
(last updated 4/20/2007)
Leanerd's primary electronic components and their locations are shown in the image below. The interface board and motor driver boards are custom boards. These boards were designed using the free version of CadSoft's Eagle software for schematic capture and layout. The boards were manufactured by Olimex. This company has very reasonable prices for two sided boards with solder mask and silk screen. The main advantage using Olimex is that they charge for each "panel" rather than each board. As long as they all fit on one panel, four small boards are the same price as one larger board. The only disadvantage using Olimex is that they are located in Bulgaria and it can take a while for the boards to be shipped to the U.S. Leanerd's boards took four weeks to ship.

Leanerd's electronics

Custom boards as delivered from Olimex.
The control box contains the DSP board, interface board, Bluetooth serial module, LCD screen, batteries and radio receiver. These components are located in the control box to provide easy access for the user, minimize the size of the chassis, and add weight to the top of the robot.
The chassis contains the sensors and motor drivers. The inertial sensors are located in the chassis to reduce the effect of translational acceleration on the sensor outputs. The closer these sensors are to the axis of rotation, the more accurate the outputs will be. The motor drivers are located in the chassis to reduce electrical noise caused by the high frequency, high power PWM signal between the motor drivers and the motors. These boards should be as close to the motors as possible.
Because the sensors and motor drivers are located a fair distance from the control electronics, care was taken to minimize the electrical noise and coupling in the wiring between the control box and the chassis. Leanerd has separate, isolated batteries powering the motors and control electronics. Opto-couplers and isolation amplifiers are used to pass signals between components powered by the isolated busses. Leanerd also uses differential amplifiers to reduce common-mode noise on the analog signals.
The DSP board, interface board, and Bluetooth module plug into each other to form an integrated robot control system as shown below.

The DSP, interface board, and Bluetooth module before assembly.

The assembled robot control system.
A Texas Instruments TMS320LF2407A digital signal processor (DSP) is used to control all of Leanerd's functions. I used this DSP partially because it is very well suited to this application and partially because I already had the evaluation board for other purposes. The DSP is part of an "eZ dsp" evaluation board manufactured by Spectrum Digital. The evaluation board has a built-in JTAG emulator, parallel port PC interface, voltage regulator, and external RAM memory in addition to all of the peripheral components required to program and operate the DSP.
Leanerd's "interface board" is a custom board used to interface between the DSP board, motors, and sensors. The interface board contains signal conditioning, battery power regulation, and various other components required to operate Leanerd. The complete interface board schematic is shown below.

The components on the right side of the schematic are used to interface with analog signals such as inertial sensors, current sensors, and battery voltages. Most of these signals pass through a differential amplifier (or an isolation amplifier for the current sensors) to provide adjustable gain and remove common-mode noise. After the differential amplifier, analog signals pass through a 2-pole low-pass anti-aliasing filter before going to the DSP's analog-to-digital converter. The components on the left side of the schematic are mainly used for voltage regulation and to interface with digital components like the Bluetooth module, radio receiver, LCD screen, motor encoders, and motor drivers.
The board layout and assembled board are shown below. The board consists mostly of through-hole components for ease of assembly and prototyping. A few surface mount SOIC components were used to save space. The right side of the board contains the battery voltage regulation and analog signal conditioning circuits. The left side of the board contains all of the digital signals. The board is designed to minimize noise by carefully routing power and ground traces, separating analog and digital signals, and generous use of bypass capacitors.
The interface board layout.

The assembled interface board
The motor driver boards are designed around the LMD18200T H-bridge chip from National Semiconductor. This chip is a fully integrated h-bridge with logic level PWM inputs and built-in current sensing. The motor driver board schematic, layout, and assembled boards are shown below.

Motor driver board schematic.
Motor driver board layout.

Assembled motor drivers.
The Bluetooth serial module is used to provide wireless communication between Leanerd and a PC. This feature is extremely useful when it comes to programming and testing Leanerd's software. Sampled data and/or test signals can be transmitted to the PC while Leanerd is running. This data can viewed real-time or logged. The logged data can then be analyzed and plotted using Matlab or Microsoft Excel.
The Bluetooth serial module is an ESD-110 UART to Bluetooth converter from Lemos International. This device connects directly to the SCI port on the DSP. The serial signal can then be read using a Bluetooth to serial converter plugged into a PC. Since this is a class 1 Bluetooth device, it has a line-of-sight range of approximately 100m. I use a Linksys USB-Bluetooth module to communicate with Leanerd. I am currently using the Windows HyperTerminal to view and store seven channels of data sampled at 100Hz. An example of data logged using the Bluetooth connection can be found on the Sensors page.
Leanerd's LCD screen is a 16x2 character LCD from Lumex. The LCD has a built in controller and uses a simple 4-bit or 8-bit parallel interface.
The LCD screen is used to display Leanerd's operating mode and battery voltages.

Leanerd's display. It looks like my batteries are dying!
The radio receiver is simply a 5-channel RC airplane receiver. The output from the receiver consists of a variable-width pulse for each receiver channel. The width of each pulse is proportional to the stick position on the transmitter. To simplify the software, I connected channels 1, 3 and 5 with OR gates. This allows all five channels to be read on a single input capture pin on the DSP. The radio receiver is shown the the image in the next section.
Leanerd has two isolated batteries. All of the control electronics are powered by a 6-cell NiMH battery pack that provides 3000mAh at approximately 7.2V. The three motors are powered by two 10-cell NiMH battery packs that are connected in series to provide 3600mAh at a total of approximately 24V.
The batteries are wired to double throw switches such that they are connected to the charger plugs when the power switches are turned off. This allows the batteries to be charged without removing them from the robot.
Although there are separate power switches for the controller power and motor power, a relay is used to prevent power from being applied to the motors when the controller is turned off.

Please email comments to troy@troys-toys.net (please use this link or type Leanerd Comments in the comment section of your email).