Monday, January 7, 2013

Making Arduino Shields in the classroom

Last month I challenged my grade 12 Computer Technology class to make traffic light simulator Arduino Shields. We used Fritzing to lay out the traces and Inkscape to make them thicker. We used a laser printout as a mask to etch the boards and finally the students put their skills to work assembling and programming the shields.

FRITZING
Fritzing.org is the source for a free neat circuit board layout utility. You can also use Fritzing to make schematics and bread-board layouts. I have tried to use Fritzing to do the bread-board, schematic and PCB all at the same time but the process became too complex and frustrating. Its better to use Fritzing to do one thing at a time. If you want to do a PCB, start there. As a teacher I like to use Fritzing to do bread-board layouts that my students can follow. I will lay out the circuit and then take a screen shot to generate the diagram.

When you pull an Arduino into the PCB in Fritzing you see two rows of points that match the i/o pin configuration. At this point you need to remember that the headers will be inserted from below and soldered on this side, the PCB trace side of your project. Components like resistors can be inserted on the underside as well but components like LEDs need to be seen and other components like transistors are too tall. These components need to be soldered onto the PCB trace side of the shield (see photos below). This is somewhat irregular but students who had minimal soldering practice were able to do this without any problems. I buy SH-2 snappable headers. You get 40 pins for 69 cents. Clearly you need to have a good understanding of the circuit before you begin. My students completed several labs involving LEDs and push buttons before starting this assignment.

Here is a dual H bridge shield layout in Fritzing.

Export the file as an 'etchable' SVG file. We use Inkscape to increase the trace width to 4 px and the donuts to 3 px. Group and flip horizontally. Print it out using a laser printer.


ETCHING
Next a piece of copper clad board is cut to size and the edges sanded. Safety glasses and a dust mask should be employed. The board is cleaned with acetone then buffed with an abrasive nylon scouring pad to get it as clean and shiny as possible. Real elbow grease should be employed. Finally the board is cleaned with rubbing alcohol. We use Nitrile gloves to protect our skin from the chemicals.

The printout is cut to fit the board and then arranged on top of the copper clad board toner down. The arrangement is passed through a common office laminator set to high at least 20 times in a row. After the second pass the paper becomes stuck to the copper and will not move. After 5 passes you will need pliers or tweezers to handle the hot board. This process fuses the toner into the copper. Let the board cool for 5 minutes and then place it in a bowl of water. After 5 to 10 minutes you can remove a thick layer of the paper by rolling your thumb over the surface. Check first to see if more soaking is indicated by carefully working on a corner. (Thats why I add some text to one corner of the board.) With the first layer of paper gone another 5 to 10 minute soak and you will be able to 'roll' the rest of the paper off. Let your board dry over-night.

We use hot Ammonium Persulphate etchant in a bubble tank to do the etching. The hotter the better but watch out for the fumes. A fume hood or exhaust hood is mandatory because the ammonia gas can burn upper respiratory tissue. Nitrile gloves and safety glasses should be employed. A lab coat will keep your Maple Leafs Hockey Jersey clean. For ease of handling we drill a small hole in one corner of the board and hang it from a popsickle stick using some string. When the board is done etching wash it with water, dry it and then wash the toner off with more acetone. Buff up the copper using the scouring pad just before soldering your components in place.

Why use Ammonium Persulphate? The alternative is Ferric Chloride. This liquid is black and stains anything it touches. Even one drop in a stainless steal sink will discolour the sink almost instantly. When the Ammonium Persulphate is exhausted and has turned dark blue you are left with a strong solution of Copper Sulphate which can be used to grow Copper Sulphate crystals by evaporation. Either chemical should go to a hazardous waste depot when you are done with it.

ASSEMBLY

Top view: Two set of lights (RYG) and one Walk-Dont Walk (RG) with a PB to call for a walk signal. Notice how the LEDs and PB are soldered to the copper trace side of the board.



Bottom view:


All the resistors in the traffic light simulator tie in to ground so we used a 330 ohm SIP Common Bus package bent at an angle to avoid hitting the Atmel chip on the Arduino. 

Once the package is ready to test insert shield onto the Arduino and start by rewriting Blink to test each LED independently. If you get a USB bus overload warning on your computer you need to unplug the Arduino immediately and test your circuit for shorts. We found it was best to leave the shield in place on the Arduino until the project is finished and marked.

No comments:

Post a Comment