■ FIGURE 8.
■ FIGURE 9. Pedestal, print
head, and eject servos.
c) Wait for one revolution of
d) Stop the pedestal rotation.
e) Move the print head to
the next line.
8) Retract the print head to
9) Move the eject servo to
shock absorption (to keep the ball
from bouncing off; see Figure 9). The
aluminum pedestal was perched on a
continuous motion servo that could
rotate the ball under the print head to
allow lines of text to be printed. There
was also a print head servo that would
position the print head around an
arc-shaped path. This way, lines of text
could be written anywhere between
the two “poles” of the ball.
Lastly, a servo motor controlled an
eject mechanism that would gently
push the printed ball from the pedestal
when it was complete. As usual, Rick’s
amazing mechanical skills had placed
a very nice mechanism in my hands
(Figure 10). Now, I needed only to
write some software to bring it to life.
each step in the printing process, it
became clear that it was going to be
an intricate task to get the printer to
perform. I identified each specific
function by following the progress of a
ball from beginning to end:
10) Move the eject servo to ready
1) Move all servos to initial/ready
2) Agitate the ammo in the hopper.
3) Move the indexer from release to
4) Wait for a ball to fall into the loading tube.
5) Move the indexer from load to
READY, SET, CODE!
I attached the servos to the Prop-
2 board, sat myself down, and stared
at the device for a while. Though what
it needed to do was relatively straightforward, as I started to make notes on
6) Wait for the ball to fall and settle on
■ FIGURE 10. Close-up of
7) Repeat next steps one time per text
a) Send text string to the serial
inkjet interface card.
b) Start the pedestal rotation servo.
I next took the above functions
and started to create subroutines that
I could call in sequence. However, at
one point it appeared that I would
need to do two things at once (rotate
the pedestal and send text to the print
control board). Since the Prop- 2 board
is based around the Parallax BASIC
Stamp, it’s a bit tricky to make things
appear to operate in parallel.
For example, in order for a continuous motion servo to turn, you must
feed it a constant “diet” of pulses from
the microcontroller. To make sure the
pedestal would spin, I created a loop
that would send a set of pulses every 20
ms to the servo. But, since the BASIC
Stamp was busy sending pulses, it could
not also send text strings to the inkjet.
I entertained the idea of some
fancy-footwork programming (e.g.,
making the code jump out of the servo
loop on every <x> iterations, fetch a
character from the sentence to be
printed, send that character to the
inkjet, then jump back into the
servo loop). However, I always
prefer simple solutions during
the dev cycle. This is especially
important at the beginning of a
project where you can waste a
lot of time designing tricky code
routines that you may later have
to abandon if the project moves
in another direction.
So, in an attempt at a quick
fix, I decided to dump the
entire sentence of text to
the inkjet interface and then
immediately start the loop that
rotates the pedestal servo. The
■ FIGURE 11. Finished ball
printed by PingPongPrinter.