

(last updated 3/1/2007)
Leanerd consists of three major subassemblies: the control box, the mast, and the chassis. The control box contains the controller, the signal conditioning circuit board, batteries, switches, battery charger connectors, radio receiver, Bluetooth® serial device, and LCD screen. The mast provides structural support, contains a motor and pulley system which allows the robot to lean, and acts as a conduit for the wiring between the control box and chassis. The chassis provides structural support for the robot, drive train, wheels, motors, pulleys, inertial sensors and motor driver circuit boards.
The control box contains the batteries because it is important for Leanerd to have a high center of gravity. This slows the inverted pendulum dynamics and make it easier to balance (imagine balancing a broomstick on your hand - the longer the broom, the easier it is to balance). The box also contains Leanerd's control electronics (Leanerd's "brain"). Even though all of the sensors are located in the chassis, I chose to put the microcontroller and signal conditioning electronics in the control box so they are close to the user interface components and to minimize the size of the chassis.
The chassis contains the motor drivers in an attempt to reduce noise caused by the relatively high power , high frequency signals between the drivers and the motors. The chassis also contains the inertial sensors. It helps to have the inertial sensors as close to the rotational axes as possible.
The main disadvantage of this arrangement is that the sensors are a fair distance from the controller and may be susceptible to noise. The signal conditioning board, motor driver boards, and wiring schemes are designed to reduce noise on the sensor signals. The details of these designs can be found in the Electronics section.
Leanerd's structure is made from aluminum and aircraft grade plywood. The "control box" and "chassis" are made from plywood and the vertical "mast" is made from aluminum. I chose these materials because they are strong, lightweight, and easy to work with using the limited shop tools and space I have available (since we do not have a garage, Leanerd was built in the spare bedroom of our apartment). The combination of wood and plywood also looks very nice when finished and kind of remind me of the days when products were packaged in beautifully finished wooden housings rather than the modern injection molded packaging used today.
The aluminum parts are made from a 6063-T52 extrusion from McMaster-Carr. A friend who owns a milling machine helped me cut some of the features in the metal parts.
The plywood is 5/32" thick Okume (or Gaboon) plywood from Aircraft Spruce. This material is very strong and lightweight and is commonly used in aircraft and marine structures. It is also looks very nice when finished. One disadvantage I found was that the 5/32" plywood only has one face veneer on each side which makes it very anisotropic. When designing the wooden structure, I had to be careful to orient the grain of the veneers to optimize strength. Also, the face veneers are very grainy which makes it difficult to drill clean holes, although it gets easier after an epoxy coating is applied.
I designed Leanerd using a computer aided modeling program. I had originally intended to use the modeling program to make templates which I could use to cut out all of the wood parts by hand. As the design progressed I realized that the parts were going to be more difficult to cut out than I had originally thought. I eventually decided that it would be worth the money to have the parts professionally cut rather than trying to cut the parts by hand or simplifying, and possibly weakening, the design. I ended up having all of the wooden parts laser cut by RMS Laser. The parts were made quickly, the price was very reasonable and the quality of the parts was far superior to what I could have done with hand saws. Another advantage of laser cutting is that the same machine can be used to professionally engrave labels or locating features. I made the 2-D patterns for all of the parts in CAD. In order to account for the width of the laser (~.008"), all of the lines on the patterns had to be offset (.004") to prevent the parts from ending up too small. The image below shows the pattern I sent to RMS Laser. The red lines are cut all the way through and the green lines are engraved. All of Leanerd's plywood parts fit on a single 2' x 4' sheet of plywood. As I mentioned above, the orientation of the grain had to be considered when laying out the patterns.

Laser cutting pattern for Leanerd's plywood parts.
It only took about one and a half weeks from the time I shipped the plywood until I received a box of parts. The accuracy of the laser-cut parts is very good. Most of the parts fit together snuggly and I could pretty much "snap" the whole assembly together. One of the only disadvantage of laser cutting is that it chars the edges of the wood. The black char is only a few thousandths of an inch thick and sands off fairly easily. If I was to make these parts again, I would add ~0.01" onto the ends of all of the tabs so I could more easily sand off the charred edge. I assembled many of the parts with wooden dowels to add strength. I used Cyanoacrylate Ester (CA) to bond the assembly. The picture below shows the parts right after I received them and put them together without adhesive (please ignore my wife's girly, purple bedding - it's the only flaw in my otherwise manly work area).

Freshly cut plywood parts

