![]() |
Forum Index : Microcontroller and PC projects : Diodes with electro sounders?
Author | Message | ||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9501 |
I have some nice cute little electro sounders: SOUNDER These do not have built-in drivers, so I am driving them with PWM from the uM, and they work fine. As they are a 3v device, I am not using any buffer transistor, and am driving them direct from the uM pin, as the current consumption is supposed to be 14mA @ 2kHz or so, so feel that is still within the limits of the uM pin. The sounder is not driven continuously, only for alerting purposes. I currently have a reverse-blocking diode across the sounder to ground, a-la the same idea as a diode across a relay coil, but am wondering if this is needed with only a 14mA current or so? At this stage, I have left it in place, but just wondering what others think..... EDIT: Just double-checked the specs for the uM I/O pins, and I am probably pushing things a bit 15mA is the maximum, and 15mA is what this device uses at 3v. Perhaps it would be prudent to put a transistor driver in afterall? Smoke makes things work. When the smoke gets out, it stops! |
||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
Cathode towards the uM pin right ? Sounder from pin to ground ? I'd take it out, and put a capacitor in series. (value depending on how low you want to go) That will relieve the pin of delivering DC if it happens to go high. The pins can evedently drive DC into 82 Ohms, but no use making heat for nothing...... |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9501 |
K of diode to uM pin, and sounder to GND - correct. OK, I experimented with various value caps, and 100uF works well to provide about the same volume from the sounder as a direct connection. Will the cap isolate the pin enough? Smoke makes things work. When the smoke gets out, it stops! |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1967 |
The diode across a relay is to suppress the spike created as the magnetic field around the coil collapses creating a back EMF. I don't think the same thing would happen with a transducer. Paul. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
> Will the cap isolate the pin enough? Since the resistance of the coil is 42 Ohm, worst case would be an instantaneous spike of ~ 3/42 Amp. An added series 39 Ohm resistor would be super safe at the expense of some efficiency. |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9501 |
@ Paul & hitsware - Thanks for the feedback, guys. I will stick with the transducer via a 100uF cap in series, no back-EMF diode. Thank you both for your input. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
atmega8![]() Guru ![]() Joined: 19/11/2013 Location: GermanyPosts: 723 |
Ok, what about Dildos with electro Sounders?? Any experience in this? ![]() |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9501 |
Not my area - how about you? ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
How low can you hear your sounder ? ' up down arrows for frequency ' left right arrows for dutycycle f=110: p=50: GoTo display setf: If KeyDown=0 Then GoTo setf If KeyDown=128 Then f=1.01*f If KeyDown=129 Then f=f/1.01 If KeyDown=130 Then p=1.01*p If KeyDown=131 Then p=p/1.01 If p>100 Then p=100 If p<0 Then p=0 PWM f,p Pause 100 display: Cls Print "frequency="f;" dutycycle=";p GoTo setf |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9501 |
KeyDown not supported in uM, only on full size MaxiMite.(uM is what I have setup on the bench at the moment) I will see if I can hook one up later. Smoke makes things work. When the smoke gets out, it stops! |
||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
> KeyDown not supported in uM uM or with using PC for terminal ? |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9501 |
KEYDOWN is a command supported in the MaxiMite version of MMBASIC, but not in the MicroMite version, according to the manuals. It's no big deal - I was going to hook up a mock MM using a UBW32 module, so that I could test it with a VGA-TV converter for another member here, so I can use it for that. Testing a beeper this way is a little subjective though, as different people have different hearing abilities or lack thereof. Is there some special reason you need to test this on these beepers? I could send you one if you wanted to play with one - I have 20. Smoke makes things work. When the smoke gets out, it stops! |
||||
hitsware Guru ![]() Joined: 23/11/2012 Location: United StatesPosts: 535 |
> Is there some special reason you > need to test this on these beepers? Nah .... Just for fun.... Back to INKEY$ then ![]() I like KEYDOWN for ease of using the arrow keys There is a way to use arrow keys with INKEY$, but I've forgotten. Something about the second byte of the ASC#? |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |