Haunt Forum banner

The New $15 Picaxe Talking Skull Controller

27K views 115 replies 14 participants last post by  pshort 
#1 ·
I've been working this season on expanding my use of the Picaxe chip for controllers to use in my haunt. With hpropman coming up the concept and the help of Fritz42_male, we've come up with an inexpensive and easy to build controller utilizing the entry level Picaxe 08 to take an audio input and have it drive a servo for a talking skull. Cowlacious makes a great off the shelf unit, but I wanted to see if we could make one cheaper and with the ability to program it to better fit our needs. The basic board costs around $15 in parts if you order in quantity once you have the Picaxe download cable which runs about $20. The code for the board is very simple and you can just cut and paste it into the free editor.
So here is the basic board. I'll be modifying it yet to utilize the other 2 outputs in order to have it triggered by a PIR and to use one of the 300 second audio boards from Electronics123.



 
See less See more
1 1
#4 ·
The chip is designed for any audio input just like the Cowlacious board. I'm using a split track with the tones which I feel gives much better response. The video is a small part of the routine my bar room singer is going to do. It was some extra work but looks much better plus it's really the only way when you're trying to get the skull to sing a song without a separate vocal track.
 
#6 ·
Yes, the program to convert the audio to the servo movement is very short. Here's what I'm starting with -

'08 Picaxe Audio/Servo driver

'#Picaxe 08M2

'b1 byte variable 0-255 in 10uS increments.
'b2 Pause variable 0-65535 in 1mS increments.
'Hitec servo's like signals between 0.740 and 2.740 mS and period of 1 to 20 mS
'C.0 is to audio player
'C.1 is from audio driver
'C.2 is PIR
'C.4 is Greeter jaw servo

symbol PIR_IN=pinC.2
symbol PIR_COUNT=b5

Pause 60000

Init: 'Just a starting point label

serout C.0,4800, ($EF); 'STOP MP3 module
pause 1000
serout C.0,4800, ($E1); 'Set MP3 volume
pause 1000

Testit:
Do : Loop Until PIR_IN=1

Do
PIR_COUNT = PIR_COUNT + 1 * PIR_IN
Loop Until PIR_COUNT = 10
PIR_COUNT = 0

goto Routine

Routine:

Servo C.4,205 'Initialises Pin4 as a servo output and sets servo to the start position
pause 500
serout C.0,4800,($01) 'Start playing first mp3
pause 500

Begin:

w3=5000 'Counter for number of loops needed, every 1000 = about 15 seconds +/-

b2=8 'Set pause delay
b3=178 'Set Servo Min position and also offset - mouth open
b4=204 'Set Servo Max position - mouth closed
Servopos C.4,b4 'Initialises Pin4 as a servo output and sets servo to the start position

OP:

ADCA: 'Reads input voltage in 256 steps Pin 1 (leg 6)

Readadc C.1,b0 'Read input voltage into b0
b1=225-b0+b3 'Add offset for servo's CCW output
If b1<b3 then gosub servomax 'Test for less than servo min position and if less, set at servo min
If b1>b4 then gosub servomin 'Test for more than servo min position and if more, set at servo max

MoveA: 'Move servoA
servopos C.4,b1 'Pulse pin 4 (leg 3) width=b1 - Using servopos can help prevent jitter

pause b2 'Wait Delay b2

w3=w3-1 'Decrement the counter
if w3>0 then goto OP 'Test for counter being larger than 0 if yes, go round the loop again

goto Hold

goto OP

servomin:
b1=b3
return

servomax:
b1=b4
return

Hold:
servopos C.4,212
pause 500
low C.4

for time = 1 to 15 '60 is the number of seconds of retrigger delay
pause 1000 'Pause for 1 sec
next time

goto Testit

I'm using a regulated 5V power supply to run the board and the servo and it seems to work fine.
I've modified the board to utilize the other 2 outputs and plan to have it triggered by a PIR. I'm using the Tenda triggerable audio device that outputs in stereo so that I can use a tone track to activate the servo.
 
#7 ·
Here's the parts list for the board as shown above -

PART PART NUMBER SUPPLIER COST EACH
1. PC Board 276-150 Radio Shack 2.19
2. 1/8 Phone Plug 274-286 Radio Shack 1.60
3. 5K Pot 43078 Jameco 1.25
4. 8 Pin Socket(2) 112206 Jameco .13
5. 0.1 Capacitor(2) 15229 Jameco .06
6. 10uF Capacitor 1946367 Jameco .05
7. Header 160882 Jameco .59
8. 1K Pot 253982 Jameco .95
9. 330ohm Resistor 690742 Jameco .03
10. 22K Resistor 691180 Jameco .03
11. 10K Resistor(4) 691104 Jameco .03
12. 2.2K Resistor 690945 Jameco .03
13. 1K Resistor 690865 Jameco .03
14. 47K Resistor(2) 691260 Jameco .03
15. N4148 Diode 179215 Jameco .05
16. LM1458 23131 Jameco .35
17. Microcontroller 08 Picaxe phanderson 2.65
18. 5V Power Supply PS-513 AllElectronics 4.50
19. Assorted Wire links
 
#10 ·
I haven't tried it with this board but it should work. I used battery packs for a couple of the Cowlacious boards myself last year and they really seemed to eat the batteries so this year I switched all of them to wall warts. I use the powered computer speakers which need to be plugged in anyway so that shouldn't be an issue for my haunt.
 
#11 ·
Don't try running a Picaxe at anything higher than 5V - it will fry quickly. Even 5.5V is too much.

Maybe there is room for a regulator on the layout - a 78L05 wouldn't do the job as you need about 1.5V more than the regulator's rating but there are other regs around that would do the job. They are transistor size as well so not much increase in size.
 
#14 ·
There are a lot of 5V LDO (low dropout) regulators available. One that I've used in the past is the LP2950CZ-5.0, which comes in a TO92 package and has the same pinout as the LM78L05. With a 100 mA load it should keep regulating with an input voltage as low as 5.45V.
 
#25 ·
#31 ·
Halstaff is correct except that if the speaker lowers or raises his voice the jaw either may not open at all or stay open during the louder sections. That is why the tone track works better. Play the tone track on one channel and the voice on the other channel. you can just record yourself saying Baaaa or something like that and use that sound where you want the jaw to open at in sync with the voice track.
 
#33 · (Edited)
I don't as I designed it on PEBBLE. If you would like to download PEBBLE, it's free and I would be happy to provide the code so that you had bring individual items up and move things around. You can find it here - http://www.picaxeforum.co.uk/showthread.php?t=12629&highlight=pebble

If you'd rather not go that route, I've labeled the resistors in this picture -
 
#35 ·
Mine are triggered so I'm not sure how much continuous duty they can stand.
I'm working on another Picaxe upgrade to this circuit. It will be able to control two 3 axis skulls with 2 servos for eyes as well as the audio circuit. It won't require programming individual movements but instead will rely on random movement. If it works out like I hope, all you'll have to program is the minimums and maximums for the servos.
I know there aren't many people interested in these circuits but I'm having fun learning and building them. They're allowing me to add an incredible amount of animation to my haunt and I'm not breaking the bank.
Send me a PM with your email and I'll pass along the PEBBLE code for the circuit.
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top