Build a LEGO (R) ZNAP
by Doug Bell (edited by S.D. Kaehler)
Doug Bell's eight-legged LEGO ZNAP walker
LEGO Bricks offer many possibilities
for creating robotic machines. The addition of the LEGO
Mindstorms (R) RCX
modules make robotic creations from LEGO bricks very practical.
A few years ago LEGO came out with a structural construction toy that seems
to have been aimed to compete with K'NEX(R)
and similar types of toys. These kits haven't caught on as well as
expected so they are being cleared out of several local toy stores (Toys'R
Us) that also sell LEGO bricks and other related products. What is
intriguing about these kits is that most come with a LEGO motor in addition
to all the other stuff for blowout prices of $10 or $15! Doug Bell
caught sight of these a couple months ago and notified the SRS listserver.
He also went and bought a bunch of them figuring that at these prices,
he could just keep the motors and throw everything else away. Doug,
however, is not one to waste an interesting toy. He saw the potential
for a walking robot in the kits and proceeded to construct what you see
above and below. This robot was built from the contents of two (2)
ZNAP #3591 kits and one LEGO
RCX module. The kits each come with a manual motor control box that
can be used to make the robot walk by remote control. The addition
of a Mindstorms RCX module enables an autonomous mode, however rotation
sensors are needed on the drive axles so the robot knows where the leg
are going. Other pieces from miscellaneous sources are cataloged
The robot walker is approximately x" wide, y" long, and z" high.
It is capable of forward and reverse motion of either or both sets of legs
permits pivoting and rotating motion about its center axis. With
fresh batteries it can move about forward or backward at 1" per second.
It can step over obstacles up to about 1/2" tall and prefers to walk on
a relatively flat surface. Below are detailed instructions for constructing
this machine if you have or can get these kits.
Terminology - Distances:
One ZNAP space - center-to-center distance between purple connectors separated
by the shortest girder.
One ZNAP hole spacing - center-to-center distance between adjacent ZNAP
holes, equal to one-half ZNAP space.
One LEGO stud length - center-to-center distance between adjacent LEGO
LEGO Mindstorms Pieces:
12ea - 4x2-space curved solid
10ea - 2x2-space rectangle solid
20ea - 2x2-space triangle solid
26ea - 4-space girder
4ea - 2-space girder
12ea - 1-space girder
3ea - 2x2-space motor mount rectangle solid
2ea - LEGO (R) Motors
4ea - 8-tooth gear
4ea - 16-tooth gear
2ea - ? stud length white shafts
a bunch - purple connector
a bunch - gray connector
Note: These kinds of pieces are all available in a Mindstorms kit, but
probably not in these quantities - I bought some extra kits from LEGO Shop
At Home to get more, mainly of the two stud length gray Technics pins.
2ea - 24-tooth gear
4ea - 30-tooth gear
1ea - RCX brick
2ea - short motor wire
2ea - 12x1 stud bricks with 11 Technics pin holes
4ea - dark gray male-to-male short-to-long Technics pin converter
8ea - 2-stud length black Technics pin
20ea - 2-stud length gray Technics pin
2ea - 8-stud length black shaft
4ea - gray male-to-male shaft-to-Technics pin converter
8ea - 1-stud length shaft stop bush
Optional ZNAP Pieces:
Optional LEGO Mindstorms Pieces:
2ea - Large (6 AA) battery box, with reverse switch
8ea - 1-space girder
8ea - gray connector
Misc. LEGO Pieces:
3ea - yellow 6x8 stud plate
2ea - long motor wire
4ea - 3-stud length black Technics pins (the ones with ribs on the third
stud's length, if you have them)(I got these from a Neumatics kit.)
2ea - 3-stud length black shafts (I got these from a Star Wars Episode
1 Battle Droid kit.)
1ea - 4x2-stud electrical connector plate, cut in half to make one 2x2
double-thick connector plate to which wires can be attached (I got this
in a pack of connector plates from LEGO Shop At Home.)
4ea - rubber bands, size and strength chosen appropriately for each use
16ea - paper or plastic covered wire ties, like those that come with garbage
bags (I cut mine in half, and they were still long enough. To protect the
LEGO pieces, the paper or plastic covering should be intact.)
4ea - Using a gray connector, connect two 4-space girders. Into the hole
on each end of this assembly, insert a two stud length gray Technics pin.
Place these pins on opposite sides. Each of these assemblies is a push
8ea - Using two gray or purple connectors, connect two 4-space girders
to the wide end of a 2x2-space triangle solid piece. Using two gray or
purple connectors, connect another 2x2-space triangle solid piece the other
ends of the two 4-space girders. Each of these assemblies is a leg.
6ea - Using a gray connector on the bottom and a gray or purple connector
on the top, connect two 4x2-space curved solid pieces. Connect them base
to base to make an 8x2-space assembly with a curved bottom. If you use
purple connectors, turn them so the assembly is flat. Four of these assemblies
are rocking beams; the other two are cross frames.
2ea - Using two or three gray or purple connectors, connect two 2x2-space
rectangle solid pieces to make a 4x2-space rectangle assembly. If
you use purple connectors, turn them so the assembly is flat. Each of these
assemblies is a front extension.
2ea - Using three purple connectors, add a 2x2-space triangle to the top
of each end of one of the cross frames. Turn the purple connector at each
end of the curved piece perpendicular to the assembly. Each triangle should
snap on from above, facing out. Add a purple connector to the top on each
end, perpendicular to the assembly. Using one more purple connector on
each side, add a 1-space girder with a purple connector slid over it between
the inboard end of the triangle on each side and the next mount inboard.
Connect the two cross frames on each end with two 2x2 rectangular pieces.
One end of this assembly is the right side of the robot, the other is the
left side. Add one front extension to the front of each side, facing forward.
This is the chassis.
Insert a black Technics pin in each end of two 4-space girders. Using
these pins, mount one girder along the outside of the bottom of each forward
extension. Insert two black Technics pins in two adjacent holes in two
2-space girders. Using these pins, mount one girder along the inside of
the bottom of each forward extension, so each extends from the second hole
from the front to the connector. These four girders are slide plates.
Add one 2x2-space motor mount rectangle solid piece to the back of each
side of the chassis, so that the motors will be low on the inside.
Using two or three gray or purple connectors, add one 2x2-space rectangle
piece to the back of each side of the chassis.
Gear train mechanism
Add the last 2x2-space motor mount rectangle solid piece to the center
of the chassis, so that the motor bracket faces down. On either side of
this, add a 2x2-space rectangle solid piece to the purple connectors floating
on the 1-space girders. Use rubber bands over these floating purple connectors
to hold them toward the center. Insert one three stud length Technics pin
(with ribs) one stud length into each of the four top-most forward and
back holes in the two 2x2-space rectangle solid pieces, from the outside.
2ea - Into each of the left and right motor mounts, insert two 16-tooth
gears. Insert a white shaft through the bottom hole, through the bottom
gear, from the inside out. Push the shaft through far enough to accept
an 8-tooth gear. Push on an 8-tooth gear. Into the next hole back, insert
a gray male-to-male shaft-to-Technics pin. Onto this pin, push a 24-tooth
gear, to mesh with the adjacent 8-tooth gear. One space behind this pin,
insert a 3-stud length black shaft. Push a 40-tooth gear onto each end
of this shaft.
4ea - Push a two stud length gray Technics pin into one of the holes on
the outer ring of each of the 40-tooth gears. The pins on the opposite
gears should be 180 degrees out of phase, i.e., on opposite sides. Each
of these is a crank pin.
2ea - Through the top center hole on either side of the frame, insert an
eight stud length black shaft. On either side of this shaft, push on the
gray connector at the bottom center of a rocker arm. On either side of
this shaft, push on two one stud length shaft stop bushes. Use a rubber
band over the two ends of the shaft, through the rocker arm, to hold this
8ea - Position each leg vertically, with the taller side toward the center
of the chassis, aligned with a rocker arm, so that the rocker arm is between
the leg and the frame. Use a 2-stud length gray Technics pin to connect
the top hole on the leg to the next-to-end hole on the rocker arm.
Secure this joint with a wire tie through the Technics pin and over the
top, through the connector at the top of the leg, where it should be twisted
4ea - For each back leg, push the center hole on the 8-space girder closest
to the center of the robot onto the nearby crank pin.
2ea - Push one end of a push rod into the bottom hole of the front 8-space
girder of the outside back leg, from the inside out. Push the other end
of the push rod into the bottom hole of the back 8-space girder of the
inside front leg, from the outside in.
2 - Push one end of a push rod into the top front hole of the bottom 2x2-space
triangle solid of the inside back leg, from the outside in. Push
the other end of the push rod into the top back hole of the bottom 2x2-space
triangle solid of the outside front leg, from the inside out.
8ea - Secure each of these joints with a wire tie through the Technics
pin and through the connector at the end of the push rod, where it should
be twisted together.
Note1: The rocker arm doesn't need to be curved, and the
pivot point doesn't need to be below the leg pivots - it just worked out
that way with the ZNAP pieces. The rocker arms and the legs could just
be straight pieces, but they aren't strong enough in ZNAP to avoid bending
in the middle. The push rods only push and pull, so can be just girders.
Note2: The rocker arms transmit the vertical motion of the back
legs to the front legs; the push rods transmit the horizontal motion. The
vertical motion reverses through the rocker arm pivots, so the horizontal
motion must be reversed by crisscrossing the push rods.
Note3: The top of each leg goes mostly up and down; the middle
of each leg goes in a circle; the bottom of each leg goes in an ellipse
- the height is the throw of the crank pin, but the width is the crank
pin throw multiplied by the the length from bottom to top, divided by the
length from crank pin to top. This is a 2:1 ellipse for this robot. Each
leg is not moving horizontally relative to the chassis when it touches
- for smoother walking it should come down as it's moving forward.
Possible improvement: The front legs often move far away from
the slide plates - something needs to be added to keep them nearer, like
outboard slide plates.
Optional - make a remote control unit:
2ea - Push an 8-tooth gear onto a motor shaft. Connect a short motor wire
onto the motor, so that the wire extends out the back of the motor. Insert
the motor into the left or right motor mount.
Use the four dark gray short-to-long Technics pins to mount the 12x1 LEGO
bricks on either side of the RCX brick. This assembly will fit at the center
of the robot, and be held in by snapping the four 3-stud length Technics
pins with ribs into the 12x1 LEGO bricks. The ribs make it easy to pull
the RCX, to change batteries, put it in another robot, or so that the robot
can be run from the remote control unit.
Install the RCX assembly with the I/R port facing forward. Connect the
left motor to Port A and the right motor to Port C, so that the wires extend
to the sides. This way, directing Port A or C forward with make the corresponding
side of the robot move forward.
Place two large battery boxes (filled with a total of 12 AA batteries)
side by side. Lock them together using two yellow 6x8 stud plates on the
bottom and one on the top. Connect one long motor wire to each battery
box, so that the wire extends away from the buttons. To use this remote
control unit, connect the wire from the left battery box to the wire from
the left motor, and the wire from the right battery box to the wire from
the right motor. Make these connections so the wires extend at right angles,
so that the right button on each battery box makes its side of the robot
move forward. If you leave the RCX assembly installed, you can snap these
junctions to the insulated back-most area of the RCX brick.
Remote control unit
LEGO Mindstorms RCX Module
Optional - add leg sensors:
8ea - affix a suitable push button to the end of a 1-space girder.
Use a gray connector to connect this assembly to the bottom of a leg. Cut
a 4x2 stud electrical connector plate in half, then solder wires to the
bottom of one half, then snap the other half below to make one 2x2 double-thick
connector plate with wires. Connect this to Port 2 on the RCX. My
goal for these leg sensors was for the robot to be able to keep itself
on a table top. I used buttons removed from the front panel of an old VCR.
I used number 28 wire-wrap wire to connect the buttons and the connector
plate. I soldered the wires to the buttons. I used scotch tape to
hold the buttons by their wires. I wire-wrapped the wires to a 14-pin
wire-wrap socket, and used a 14-pin header to hold the resistors for the
Close-up of a leg/foot sensor
My method of connecting the buttons to the RCX needs improvement, but
here's what I did - I connected the front and back buttons of legs on the
same push rod in series. My rationale was that if the robot is moving forward,
the back leg should get pushed in time to use the front leg button to sense
if there's a table to step on; the reverse when moving backwards.
The problem with this is that the program needs to know the phase of the
drive gears. Without a sensor for this, being able to sense when the back
leg touched would have told when to check the front leg. With the
buttons connected in series, I had four (4) circuits to multiplex into
one RCX input. I did this by connecting these four (4) circuits in series,
with a resistor in parallel with each of the four (4) circuits. The resistors
were 4.7K, 10K, 20K, and 39K, 5%. This makes an A to D converter, but because
the drive current from the RCX input is from a voltage source through a
resistor instead of from a constant current source, the output of the A
to D is not linear. This makes the steps different sizes, and in particular
makes some of the steps pretty small. I plan to re-think this circuit.
Also, the robot isn't heavy enough to always push the buttons I used.
A brute force method would be to use more RCX inputs, but I was hoping
to save them for other sensors.
Picture of leg sensor conditioning circuitry
I've attached the NQC source code I used
at the RCX Challenge, with
most of the sensor code stubbed out - I tried to stub it all out for the
demo, but I missed one, so the robot waits until at least one series string
of buttons is pushed, then goes through its motions. That turned out to
I left out some pieces showing in picture above since they weren't needed
and so just made the robot heavier.
I hope you have found this article interesting and informative.
Feel free to offer comments and feedback to me at email@example.com.