On 29 Nov 2003 at 9:02, gtyler wrote: > What I mean is if it is an open drain and you connect the diode one way it > will work as intended, but if it is not an open drain then no matter which > way you fit the diode it shorts the output when it is driving either > positive or negative. > > George That would be true if you can show me a PIC that drives negative, If you use the speaker as a pullup, it's just like driving a relay. Use a stinkin' diode. OTOH, think about all the 555 circuits driving speakers. Ever see a 555 tone generator, warbler, whatever? Ever see even a diode on the output of one of those? I don't recall seeing one. Turn up the volume of your stereo until it clips. You're more likely to blow your speakers. If you've been paying attention, I showed that a PIC ain't gonna like drivin' an 8 ohm speaker and I plugged in 32 ohms and that's too much. So start thinking about an output amp like the emitter follower I think someone mentioned. I've seen enough tone generators with square wave outs and no diodes. One that comes to mind is my line finder. It's just a two tone CMOS oscillator and an "inductive amplifier" they call it which is the $20 way of saying LM386 op-amp. No diodes across that speaker, either. Mike > > ----- Original Message ----- > From: "Mike" > To: > Sent: Saturday, November 29, 2003 12:16 AM > Subject: Re: [PIC]: Driving a speaker? > > > > On 28 Nov 2003 at 22:15, gtyler wrote: > > > > > > > This could be true if it is an open drain output, otherwise it does not > > > matter which way the diode is, > > > > Yes it does. It's called a inductive kick-back and it doesn't care if its > an open-drain or > > not. It will attempt to sent a high-current spike in the other direction. > I wouldn't count > > on the pull-up to absorb it all either. > > > > There's a lot of text below and by top posting, it isn't clear who or what > you're replying > > to. > > > > > in one direction the diode will short the > > > output, also an isolating capacitor does not solve it either. > > > > The cap is to protect the speaker in the event that the PIC output is > inadvertently left > > high. > > > > > While I have > > > seen PICs work like this I doubt if it is good practice.Rather drive a > > > transistor and use that to drive the speaker. > > > > Why would it be bad practice? It only depends on the amount of drive > required. If the > > PIC can drive it... as they say, "If it ain't broke, don't fix it." > > > > at 5Vp-p into 8 ohms with no cap: > > > > Vrms = 3.53V and P = 1.56 W avg > > > > with cap and assuming a reasonable square wave at the speaker, neglecting > cap > > loss: > > > > Vrms = 2.5V and P = 781mW avg. > > > > NOTE: square wave in this context implies 50% DC, any thing else is a > pulse or > > rectangular wave except for 0% and 100% DC > > > > Take 781mW (with cap, which is smart, not for the speakers sake in this > case, but > > that of the PIC) and you get: > > > > Irms = sqrt(Pave/R) = 312 mA rms > > > > Ip = 441mA > > > > So much for the 8 ohm speaker with no driver transistor. But that removes > the > > abiguity of the technical term "doubt" used above. Good guess, though ;-) > > > > BRs, > > Mike > > > > > > George > > > > > > > > > You really want to load the pic output with a diode? > > > > > > > > > > > > George > > > > > > > > > > No, and that wasn't suggested. The diode is there to prevent > the > > > > inductive > > > > > kickback from hitting the PIC pin. I don't see how you can say you > are > > > > > "loading" the PIC pin with the diode, the diode only conducts when > the > > > > > speaker is turned off, and then only conducts current due to the > attempt > > > to > > > > > change the current flowing through the speaker quickly. It is a > similar > > > > > effect to turning off a relay. TTYL > > > > > > > > You're both right - depends which way round the diode is. > > > > > > > > Regards > > > > Sergio Masci > > > > > > > > > > -- > > > http://www.piclist.com hint: PICList Posts must start with ONE topic: > > > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > > -- > > http://www.piclist.com hint: PICList Posts must start with ONE topic: > > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics