If anyone is thinking of building this, here is the final layout -
Also, there is only 1 of the Tenda audio boards currently in stock and I'm not sure how often they get them in.
http://www.mdfly.com/index.php?main_...roducts_id=284
-
07-07-2011,04:28 PM
__________________________________________________
Dates on the calendar always come faster than you expect
-
07-08-2011,09:38 AM
The Tenda boards are currently out of stock at mdfly. I'll try and watch and post when they have them back in stock.
__________________________________________________
Dates on the calendar always come faster than you expect
-
07-11-2011,07:42 PM
Pshort has come through again and put together a schematic with the current modifications. My thanks to him for continually updating the schematic when I decide to make improvements. His work is greatly appreciated.
__________________________________________________
Dates on the calendar always come faster than you expect
-
07-11-2011,10:10 PM
Nice job, thanks for posting this
-
07-12-2011,09:01 AM
Looks like a really simple circuit to put together. Do the picaxe chips have an onboard oscillator?
-
07-12-2011,04:45 PM
So what does the code look like that runs the controller?
It has to do a whole bunch of stuff, detect the PIR trigger, send commands to the audio board to play and drive the servo.Boo!
-
07-12-2011,08:13 PM
Here's the code I used for the current design which uses a single audio track of 15 minutes that I put together with Audacity -
'08 Picaxe Audio/Servo driver
'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
'pin0 is to audio player
'pin1 is from audio driver
'pin2 is PIR
'pin4 is servo for jaw
Init: 'Just a starting point label
Pause 60000 'Wait 60 secs for PIR to 'settle down
Symbol delay = 5000 'Sets variable delay for making the whole thing wait for a while after pressing the button
Symbol time=b1
low 0 'Ambient audio or No audio
Testit:
readadc 2,b0
pause 5 'Brief pause on the checking loop
b0 = b0 + 5 * Pin2 'Pin 2 is PIR
if b0 < 100 then Testit
high 0 'Start audio
goto BEGIN
Begin:
w3=60000 'Counter for number of loops needed, every 1000 = about 15 seconds +/-
b2=8 'Set pause delay
b3=180 'Set Servo Min position and also offset - mouth open
b4=219 'Set Servo Max position - mouth closed
Servo 4,b3 '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 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 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:
low 0 'Stop audio or ambient track
for time = 1 to 30 '30 is the number of seconds of retrigger delay
pause 1000 'Pause for 1 sec
next time
goto Testit__________________________________________________
Dates on the calendar always come faster than you expect
-
09-02-2011,07:54 AM
I received the 5V power supply to run the wiper motor for the Kiwi controller board for the seance room and it works perfectly. All the components are happy and working together now.
The Kiwi board controls the entire scene. When the PIR is triggered, it starts a wiper motor on the rocking chair, starts the moving books, turns on the LED lights on both the books and the rocking chair, triggers the Tenda board to start and runs the jaw servo on the skeleton. After the skeleton says his piece, the audio, the rocking chair and its light stop. A second servo pushes down on the DVD remote and starts the Madame Leota projection. After it finishes, the moving books and its lights go off and the system waits for 60 seconds before it can be retriggered.
Everything including the PIR, Tenda board, Kiwi board, components, speakers and power supplies came to around $80 with the 5A power supplies costing $30 alone. I have to order some off Ebay to cut down that cost.
Here's a picture of the completed electronics package with the Kiwi board and the audio/servo driver using the Tenda stereo board.
http://
__________________________________________________
Dates on the calendar always come faster than you expect



LinkBack URL
About LinkBacks





Bookmarks