Shop OBEX P1 Docs P2 Docs Learn Events
Animated Creature with the PIR 555-28027-RT — Parallax Forums

Animated Creature with the PIR 555-28027-RT

Isaac ElekomIsaac Elekom Posts: 4
edited 2012-03-27 10:09 in Robotics
I am working on a animated dinosaur with PIR sensors for eyes I am looking into having the eyes blink and the dinosaur roar, What I want is to have the eyes blink when motion is detected and then if both of the sensors detect motion the dinosaur raors. But I am lost as to how to wire it up. I want the audio that it plays to be on a SD or microSD card so I can change what it plays with my computer. to put what I want done really simply it would look like this
Imput (R) and Imput (L) right and left eye each eye has an eye lid (RL) and (LL) then a speaker (S) is in his throat.
When (R) is activated blink (RL)
When (L) is activated blink (LL)
If (R) and (L) are activated within 1 second activate (S)
any help would be greatly appreciated.
Tsintaosaurs (31).jpg
1024 x 575 - 106K

Comments

  • xanaduxanadu Posts: 3,347
    edited 2012-03-24 11:02
    The PIR sensor mentioned is connected directly to a microcontroller.

    The LED's, provided the microcontroller is not too far away, can be driven with a current limiting resistor. Google 'LED resistor calc' if you don't know the math it's a good way to learn.

    The MP3 depends on what you buy, anything in mind?

    Servos for the eyelids, again they also connect directly.

    You may want to use some transistors and relays for brighter lights, this forum is full of posts just search for it.

    What microcontroller are you using? Animatronics is good stuff, have fun!
  • Isaac ElekomIsaac Elekom Posts: 4
    edited 2012-03-24 17:41
    I am wanting to use Parallax the whole way but I know that Arduino has a sound card so that would work better for the roar. The roar would be played through the microcontroller but I need one that can do it. Good idea for the eyelids.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2012-03-26 11:13
    Adding an Arduino and a sound shield is one way to go, but it might be more expensive than simply going with something like the PropBOE. Here's how it breaks down:

    In order to play back sound on an Arduino you need a shield (or breakout board) with an SD card, and depending on the sound format you use, an integrated codec for the sound clip. The Adafruit Wavshield is about the least expensive approach, but considering the data thruput requirements of decent WAV audio, your Arduino will pretty much be tied up just in playing back sounds. To mitigate this you can use an MP3 shield, like the SparkFun MP3 Player, but at $40 the Arduino+shield will add $70 to your project.

    The PropBOE has the SD card reader built in, plus an integrated headphone amp and 1/8" audio output jack for direct connection to an amplifier. You can use a WAV playback object available on the OBEX. Sound is decent as long as you select the correct encoding parameters. The PropBOE has plenty of I/O for the sensors, servos, lights, and motors you want to use. By distributing the workload among the Propeller's eight cogs you can do multiple tasks at once, including audio playback.

    The PropBOE is more expensive ($129) than an Arduino, but if you're going to be adding sound shields, SD card readers, etc., it might actually be cheaper in the long run. Plus it's ideally suited for things like animatronic projects where you need to control many things at once.

    -- Gordon
  • Isaac ElekomIsaac Elekom Posts: 4
    edited 2012-03-27 10:09
    I may just go with the ProbBOE if it would be easier.
    Thanks Isaac
Sign In or Register to comment.