• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

H-Bridge Amp for 8Ω Speaker (PWM)

Status
Not open for further replies.

JDW1

Member
I am using fairly robust D882 and B772 transistors in my design, so I am wondering if I still need 4 damper diodes to protect the transistors as shown below? (Leaving them out saves a little on space and cost.)

 

fezder

Well-Known Member
Never thought of using H-bridge with speaker, then again, push-pull topology isn't that far at all...and haven't had luck of building amplifiers.
but where's your filtering feeding the speaker?.
Just asking, do you mean dc-blocking filter? (learning alongside....)
 

JDW1

Member
What I posted is not the complete circuit. I was just simulating that part in the iCircuit app (for OS X, iOS, etc.):

http://icircuitapp.com

There is of course filtering on the +12V power supply side. And the 2 PWM oscillators you see will be output pins of a controller chip (the same PWM signal on both, but one being 180° out of phase). There is a slight DC offset on the PWM signal going into those 680Ω resistors, but the output at the speaker side is a perfect 0V to 11.9V as you can see. I have built it and verified it works. I was merely posting this to know if there are reasons to use 4 protection diodes in a SPEAKER circuit versus a MOTOR circuit where I know they are needed. I assumed diode protection might be needed since I do see some audio amp designs that put a single diode across the speaker. And there is a reactance when you properly simulate a speaker, as discussed here:

http://www.thegearpage.net/board/index.php?threads/aikens-reactive-dummy-load.1072793/

http://www.shine7.com/audio/orcad.htm
 

crutschow

Well-Known Member
Most Helpful Member
Not sure I understand what you are trying to do. :confused:
Such a low PWM frequency will be reproduced by the speaker as a very loud sound.
For audio reproduction the PWM frequency has to be much higher than highest audio frequency.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
Not sure I understand what you are trying to do. :confused:
Such a low PWM frequency will be reproduced by the speaker as a very loud sound.
For audio reproduction the PWM frequency has to be much higher than highest audio frequency.
I presumed the frequency in the simulation was nothing to do with the actual project?, unless of course he's simply making a sounder - and not a class-D amp?.
 

dr pepper

Well-Known Member
Most Helpful Member
You might well get some back emf from the speaker if you apply a square wave to it like that circuit would.
As Nige says not a good idea for music, if your making a sounder then the diodes may be a good idea, or you could put a r/c snubber across the speaker to reduce spikes which could blow the trannies.
 

JDW1

Member
Folks, thank you for all the kind input. My project is a customizable car alarm siren.

There are various tones that the siren will reproduce, but primarily the tones sweep up and down from about 650Hz to 1650Hz. I might go as low as 300Hz or as high as 3kHz but that's about it. The reason to use an H-Bridge Amp in this application of course is to get the loudest sound possible from the speaker. You want to split ears more than achieve pristine audio accuracy. I want somewhere between 110dB to 120dB from the speaker (at 3 ft.), which in my tests is possible.

Most all car alarm sirens use pretty much the same 6-tone chip, even if they are 1-tone. You've all probably heard them, and if you Google for car alarm sounds you'll see they're pretty much all the same. As a result, there is not a wide variety of siren tone generator chips out there. The 3-volt RATO RT0618 is the one I have been fiddling with. Note the two application circuits in the back of the following datasheet, the second of which uses the H-Bridge, but with no protection circuitry around the speaker:

http://www.promelec.ru/pdf/RT0618.pdf

My project is to go beyond what that RATO chip offers; but so far, I've not yet figured out how to accomplish my aim. I want to distinguish the "Chirp" sounds (created when the alarm controller pulses the siren ON about 30 to 40msec) from the full siren blast (which usually lasts 30 seconds, and cycles through 1 or more of the 6 tones). In other words, I want to create a siren that allows the user to choose which Chirp sound they want separately from the Full Siren blast. This is not possible with the RATO chip because, for example, if you select only tone-5 (S5), if you activate the siren for 30msec, you will hear the distinctive chirp sound for S5. (The Chirp is tone S5, just for a very short duration.) To get a different chirp sound with that RATO chip would mean I'd need to select something other than S5, but that's not what I want. I also would not be able to choose 6-tone mode with that RATO chip either, since the RATO chip cycles through the tones in a fixed order, and your Chirp sound would be fixed to whatever is the 1st tone played. Again, I want to make the Chirp sounds selectable and not tied to the full siren blast.

It seems that my only option would be to use a PIC MCU to read incoming pulses that are, say, less than 60-100msec and interpret that as a Chirp, then determine which Chirp tone the user has programmed (for example, by externally cutting a wire), then play that Chirp via PWM through the H-Bridge; and then if the incoming activation is longer than 60-100msec, I'd play whatever Siren blast setting had been chosen. But in this case, the Chirp sound would not simply be a short duration of the chosen Full Siren Blast sound. They would be completely separate.

