Microcontroller based class-d amp? - diyAudio
Go Back   Home > Forums > Source & Line > Digital Source

Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 31st December 2003, 11:55 PM   #1
ukram is offline ukram  Finland
diyAudio Member
 
Join Date: Jun 2003
Location: Espoo, Finland
Default Microcontroller based class-d amp?

Any opinions about my idea to make a class-d amp using MSP430F2132 microcontrollers as PWM generators?

This way there would be good control over the FETs timing.

An opamp could do error integration, and the ~200 ksamples/s A/D converter could read the voltage from integrator and this could be used to adjust the PWM modulator.

I'm planning to use just short pulses when there is no signal instead of full 50/50 duty cycle PWM, to avoid large current in the output filter. This can be done by using separate "compare registers" for each FET.

One MSP430F2132 can do only one channel, so two would be needed for stereo amp.

Simulated FET output stage (100 ns pulses and 10 us interval):

http://hepso.dna.fi/misc/classd/schematic.jpg

http://hepso.dna.fi/misc/classd/waveform.jpg

http://hepso.dna.fi/misc/classd/classd3.asc

The idea here was to use rather small damping resistor, otherwise there was lots of oscillation when both FETs are off. Level shifting is done just with capasitors, and resistors are there to make sure the FETs are not on for very long time in case of error. Some kind of buffer is needed after the mcu.

I thought about using MTP8P10 and MTP8N10 FETs, which are not as fast as i'd like, but could not find anything better in 100 V.
  Reply With Quote
Old 1st January 2004, 12:36 AM   #2
diyAudio Member
 
Tony Salsich's Avatar
 
Join Date: Dec 2003
Location: Cold country (Wisconsin)
Do you mean MSP430F1232? Have you considered the TMS320C2000 series of DSP's instead? They have are more suited to the job, with a lot of useful peripherals. I have designed some switchers using the 24xx, but not amps (motor drives, which are similar in topology, but not in quality ). The '28xx series screams at 120 mips and has a very fast A/D. If a micro can do the job, this one can. The cost of tools may be a problem though. Do you already have the '430 tools?

Tony
  Reply With Quote
Old 1st January 2004, 01:32 AM   #3
subwo1 is offline subwo1  United States
diyAudio Member
 
subwo1's Avatar
 
Join Date: Jan 2002
Location: North American Continent
I would be interested in seeing how it turns out for you. The concept of using software to computationally reconstruct audio waveforms is beyond the scope of my abilities, so can't help you in that area in any serious way.

Beware of power-on mosfet shoot-through current with capacitor coupled drive of complementary mosfets. An aquaintance blew many a mosfet before arriving at a decent solution. Let me know if you are interested in seeing his answer to that hang-up.

I kicked around the idea of a PWM amp idling with short pulses from each rail, an effect paralleling idle current in a class AB amp. It involves extra circuitry if done linearly, but I think it is worth trying digitally if it is not hard to implement.
__________________
USMPS
http://groups.yahoo.com/group/switchmode/
  Reply With Quote
Old 1st January 2004, 02:02 PM   #4
ukram is offline ukram  Finland
diyAudio Member
 
Join Date: Jun 2003
Location: Espoo, Finland
Yes, i meant MSP430F1232. I did a soldering iron control with it. There is free development software.

Is there free demo compiler for TMS320F241? It is available as 68 pin PLCC version, that can be used with cheap PLCC socket to get 2.54 mm pin distances.

One possibility would be external 8 bit A/D converter to be able to use normal signal ground as reference level. With MSP430 (or TMS320) i would have to use 1.5V or 2.5V virtual ground for the A/D converter.

Is there any mcu:s that can do bipolar A/D conversion?

I'm not planning a lot of signal processing, just using the A/D value directly for PWM control value sounds enough.
  Reply With Quote
Old 1st January 2004, 11:22 PM   #5
diyAudio Member
 
Tony Salsich's Avatar
 
Join Date: Dec 2003
Location: Cold country (Wisconsin)
There is a free 30 day trial of code composer, but the demo boards are not free. Check this link:
http://dspvillage.ti.com/docs/catalog/dspplatform/details.jhtml?templateId=5121&path=templatedata/cm/dspdetail/data/vil_getstd_how


