Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   bells, buzzers, and whistles (http://www.chiefdelphi.com/forums/showthread.php?t=88060)

kamocat 22-12-2010 17:27

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:
  • wire something up to a solenoid output (requires the robot to be enabled)
  • create a circuit to amplify a digital output and wire up a buzzer or beeper to that

I suppose if there's something over SPI or I2C, that could work as well. I'm using the RS232 port for CAN.

RyanCahoon 23-12-2010 01:20

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

kamocat 23-12-2010 01:36

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.

RyanCahoon 24-12-2010 01:05

Re: bells, buzzers, and whistles
 
Quote:

Originally Posted by kamocat (Post 987975)
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.

My experience with these is they include very rudimentary, very noisy types of signal generators (see one person's teardown), so I suspect the range is in fact a range, and the frequency depends on the specific amount of voltage/current being supplied to the device, environmental factors, etc. 5 volts should work fine.

--Ryan

Greg McKaskle 27-12-2010 13:32

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

Ether 27-12-2010 14:23

Re: bells, buzzers, and whistles
 
Quote:

Originally Posted by kamocat (Post 987762)
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?

Could you just connect a digital or PWM directly up to a small tweeter? That ought to be sufficiently annoying to grab your attention.



Al Skierkiewicz 27-12-2010 15:48

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.

kamocat 27-12-2010 15:59

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?

Ether 27-12-2010 16:17

Re: bells, buzzers, and whistles
 
Quote:

Originally Posted by Al Skierkiewicz (Post 988801)
As Ether pointed out, a digital output could make a nice beeper if you couple it to an LM386 or equivalent and a speaker.

Here's another thought:

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 :-)



Al Skierkiewicz 27-12-2010 21:40

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.

Gdeaver 27-12-2010 22:30

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.

Ether 27-12-2010 22:52

Re: bells, buzzers, and whistles
 
Quote:

Originally Posted by Al Skierkiewicz (Post 988868)
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.

Yeah, it might not be able to source enough current to an 8 ohm load to be as loud as you might want.

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.




Al Skierkiewicz 28-12-2010 09:56

Re: bells, buzzers, and whistles
 
The 9403 module is limited to 2 ma per output. Which transceiver are you referring to?

Ether 29-12-2010 21:24

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.




All times are GMT -5. The time now is 12:07.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi