Author Topic: Class D Speaker Driver  (Read 17586 times)

0 Members and 1 Guest are viewing this topic.

Offline gnuarmTopic starter

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: Class D Speaker Driver
« Reply #25 on: February 21, 2021, 08:26:24 pm »
The FPGA has 3.3V outputs, but I have control over the logic and can tristate if useful.  My thinking is to generate a pair of opposite polarity, non-overlapping signals from the FPGA to control the high and low side drivers.  Zero's design avoids using a level shifter for the high side by AC coupling a common drive signal. 

I'm sorry, but I still don't get why you are talking about saturation.  In a D class amplifier the goal is to saturate.  I'm not trying to build a class B amplifier.  Well, I'm not thinking of it as class B since the only values that will be fed into it are max of either polarity, which pretty much makes it class D.  By not saturating power is being expended in the transistors that is not needed. 

I think it is pretty clear I'm not grasping something fundamental about what you are saying. 

One thing I realized running Zero's simulation, I had not looked at the 2N7002's Ron, it's a bit high for this, so I'll need different transistors no matter what.  Minimizing the BoM is something I prefer, but on this project there's no point.  I'm not the only designer and people seem to be happy throwing whatever part onto the board regardless of what else is already in use. 
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline gnuarmTopic starter

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: Class D Speaker Driver
« Reply #26 on: February 21, 2021, 08:41:06 pm »
If it's only ever going to be AC, BJTs can be biased and AC coupled to the I/O port, which shouldn't be allowed to float, otherwise both transistors will turn on, causing a short circuit. An additional pair of emitter followers may be required, if more base drive is required.


Actually, your circuit turns off both transistors when no AC is present.  So it's safe in that regard which is useful since the idle state is no pulses.  The PWM signal is at least 32 kHz, but that might be too low I've realized.  So perhaps 128 kHz or even 256 kHz.  That lowers the resolution of the value being output (33 MHz clock), but there are ways to dither the PWM to get more resolution than allowed by a simple PWM. 

The 32 kHz rate is not too low for the speaker, but it will be harder to filter out for EMI purposes.  The chips work at higher frequencies to make them easier to filter.  In fact, many claim "no filter required" but I expect they are referring to the need to filter for acoustic purposes.  They talk about using ferrites in the filter, but even at 250 kHz ferrites are not effective.  Ferrites will help with much higher frequencies, but not the fundamental.   I don't recall EMI standards.  Are the sub MHz frequencies not such an issue?
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline bdunham7

  • Super Contributor
  • ***
  • Posts: 9439
  • Country: us
Re: Class D Speaker Driver
« Reply #27 on: February 21, 2021, 08:59:32 pm »
I'm sorry, but I still don't get why you are talking about saturation.  In a D class amplifier the goal is to saturate.  I'm not trying to build a class B amplifier.  Well, I'm not thinking of it as class B since the only values that will be fed into it are max of either polarity, which pretty much makes it class D.  By not saturating power is being expended in the transistors that is not needed. 

I think it is pretty clear I'm not grasping something fundamental about what you are saying.

I only mentioned it because you expressed specific concerns about shoot-through with the push-pull arrangement.  Saturating the transistors will limit the rate at which you can switch the output state without having both transistors on at the same time.  Without seeing the actual setup, I wouldn't know whether this is a concern or not.
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22457
  • Country: gb
  • 0999
Re: Class D Speaker Driver
« Reply #28 on: February 21, 2021, 09:42:43 pm »
If it's only ever going to be AC, BJTs can be biased and AC coupled to the I/O port, which shouldn't be allowed to float, otherwise both transistors will turn on, causing a short circuit. An additional pair of emitter followers may be required, if more base drive is required.


Actually, your circuit turns off both transistors when no AC is present.
The problem is if the input is left to float when the power is applied, both Q1 & Q2 simultaneously turn, as C2 & C3 charge.

Quote
So it's safe in that regard which is useful since the idle state is no pulses.
Once it's settled to the steady state, with C2 & C2 charged, it should be fine with the input floating.

Quote
The PWM signal is at least 32 kHz, but that might be too low I've realized.  So perhaps 128 kHz or even 256 kHz.  That lowers the resolution of the value being output (33 MHz clock), but there are ways to dither the PWM to get more resolution than allowed by a simple PWM. 

The 32 kHz rate is not too low for the speaker, but it will be harder to filter out for EMI purposes.  The chips work at higher frequencies to make them easier to filter.  In fact, many claim "no filter required" but I expect they are referring to the need to filter for acoustic purposes.  They talk about using ferrites in the filter, but even at 250 kHz ferrites are not effective.  Ferrites will help with much higher frequencies, but not the fundamental.   I don't recall EMI standards.  Are the sub MHz frequencies not such an issue?
What sort of sound do you want to produce? I thought it was just a square wave. 32kHz should be fine. Keep the cable to the speaker short, make it a twisted pair and EMI won't be a problem.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21608
  • Country: us
Re: Class D Speaker Driver
« Reply #29 on: February 22, 2021, 12:12:50 am »
I've used some little class D amp modules, I forget the part number but I got them for 99c shipped which is not much more than the cost of a single mosfet. They're tiny and work well, nothing on the module besides the IC and a few passives. Easier than designing something.
 

Offline gnuarmTopic starter

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: Class D Speaker Driver
« Reply #30 on: February 22, 2021, 12:46:05 am »
Sure, it's hard to communicate these things without a design in front of you. 

I'm still considering my options.  Since a self designed driver will take so many different parts, I'm still considering a single chip amp or motor driver.  I haven't found a simple class D amp that will work from 7.5V.  Above 5V they all seem to become large handling many watts, also the $$$ start mounting. 

This motor driver seems to ring all the bells. 

https://www.onsemi.com/pub/Collateral/LV8548MC-D.PDF

It will actually work from 5V to the full battery voltage and will drive both speakers.  One issue I'm not certain of is the "standby" state.  Seems having all the inputs low puts the device in a low power state which takes 7 us to exit from.  If I want the reverse drive to not  have any overlap (this part doesn't seem to have any internal timing to prevent that) and use the LL input state the chip goes into standby with the 7 us delay exiting.  But I think I can use HH for the non-overlap state.  The doc calls this "brake", but I think it connects both outputs to the positive rail forming a current loop.  This is easy to exit from without passing through the LL state.  I just wish they gave more timing info, but I expect it will be ok at 256 kHz. 

One problem with the H bridge chips is that I need to detect the current to tell if the speaker is open or shorted.  So maybe a home rolled design is required. 
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline gnuarmTopic starter

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: Class D Speaker Driver
« Reply #31 on: February 22, 2021, 07:14:04 am »
I think I have settled on a part that will do the job.  It's a dual full bridge motor controller, LV8548MC.  This will give the maximum range of power and require essentially no additional components, it's cheap, readily available and works with all the voltages in the system. 

https://www.onsemi.com/pub/Collateral/LV8548MC-D.PDF

The only fly in the ointment is the lack of current monitoring... but I think I've figured that out.  The current monitor only needs to be crude to detect no current (open speaker) and far too much current (shorted speaker).  The resistance of the FETs is not as low as in other devices and specified to be within a 2:1 range.  I can time the measurement to coincide with the low side FET being turned on and use LVDS inputs on the FPGA as comparators.  The other motor drivers had too low resistance to produce enough voltage for this to work.  Who would have thought the "crappy" part would be the desired one? 

This will use a lot of I/Os on the FPGA, 12 total.  Those comparators are using 8, two for each measurement.  Otherwise this is a simple driver approach.  I always knew the current sensing would be tricky.  Rather than use four comparators, I could use two as the inputs for two ADCs.  But that still requires two outputs for the feedback signal so only saving two I/Os.  We should have plenty of I/Os, so not likely a problem.
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline bdunham7

  • Super Contributor
  • ***
  • Posts: 9439
  • Country: us
