Week 06. Electronics design

Goal

This week the goal is to redraw the echo hello-world board and adding at least two components to it: An LED and a button.

Last week MIT Lecture review

This has been the 5th week in a row that the script does not pick me, so I have 76,26% chances of being picked this time according to the calculations I've been doing last weeks. As the Fab Academy scales I think that this picking method will need evolution. If it was a way to evaluate people in the way of pass/fail I might consider it correct. But it is not, it is an assignments showcase. So IMO it should be a opt-in list. If you have something to showcase, either a success, a failure, or something in between, you opt-in. This way we would save more time by avoiding watching 404 not found, and also help instructors to track and identify which students are not opting in for the showcase as they would need more help. His week I am going to count how many students really showcased something from all the students that were picked. Having said that, bringing this idea to practice might be difficult.

So here we are, electronics again. Now we have to modify a design and making our own board, so this week, I'm going to call...

Kokopelli, my friend!

Long time no see! I am going to use Kokopelli as a tool to modify the board. Most of the people here in Barcelona are using Eagle so I will use this and we will compare later. My intention is to explore the design capabilities of Kokopelli.

hello.ftdi.44.cad is a 3800 lines of code file created by Neil that has an embedded library of components that can be added to the design. The elements I would need to add to the echo hello-world are LEDs, resistors and a button. From the schematics of the original board you can see that there are 4 free pins in the microcontroller: PB2, PA7, PA2 and PA3. Actually, the definition of the board starts at line 3591 (from where you have to edit the file). Here you are a micro-tutorial of what you need to do:

THE 5 MINUTES CRASH COURSE OF KOKOPELLI:

Forget the one hour video tutorial of Eagle. You follow my tutorial and in 5 minutes you will be making rockets to Mars. Ready, Set, Go!

What you basically need to do to add a component in Kokopelli is searching in the code for the definition of a matching class. For instance if you want to add a button, you guess... look for 'button' in the code and you will see a class named:

class button_6mm(part)

That is your boy. What you will do next is to define an instance of this button in the code (give it an unique name like PUSHBUTTON):

PUSHBUTTON = button_6mm('Nice\nButton');

\n is used to break line in the name . You won't see anything on screen yet. Having done this you have to define the parameters of position and rotation of the instance created:

pcb=PUSHBUTTON.add(pcb,x,y,z,angle=0)
pcb=PUSHBUTTON.add(pcb,x,y,z,0)        #Alternative format for angle
 
It should appear on screen now. Where x, y z are the coordinates of the component and angle is the angle of the component (counterclockwise positive). The nice thing of Kokopelli is that you can set the coordinates relative to other components. Coordinates can be like this:

R2.x                  #Coordinate x of the center of R2 resistor
LED1.pad[2].y         #Coordinate y of the pad number 2 of LED1
-0.3                  #Absolute coordinate
IC1.pad[5].x+.08      #Distance from a given component or pad

Now you only need tho define wires that connect the pads of your component to other components or wires of the board. Every component has pins defined by a name in the class. For instance the button_6mm class defines pins left 1, right 1, right 2 and left 2 that correspond to numbers 1,2,3 and 4 (first pin defined is number 1 and so on). Lets say you want to connect pad right 1 from the button (pin 2 because it was the second defined in the class), to pad PB2 (pin 5 in the class definition) in the IC1:

pcb = wire(pcb,w,
PUSHBUTTON.pad[2],   #Starting point from pad number 2 of PUSHBUTTON
point(x,y,z),        #Optional intermediate point
IC1.pad[5])          #End point: Pad number 5 of IC1

Where w is the width parameter of the wires (which is defined at the beginning of the board definition zone). You can have as many intermediate points as you want.

Wires never go oblique in Kopopelli, they will only go in X and Y direction and the first movement will always be horizontal. That means that if you place a wire from A to B it will go like this:

              B       A--->---
      |               |    #This is an awesome ASCII drawing
A-->---               B                   


If you want to change it, reverse the order of the points. So from B to A it will go like this:

---<---B
|     
A


That's it! The whole process is not that as hard as it might look like. It takes more time to explain it than actually doing it.
The finished design
Original board (LEFT) and wrong modified board (RIGHT).

WARNING! The image above contains a error which has been corrected in the files. I keep the wrong image here for documentation purposes. Notice in LED1 and LED2 there is a wire connecting anode and cathode. This wire should not be there so it has been removed in the files.

