Loki Crosses the Pond — Part 2
rangefinders, and a Devantech
SRF08 ultrasonic rangefinder in the
“prototype” area of this board.
The QwikFlash controller board has
an RS-232 level converter and a built-in
DB- 9 connector for communications,
although I currently use just the TTL
lines for telemetry (via Bluetooth). With
it, I run a terminal interface program
called T2 on my PC to access Loki’s
small monitor program. I used the
monitor program to develop Loki’s
gaits and postures.
There is even an 8x2 character
LCD that can be added to the board,
although only the board on Shelob has
this part. The LCD is not currently used
on Loki. The Bluetooth (Blue SMiRF)
setup I’m using is from SparkFun, and
is great for freeing Loki from wires
(it doesn’t take much weight to off-balance a small robot such as this).
Otherwise, a lightweight, three-conductor cable can be used for
normal RS-232 communications.
The QwikFlash board requires 7 to
9 VDC, which I get from a 1,300 mAh
7.2V battery pack I salvaged. A 6V
battery pack would be sufficient if
you’d like to use a 9V battery for the
controller instead. I added three
1N4001 power diodes in
series to drop the voltage
from the battery pack closer
to 6V for the R/C servos I
used (servos don’t like too
much voltage). A modular
RJ11 connector to match
the Microchip MPLAB ICD2
in-circuit debugger cable is
also on the board. I used the
ICD2 to download and
develop the code for Loki.
MPLAB IDE v7.4 runs the
ICD2 and invokes the HI-TECH
Software compiler that I used.
LOKI Four-Servo Biped Robot Summary
• Cheap walking robot, low cost parts, can be made at home
• Loki is inspired by the efforts of David Buckley
http://davidbuckley.net/DB/Loki.htm.
• Original construction was wood (I later found out)
• My Loki is constructed of PCB material to a similar size
• Currently using four Futaba S3004 R/C servos, need bigger knee servos
• Battery is a salvaged six-cell Ni-MH 7.2V 1,300 mAh pack
• Controller board is a $15 (bare) QwikFlash 18F4620 PIC board available from
www.picbook.com
• 50 MHz, 64K Flash, 3K RAM, plus EEPROM
• Bluetooth wireless for telemetry and monitor control
• EEPROM gaits editable over wireless link
• PIC programming via ICD2
• Control program written in HI-TECH C, used to develop gaits
• Two modes, autonomous and control via a small monitor program
• Parser used to decode commands received by monitor
• EEPROM commands save, view, and execute steps in sequences
• Autonomous control currently consists of simple obstacle avoidance while doing
a simple walk
• Sensors include two Sharp GP2D12 IR range finders and a SRF08 ultrasonic
rangefinder
• Body and feet PCB material CAD designed and cut on my CNC’d Sherline mill
• Loki’s gait is exaggerated due to the need to clear the toes of the overlapping feet
• R/C servos are driven by two timers and interrupts in the PIC
• Servo commands set new angle for servo and time to get to new position
• Gaits are stored by strings of servo move commands, similar to those of the
Lynxmotion SSC32 servo controller
• To walk, a simple array of six strings is repeated in an endless loop
• More strings allow Loki to make turns
• An FSM selects the strings to be used, and changes the string selection upon
recognition of an object by a sensor
Controller Board
Construction
To build the QwikFlash
controller board, you can
follow the instructions in the
CA1.PDF document found on
the previously mentioned
PICbook web page. Some
comments are in order. If
you use a Bluetooth module,
Schematic 1. Drawing
of Loki sensor, servo,
and battery wiring.
SERVO 07.2008 51