Re: Class D Speaker Driver
« Reply #32 on: February 22, 2021, 02:49:31 pm »
Wow!  That alarm must be pretty important.

If I may ask, what action will your device take if it senses a failure in the speaker drive system?
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline wizard69

  • Super Contributor
  • ***
  • Posts: 1187
  • Country: us
Re: Class D Speaker Driver
« Reply #33 on: February 22, 2021, 05:21:03 pm »
Buy a buzzer that makes the noise you want and switch it on an off with that single transistor.    I work with machinery from dozens probably hundreds of manufactures and nobody would even bother with a speaker as an alarm.    The usual approach is some sort of buzzer or possibly a bell.   It doesn't matter what the controller is made of either, could be a custom CNC, PLC or a single board computer.    It comes down to what you waste your time on and noise makers are not a place to do that.

You mentioned a 'trapezoid' signal--is this just a beeper or annunciator of some kind?  Why would you need to drive the speaker with both polarities?  You can just use the signal to turn a transistor completely on and completely off, it should sound about the same.

The purpose of the signal is as an alarm.  Waveform characteristics are provided, frequency, harmonic content, envelope and cadence.  That's not hard to manage.  I just need to get it to the speaker with a minimum of kerfuffle in the electronics.  I don't know why I thought a transistor would do the job, lol
 

Offline gnuarmTopic starter

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: Class D Speaker Driver
« Reply #34 on: February 22, 2021, 08:39:46 pm »
Wow!  That alarm must be pretty important.

If I may ask, what action will your device take if it senses a failure in the speaker drive system?

First, there is redundancy in the alarm speakers.  So if one is not working it sounds a separate alarm indicating the "alarm" is not working 100%.  lol  Yeah, I know.  This is for a circuit that someone's life depends on, an open source ventilator. 

The overall design has multiple fail safes.  Human foibles are not as well accommodated.  That's not my problem.  I'm coding parts of the FPGA and much of the control circuit board.
« Last Edit: February 22, 2021, 08:45:20 pm by gnuarm »
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline gnuarmTopic starter

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: Class D Speaker Driver
« Reply #35 on: February 22, 2021, 08:44:45 pm »
Buy a buzzer that makes the noise you want and switch it on an off with that single transistor.    I work with machinery from dozens probably hundreds of manufactures and nobody would even bother with a speaker as an alarm.    The usual approach is some sort of buzzer or possibly a bell.   It doesn't matter what the controller is made of either, could be a custom CNC, PLC or a single board computer.    It comes down to what you waste your time on and noise makers are not a place to do that.

I guess that while you quoted my post, you missed the part where I said...

Waveform characteristics are provided, frequency, harmonic content, envelope and cadence. 

I appreciate that you think you are helping, but this is not a hobby project.  There are specific guides and specifications.  The sounds produced by this equipment are in fact clearly indicated and a simple buzzer does not suffice other than as a backup which we are indeed using to indicate a failure in the alarm system itself.
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline bdunham7

  • Super Contributor
  • ***
  • Posts: 9439
  • Country: us
Re: Class D Speaker Driver
« Reply #36 on: February 22, 2021, 08:47:17 pm »
First, there is redundancy in the alarm speakers.  So if one is not working it sounds a separate alarm indicating the "alarm" is not working 100%.  lol  Yeah, I know.  This is for a circuit that someone's life depends on, an open source ventilator. 

The overall design has multiple fail safes.  Human foibles are not as well accommodated.  That's not my problem.  I'm coding parts of the FPGA and much of the control circuit board.

Does the FPGA have other functions or is it just the alarm?
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline gnuarmTopic starter

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: Class D Speaker Driver
« Reply #37 on: February 22, 2021, 09:03:03 pm »
First, there is redundancy in the alarm speakers.  So if one is not working it sounds a separate alarm indicating the "alarm" is not working 100%.  lol  Yeah, I know.  This is for a circuit that someone's life depends on, an open source ventilator. 