Cutting the board with the Roland GX-24

Since today there were a lot of people queuing for using the Roland Modela, I decided to give the Vinyl cutter a try. It was a complete mess. I still don't know whether this circuit is so small that it is not suitable for vinyl cutting or I had bad settings. One thing I noticed is that the vinyl cutter was dragging the copper. As if it was cutting with the side of the blade, instead of the sharp side. In the image below, the thing to the left that looks like a modern sculpture of a rabbit in a rodeo is actually the board (what is left, I mean).

Yet another Miserable Failure

Milling the board

These are the exported traces from Kokopelli at 500 dpi (about 20 pixels/mm). I later added the text HELLO! and 2013 in Gimp. Also it is said here in Barcelona -and I proceeded that way- that you have to add the white border to the mill traces in order have it cutout later correctly. I have to check it since this looks like an urban legend to me: Everybody says you need to add this white border to the traces layer, but when you ask why, nobody knows. Fab modules do not remember what you have done before you cut, it should not matter if the image you milled before was with or without the white border. To obtain this image in kokopelli uncomment and export the output = "traces and exterior". It will have the white border already.

WARNING! In week 08 I noticed that the image below contains an error which has been now corrected in the Download Section. I keep the wrong image here for documentation purposes. Notice in LED1 and LED2 there is a wire connecting anode and cathode. This wire should not be there so it has been removed in the files.
Traces
Traces and Exterior. WARNING DO NOT USE THIS IMAGE. CONTAINS AN ERROR. USE THE ONE IN THE DOWNLOAD SECTION.

And this is the cutout image. In Kokopelly you will obtain the inverse of this image. In order to obtain this image in kokopelli you have to uncomment and export the output = "interior". If you uncomment and export output = "exterior" you will obtain the inverse o this image. I show the right one here so that you remember the fact that this is a white image with a black border. Look at the center of this image for 30 seconds:

Exterior

Even though I inverted the image so that it was a white image with a black border, I still don't know why, but after I milled the traces and I watched the result, it was so good and I was so excited that I loaded the black image with white border and sent it to cut the board. As a result the board has been ruined and I have to repeat it again. White image, black border. A white image with a black border. You need a white image with a black border. White image, black border. White image, black border. Focus Francisco, focus.

Ruined board

On Wednesday afternoon, after the lecture, I milled the board again. This time I double checked the cutting image and it was cut where it had to be. But one thing I noticed is that both milling and cutting where not very precise. I could be that mill bit lost the sharpness, but I doubt it taking into account what we mill here. My best guess is that the end of the bit was broken due to an accidental drop, but it is so tiny that I cannot check it out. I used the end of a dry sponge to carefully rub the surface and remove all of these imperfections. As you can see also, the cutout is quite rough and I used a sharp knife to clean it.

Final board

Stuffing the board

Reusing components

This week I have been desoldering components from electronics waste. I do this because we are surrounded by a lot of devices that we trash (actually I keep a lot of them hidden secretly in my basement so that my wife do not trash them) and are mines of electronics components. Components are cheap I know. But if you don't have a big production you are not ordering one 0.001 euro 10k ohm resistor, paying ten euros for shipping and waiting one week for delivery, are you? My goal is try to obtain as many reused components I can for this board. When reusing it is vital to have a multimeter that can measure capacitors, diodes, etc.. I didn't see any in the Lab (I strongly recommend to buy at least one if they don't have) so I used one I have at home. It was of great help one ebook that John Rees gave me. I obtained for my board, all the capacitors, resistors, LED and crystal. Actually I could not use the LEDs because they had a square form factor that did not fit in my board design. I could not manage desolder the connectors and the ATtiny44. I should use another technique, like a hot air gun.

Desoldering components for reuse

Stuffing

Before you solder reused components in your board please make sure that you removed all the excess of solder and pads that may be attached to the component legs. You can do that by re-heating the component legs and using a wet sponge to clean the soldering iron. This time I could stuff the board quite faster that the first time, and I am becoming more confident on this. Holding the board with the helping hands proved to be worse that just laying it on the table.

Final board
Finished board. CAUTION: In week 08 I noticed that LEDs were conected the wrong way. Notice the green mark in the LEDs, it indicates the cathode, but I put the mark in the anode side. SO DO NOT FOLLOW THIS IMAGE TO PLACE AND SOLDER YOUR LEDs.

What I learned

Lessons learned

Download files

You can download all the files related to this week here.