|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
bells, buzzers, and whistles
I'm currently using my cRIO as a test bench, as opposed to driving it around like an RC car.
I thought it'd be fun if it made a "ding" when it finishes a test. (a buzz or a beep would be fine too; some kind of distinct sound) What's a good way to do this? These are the options I see:
I suppose if there's something over SPI or I2C, that could work as well. I'm using the RS232 port for CAN. |
|
#2
|
||||
|
||||
|
Re: bells, buzzers, and whistles
Maybe a piezo buzzer? Could control it using a relay off of a DIO or relay port, or could probably use a solenoid port directly.
http://www.radioshack.com/product/in...ductId=2062395 (I think this one is a buzzer; have to make sure that it has the tone generator circuit and isn't just the piezo element by itself) --Ryan |
|
#3
|
||||
|
||||
|
Re: bells, buzzers, and whistles
Thanks!
It says 300-500hz, so I'm guessing it includes a switcher. Apparently the digital module can put out 64mA, but I think I'll use a small transistor to amplify it. 6V*20mA = 120mW. A 2N2222 should do fine, but I hope the buzzer will run on 5V. |
|
#4
|
||||
|
||||
|
Re: bells, buzzers, and whistles
Quote:
--Ryan |
|
#5
|
|||
|
|||
|
Re: bells, buzzers, and whistles
I was looking to do this about a year ago, and ended up connecting a solenoid and a bell. A bit limiting, but easy and kinda retro-cool.
Greg McKaskle |
|
#6
|
||||
|
||||
|
Re: bells, buzzers, and whistles
Quote:
|
|
#7
|
|||||
|
|||||
|
Re: bells, buzzers, and whistles
You can connect a small speaker and a 555 timer to make a cheap beeper. Radio Shack had a three wire piezo on the shelf for a long time. This would self oscillate or could be connected with a 2N2222 for feedback operation. The feedback made it highly efficient. I could not find it on their website though.
As Ether pointed out, a digital output could make a nice beeper if you couple it to an LM386 or equivalent and a speaker. |
|
#8
|
||||
|
||||
|
Re: bells, buzzers, and whistles
Do you think it makes a difference in this case if I use a linear op-amp vs a transistor? I would expect them to perform the same if there's only 2 states: 0v and 5v.
How do you determine the capacitor size? (Because the GPIO are pulled high, I could burn up the speaker without a capacitor if I was running a program that didn't set that channel low. I suppose the other way would be to use a MOSFET. I have plenty of those from Jaguar's I've burnt up.) EDIT: I've never heard of a piezoelectric speaker having 3 wires. How does that work? Last edited by kamocat : 27-12-2010 at 16:10. |
|
#9
|
||||
|
||||
|
Re: bells, buzzers, and whistles
Quote:
Could you just connect the tweeter to the RTS or DTR pin of the cRIO's RS232 port and toggle it at a sufficiently annoying frequency? (like perhaps the tweeter's resonant frequency - if it's low enough to hear :-) Last edited by Ether : 27-12-2010 at 16:24. |
|
#10
|
|||||
|
|||||
|
Re: bells, buzzers, and whistles
I suggested the LM386 since it is designed for low impedance loads. A speaker connected across one of the digital outputs will likely exceed the current rating on the driver trying to sink current with an 8 ohm load. A 1mmf/16v electrolytic cap in series with the input should handle most frequencies you send it. The chip is self biased for single polarity power and can operate down to 4 volts.
If you are using one of the piezo devices, a simple single transistor driver should work fine. |
|
#11
|
|||
|
|||
|
Re: bells, buzzers, and whistles
Do you remember Monty Python's "The Meaning of Life" movie. The pregnant woman in the delivery room and the machine that goes "PING". You should have your own machine that goes "PING". I like machines that go "PING". They intimidate non-techies.
|
|
#12
|
||||
|
||||
|
Re: bells, buzzers, and whistles
Quote:
It shouldn't hurt the transceiver though. RS-232 drivers and receivers must be able to withstand indefinite short circuit to ground or to any voltage level up to ±25 volts. |
|
#13
|
|||||
|
|||||
|
Re: bells, buzzers, and whistles
The 9403 module is limited to 2 ma per output. Which transceiver are you referring to?
|
|
#14
|
||||
|
||||
|
Re: bells, buzzers, and whistles
I was referring to the RTS pin on the cRIO's RS232 port. On the PCs I have tested here, I can connect a small speaker directly to the RS232 port's RTS pin and -- by toggling the RTS line at an appropriate frequency -- get a sound loud enough to grab your attention from across a large room. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Thanks to 1742 and 1209/Congrats to 2410, 935, and 1987 | vhcook | Thanks and/or Congrats | 4 | 28-03-2010 15:50 |
| Boilermaker Regional - WFFA and Volunteer Award and the Trio! | Chris Fultz | Thanks and/or Congrats | 1 | 21-03-2010 14:05 |
| Congratulations and Thank you to Team 341, 694 and 3204! | AnibaS | Thanks and/or Congrats | 2 | 18-03-2010 07:40 |
| Code Errors With "Bells and Whistles" | Ryan O | Programming | 2 | 31-01-2006 19:29 |
| Code error on RC after downloading "bells and whistles" version of Kevins camera code | DanDon | Programming | 6 | 10-01-2006 18:07 |