The Birth of RoboDolly
The conception of the RoboDolly can be traced back to my senior year of high school. This aluminum ornament evolved from housing a few flashing lights to displaying a fully handmade LED matrix. The final product was awarded to my robotics programming mentor; it now sits on his desk and gleams at his envious co-workers.
The following will provide a step-by-step guide of the RoboDolly's creation. As this robot served primarily as a learning experience, I was involved in each aspect of its designa and creation: body, electronics, and software. The first version of the robot, which was gifted away, was completely hand-wired. It can be distinguished in the photos by its spaghetti-like wiring, use of perfboard, and black knobs. The second version was made entirely with PCBs, which greatly reduced the amount of wiring. This instructable will focus on the latter model, although photos of the original will be provided for reference.
Attached, you will find all the necessary files. They are all neatly zipped into 'RoboDolly_files.zip'. The enclosed files will be referenced hereafter by filename.
In 'parts.xlsx', you will find a list of all parts necessary for the project. Although the calculated bottom line sums to $103.80, the final cost is likely to be far higher. Most of the parts listed cannot be purchased individually; instead, they are sold by the foot or in a pack. Also, all of the suppliers mentioned are online retailers who charge shipping fees. The cost of my latest version totaled roughly $180. You may make substitutions for certain parts, but this should be done with extreme caution. For example, the power connector mounted to the rear of the robot must be constructed of plastic: a metal jack would ground the electronics against the body of the robot, which would cause the device to appear dead. (Of course, I found this out the hard way.)
Step 1: Body
Cutting the Body and Head
The body and head are constructed solely out of 4" square aluminium tubes. It is this simplicity that provides the RoboDolly with his unwavering elegance. The body is a 10" vertical length of this material, and a 5" horizontal piece comprises the head. This is shown in the rendering below. These parts were cut with a band saw and the edges were thoroughly filed. Clean edges and dull corners are especially important for a project such as this. Since the final product is going to be used as decoration in a home or office, sharp edges are likely to cause injury. Any remaining burs, on the other hand, may damage electronics in or around the robot.
Drilling the Matrix
Drilling the holes for the LED display is no simple feat. The mill I was using had a broken cross-sliding vise and therefore only allowed for a few inches of motion. I was forced to use the mill only to create a template. This template included two columns of the grid (9 X 2) with 0.4" spacing between the holes. Ideally, a template should be made out of a harder material than the piece being drilled, but a piece of scrap aluminum was enough for a single robot. After the template is created, print 'matrix_template.pdf' and carefully follow the instructions in the file. Align the paper template with the edges of the body and position it to the proper height, pulling the paper taut over the metal as you secure the pattern with packaging tape.
Clamp the metal 2-row template over the first two columns of dots, aligning painstakingly. After drilling these two rows on a drill press, move the template over a column at a time, aligning the previously drilled holes to the first line of the template. Ensure that this is as exact as possible, as mistakes will be quantified with each successive column. If you are not careful, the grid can melt into a rhombus. (An alternative method is to drill directly into the paper template without a metal guide; however, experienced machinists will note that this will allow the tip of the drill bit to shift and miss the dot.) Clean off any burs that may have developed on the inner edge of the holes, perhaps giving the inside a nice filing. I recommend practicing first on a piece of scrap metal. I was able to eliminate burs by changing the speed of the drill and the pressure I applied while boring into the metal.
The easiest way to drill holes for the components is to take a look at their datasheets. The diameter for panel mount components is often stated in these documents, and a slightly larger bit will likely suit the task. For the switches, potentiometers, and DC jack, it is best to seat these components in scrap metal before drilling into the body. For the circuit boards, it is best to lay the unpopulated boards face-down on the outside of the robot and mark the screw holes. Make sure to keep clearances in mind, and perform a dry run of installing components even before creating mounting holes.
For the head, you will need to drill a hole in the center of bottom side; the ribbon cables from the eyes will pass through this hole. In the front of the face, drill holes far larger than the 10mm LEDs. However, the LED mounting holes in the plexiglass itself should produce a tight fit. Two additional holes should be placed through both layers -- head aluminum and plexiglass -- for attaching the two materials. The LEDs will be fixed to the plexiglass with epoxy after wiring.
Two 3-in. 1" square aluminum tubes will be used to mount the head of the robot to the body. The tubes should be centered along opposite sides of the body with 0.05" of clearance from the top. Two #8 bolts will secure these tubes on either side. Another bolt on either side will connect the head to the body. Attach the wire wheel to a hand drill. While wearing protective gear, guide the wire wheel lengthwise along the robot; this will produce a uniform finish. At this point, all necessary drilling and filing should be complete. To prepare the metal body for housing electronics, clean the metal thoroughly and purge the body of all filings and aluminum dust. Loose metal will damage electronics by bridging connections.
Step 2: Electronics
The RoboDolly's electronics are comprised of three circuit boards. The following descriptions will help you understand the function of each:
1) microcontroller - This board interfaces with most of the hardware and houses the ATMega328 'brain' of the robot. It connects directly to the power supply and powers the other boards. This power can be switched on and off with the "hard" key switch.
2) switcher - The switcher serves two purposes: extends the outputs of the microcontroller and drives the LEDs. It can be thought of as a matrix driver. In my design, the columns provide power to the anodes of the LEDs and the rows are connected to the cathodes. Each LED is switched on/off by addressing the correct row and column. An image is produced by quickly scanning columns of LEDs.
3) matrix - The matrix does not have any electronics of its own, as it depends on the switcher to function. It has a single connection for each row and column.
The boards for this entire project were created in Fritzing. It is wonderful freeware for beginners. You will find the Fritzing files for each of the three boards in 'RoboDolly_files/electronics'. With these files, vector renderings (for etching) and gerber files (for automated milling) can be generated. I have included the PDF files I used to etch each of my own boards. They should be printed in actual size, and their size should be verified before etching. There are several tutorials on etching circuit boards on Instructables, so I will spare a full explanation.
The soldering procedure for these boards are somewhat strange. The best approach is to take a look at the Frtizing files and understand the connections that are involved. Some components, including ICs and resistors, need to be soldered on both sides of the board. This was done to reduce the presence of vias and reduce the overall size of the boards. Since all the components are through-hole, this isn't too difficult. I only had trouble soldering the IC socket for the ATMega328, since the top half of each pin is shielded by plastic. I would recommend using a socket for only this component, since it must be removed for the scrolling message to be reprogrammed.
For the LED matrix, follow the soldering method described below:
1) Insert each LED into its proper position, maintaining constant height for all LEDs and verifying polarity before soldering.
2) Solder the anode (back of board) and the lone pad next to it. This will secure the LED.
3) With a pair of needle-nose pliers, push the cathode through the third hole. Gently pull this lead all the way through from the front side. Solder the cathode to the row on the front.
4) Verify that each LED is soldered correctly by connecting all the columns to +5V and tying all the columns to GND.
The wiring for the eyes is fairly straightforward. Each RGB LED should be mounted on a piece of perfboard, which will be used as a breakout. The red anode should be matched with a 150-ohm resistor, and the blue and green anodes should each have a 100-ohm resistor. On the opposite side of the breakout, a 4-wire 15" ribbon cable should be connected to each anode and the common cathode. Take note of the wiring configuration, since the other end of the ribbon cable will be later connected to the microcontroller.
It is best to hold off on connecting the boards to each other until all parts of the robot are constructed. Wire lengths and clearances are difficult to determine at this stage.
Step 3: Software
An Arduino Uno is required to program the robot. Carefully remove the IC from the Arduino and replace it with the ATMega328 chip from the parts list. This new microcontroller must be pre-formatted with the Arduino Optiboot (Uno) bootloader. It is possible to buy a stock Atmel ATMega328 chip and burn the bootloader yourself, but this requires extra effort. Note that an IC with the Deumilanove bootloader will not work on the Uno, just as an Uno IC cannot be programmed on a Deumilanove. I would recommend using an Uno, as that is what I used myself.
The software for using the Arduino can be found on the company's website. After installing this application, open the file 'RoboDolly.ino' and edit the line beginning with "const char message = ". Insert your desired message between a pair of double quotes. The message can only contain capital letters and numbers; all other characters will be ignored. Do no change any pin numbers, since all of the pins in the program correspond to those on the microcontroller PCB. Upload the code to the Arduino, and transfer the IC to the microcontroller board.
Step 4: Installation
After preparing the body and the electronics, it is time to put everything together. Begin with the components that are farthest inward and would be hard to reach after adding other electronics. The power switch and the mode button should be installed first with stranded wire. The wires should trail about 3"-5" beyond the bottom of the robot for easy connection. Next, the LED matrix should be installed with similarly long ribbon cables. Use 1" #4-40 screws with spacers, which should cause the LEDs to be flush with the surface of the body. Attach the loose ends of the ribbon cable to the switcher board. Connect the potentiometers and buttons to the microcontroller board. Route the eye cables through to the microcontroller board, and connect the DC jack. Then, only after determining the topology of the wires, connect the switcher board to the microcontroller board.
It is advisable to run a thorough test of the robot's electronics at this point. Ensure that there is no contact between traces, solder joints, and wires to the body of the robot. Carefully power the robot and test all of the pieces of hardware. (Since the code is known to work correctly, functionality is not an issue.) After you have checked the electronics, mount the potentiometers and reset button. Finally, mount the microcontroller and switcher boards as shown.
Step 5: Demonstration
Participated in the