I began building a robot from scratch using an MC68HC908GP32CP microcontroller. The things I learned suggested the need for the Roman numeral 'I' postfix in the 'bots name. (A completed 68HC08 robot is Bugdozer, a Sumo combat robot.)
Twofold I vs. The Lizard King
To provide a sense of scale, Twofold I is about one quarter the size of a fully-grown Tyrannosaurus Rex. Shortly after this picture was taken, Mr. Rex attempted to bite off a piece of Twofold, but quickly died of lead poisoning.
Twofold overhead view labeled
Microcontroller: An MC68HC908GP32CP. 40-pin plastic DIP, socketed. 512 bytes of RAM. 32 kilobytes of FLASH program memory.
All of the pins of the microcontroller are brought out in headers to the left and the right. These make connections to the breadboard a breeze!
Ground and +5 V: Nine-pin jumper-wire-compatible headers are available to connect to ground and regulated voltage.
Breadboard: One of the nicest features for ongoing robot development. It makes it easy to test new sensors and prototype ideas on a live robot platform. I got the idea for the onboard breadboard and headers from the Boe-Bot.
Crystal Socket: A half-size oscillator socket. An Epson 32.768 MHz oscillator is currently installed, but is swapped out for 4.9152 MHz when debugging or programming through the MON08 connector.
It was a mistake to use a canned oscillator instead of a 32.768 kHz crystal with the HC08’s built-in PLL (phase-locked loop) clock generator. (I didn’t want to take the time to learn how to build an oscillator from a crystal.) The socketed oscillator works fine, but is more expensive, less flexible, and requires a physical change when programming the FLASH.
For schematics and 68HC08 source code for the PLL, see the PLL page.
Reset: I didn’t think a reset button was going to be important, but it already came in handy debugging power-up problems between some weak oscillators and the LCD.
MON08: 8 pairs of jumpers connect the 68HC08 microcontroller to the appropriate onboard peripherals when the yellow jumpers (hot-glued together) are in place. The yellow jumpers can be removed to connect the microcontroller to a PC for debugging or programming the FLASH memory.
The ability to program in-place saves me from having to disconnect all of the jumper wires crossing over to the breadboard. Additionally, the circuit board isn’t subjected to all that flex when trying to remove the microcontroller from the socket.
Twofold flipped open
Twofold is contained on two boards. Gaining access to the lower board (or bottom of the upper board) is easy with hinged standoffs.
The lower board contains the power supply: +9-volt Ni-MH rechargeable battery and +5-volt regulator. Perhaps soon it will contain motors and respective drivers.
Twofold power supply
Voltage Regulator: The LM2940T is another idea I got from the Boe-Bot.
Hinged Standoff: The hinged standoff means only one pair of standoffs need to be unscrewed to gain access to the lower board. In fact, the pair of hinged standoffs provide enough structural integrity that the standard pair of standoffs can remain unscrewed most of the time.
Connector To Upper Level: If the hinges don’t provide enough access, the two boards can be separated without desoldering. The connector carries ground, regulated power, and unregulated power to the upper level.
Power Switch: As necessary and useful as you would expect.
Current Jumper: This is a very cool feature. A jumper connects the power switch to the ground of the battery. By removing the jumper and connecting a multimeter (or ammeter) to each of the jumper pins, the meter is placed in series with the entire robot circuit. Experiments with power usage can easily be measured.