I would also want to offer the user the ability to choose a "soft chirp" which makes the Chirp sound less painful to the ears than the full siren blast. I suppose this could be achieved by reducing the amplitude of the two PWM output waveforms (if that's possible to do via a PIC).

Why do this? To make the siren sound different from anything else out there. I've not see any car alarm siren that allows the user to distinguish the Chirps from the main siren blast. So this level of selectability would make the sound truly unique. And since you only rarely hear the full siren blast, and since you hear the Arm/Disarm chirps several times per day, being able to change the chirps would have merit.

Any further thoughts and advice on H-Bridge diode protection or my siren project in general would be greatly appreciated.

Thank you!
 

audioguru

Well-Known Member
Most Helpful Member
You are making a variable low frequency buzzer with an output power of 7.5W for the low fundamental frequency and another 7.5W for all of its harmonics. It is not loud unless you play it through a directional horn speaker. Since there is no audio amplifier then if you reduce the input signal level then the output will just suddenly stop. If you use real PWM using a high frequency carrier then the width of the pulses controls the loudness and you can make sounds that are not a simple buzz.
 

JDW1

Member
audioguru, I am unsure what you mean by real PWM. Did you reference the RATO RT0618 datasheet mentioned in my previous post and examine their application schematic?

I have a 3rd party car alarm siren that uses that RATO chip and that same H-Bridge implementation, and using a Sound Meter at 1 meter I get 120dB. That's loud. And of course it sounds (to my ear) louder or softer depending on the tone being played (depending on the PWM signal going into the H-Bridge from the RATO chip). The tones generated by that RATO IC are truly PWM. (I don't know how you define "buzz" but that word implies "mono-tone," which this siren is not.) The width of the square-wave pulses exiting the RATO chip vary the tone (frequency) played on the speaker. Those PWM signals are shown in my opening post and schematic, simulated as two separate signals, 180° out of phase with each other.

The H-Bridge is the audio amplifier. The H-Bridge boosts the 3Vp-p (plus 0.6v offset) PWM signal output of the RATO chip to nearly 11.9Vp-p. You can see that in the waveforms shown in my opening post.
 

audioguru

Well-Known Member
Most Helpful Member
The datasheet for the RATO IC has no details about its signal. It says it makes 6 different sounds. Its oscillator operates ay 80kHz so it probably produces the sound differences with PWM.
You did not show any PWM, instead you showed a 650Hz buzzer. Like a buzzer, your oscilloscope shows a 650Hz squarewave, not a high frequency PWM waveform.

The width of the pulses does not vary the frequency of the tone, it varies the loudness of the tone. The frequency of the tone is produced by changing the width of the pulses at an audio frequency.
 

JDW1

Member
Yes, on my iCircuit simulation, I have (sadly) no means to produce a Sweep sound, so I had to use 2 fixed signal sources. But on the actual siren product I've been fiddling with, pins 11 & 12 of the RATO RT0618 chip are indeed PWM, and you can see and hear that in the following video I just made (scope problems are on pins 11 & 12):


By the way, the siren is actually much louder than what you hear. To ensure I could make this video without clipping the audio too much, I swapped the two 220Ω resistors for 1.5kΩ each, thereby reducing the output volume considerably.

Remember, what you see on the scope in this video are pins 11 & 12 of the RATO RT0618 chip which are 180° out of phase with each other and are the signals that feed into the H-Bridge Amp, which in turn drives the 8Ω speaker. The PWM signals hitting the speaker (after the H-Bridge) are the same pulse widths you see on the scope, just 0-12Vp-p (amplified).
 

Nigel Goodwin

Super Moderator
Most Helpful Member
The PWM signals hitting the speaker (after the H-Bridge) are the same pulse widths you see on the scope, just 0-12Vp-p (amplified).
You're confusing the issue by referring to it as PWM, which it's not - it's just a crude squarewave buzzer.

PWM (for audio) uses a frequency far above audio, and filters the carrier out before the speaker - the modulation (PWM) is the actual audio. You have no carrier, no modulation, thus no PWM.
 

JDW1

Member
Strictly speaking, you are correct regarding PWM and an HF carrier. I certainly don't mean to insult the intelligence of audio pro's out there or create further confusion, but let's put strict adherence to labels aside for just a second while we ponder it logically. As you see in my video, the amplitude is unchanged while only the widths of the square wave pulses vary, thereby producing a sound (which you label "buzzer") from a speaker that audibly (to human ears) sounds like high and low frequencies. Whether we dislike that particular sound or not, the fact is they are high and low frequencies in the audible spectrum, not merely a fixed-tone "buzz." Therefore, to increase or decrease audible frequency by varying only the widths of pulses, with or without an HF carrier, is to my brain, "Pulse Width Modulation" of a sort. Perhaps we should call it PWO, Pulse Width Output? Or PWSD, Pulse Width Speaker Driver? Certainly sounds better than calling it "Crude Square Wave Buzzer." :)