Parts are glued with CA and most of the char sanded off.
All of the wooden parts were painted with two or three layers of System Three Clear Coat Laminating Epoxy and three coats of System Three Spar Urethane Varnish. Since the Okume plywood is very grainy, it's strength can be enhanced significantly with an epoxy finish. The wood soaks up the relatively thin epoxy which helps bind the fibers together, adding strength and durability. The spar varnish adds a tough, UV-resistant coating to the epoxy. If exposed to ultra-violet light for long durations, epoxy will degrade and become discolored. The spar varnish protects the epoxy from UV exposure and ensures a long lasting finish. The combination of epoxy and spar varnish has become a common method for protecting high quality wooden boats. After each coating was applied the parts were wet sanded and buffed with steel wool for a beautiful satin finish. One problem I found was that in areas where I used a lot of CA to bond the joints, the CA saturated wood does not quite match the epoxy coated wood. It is not very obvious, but it may have been worth the extra time to bond the parts with epoxy instead of CA. The image below shows pieces of Leanerd's chassis and control box between layers of paint.

Freshly painted chassis and control box.
The chassis assembly consists of a wooden structure, two wheels with shafts and bearings, two motors, drive pulleys, and mounting features for the inertial sensors, angle sensor, and motor drive electronics.

CAD rendering of Leanerd's chassis without the cover.
The chassis structure was designed to be strong and lightweight. The weight is important because the base of the robot needs to be able to move quickly to stay balanced. I also worked hard to make the chassis narrow and to minimize the rotational inertia around the "leaning" axis. This is important to allow the chassis to rotate quickly to adapt to uneven terrain. In order to minimize weight and rotating inertia, I moved the two wheel motors as close to the center of the robot as I could. I also mounted the "leaning" motor to the mast instead of trying to package it inside the chassis. The wooden structure features interlocking joints to improve the strength. The structure also depends on the cover for much of it's strength and rigidity. The image below shows Leanerd's chassis structure after bonding.
Leanerd's chassis prior to painting. Note the interlocking joints, threaded inserts for the cover, and the use of fiberglass washers and wooden dowels to reinforce the bearing bores and attachment bosses.
Leanerd uses slightly modified wheels from a Xootr push scooter. These are high quality wheels made from aluminum and polyurethane. They are somewhat expensive, but I was also able to re-use the bearings that come with the wheels. Since scooter wheels are designed to roll freely rather than be driven by a motor, I had to modify the wheels for this application. To make it easy to attach the wheels to the drive shafts, I removed the two bearings that come with each wheel and bonded a shaft coupling into the bearing bores. After removing the bearings, I used a Dremel tool to grind down the locating shoulder between the two bearings. I also cut a notch on one side of the wheel hub for the shaft coupling set screw. Since the inside diameter of the bearing bore is 1.125" and the outside diameter of the shaft coupling is ~1.00", I located and centered the shaft coupling in the bearing bore using three 0.0625 dowel pins. The OD of the shaft coupling is not very accurate so I had to use a few layers of 0.001" Mylar tape as a shim to make everything to fit tight. Once the shaft couplings were properly located in the bearing bores, I tacked them in place with a few drops of J.B. Weld adhesive. Once the adhesive dried, I removed the dowel pins and the Mylar tape and filled the gap with J.B. Weld. Once complete, the wheels can be easily attached to the drive shafts with the set screw. As far as I can tell, they are perfectly centered and straight.
The drive shafts for the wheels and the mast joint are all 0.5" diameter, ceramic-coated aluminum shafts from McMaster-Carr. I chose to use aluminum shafts to reduce the weight and cost compared to steel shafts. They are also much easier to cut to length than steel shafts. A shaft collar is used on the opposite end from the wheel to keep the shafts from moving axially in the bearings. The only problem with the aluminum shafts is that the set screw deforms the aluminum slightly making it difficult to remove from the bearings.
I reused the bearings from the scooter wheels. I saturated the holes in the wooden structure with thin CA and sanded them lightly until the bearings fit tight. One of the reasons I selected the 5/32" plywood thickness is that two pieces of plywood laminated together are the same width as the bearings. I bonded large fiberglass washers to the wood structure on one side of each bearing to locate the bearings axially.
The images below show the wheels during modification and fully assembled.

The shaft coupling located inside the bearing bores. Three dowel pins are used to locate and center the coupling. The green Mylar tape is used as a shim. On the right side, you can see the J.B. Weld that was used to tack the coupling in place. The shaft coupling set screw is covered with wax to prevent adhesive from bonding it in place.

The shaft coupling centered with the three dowel pins.

An assembled wheel. It looks like it was made for this!
For the two wheels, Leanerd uses two Maxon gear motors with encoders. I purchased both motors as a pair on Ebay. Maxon motors are very high quality and are powerful and efficient. The gear ratio is fairly low on these motors, so I also have a set of pulleys to provide more reduction. This is actually helpful because it moves the motors away from the wheel centerline and allows me to reduce the width of the chassis. On the other hand, I think a larger reduction would be better. My motor drivers are limited to 3A and I think more torque and less speed would improve Leanerd's performance. These motors are installed with a fairly large inductor in series. The reason for this is described in the Electronics section.