PHP Code:
One possibility would be external 8 bit A/D converter to be able to use normal signal ground as reference levelWith MSP430 (or TMS320i would have to use 1.5V or 2.5V virtual ground for the A/D converter
I would not think that 8 bits is enough. The on-chip, 10 bit unit is better. With ten bits you get 9 bit signed anyway. I don't recall seeing a bipolar A/D. Everyone offsets to virtual ground.

PHP Code:
I'm not planning a lot of signal processing, just using the A/D value directly for PWM control value sounds enough. 
Perhaps you are better off trying your idea with an MSP if you do not need lots of processing, but have look at the 14X series. They have HW multipliers and 12 bit A/D.

One really good thing about the DSP's is the PDPINT pin, which quickly kills the PWM outputs in hardware (handy for saving your FETs!). The drives I have worked on could withstand a shorted output with no damage to the IGBT's (a bit more rugged than FET's, but you see my point).

Happy designing!

Tony
  Reply With Quote
Old 2nd January 2004, 09:15 AM   #6
subwo1 is offline subwo1  United States
diyAudio Member
 
subwo1's Avatar
 
Join Date: Jan 2002
Location: North American Continent
Quote:
the IGBT's (a bit more rugged than FET's, but you see my point).
Generally, MOSFETs are more rugged for a given steady output current rating because they possess a positive temperature coefficient in regard to channel resistance as well as a larger die size for a given current rating, allowing them to dissipate greater instantaneous power without destruction. IGBT's, OTOH, become more conductive from collector to emitter with increasing temperature and may also suffer from thermal runaway in certain cases.
__________________
USMPS
http://groups.yahoo.com/group/switchmode/
  Reply With Quote
Old 2nd January 2004, 10:43 AM   #7
ukram is offline ukram  Finland
diyAudio Member
 
Join Date: Jun 2003
Location: Espoo, Finland
The 8 MHz or 20 Mhz clock might not be enough for small signals... For 100 kHz you get 80 or 200 different pwm outputs, so it is equivalent to only about 8 bits D/A converter. How fast (oversampled) should a 8 bits D/A converter be to generate proper output?

I guess i'll go for analog integrator / comparator / oscillator style.
  Reply With Quote
Old 2nd January 2004, 11:01 AM   #8
diyAudio Member
 
Join Date: May 2002
Location: Switzerland
Yo'd have to use noise-shaping as TacT/TI are using. Otherwise you would need too high a sampling rate.

Regards

Charles
  Reply With Quote
Old 2nd January 2004, 10:24 PM   #9
ukram is offline ukram  Finland
diyAudio Member
 
Join Date: Jun 2003
Location: Espoo, Finland
If i do negative feedback with analog integrator, isn't it the same as doing noise shaping? It does decrease low frequency noise.

I mean that i integrate the difference between input signal and PWM output (divided by amplification), and do A/D conversion for the result and feed that value into PWM modulator.

That should be easy to do with the TMS320F241. It has five timer compare registers, enough for driving two output stages with individual timing for each FET.
  Reply With Quote
Old 3rd January 2004, 06:29 AM   #10
diyAudio Member
 
Join Date: May 2002
Location: Switzerland
Quote:
If i do negative feedback with analog integrator, isn't it the same as doing noise shaping? It does decrease low frequency noise.
This would indeed be noiseshaping !

Quote:
I mean that i integrate the difference between input signal and PWM output (divided by amplification), and do A/D conversion for the result and feed that value into PWM modulator.
This is quite a cool idea from the first glimpse. You'd have to watch out for how much delay is introduced by your A/D converter since this can affect loop stability. Even more since you might have to use more than one single integrator to achieve enough SNR.

Regards

Charles
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
using a microcontroller for 'whole' class-d amplifier oldroborg Class D 17 16th February 2014 01:33 PM
304TL based Class A angelfj Tubes / Valves 125 1st November 2010 07:52 PM
8 Channel Class D Based on TAS5706A aramosfet Class D 3 12th April 2009 07:37 AM
Microcontroller Help imix500 Parts 8 3rd September 2008 02:49 AM
help with microcontroller sss Everything Else 2 31st July 2008 04:30 PM


New To Site? Need Help?

All times are GMT. The time now is 06:59 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2