Reply To Thread
Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. Collapse Details
    #11
    Halstaff's Avatar
    Halstaff is offline The Great Pumpkin
    Join Date
    Nov 2009
    Location
    San Diego, CA
    Posts
    512


    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
    __________________________________________________
    Dates on the calendar always come faster than you expect
    Reply With Quote
     

  2. Collapse Details
    #12
    Halstaff's Avatar
    Halstaff is offline The Great Pumpkin
    Join Date
    Nov 2009
    Location
    San Diego, CA
    Posts
    512
    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
    Reply With Quote
     

  3. Collapse Details
    #13
    Halstaff's Avatar
    Halstaff is offline The Great Pumpkin
    Join Date
    Nov 2009
    Location
    San Diego, CA
    Posts
    512
    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
    Reply With Quote
     

  4. Collapse Details
    #14
    Raven's Hollow Cemetery's Avatar
    Raven's Hollow Cemetery is online now Boo baby, BOO!
    Join Date
    Jul 2011
    Location
    Tallahassee, Fl.
    Posts
    1,679
    Nice job, thanks for posting this
    Reply With Quote
     

  5. Collapse Details
    #15
    Calloween's Avatar
    Calloween is offline Macho Nacho
    Join Date
    Mar 2009
    Location
    Franklin,Tennessee
    Posts
    816
    Blog Entries
    1
    Looks like a really simple circuit to put together. Do the picaxe chips have an onboard oscillator?
    Reply With Quote
     

  6. Collapse Details
    #16
    Jack Skellington's Avatar
    Jack Skellington is offline The Great Pumpkin
    Join Date
    Oct 2005
    Location
    Northern New Jersey
    Posts
    451
    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!
    Reply With Quote
     

  7. Collapse Details
    #17
    Halstaff's Avatar
    Halstaff is offline The Great Pumpkin
    Join Date
    Nov 2009
    Location
    San Diego, CA
    Posts
    512
    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
    Reply With Quote
     

  8. Collapse Details
    #18
    Halstaff's Avatar
    Halstaff is offline The Great Pumpkin
    Join Date
    Nov 2009
    Location
    San Diego, CA
    Posts
    512
    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
    Reply With Quote
     

Reply To Thread
Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts