[ home | FAQ | project | download | prototype | community | links ]
This page documents some of the notable decisions and thought processes that went into the construction of the first prototype droid.
There's a Bill of Materials at the bottom of this page, listing all the major components used in the prototype, along with the vendors' names, prices paid, and links to the vendors' web sites.
It would probably have been possible to construct a suitable 3-wheeled motorized base at a lower cost than buying the assembled unit from Zagros Robotics. However, it was decided that for the first prototype, at least, it would be worth spending the money to get a ready-made platform, so that the robot could be up and running as quickly as possible. The square Rex-12 base was chosen in preference to the round one, because the latter is balanced at the front and back by two rigid casters with no kind of suspension mechanism, so it's more prone to getting stuck when driving over small bumps and valleys. The square base, on the other hand, has only three points of contact with the ground (two front drive wheels, and one rigid rear balancing caster), so all three wheels will always be in contact with the ground, even when driving over small bumps and valleys.
For compatibility with this project's Motor Control Module and driver software, the requirements of the base are:
The maximum current draw of the DC motors is determined by the choice of H-bridge motor driver circuit. The Magnevation motor driver board was chosen for the prototype, which has two integrated LMD18200 H-bridges (one for each drive motor), each rated at 3A continuous.
The specifications of the Rex-12 base used in the prototype are as follows:
Even though the base is square, it is modeled in software (for the purposes of path planning and map building) as a circular base, with a radius equal to the distance from the centre of the robot to its furthest corner. The centre is defined as the half-way point between the main drive wheels. On the prototype base this distance is just over 10 inches, which means that the robot will consider paths to be navigable only if they are at least 20 inches wide.
The prototype has three decks. The following components are mounted on the base deck:
The tallest of these components is the battery, so the spacers that came with the Zagros Robotics Long Riser Set were cut down to four inches. This space between the base and the middle deck, is just enough to accommodate the battery. It was decided that leaving the spacers at their original length of 10 inches would have resulted in a robot that was too tall for the Rex-12 base, with a tendency to topple. Using the Zagros Robotics Short Riser Set for spacing the decks was not an option, because this has a maximum total length of only six inches (for all decks).
The following components are mounted on the middle deck:
The following components are mounted on the top deck:
To keep the cost down, the Pan & Tilt Head is built around a pair of regular RC hobby servos, using the kit from Lynxmotion. This kit is very good value and comes in two versions, one which includes a pair of standard (low-grade) hobby servos, and one containing just the mounting components (i.e. you supply your own servos).
Standard hobby servos don't last long (about 100 hours of continuous use is the commonly quoted MTBF). However, for the first prototype, standard low-grade servos (the ones than come with the all-inclusive Lynxmotion kit) have been used, so that their lifespan can be assessed. They will, in due course, be replaced by servos with metal gear and dual ball bearings.
One of the hex (allen key) head bolts included in the kit acts as a stop to prevent the head from tilting down below horizontal. To enable the head to tilt down as low as possible (so that the robot can look at the floor, for example) the hex head bolt was replaced by a standard bolt with a lower profile.
For initial testing and software development, the Input Module was built on breadboard, with the PIC, pushbutton switch array, RF receiver and one IR receiver all sharing the same breadboard. For mounting on the robot, the Input Module is split into two physically separate circuit boards; one containing just the six-button keypad, and the other containing all the electronics except for IR detectors. Four IR detectors are mounted discretely around the perimiter of the robot.
The PICProto range of prototyping boards from Micro Engineering Labs, are ideal for assembling simple circuits like the RF Remote Module. Pictured below is the PICProto18, used in the prototype. Project boxes are readily available (for example, from Fry's and Radio Shack) with a 4x6 membrane keypad, and battery compartment - perfect for this module.
The SRF04 sonar sensors are mounted using the purpose-made brackets available from Lynxmotion. These are a little pricey for what they are ($5 apiece), and it would certainly be possible to create suitable "home-made" mounting brackets at a fraction of the price, but the Lynxmotion brackets were purchased for the initial prototype to save time and effort.
In terms of positioning around the perimiter of the robot, all sonar sensors except for the three downward pointing precipice detecting sonars and the head mounted sonar, point in directions along imagingary spokes eminating from the centre point of the robot base . The centre point is considered to be exactly half-way along the axis formed between the hubs of the two drive wheels. This positioning simplifies the sensor model of the sonar array.
The three downward facing (precipice detecting) sonars for sensing floor discontinuities are positioned along the front of the robot, looking at the floor a few inches directly ahead, and are horizontally aligned with each of the three wheels.
The following photograph shows the Sonar Array Module assembled on veroboard to support 12 SRF04 sonar sensors (a maximum of 16 are possible in total). The two 3-pin headers at the right are I2C connectors; one for the host or the previous bus device, and the other for the next I2C device on the bus. The screw-terminals in the lower-right corner are for the 12V DC power supply.
The firing sequence chosen for the twelve sonars on the prototype are as follows:
This sequence ensures that at least one of the downward-facing precipice detecting sensors is fired every tenth of a second. This sequence also minimizes sensor crosstalk by firing sensors mostly in alternating opposite directions.
The HR15-12 13AH Sealed Lead Acid battery was selected for the prototype. By far the largest power drain on the battery is from the DC to DC converter that powers the mainboard, hard disk, and peripherals that take their power from the motherboad (e.g. USB devices). The current draw from the battery with just the DC to DC converter connected to it, powering the mainboard with a 40GB hard drive and the USB network adapter attached, was measured at around 3.2A on the bench.
The discharge characteristics of the HR15-12 battery according to the data sheet would indicate that the battery should be able to supply sufficient power to keep the mainboard up for at least 3 hours. This means that the robot should be able to operate for approximately 2 to 3 hours between battery charges while stationary.
The drive motors and sonar sensor array (which needs to be powered up whenever the robot is moving) are the next biggest loads on the battery, so depending on how much the robot moves around, the actual useful running time between battery charges could be considerably less than 3 hours.
The assembled prototype weighs 30lbs in total (including the 6lb Rex-12 base, and the 9.25lb HR15-12 battery), so upgrading to a heavier battery with a larger capacity may not be possible with the Rex-12 base. Zagros Robotics are a little vague in their payload specification for this base, saying only that the platform will "easily carry over 15lbs of payload at maximum speed", so in the end, some experimentation may be necessary to establish the largest battery capacity that's practical for a robot using this base.
A 70 Watt DC-DC converter from mini-box.com was selected to convert the battery voltage to the various voltages needed by the mainboard and hard disk. This particular DC-DC converter has an input range of 10.5V to 15.5V, which is ideal for this application where it is driven from a lead acid battery. There are now even better DC-to-DC converters available, with even wider input voltage ranges. In particular, DC-DC converters for automotive applications (designed to hook up to a car battery) are ideal.
A pre-built 4A smart fast charger with 110/220V AC input from Power-Sonic was selected for the docking station. 4A is right at the top limit of the charging rate allowed for the HR15-12 battery (it's actually 100mA over). Using this charger should allow the robot's battery to be fully recharged from a fully discharged state in around 5 hours.
The following photographs show the Docking Station. The spacing of the three contact plates is to ensure that it is not possible for the robot's docking contacts to mate with more than one plate if misaligned. This ensures that the incorrect voltage cannot be applied to the Power Management Module, however badly the robot is docked. In the first photograph of the Docking Station, the three contact plates are, from left to right, Ve (external voltage), Vc (charge voltage) and GND (common ground). The second photograph of the Docking Station shows the base deck of the robot in its docked position.
Although it would have been possible to design the Docking Station with the charger inside, it was decided to keep it outside of the main enclosure because of the large heat sink at the back of the charger (which gets very hot). It would have been necessary to build a fan or some other ventilation system into the Docking Station, if the charger was to have been placed inside. The 12V DC power supply unit (which provides Ve) is mounted inside the enclosure. This is a small switched mode 110/220V unit with a regulated 12V DC 4.5A output.
The docking station was constructed from 1/8" grey-tinted Acrylic sheet. The Acrylic is semi-transparent, so the infrared commands from the Power Management Module can reach the infrared detector inside the Docking Station. The green and yellow LEDs on the Docking Station circuit board are also visible when lit through the tinted Acrylic.
The following photograph shows the front of the robot base, in which you can see the three docking contacts. These are made from small decorative hinges, obtained from a hardware store, positioned directly in front of microswitches. The hinges had to be sanded down to remove the insulating varnish from them. An attempt to use the original lever arms of the microswitches as the contacts was not successful, and to be honest, even the metal hinge approach is not totally satisfactory; some rethinking is needed here. The IR LED driven by the Power Management Module is also visible in this photograph, just left of the centre sonar transducer.
The following photograph shows the Power Management Module, assembled on veroboard, mounted on the base deck.
The following photo shows the Motor Control Module (built on veroboard), and the motor driver board. The motor driver board was assembled from the kit from Magnevation. This motor driver kit is based on a pair of National Semiconductor LMD18200 H-bridge chips, and it was actually tailored to interface optimally with the OOPic controller. However, it is well suited to drive the Rex-12 base from the Motor Control Module. The Motor Control Module connects to only eight of the forty interface pins on the board, as follows:
The Motor Control Module uses Locked Antiphase drive mode, rather than Direction+PWM. This means that the PWM pulse train from the Motor Control Module output actually drives the Direction input of the LMD18200, rather than the PWM input. The PWM input of the driver is always held high. In this mode, when the Motor Control Module outputs a signal (to the Direction input of the driver) with a duty cycle of 50%, the motor is stopped. 100% duty cycle means full-speed forward, and 0% means full-speed reverse.
It was necessary to invert the quadrature encoder count direction on the prototype for the left side encoder. This is because on the Rex-12 base, the left side encoder counts backwards when the base is moving forwards. There are two ways to accomplish this reversal: one is to reverse the A and B signal connections from the quadrature encoder, and the other is to use the XOR Encoder Mask configuration feature of the Motor Control Module (use a mask setting of 64).
The Mini-ITX mainboard form-factor (6.7" x 6.7") is ideal for this project, and fits comfortably within the 12"x12" area of the prototype robot base. The Nehemiah M10000 EPIA M mainboard from VIA was selected for the prototype because of its excellent I/O capabilities. Among the many integrated ports and peripherals supported by this mainboard are two firewire ports, four USB ports, two serial ports, a parallel port, and built-in audio, video and IDE controllers. It also has an integrated I2C interface, which is perfect for communicating with the custom-designed PIC microcontroller-based peripheral devices employed in this project. This mainboard also has an integrated network interface with RJ-45 LAN port. This could, in theory, be used in conjunction with a wireless 802.11 access point, but in fact, it's more economical to use a USB wireless network adapter.
The Nehemiah M10000 EPIA M mainboard comes equipped with a VIA 1GHz C3 (second generation; Model 9) processor with SSE instruction set extensions (we can take advantage of the GNU Compiler's support for these extensions with the -mfpmath=sse flag). Version 3.3 of GCC has a c3-2 processor type that can be passed to the -mtune= and -march= options. This version of GCC is not yet widely bundled with GNU/Linux distributions, but the -march=pentium3 -mfpmath=sse combination will probably work fine with older versions of GCC to squeeze as much performance as possible out of the Nehemiah. What definitely won't work is -march=c3, as the original C3 processor architecture is significantly different to the new Nehemiah C3.
The following photograph shows the mainboard and hard disk mounted on the middle deck. The circuit board to the right of the mainboard is a Morex DC-DC converter, which has now been replaced by the superior PW-70 from mini-box.com. The Morex converter has a much tighter input voltage tolerance (11.4V - 12.6V) than the PW-70, which made it unsuitable for being driven from a lead acid battery. The PW-70, on the other hand, can handle an input voltage in the range 10.5V to 15.5V. By now, even better DC-DC converters with even wider input voltage ranges available, designed for in-car PC applications. Both the mainboard and hard disk are mounted using rubber, shock absorbing spacers.
In order to install the operating system, the EPIA-M mainboard, with 512MB RAM fitted, was hooked up to a conventional ATX power supply, a keyboard, mouse, monitor, speakers, 40GB hard disk and a CD-ROM drive.
Setting up the BIOS is straightforward. Starting initially from Load Optimized Defaults, the only changes made were:
Red Hat Linux 9 was installed using mostly default installation options (you can download the ISO images for this GNU/Linux distribution free of charge from redhat.com). The exceptions to the default installation choices are listed here:
Post installation steps:
Using the Belkin F5D6050 with Oliver Kurth and Jorg Albert's Atmel Linux driver is pretty straightforward. Here are the basic steps:
Here's a sample ifcfg-wlan0 file:
# Please read /usr/share/doc/initscripts-*/sysconfig.txt # for the documentation of these parameters. USERCTL=no PEERDNS=yes GATEWAY= TYPE=Wireless DEVICE=wlan0 HWADDR= BOOTPROTO=dhcp NETMASK= ONBOOT=yes DHCP_HOSTNAME= IPADDR= NAME= DOMAIN= ESSID=WLAN_ROBOT CHANNEL=1 MODE=Managed KEY=e9aa93b9ad551cc9662facf4f9 RATE=Auto |
Obviously you should substitute your own settings for ESSID, MODE, KEY, etc. In the case of the prototype, the robot is participating in an encrypted infrastructure-mode wireless network (hence MODE=Managed and KEY=...), and gets all its network settings by DHCP. The wireless network is called WLAN_ROBOT.
With the two IEEE 1394 webcams plugged into the FireWire ports on the mainboard, the libdc1394 library and coriander program were installed to test the webcams. Here are the steps that were taken (logged in as root):
Obviously running this test using Coriander requires a graphical display (with keyboard and mouse). There are at least two options here:
Installing Festival was straighforward. Here are the steps that were taken, all while logged in as root:
Below is a list of the major components that were procured for the prototype droid. A more comprehensive bill of materials, is available on the OAP Community Wiki pages.
Item Description | Quantity | Vendor | Date of Procurement | Unit Price (US$) | Extended Price (US$) |
Rex-12 Square Robot Base with HP Quadrature Encoders | 1 | Zagros Robotics | July 10, 2003 | 349.95 | 349.95 |
12" Square Additional Deck | 2 | Zagros Robotics | July 10, 2003 | 9.95 | 19.90 |
Set of Long Risers and Spacers | 1 | Zagros Robotics | July 10, 2003 | 14.95 | 14.95 |
HEDS 5500 Encoder Cable | 2 | Zagros Robotics | July 10, 2003 | 10.00 | 20.00 |
Pan and Tilt Kit | 1 | Lynxmotion Robot Kits | July 10, 2003 | 45.00 | 45.00 |
Nehemiah M10000 EPIA M Mini-ITX 1GHz Mainboard from VIA | 1 | mini-itx.com | July 10, 2003 | 171.15 | 171.15 |
512MB PC2100 DDR DIMM | 1 | mini-itx.com | July 10, 2003 | 145.07 | 145.07 |
mini-box.com PW-70 DC-DC Converter | 1 | iTUNER | September 9, 2003 | 49.95 | 49.95 |
12V 13Ah (10 hr rate) Sealed Lead Acid Battery from B.B. Battery Co. | 1 | zbattery.com | July 10, 2003 | 28.11 | 28.11 |
ADS Pyro 1394 WebCam | 2 | Buy.com | June 23, 2003 | 73.99 | 147.98 |
634 Intelligent Serial Display | 1 | Crystalfontz | June 24, 2003 | 65.00 | 65.00 |
Devantech SRF04 Sonar Sensor | 12 | Mark III Robot Store | August 5, 2003 | 30.00 | 360.00 |
Eltec 442-3 Infrared Sensor with Fresnel Lens If you've never bought one of these before, you might want to consider the kit from Acroname, which comes with a handy booklet and a card cut-out pattern with which you can make a concentrating cone. |
1 | Mark III Robot Store | July 10, 2003 | 50.00 | 50.00 |
Belkin F5D6050 Wireless 802.11b USB NIC 11MBPS | 1 | Buy.com | July 11, 2003 | 54.94 | 54.94 |
Magnevation Motor Driver Kit based on two LMD18200 H-Bridges | 1 | Acroname | July 18, 2003 | 65.00 | 65.00 |
Power-Sonic PSC-124000A Battery Charger for Sealed Lead Acid Batteries (4 Amp) | 1 | Portable Power Systems | July 30, 2003 | 109.95 | 109.95 |
Below is a list of other suppliers of miscellaneous parts used in the construction of the prototype droid.
Vendor | Description |
Randy Jones' glitchbuster.com | Randy supplies PICMicro parts and related electronic components, such as crystals, resonators, PICProto boards and some discrete components. One-man store. Professional, courteous personal service. |
RobotZone | Supplier of hobby servos, suitable for the Pan and Tilt head, and many other robotics-related components. The small "90 degree universal servo mounts" are useful for fixing circuit boards and panels perpendicular to the robot's horizontal decks. |
Lynxmotion Robot Kits | As well as the Pan and Tilt Kit mentioned above, Lynxmotion supplies high-quality mounting brackets for the SRF04 sonar sensor. |
United States Plastic Corp. | A useful source of acrylic sheeting. Thin (1/16") acrylic sheet is used to clad the prototype droid. Slightly thicker (1/8") acrylic sheet was used to construct the Docking Station. |
Copyright © 2001-2009 Dafydd Walters. All rights reserved. This page was last modified on November 27, 2009 |