Shop OBEX P1 Docs P2 Docs Learn Events
2 signals at a time? — Parallax Forums

2 signals at a time?

ksychengksycheng Posts: 11
edited 2006-12-09 17:12 in BASIC Stamp
Hey guys...

Hope everything is going well...

I am doing a project...I have a webcam, a servo motor...
First of all, the user has to define a certain colour (HSV values) and then the webcam, together with the servo motor will chase after that colour...
that part is done...

However, I want to add something extra to it...I want a speaker (an alarm) to sound as soon as the webcam loses the target...
Is it possible to send out 2 signals at the same time? 1 to tell the webcam to keep looking for the target and the other to make the speaker sound?

Thanks in advance.
Good day!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-12-09 15:32
    You might be able to make some sort of sound by outputting short bursts of sound in between servo pulses. It's probably a lot easier to use something like a 555 timer to put out a pure tone and use the Stamp to turn it on and off. Another choice would be to use one of those little piezo speakers with a built in tone generator and just use the Stamp to turn it on and off.
  • ksychengksycheng Posts: 11
    edited 2006-12-09 15:50
    Thanks for your reply! Exactly what I need...

    In what kind of stores will I be able to purchase those '555 timer' and 'piezo speakers'?
    I am new to this...no idea what they are...

    Thanks a lot, Mike!
  • Mike GreenMike Green Posts: 23,101
    edited 2006-12-09 16:34
    Here is one example of a piezo buzzer that can work directly from a Stamp pin (positive to +5V, negative to Stamp pin, do LOW to pin to turn on): <http://www.radioshack.com/product/index.jsp?productId=2062398&cp=2032058.2032230.2032266&parentPage=family&gt;

    The Stamps in Class tutorial on Basic Analog and Digital discusses tone generation and has a chapter with a 555 timer based sound generator. It's powered from +5V. You can simply power it from a Stamp pin (make HIGH to turn on) instead. Parallax sells the 555 timer and piezo speaker, but others like DigiKey, Jameco, and Mouser have similar parts in the on-line catalogs.
  • ksychengksycheng Posts: 11
    edited 2006-12-09 16:54
    Thanks.

    How is the loudness of the 85dB Piezo Buzzer?· I want a nice and loud tone!



    Thanks again!!!
  • Mike GreenMike Green Posts: 23,101
    edited 2006-12-09 17:12
    These are pretty loud. Look at Radio Shack's website for others that are even louder, but may need a switching transistor for the Stamp to control them (they draw more than the 20ma maximum limit for a Stamp pin).
Sign In or Register to comment.