using a microcontroller for 'whole' class-d amplifier - diyAudio
Go Back   Home > Forums > Amplifiers > Class D

Class D Switching Power Amplifiers and Power D/A conversion

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 26th January 2009, 10:35 PM   #1
diyAudio Member
 
Join Date: Nov 2005
Location: brasil
Default using a microcontroller for 'whole' class-d amplifier

Anyone done it, or know of projects that have? I'm thinking of using a microcontroller to implement a class-d bass amplifier (say <200hz) from audio input all the way to driving the gate drive transformer mosfets.
The attraction of this is (apart from fun) is that all the issues associated with producing a reliable and accurate amplifier can all be implemented & experimented with in software. For high power output all the relevent protection built in, without too much need for a crowbar on the output terminals!

cheers,
Rob.
  Reply With Quote
Old 27th January 2009, 12:56 AM   #2
diyAudio Member
 
Join Date: Sep 2005
Would you consider a microcontroller with an external opamp for the input stage/integrator? Or did you mean using an internal A/D converter to sample the input? I would think that if you allowed for an external opamp, it would give you more flexability, but I'm just asking to clarify your intentions.

On a related note, there are SMPS power supply projects that use a microcontroller for all of their processing.
  Reply With Quote
Old 27th January 2009, 01:28 AM   #3
Eva is offline Eva  Spain
diyAudio Member
 
Eva's Avatar
 
Join Date: Oct 2003
Location: Near the sea
Send a message via MSN to Eva
The modulator is the easiest part and it's actually harder to implement in software. A good analog modulator may be as simple as a single LM311 comparator. The hardest part is the power stage and its PCB layout and a DSP won't help there.
__________________
I use to feel like the small child in The Emperor's New Clothes tale
  Reply With Quote
Old 27th January 2009, 01:41 AM   #4
diyAudio Member
 
Join Date: Nov 2005
Location: brasil
I would definitely have an external input stage, almost certainly an opamp. For the microcontroller, I would like to use something like this prototype board http://www.microchip.com/stellent/id...cName=en536385 with one of these in ithttp://ww1.microchip.com/downloads/e...Doc/41350b.pdf page 117 onwards contains interesting PWM info on this PIC.
I was originally thinking along the lines of generating the pwm myself in software, however this might not be reliable, bearing in mind i'd like to do other things on the controller too. The above microcontroller has full bridge pwm generation capabilities built in, so could do the book-keeping for me.
I stumbled across some smps microcontroller stuff before, this is what got me thinking about this.. I've not yet looked deep enough into this idea to contemplate soldering yet. Although i did order a new breadboard yesterday

cheers,
Rob.
  Reply With Quote
Old 27th January 2009, 01:49 AM   #5
diyAudio Member
 
Join Date: Nov 2005
Location: brasil
@eva, definitely agree about the output stage & its layout. I had originally considered using a microcontroller for all the peripheral functionality, fault detection etc.. leaving the amplifier itself entirely analogue, but then figured if i have a fast processor in there i could use it for everything short of driving the output stage! As i looked further i realised just how feature packed those PICs are..

cheers,
Rob.
  Reply With Quote
Old 27th January 2009, 06:14 PM   #6
alvaius is offline alvaius  Canada
diyAudio Member
 
Join Date: Feb 2002
Location: Toronto
I think even for 200Hz, you would be hard pressed to implement in a basic micro like a PIC18. Simply not having the I2S ports would be a major pain. A DSP is not very expensive. Freescale has a class-D reference based around one of their Symphony 24 bit audio DSPs. That could be used as a good reference.

Alvaius
  Reply With Quote
Old 30th January 2009, 05:48 AM   #7
diyAudio Member
 
Join Date: Jul 2004
Location: Seattle USA
Rob,
I hope you get something going.
It seems like the microcontroller could just generate the PWM stream directly without a modulator. The algorithm and coding might not be realtime, but you could add latency to the higher frequencies to sync them back up. This looks like a really fun project.
  Reply With Quote
Old 30th January 2009, 07:18 AM   #8
Eva is offline Eva  Spain
diyAudio Member
 
Eva's Avatar
 
Join Date: Oct 2003
Location: Near the sea
Send a message via MSN to Eva
Microcontroller class D for audio = a big waste of time.

If you want it simple, self oscillating is the way to go and it outperforms the other solution.
__________________
I use to feel like the small child in The Emperor's New Clothes tale
  Reply With Quote
Old 14th February 2014, 07:46 AM   #9
Mondan is offline Mondan  Romania
diyAudio Member
 
Join Date: Mar 2010
And now I'm looking for the same thing.
I wanted to open a separate topic, but I saw this old topic.


The idea is good and I think it has many advantages.
The problem is I have further complicated the situation: being and quality and very cheap

As advantages can read the SD card and directly out PWM:
Simple SD Audio Player with an 8-pin IC

I have tried with dsPIC SMPS specialized, but the results were below expectations:
- 16 bit high speed PWM out
- 10 bit 1MSPS A/D
Looking further improvement ideas
  Reply With Quote
Old 14th February 2014, 02:32 PM   #10
diyAudio Member
 
Join Date: Jun 2009
DDFA might be of interest. I pretty much agree with Eva, though; performance comparable to DDFA can be had by copying IRF's IRS20957 reference design and if higher performance than that is needed it's probably easier to increase the analog feedback order.

Last edited by twest820; 14th February 2014 at 02:41 PM.
  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
Class D Vs Class I (Balanced Current Amplifier) rmsaudio Class D 29 26th January 2014 10:25 PM
help with microcontroller sss Everything Else 2 31st July 2008 04:30 PM
Microcontroller based class-d amp? ukram Digital Source 21 19th January 2004 11:38 AM
Questions about how to decrease the PASS A-40 amplifier into a class AB amplifier. novtango Pass Labs 2 21st October 2002 01:50 AM


New To Site? Need Help?

All times are GMT. The time now is 03:13 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