Propeller audio class D amplification
Erlend
Posts: 612
Hi,
Using the Prof Dev board with the audio out connected to two flatspeakers (salvaged from a dead mobile phone) does not give the volume level I would like. First I designed a small transistor-based amp, defaulting to thinking class A and lots of PWM noise filtering. Then the idea struck me; why not run it class D all the way? I have lots of small JFETs lying around, but probably only one per channel is enough? I'm thinking why not skip the on-board audio amplifier, and instead run the ouput PWM from the Propellor pins directly to a simple class D amplifier, then let the speakers sort out the overlaid PWM frequencies, or if required run the output through a simple LR filter.
Am I on the right track? Anyone done this before?
Erlend
Using the Prof Dev board with the audio out connected to two flatspeakers (salvaged from a dead mobile phone) does not give the volume level I would like. First I designed a small transistor-based amp, defaulting to thinking class A and lots of PWM noise filtering. Then the idea struck me; why not run it class D all the way? I have lots of small JFETs lying around, but probably only one per channel is enough? I'm thinking why not skip the on-board audio amplifier, and instead run the ouput PWM from the Propellor pins directly to a simple class D amplifier, then let the speakers sort out the overlaid PWM frequencies, or if required run the output through a simple LR filter.
Am I on the right track? Anyone done this before?
Erlend
Comments
http://hackaday.com/2012/09/05/70-watt-amp-uses-an-attiny/
http://forums.parallax.com/showthread.php/114155
-Phil
Base ramp frequency around 250kHz.
But it is a shame to have to convert digital from the Prop to analog only to turn it back to class D.
Here is the basic class D diagram, straight constant-frequency PWM, and it contrasts with Phil's low-frequency duty-mode scheme.
The TPA2006 uses a slightly different scheme. I think this is what Mark is doing in the code from post #5. (Mark, please correct me I I'm mistaken). Here is the diagram from TI:
For a given % drive, it generates twice the frequency of the scheme above, and thus 1/2 the ripple current. Is that right?
Erlend
Is your SD card wired correctly now? (Have to ask!). If it is simply a mechanical adapter, there is not much that could burn out, and even if the power were applied incorrectly, that could only affect the card, not the adapter. Which adapter is it? You should start a separate thread if you need additional help with it.
Which MOSFETs are you thinking of? A smallish (say SOIC8 size) MOSFET is usually < 100ns switching (assuming suitable gate driver).
a single PWM signal and drive the speaker in antiphase from it - 50% PWM = zero signal. There is then high ripple current all the time though as the filter
sees a square wave. This way means the differential signal is small on overage for common case (so low ripple current in the filter, low power losses). However it swings
the speaker leads in common-mode, suggesting only short cables and/or big ferrite beads (or common-mode choke) to reduce EMI.
There are complementary pairs like the Infineon BSL215C in tssop6, 12ns, 100pF, 0.15Ω for the N type, Its P type mate comes in at double the delay+rise times, and double the input capacitance.
The TPA2006 is capable of delivering 1.5W peak from a 3.3V supply, so internally the output bridge must have some pretty capable mosfets.
Yes, the wiring is now correct - triplechecked : ) - and I've started a new thread "microSD frustrations". Class D soldering is put on hold until there again is sound.