Step 1: Design
In my original design (show in the images above), all four legs in each segment were controlled by one highly geared down motor. I decided to ditch this idea for a few reasons. Firstly, I could not find the type of spur gear needed to mesh the legs together. Also, with all the legs linked together, the robot would have a hard time gripping uneven surfaces. Finally, I decided that the robot would be much easier to build if the motors drove the legs directly.
The other significant change I made from my original design was the way the spine worked. In my model, I used a rack and pinion type gearing system to extend and contract the spine. However, I could not find the necessary parts to build such a system, so I ended up using a threaded rod coupled to a motor to actuate the spine.
Step 2: Tools and Materials
- Arduino Uno (any will work)
- 3X L298HN - these can be gotten for free as samples from ST
- 2.5" x 3.125" Perf Board
- Terminal Strips
- 22AWG Solid core wire
- 3X Aluminum heatsinks (I cut in half an old northbridge heatsink)
- Thermal paste
- 9V Battery (to power the Arduino)
- Approximately 12V LiPo or Li-ion battery (I modified a laptop battery, so I did not even need to buy a charger)
- 5V regulator (To regulate power to the motor controller logic circutry)
- 9V Battery clip
- Barrel connector (Must fit the Arduino power connector)
- 4X 7 RPM Gear Motor (These power two legs each)
- 4X Thin linear trim pots (Rotation sensors for the legs)
- DPDT Toggle switch (Power switch)
- SPDT Slide switch (User input)
- 2X Mini Snap Action Switch (Limit switch)
- 3 10K resistors (Pull down)
- Signal Wire (Old IDE cables work really well, and let you organize your wires easily)
- Heat Shrink Tubing
- 12' 3/4" x 1/8" Aluminum Bar (These come in 6' lengths at my local hardware store)
- 6" x 3" acrylic sheet (Electronics are mounted to this)
- 6x Standoffs with screws
- 1' Threaded rod and corresponding 1/2" nut
- 2X 1' x 3/16" steel rod
- 1' x 3/16" I.D. Brass Tubing
- 4X 5mm Aluminum Universal Mounting Hub
- Pack of large T Pins
- 4X 3/32 screws (to mount the motors)
- An assortment of 4/40 screws and nuts
- Assorted hex screws and nuts
- 4X Bic pens (I used the plastic shafts to fix the pots on the legs in place)
- 4X Locknuts
- 5 Minute epoxy
- Sheet metal scraps (For spacing and mounting things. Bits of Meccano work well)
- Stick on Velcro (For holding on the batteries)
- Hard Drive reading head bearing
- 3/4" Plastic angle
- Electrical Tape
- Zip Ties
- Electric Drill / Drill press (As well as a lot of bits)
- Soldering Iron
- Allen wrench
- Assorted screwdrivers
- Wire Strippers
- C Clamp (These can be used to make nice 90 degree bends in the aluminum)
- Bench PSU
Step 3: Motor Controller
When finished, this motor controller should be able to bidirectionally control 4 DC motors at up to 2A each (probably 2A continuously, because of the size of the heatsinks). As you may notice, this leaves me one motor short. My original design used a servo to actuate the spine, but I had to change my design to using a DC motor. To power it, I wired my third L298 chip to a molex connector (so I can disconnect the motor) and soldered on wires for all the connections. It does not look as pretty as my controller on a circuit board, but it works.
Step 4: Power
I wanted to avoid having to buy an expensive LiPo/Li-Ion battery pack and charger, so I searched through my piles of electronic junk for a device with an appropriate battery. I settled on the battery from a 12" iBook laptop. The battery was 10.8V and 50Wh, but it was a little large and heavy for my needs. To fix this, I tore it open and had a look at the internals. I found that the battery was comprised of six 3.7 volt cells. These cells were organized in pairs of two wired in paralleled. The three pairs were then wired in a series, making a total 11.1V. To shrink the pack but keep the voltage, I simply removed one cell from each pair. The final battery pack had only half the capacity and half the discharge rate of the original (now only 2C), but the full voltage. I then wrapped the cells together with electrical tape so they would hold their shape, and soldered a quick-disconnect connector to the battery leads.
Step 5: Power, Cont.
Step 6: Legs
To make the legs, I cut four 8.5" lengths of the aluminum bar. I marked the segments 2.5" from each end. At those marks, I bent the aluminum at a right angle, to make a "U" shape. If you do not have a bending brace (which I don't) you can get a clean bend by clamping the aluminum with a c-clamp right on the mark, and pushing the unclamped end against a solid surface, like a work bench.
Step 7: Feet
Step 8: Motor Hubs
Step 9: Building the Frame
Next, I made a matching plate for the opposite side of the leg assembly. This plate holds the legs straight while they turn. I drilled holes through the legs, opposite to the motor hubs. Then I bolted the legs through the plate with washers and a locknut to hold them in place and let them spin freely on the bolt.
Step 10: Frame, Cont.
I bent the aluminum at right angles using a c-clamp, and drilled four holes in each end. I drilled matching holes in the motor plate and the opposite plate in each leg assembly, and then bolted everything together with 4/40 screws.
Once both segments of the robot were built and structurally sound, I could test their tree-gripping ability by hooking the motors up directly to a battery. Fortunately, they worked quite well, or I would have had nothing else to share.
Step 11: Electronics Platform
Step 12: Rotation Sensors
While designing and building the leg assemblies, I neglected to build in an easy way to connect the potentiometers to the legs. In the solution I came up with, one side of the pot is fixed to the inside of the leg by the protruding screw heads. The other side of the pot is fixed to the locknut on the end of the bolt that holds the leg in place. When the leg turns, the side of the pot fixed to the leg turns, while the side fixed to the locknut is held in place.
To interface the pots and the legs, I first sanded the plastic side of the pots flat. I took four squares of acrylic, approximately 3/4" on each side, and drilled four holes in each, corresponding to the four screw heads in each leg. Then I glued a potentiometer to the center of each acrylic square.
To fix the opposite side of the pots to the locknut I had to get even more creative. First, I glued metal standoffs scavenged from a PowerMac G5 case to the metal side of the pots. Then I glued the plastic shaft from a Bic pen to the metal side of the pots. The other ends of each pen were cut to fit within the metal legs. Then the pen shaft was forced over the square locknut and epoxied to it.
Step 13: Backbone Motor
To mount the motor to the robot, I bent a short length of aluminum to an "L" shape. I drilled a large hole out of the center of one of the faces (for the motor shaft and gear) and two small holes in both faces for bolting the motor to the metal and bolting the metal to the robot. I drilled corresponding holes into the back of one end of the segment of the robot without the electronics, so that the motor was positioned between the two legs.
Step 14: Mounting the Spine
With only the coupling, the threaded shaft still can not bear any load, because it would just pull off the motor. To support load, I made a bearing for the shaft out of an old hard drive read/write head bearing. I drilled out the center so that the threaded rod could pass through it. I then fed the rod through it, and fastened a nut on each side of the bearing, to hold the threaded rod in place. I then bolted the bearing down to the back of the robot's frame.
Step 15: Mounting the Spine, Cont.
Step 16: Linear Slides
First, I added a pair of aluminum bars to the segment of the robot without the electronics, to match the pair on the other segment. To mount the steel rods and the brass tubing to these, I made a clamp system similar to the clamps holding the feet in place. To do this for the large diameter rods, I first clamped two 3/4" squares of aluminum together. I then drilled a 1/8" hole down the intersection of the squares, and then took them apart. I drilled two holes in each square, and corresponding holes in each supporting arm. Then I repeated the process four times. To get the slides perfectly parallel to the threaded rod, I had to bend up the supporting arms on the non-electronics segment of the robot.
Step 17: Wiring the Robot
Because this robot is autonomous, I needed a method for controlling the robot's actions so that I could get it to release from the tree. For this, I just used a simple slide switch connected to a digital input on the Arduino
Next, I wired the digital output pins on the Arduino to the inputs on the motor controller. First, I connected all the motor enabling pins on the motor controller to eachother. The rest of the wiring went as follows:
- Enable Motors
- Motor 4 Input 2
- Motor 4 Input 1
- Motor 3 Input 2
- Motor 3 Input 1
- Control Switch
- Motor 2 Input 2
- Motor 2 Input 1
- Motor 1 Input 2
- Motor 1 Input 1
- Motor 5 Input 2
- Motor 5 Input 1
I collected the umbilical cord of wires running between the two segments of the robot into a bundle, and fastened them together with zip ties and electrical tape, to keep them organized.
Step 18: Limit Switches
The spine has two limit switches. One is pressed in when the two segments of the robot are pulled close together, and the other becomes un-pressed when the threaded rod retracts past it. The latter is a switch like this glued parrallel to the threaded rod, on the segment of the robot with the electronics. When the spine retracts, it pushes down the lever of the switch, and when it retracts, the switch opens.
The second limit switch is a push button switch that requires very little force to actuate. I mounted it on a strip of aluminum from the front of the electronics segment.
Both the switches are connected to the same 5V and ground lines as the potentiometers on the legs, and their signals go to inputs A4 and A5, which the Arduino is set to read as digital inputs rather than analog.
Step 19: Battery Holders
The perfect place for mounting the 9V battery was right above the Arduino, so I created a mounting system for it out of some scrap metal. A piece of metal (with an electrical tape insulated bottom) screws on above the Arduino through one of the standoffs. On top of the metal is a bit of stick-on velcro. A piece of metal bent into a "U" shape clips onto the 9V battery, and then sticks to the velcro above the Arduino board, holding the battery in place.
To hold the larger battery pack, I cut two brackets out of some soft plastic angle bar I had lying around. These brackets screw into the arms that hold the linear slides. The battery stays in mostly by friction, but a bit of velcro on one side helps to stop it from slipping out.
Step 20: Programming
Opening the legs is very simple. The legs turn outwards from the tree until their rotation sensors reach a point set in the program. Then power is cut off to the motors. Closing the legs on the tree, however, is a little bit more complex. Since trees vary in diameter, the legs need to be able to grip a wide variety of diameters without reprogramming the robot for each size. To figure out when to cut off power to the motors, the controller first calculates the speed at which the legs are moving towards the tree. It does this by sampling the position of the legs' potentiometers every .05 seconds. It subtracts the previous value of the potentiometer from the current value to find the distance traveled by the legs over the time period. When the distance travels becomes close to zero (I used 1 in my program), it means that the legs have gripped into the tree and are beginning to slow down. Then the controller cuts of power to the motors, to prevent them from stalling out, or damaging themselves, the motor controller or the gearboxes.
The last piece to the programming puzzle is the method of controlling the robot's actions. If you look at the above movement cycle, you will notice that the robot is gripping the tree at all times. This makes it difficult to remove the robot, so I programmed the control switch to manually control the behavior of the robot. While the switch is off (circuit open), the robot keeps its legs open. Once the switch is turned on, the robot begins its climbing cycle. To remove the robot from the tree, the switch is turned back to the off position, and both sets of legs release.
If you liked this project, please vote for me in the Epilog contest! What would I do with a laser cutter? Well, I could use it to make parts for even more robots and machines (after I finished etching every electronic device I own, of course). Not having to manually cut, file, bend, and grind every component of my robots would let me significantly increase the complexity and variety of what I can build, and would also significantly cut down on construction time, so that I would be able to build even more interesting things.
This project was featured on Hack A Day! Thanks for the great article.