Semantics aside, my video clearly shows what the RATO chip is doing.

Regarding the subject of this thread, the consensus here appears to be that protection diodes (4 of which are shown in the schematic in my opening post) are NOT needed in this particular circuit to protect the transistors, seeing that the speaker feedback would not be significant enough to damage them over time.

The only thing left is to figure out how to produce different Chirp sounds that are not tied to the full siren sound. But again, the only solution I see for that would be to use an MCU like a PIC.

My personal thanks to everyone who contributed to this thread, including details about the strict definition of "PWM."
 

audioguru

Well-Known Member
Most Helpful Member
I agree with Nigel that the signal is not PWM, it is simply changing the frequency of the squarewave audio output. A buzzer also produces a squarewave usually at a fixed frequency but it can be at a variable frequency like this one.
The "chirp" is simply a fixed frequency squarewave for a short duration of 30ms and is also not PWM.
The switched resistors in the RATO circuit simply change the frequency of the audio squarewave and do not change its tone.
The siren sound also does not change the widths of the pulses, it simply changes the frequency of the audio squarewave.
Your original schematic and the schematic from RATO do not have the 220 ohm resistors that you are trying to use as volume controls. Which resistors? Maybe if you starve the transistors from having enough base current then they do not turn on properly which reduces the volume. The transistors are missing resistors that would quickly turn them off.

Of course you think the pulses are narrower when the audio squarewave frequency is increased because there are more pulses in a certain time period. PWM varies the actual width of the high frequency pulses to form a low frequency waveform and the audio modulation changes the frequency of the changed widths. I wrongly said, "the width of the pulses controls the loudness" when actually the loudness of the demodulated audio waveform is determined by how much the width of the high frequency pulses vary.

I do not know what "different chirp sounds" you want. A chirp is simply a single frequency for a short duration. A different sound would be a sinewave or triangle wave instead of a squarewave. What about having two or three audio frequencies at the same time playing a musical chord? With vibrato and/or tremolo? Then the sounds will be different.

Why do you need a car alarm? To scare away an animal that gets too close?
 

tomizett

Active Member
Personally (and I don't claim to be an expert, mind) I'd want to include those diodes to be on the safe side. It's usual to include "catcher" diodes on large linear power amplifiers and, while in theory there should be no problem with back EMF as either the top or bottom transistor should be saturated at all times, there will always be some finite dead-time during which a commutation current will want to flow. Without an explicit commutation path you'll be breaking down the BE junction, and transistors don't like that. Even if there is no problem inherent in the amplifier itself, cars are a notoriously hostile environment in terms of EM noise and I think it might be wise to apply these diodes if you are planning on running any length of cable between the sounder and amplifier.
Just my 2p worth.

I like the drive scheme though - that's tidy.
 

dr pepper

Well-Known Member
Most Helpful Member
I'm with tommi, protect your trannies with diodes and a rc snubber.
 

JDW1

Member
Your original schematic and the schematic from RATO do not have the 220 ohm resistors that you are trying to use as volume controls. Which resistors?
The schematic in my opening post shows those 2 resistors as being 100Ω each, which is what the RATO RT0618 datasheet specifies in its example application circuit, but the siren you see in my video uses two 220Ω instead. In my testing, the difference between 100Ω and 220Ω is negligible on the final output amplitude. But increasing them to 1.5kΩ each drops the amplitude from 11.9V to about 6.0V.

The sound of chirps is really a personal preference. Some people don't like any chirps and instead turn them off when Arming and Disarming an Alarm. Yet others buy "voice modules" that speak when you Arm/Disarm. Finding one's preference is trial and error. You know the chirp you prefer only when you hear it.

I don't know if I can answer the question about why I want a "car alarm" to your satisfaction. Some people love them while others hate them.

As to the diodes and RC snubber, please note that neither the RATO datasheet, nor the actual siren product I am fiddling with (which is based on the RATO datasheet design) have such protection parts. That implies (a) they really aren't needed or (b) they are and the current design is somewhat flawed in that the transistors could go bad in time.

Thank you for all the feedback.
 

audioguru

Well-Known Member
Most Helpful Member
The schematic in my opening post shows those 2 resistors as being 100Ω each, which is what the RATO RT0618 datasheet specifies in its example application circuit, but the siren you see in my video uses two 220Ω instead. In my testing, the difference between 100Ω and 220Ω is negligible on the final output amplitude. But increasing them to 1.5kΩ each drops the amplitude from 11.9V to about 6.0V.
I didn't look at the datasheets for your (Oriental?) transistors because sometimes they are not written in English but transistors all have a wide range of current gain. RATO probably used 100 ohms so that all of them turn on properly so your might have high gain and work with higher resistance.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top