A wheel drive motor with mount, pulley and inductor. This is a Maxon precision motor with planetary gearhead and 500 count encoder.
The mast "lean" motor is a Pittman "Lo-Cog" gear motor also purchased on Ebay. For this motor I do not need an encoder, but I did add a potentiometer to measure the angle of the mast with respect to the chassis. With the final version of the software this sensor may not be necessary, but I think it will be very helpful during debugging and software development.

The mast motor is mounted on the mast to reduce the size, weight, and inertia of the chassis.
The wheel drive pulleys and belts are 3mm pitch, 9mm width GT series timing belts and pulleys purchased from Stock Drive Products. I used polycarbonate pulleys to further reduce the weight and inertia of the chassis assembly. The mast pulleys and belt are 5mm pitch, 9mm width GT series units. Since the larger mast pulley also acts as the mast attachment and bears a significant amount of weight I use aluminum pulleys for the mast. The larger pulley is bonded and pinned to the chassis structure. The large pulley and a shaft collar are used to attach the mast to the chassis. The mast pivots on a pair of Teflon bushings pressed into the aluminum walls of the mast.
The chassis design also includes a mounting feature for the inertial sensors that are used to sense Leanerd's attitude in the forward/backward direction. The sensors are described in more detail in the Sensors section. The sensor assembly is attached to the chassis as close as possible to the axis of rotation. This minimizes the affect of translational motion on the accelerometer output. The image below shows the inertial sensors attached to the chassis.
One of the inertial sensor assemblies attached to the chassis.
The chassis also includes mounting features for the three motor driver circuit boards. The circuit boards themselves are described in the Electronics section. The driver circuit boards are mounted to aluminum plates that are bonded to the inside of the chassis. The aluminum plates act as heat sinks and have fins attached that protrude to the outside of the chassis. The fins are modified CPU heat sinks that are bonded to the aluminum plates with thermally conductive adhesive pads. There will not be a lot of air flow in the area where the fins protrude, but the drivers should not produce a lot of heat so the heat sinks should be adequate. The following pictures show an internal view of two drivers attached to a heat sink and an external view of the heat sink fins. Note that the heat sink with the longer fins has two drivers attached (one wheel and the mast), while the heat sink with short fins has only one driver for one wheel. One of the heat sinks has to have short fins to clear the mast as it rotates.
Two motor drivers attached to a heat sink. Note the thermal interface material between the H-bridge and the aluminum plate. These drivers are for one wheel motor and the mast motor. There is a single wheel driver on the other heat sink.
The heat sink fins protrude into the center of the chassis. While this hides them from view, it also reduces the air flow around the fins. The heat sink with long fins has two drivers attached, while the smaller heat sink has only one.
A potentiometer is included in the chassis/mast interface to measure the angle between the mast and chassis. Although this sensor may not be required with the final version of the control software, it allows me to simply control the mast angle while debugging the software and selecting the gains. The angle sensor consists of a 50 kΩ potentiometer and a linkage attached to the mast. The following images show the angle sensor assembly in CAD and as installed in Leanerd.

The potentiometer and linkage provide a signal proportional to the angle between the mast and chassis.
The mast/chassis angle sensor installed.

The fully assembled chassis without the cover. Once the wiring is installed, there is not much extra space.

The fully assembled chassis - very nice!
The "mast" is the aluminum structure that connects the control box and the chassis. The mast is attached to the chassis with a pivoting joint that allows the robot to lean into the turns and stay vertical when traveling over uneven terrain. Since it interfaces with the chassis, many of the mast design features have been described above including the mast material, motor and pulleys, chassis attachment, and the mast/chassis angle sensor assembly.
The mast also has an inertial sensor assembly mounted to it. These sensors are used to measure Leanerd's attitude in the side-to-side direction. The control system will use feedback from these sensors to enable Leanerd to lean into turns and remain upright when traveling over uneven surfaces. The sensors are described in more detail in the Sensors section.

The inertial sensors attached to the base of Leanerd's mast sense how the mast is leaning side-to-side.
In addition to the features described above, the mast acts as a conduit for the large number of wires that carry power and sensor signals between the control box and the chassis.
The control box attaches to the top of the mast and serves as Leanerd's "head". The control box is made from plywood and contains the batteries, microcontroller, signal conditioning board, radio components, and user interface components. The images below show the basic layout of the control box.

General layout of control box interior. Note the use of Velcro to mount the batteries, receiver and buzzer.

Control panel layout.
The control box also has a "mode" button located on the top cover. This button will be used to select between various operating modes (the operating modes are described in more detail in the Software section). Since this is likely the only button that will need to be pressed while Leanerd is balancing, I located it on top of the control box, above the mast attachment, to prevent button presses from forcing Leanerd off balance.

The completed control box. Note the mode button on top.
The control box is fully assembled tested. I don't have a picture yet, but I've added a foam bumper underneath the control box for protection when Leanerd falls over during testing.
Please email comments to troy@troys-toys.net (please use this link or type Leanerd Comments in the comment section of your email).