The overall design has multiple fail safes.  Human foibles are not as well accommodated.  That's not my problem.  I'm coding parts of the FPGA and much of the control circuit board.

Does the FPGA have other functions or is it just the alarm?

Lol!  Remember, "just" is a four letter word!  To manage the alarm, some 5 different parameters are measured with ADCs, others are detected with binary inputs and a UI provides the management of limit settings and other operating parameters not associated with the alarm... no point in having two UIs. 

The idea is to separate the alarm function so it can be separately approved, no dependency on the MCU software and no interference with the operation of the machine.  Think of it as the MCU does the work of running the machine and the FPGA is the overlord watching for mistakes. 
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22457
  • Country: gb
  • 0999
Re: Class D Speaker Driver
« Reply #38 on: February 22, 2021, 09:34:39 pm »
Buy a buzzer that makes the noise you want and switch it on an off with that single transistor.    I work with machinery from dozens probably hundreds of manufactures and nobody would even bother with a speaker as an alarm.    The usual approach is some sort of buzzer or possibly a bell.   It doesn't matter what the controller is made of either, could be a custom CNC, PLC or a single board computer.    It comes down to what you waste your time on and noise makers are not a place to do that.
If you look inside lots of alarm modules you'll find, they quite often have a speaker driven by an amplifier and an oscillator, or a synthesiser. Obviously this doesn't apply to plain old bells and buzzers, but certainly does to those which make more complex sounds, that can be changed/varied, i.e. the type with a small switch, or multiple inputs for different sounds.

If the intention is to integrate this into a small, compact enclosure, then it certainly makes sense to use a speaker, class D amplifier and software/hardware synthesiser, especially if there's an FPGA sitting there with a lot of unused gates, ready to do the job. It has the advantage of flexibility:the alarm sound can be changed with a little programming, rather than having to change the entire alarm module, if it can't make the desired sound.

A similar principle applies to other things such as switched mode power supplies and motor drives: in an industrial application, it would be preferable to use a ready built module, but in mass produced consumer electronics, it's often cheaper to add it to the PCB and there might not be space, for a bulky industrial module.
 

Offline gnuarmTopic starter

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: Class D Speaker Driver
« Reply #39 on: March 04, 2021, 08:09:49 pm »
Actually, your circuit turns off both transistors when no AC is present.
The problem is if the input is left to float when the power is applied, both Q1 & Q2 simultaneously turn, as C2 & C3 charge.

Quote
So it's safe in that regard which is useful since the idle state is no pulses.
Once it's settled to the steady state, with C2 & C2 charged, it should be fine with the input floating.

Quote
The PWM signal is at least 32 kHz, but that might be too low I've realized.  So perhaps 128 kHz or even 256 kHz.  That lowers the resolution of the value being output (33 MHz clock), but there are ways to dither the PWM to get more resolution than allowed by a simple PWM. 

The 32 kHz rate is not too low for the speaker, but it will be harder to filter out for EMI purposes.  The chips work at higher frequencies to make them easier to filter.  In fact, many claim "no filter required" but I expect they are referring to the need to filter for acoustic purposes.  They talk about using ferrites in the filter, but even at 250 kHz ferrites are not effective.  Ferrites will help with much higher frequencies, but not the fundamental.   I don't recall EMI standards.  Are the sub MHz frequencies not such an issue?
What sort of sound do you want to produce? I thought it was just a square wave. 32kHz should be fine. Keep the cable to the speaker short, make it a twisted pair and EMI won't be a problem.

This AC biasing idea does not work for this use.  The square wave is not always full volume.  I was planning to use PWM to control the amplitude.  This biasing centers the PWM signal at some voltage level on the high side that no longer turns on the high side transistor when the duty cycle is very low (from the source perspective).  The drive at the PNP base becomes 1.5 V more positive than the high rail, but only swings to -0.14 V relative to the emitter when the PNP should be turning on. 

Direct drive only takes one more device to level shift the signal.  I prefer FETs because of the limitations of hfe with higher currents in bipolar transistors. 

I'm wondering if this requires a push-pull arrangement at all.  The high side switch provides current into the speaker, but can the low side switch be replaced by a Schottky diode to ground as is used in switching power supplies.  Then only one output is required.  Or the configuration can be reversed with a low side driver to ground and a diode to the V+ rail.  The only disadvantage is the other end of the speaker is connected to the V+ rail, but through a capacitor which removes the DC component. 

I'll try running a sim on that. 
« Last Edit: March 04, 2021, 08:12:21 pm by gnuarm »
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22457
  • Country: gb
  • 0999
Re: Class D Speaker Driver
« Reply #40 on: March 05, 2021, 11:07:07 am »
Actually, your circuit turns off both transistors when no AC is present.
The problem is if the input is left to float when the power is applied, both Q1 & Q2 simultaneously turn, as C2 & C3 charge.

Quote
So it's safe in that regard which is useful since the idle state is no pulses.
Once it's settled to the steady state, with C2 & C2 charged, it should be fine with the input floating.

Quote
The PWM signal is at least 32 kHz, but that might be too low I've realized.  So perhaps 128 kHz or even 256 kHz.  That lowers the resolution of the value being output (33 MHz clock), but there are ways to dither the PWM to get more resolution than allowed by a simple PWM. 

The 32 kHz rate is not too low for the speaker, but it will be harder to filter out for EMI purposes.  The chips work at higher frequencies to make them easier to filter.  In fact, many claim "no filter required" but I expect they are referring to the need to filter for acoustic purposes.  They talk about using ferrites in the filter, but even at 250 kHz ferrites are not effective.  Ferrites will help with much higher frequencies, but not the fundamental.   I don't recall EMI standards.  Are the sub MHz frequencies not such an issue?
What sort of sound do you want to produce? I thought it was just a square wave. 32kHz should be fine. Keep the cable to the speaker short, make it a twisted pair and EMI won't be a problem.

This AC biasing idea does not work for this use.  The square wave is not always full volume.  I was planning to use PWM to control the amplitude.  This biasing centers the PWM signal at some voltage level on the high side that no longer turns on the high side transistor when the duty cycle is very low (from the source perspective).  The drive at the PNP base becomes 1.5 V more positive than the high rail, but only swings to -0.14 V relative to the emitter when the PNP should be turning on. 

Direct drive only takes one more device to level shift the signal.  I prefer FETs because of the limitations of hfe with higher currents in bipolar transistors. 

I'm wondering if this requires a push-pull arrangement at all.  The high side switch provides current into the speaker, but can the low side switch be replaced by a Schottky diode to ground as is used in switching power supplies.  Then only one output is required.  Or the configuration can be reversed with a low side driver to ground and a diode to the V+ rail.  The only disadvantage is the other end of the speaker is connected to the V+ rail, but through a capacitor which removes the DC component. 

I'll try running a sim on that.
Yes, the AC couped configuration does impose limits on the duty cycle, but that only applies at DC. My guess is that your simulations were conducted, either with fixed duty cycles, which don't reflect the reality of a continous cycle sweeping between 5% and 95%, or the coupling capacitors were undersized. The audio signal should have no net DC component, so the duty cycle, averaged over the entire waveform period will be 50%. The capacitors need to be big enough to pass the lowest frequency component of the signal, without shifting the bias point. It's no good just selecting values which are adequate for the switching frequency, if the audio signal can go down to 20Hz.

No, a push-pull arrangement is required if you want to avoid DC in the speaker coil. If you want half-bridge, then an AC coupling capacitor is required, unless it's a bipolar power supply. A buck converter only outputs current flowing in one direction. In low power applications, it might be acceptable to just connect one side of the speaker to +V and the other to a transistor, but half of the power will be dissipated as heat in the speaker coil, which is only tolerable at low power levels.

I thought you'd settled on the LV8548MC? If only one channel is required, the two can be connected in parallel for low on resistance.
 

