WELCOME TO THE HOMEPAGE OF
BBB
the three-legged walker
A project in the
MIP-course
Aim
The aim for this project was to build a three-legged walker that should
walk a special path consisting of:
- a flat part
- a short stair upwards
- a straight part with rough ground
- a short stair downward
- a final flat part
The first goal was to walk that path "as fast as possible", but
ended with Publicums Vote. There where some constraints put on the machine.
It should have an IntelTM 80C196KB microcontroller, be autonomous
and manage the track mentioned above.
A General Description
The robot consist of a fuselage and two feet which are movable
forward/backward respectively up/down separately by four R/C-servos.
The feet are so big so it can stand on one foot at the time. To be
able to walk at all there are cut-out "toes". To get rid of a slipping
robot the feet are padded with an old carpet for mouses. It has a display
onboard mainly for debugging purpose. It also has the microcontrollers
built-in PWM output connected so we are able to play samplings and tones.
Hardware(ie electronics)
The hardware consists roughly of an IntelTM 80C196KB
microcontroller, 32K ROM, 32K RAM and a PAL.
The PAL was used for addressdecoding and to divide CLKOUT from the
microcontroller by two.
The divided signal is then rerouted back to the microcontroller to run Timer2.
Timer2 is used for controlling the PWM-signal to the
servos so we can generate four PWM-outputs with the HSO and without any
CPU-overhead.
Addressdecoding was simple since we made the EPROM the occupy the lower part
and the RAM occupy the upper part of the 64K address space.
On the running prototype we patched the RAM space to consist of an EPROM with
samplings to be played during boot up. We used the internal RAM instead.
To split the linear address space in two parts was really unnecessary since the
processor start execute code att 0x2000. The other groups have moved
addresspin A13 of the EPROM be connected to addresspin A14 on the
microcontroller. But they have to move the code when they burn their
EPROM's.
The eight AD-channels are connected to a 10-pin IDC-connector so the
construction be extended easily.
Software
The software was coded in C and compiled by an IAR C-compiler for
the IntelTM 80C196.
The reason for choosing that processor was orders from the institution,
DAMEK. They are commited to that
processor and have docs, compilers and emulators for it.
By programming the HSO correctly we can generate (in princip) four
independent PWM outputs, which we used for controlling the servos.
It's described in IntelTM "16-bit Embedded Controllers"
pp.4-48--4-49.
LCD.
The code was split in small separate parts for easy maintenance. The parts
became relatively small, but it simplified debugging a lot anyhow. The
source code is available underneath, including a short description on each
file.
| wait.h |
Defintionfile for waitfunctions |
| wait.c |
Contains one function that wait a number of milliseconds.
Based on two stupid forloops.
Ie not so exact, but OK for our purpose. |
| servo.h |
Definitionfile for servocontrolling functions |
| servo.c |
Functions to reprogram the HSO for pulsewidth generation to the servos
described above. |
| lcd.h |
Defintionfile for handling the LCD-display attached to BBB |
| lcd.c |
Several functions to initiate, print text and numbers to the LCD-display |
| main.c |
Includes the "main" function plus some extra interrupthandling |
Machineware
Introduction
The robot has two feet that it walks with. The feet are so big the robot
can stand stable all the time. As engine the robot uses regular radio
control servos. The mechanics in the robot are designed to be as simple
as possible, but at the same time light weight and robust. For that reason we
chose to build the robot mainly in plastic, brass and glass fiber
epoxy.
Mechanical data
Weight : 1640 g
Length : 20 cm
Width : 21 cm
Height : 20 cm
Velocity on flat surface : approx. 1.3 cm/s
Current consumption (flat surface) : approx. 1A mean with Î = 4A
Current supply : 7.2V Ni-Cd accumulator battery, 750 mAh
Maximum climbing angle : ±30°
Mechanical principle : Two large feet. Statically stable.
Choice of material
The first prototype had a chassis of 1 mm thick bent steel
plate. We came to the conclusion that it was too heavy and were forced to
substitute it with 1.6 mm glass fiber epoxy with aluminum angles. For
the legs we selected 6 mm brass poles. Brass poles were also
used for the sliding rails to the leg holders. The leg holder were made
of PEHM which is a nylon similar plastic. The feet are made of 4 mm
thick aluminum sheet so it could be light weight and also strong. The feet
are also wrapped with rubber to prevent sliding on slippery surfaces.
Engine element
At first we had a lot of suggestions for engines for the robot.
The first was solenoids of some kind. They are very fast, but we came
to the conclusion - after some experiments - that they are too heavy relative
to the force they can deliver. Solenoids can only deliver force in their
innermost position. We also thought of using stepper motors, but
they were also too heavy and too slow forour application.
Another solution was to use a regular motor with a
eccentric placed pin and by that accomplish the up/down going movement.
This solution was rejected when we realized that we wouldn't
have to use the micro processor for anything. So finally we came to
the conclusion to use servo motors for controlling the robot. They are
easy to control,quite strong in relation to their weight and not so expensive.
Function
The function of the robot is simple. The aim is that the robot
all the time should be statically stabile, it would
always have is center of gravity inside it's supporting surface. This
implicit that the robot got large feet with several toes that goes
into each other. Each foot is attached to a leg that consists of two
parallel brass poles. The leg is attached to the chassis via the
leg holder. The leg holder can slide on the parallel brass poles that
is attached to the chassis. On each of the leg holder there is a servo that
controls the up/down movement of the feet and on the chassis there is
two other servos that controls the back/forward movement on the
leg holder. In this way the robot can
start with lifting one of its foot, move it forward, put it down and
then move the whole body a little bit forward. And then the next leg and
so on. The servos are not so strong that the robot can move the body forward
when it stands on just one leg.
The Story
In 1997:
- Jan 13: The MIP-course started
- Mar 10: Jacob & Stefan realizes that the machine should be
ready within 11 days. Starts chasing stuff for the robot.
- Mar 11: Stefan starts CADing the controller card. Jacob
take up residence in the machine shop.
- Mar 15: The controller is rolling. Patches for memory control
and Timer2 clock was added later.
- Mar 16: Stefan starts writing code. Nothing works. Jacob hasn't seen
the sun since 11th.
- Mar 18: BBB takes it's first sorrow steps. BBB is to heavy! Jacob
has to make the body lighter.
- Mar 20, 14.00: BBB makes it's apperance in the competion in hall M1 at
Dept of Machine Technology, KTH as one of two starting teams. It
was
5 groups
in the beginning. BBB comes on second place :-)
Caterpillar
wins by dropping small LEGO-pieces where ever it goes. But votes where
quite equal. The problem with BBB is a play in one of the legs, which
makes BBB wanting to stand on it own toes when it goes down the stairs.
But we made it! In eleven long days!
- Mar 20, 16.00: Nice higher level students invites Jacob and Stefan
(and of course the rest of the groups) to a party with chips and beer.
Many tips where received from the
older students. One of the better ideas was to implement a potentiometer
for adjusting the speed of BBB.
- Mar 22: Stefan's 30th birthday. Gee, beware!
- Mar 24: Jacob goes back to machine shop for building blocks with less
play. Stefan starts implementing speedcontrol via a potentiometer and
the built-in AD-converter. No AD-conversion works at all.
- Mar 25: Stefan finds all the errors in the AD-code. "Race condition".
Sigh!
- Mar 26: BBB starts talking. Plays
the sample from the patched-in EPROM. An
amplifier is built-in too.
- Mar 27, 06.45: BBB makes an apperance on the morningshow at
TV4. Not so succesfull, but
interesting and fun.
- Mar 27, 10.00: Starts hacking these pages into something more
informative.
- Mar 27: A one-page article from the competition in a swedish
magazine called "Ny Teknik"
(New Technology in english) .
In action:
We were invited to the morningshow of TV4. Here are two pictures of the
event.
Two happy robotbuilders
The striketeam at the logotype of TV4.
Citizen: