100 mA unit would work
fine, as this is a low power
application.
I drilled two holes on
the front of the case to
mount two 3 mm, 1 mA
indicator LEDs (junun.
org). A male three-pin
header sticks out of the
case where the audio jacks
were originally, so I can
use a servo style cable to
connect to various
controllers. Servo extension
cables are cheap from
eBay, and they can be cut
and spliced to make the
required connections.
Internal connection points for
power and audio are easily traced
with a multimeter; you ARE a hacker,
after all! RoboVoice pin 26 goes
through a 10 µF cap into the amplifier
input.
FIGURE 4.
Amplified "hamburger speakers"
are under $5 from eBay China. They
are small, loud, and have an internal
lithium battery recharged via a USB
cable. They are perfect for mounting
on a small mobile robot. Many of
them have a three-position
on/off switch which also
selects the high/low volume.
(See the video at
www.youtube
.com/watch?v=
0yvJ4ZiAZOY.) Once again,
some hacking is required
to make room for the
electronics. Specifically, I cut
out the speaker's expanding
bellows and replaced it with a
fixed plastic ring about 1/2"
wide, which holds a circular
piece of perfboard (Figure 4).
For 3.3V power, I connected
to the internal lithium battery
BASIC STAMP 2 PROGRAM
‘ BASIC Stamp 2 program sings ROW ROW ROW YOUR
‘ BOAT on SP0-512
‘ {$STAMP BS2}
‘ {$PBASIC 2.5}
INPUT 0 ‘speaking line from 512
OUTPUT 7 ‘9600 true 8N1 data to 512
PAUSE 1000
SEROUT 7,84,[CR] ‘initialize SP0-512
GOSUB waitspeak
main: ‘ sing at speed 2
‘‘‘‘‘‘‘‘NOTE: timing spaces removed for magazine
‘‘‘‘‘‘‘‘listing; add multiple spaces between
‘‘‘‘‘‘‘‘words for timing delays
SEROUT 7,84,[“[S2][G2]rowhh rowhh rowhh [A2]yer
[B2] boat jehnn [A2]dlee [B2]down [C3]thuh [D3]
stream”,CR]
GOSUB waitspeak
PAUSE 450 ‘ pause for proper phrasing
SEROUT 7,84,[“[G3]merrily [D3]merrily
[B2]merrily [G2]merrily [D3]lie ff[C3]is [B2]but
[A2]uh [G2]dream”,CR]
GOSUB waitspeak
FOR B0=1 TO 5 ‘count from one to five
SEROUT 7,84,[“[S3] very ubble B 0
equals “,DEC B0,CR]
GOSUB waitspeak
NEXT
GOTO main
waitspeak: ‘ wait subroutine
PAUSE 100 ‘ wait 0.1 sec for
speaking line to go high
test:IF IN0=1 THEN test ‘ wait until speaking
‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘ line goes low
PAUSE 100 ‘ wait 0.1 sec after
‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘ speaking line goes low
RETURN
46 SERVO 11.2012
PICAXE 20M2 PROGRAM
'PICAXE 20M2 program sings ROW ROW ROW YOUR
'BOAT on SP0-512
#picaxe 20m2
#no_data
setfreq m16
' 8 or 16 MHz required for
' 9600 baud serial data
'speaking line input from 512
'output 9600 baud true 8N1 data
' to sp0-512
pause 1000 'wait to clear "ready" signal from
' 512
high c.4:pause 10' manual 2 p.209 says
set pin high before sending true data
SEROUT c.4,T9600_16,(13) 'initialize 512 with a
'carriage return
input c.5
output c.4
GOSUB waitspeak
main:
SEROUT c.4,T9600_16,("[S2][G2]rowhh [A2]yer
[B2] boat jehnn [A2]dlee [B2]down [C3]thuh [D3]
stream",13)
GOSUB waitspeak
PAUSE 450 ' pause for proper phrasing
SEROUT c.4,T9600_16,("[G3]merrily [D3]merrily
[B2] [G2]merrily [D3]lie ff[C3]is [B2]but
[A2]uh [G2]dream",13)
GOSUB waitspeak
for b0=1 to 6 'lets count B0 from 1 to 6
SEROUT c.4,T9600_16,("[S3]the val you uv B
0 iz ",#b0," you nitzz",13)
gosub waitspeak
next
goto main
waitspeak:
PAUSE 100
test:IF pinc.5=1 THEN waitspeak
PAUSE 100
RETURN
' wait to speak subroutine