Offline gnuarmTopic starter

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: Class D Speaker Driver
« Reply #41 on: March 05, 2021, 09:27:27 pm »
I have "settled" on several approaches but there's always something that nags at me and I end up revisiting this.  The issue with the half bridge is the current spikes that seem to be inevitable.  I think that might have been from the AC coupled drive not turning off fast enough causing shoot through even with some ns of non-overlap.  The motor drivers are not specified how fast they can work.  The class D audio amps either won't work from 7.5 V or are big clumsy things intended for high power... or both.  TI has some chips that require 8 V to work, lol. 

So last night I simulated a full bridge using MOSFETS and separate drives for high and low sides with level shifting for the high side drive.  Don't have to worry about overlap as I am only using one path at a time pulsing it on and off.  The other pair is used for the other direction.  I'm happy to post an LTspice file if anyone is interested.  It seems to work pretty well with max current spikes of 100's of mA rather than amps.  A 10 uF cap on the power rail does a good job.  I have ferrites on the leads to the speaker.  Many audio data sheets show small caps to ground on these outputs for noise issues.  Is one cap across the output just as good or should they be common mode to ground? 

I'd like to get models of the components in use.  The FETs have models but I haven't plugged them in (LTspice is a PITA in that regard) yet.  I don't know much about the ferrite beads.  LTspice only has Würth ferrites but I modified one a bit to match up better to the ferrites I am using.  Then there is the speaker...  I can bug the vendor for an electrical model.  Seems they are willing to provide Thiele-Small parameters which I can calculate electrical parameters. 

So at the moment this is the approach I want to follow.  I can add a resistor to the ground path for the low side sources to measure current.  Each speaker uses six transistors, but the power path parts can be a combination N and P channel package limiting the board space requirement.  I guess the bottom line is this approach gives more confidence of working while still being inexpensive and not complex.  The only concern really is EMC. 
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline gnuarmTopic starter

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: Class D Speaker Driver
« Reply #42 on: March 09, 2021, 07:17:30 pm »
So when an H bridge motor controller is in freewheel, is that all transistors open, or both ends grounded?  What is brake mode?  It appears they call freewheel opening all transistors, but the inductor current has to go somewhere, so through the body diodes (or protection diodes) with voltage drop and dissipation.  Connecting both ends of the load to ground (or both to power) routes the current through a low resistance path dissipating less power, so why is this called "brake" mode?  I think it is because there are two separate back EMFs, one inductive and the other a motor back EMF.  The inductive EMF always resists a change in current, -L di/dt.  The motor EMF is from the motor turning in the magnetic field.  When opening the circuit on a rotating motor with current the two have opposite signs.  So the inductive EMF will channel through the diodes until dissipated.  The motor EMF does not flow which is good because it would brake the motor, hence "brake" mode.  These are two separate effects. 

I found the MP6519 motor controller which has means of measuring the current.  The data sheet does not describe the output operation in enough detail for me to know the alternate state of the outputs when in current limit mode (PWM in other words).  The part has a mode pin that controls the direction of applied voltage.  It generates an internal saw tooth to control the PWM width.  One end of the load is pulled high and the other low in a PWM duty cycle set by the current in the load and the input control.  Sooo...

What I don't know is what the other state of the output transistors is.  I'm guessing it is the free wheeling mode where the output FETs are all off, aka "freewheeling" conducting the inductive back EMF current through the body diodes.  Not sure if this is good for a speaker.  What states does a class D amp use exactly?  Is that the difference with a motor controller?
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline gnuarmTopic starter

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: pr
Re: Class D Speaker Driver
« Reply #43 on: March 09, 2021, 07:21:48 pm »
The big fly in the ointment for most drivers I've found is the lack of current measurement.  One way around this is to add a series resistor in the speaker path connected via a diode bridge.  Then the current in the resistor is always unidirectional even if not ground referenced so an op amp is needed.  But that's a few extra parts.  I would need to go back over the class D amp list to find something not overly complex that works at 7.5V. 
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->