8 bit class D amplifier with AVR microcontroller

Hello Everyone,
This is my first project for experiment on avr microcontroller, Hope this helps and any comment I will Thanks for you advanced.
D-Attiny85.png

Waveform.png

Source Code over there is HERE>
 
Last edited:
  • Like
Reactions: 1 user
Hi. You are adding additional transistors to ir2110 output , but they must be supplied from same voltage , as ir2110 internal drivers are. You are trying to supply them from +-12v , it will not work as expected, probably burn mosfets and ic. Also this ic already rated if i'm right at 2 ampere , so you could better first test with single mosfet without transistors , just one output MOSFETs pair. If all will work , check if ic is getting hot, if it's not , no need for transistors. Refer to ir2110 datasheet , and halfbridge operation, how high-side mosfet driver gets its supply voltage.
 
Actually , i think this IC is not a correct one for your application, i'm talking about ir2110. Because output driver gnd (low side mosfet) and input gnd ( mcu connection) should be connected together ,according to datasheet. But then you will short circuit your -90v supply. Datasheet says logic supply offset is just +-5v , so you can't have seperate negative lines. Vss and Com named pins according to datasheet ,pins 13 and 2 , they must be connected together. Search for fully isolated mosfet driver , it must be optically isolated , and allow floating output operation. This ic uses floating supply ,but just for positive output. Or more simple solution is to use +180v single rail supply ,connect 3 and 12 pins together ,and use more mosfets in bridge operation , you need two ics then and speaker will no longer be connected to ground .
 
Looking at the data for IR2110, it does not work with negative voltages. The logic input has to be referenced to the negative rail, or actually "VCC", which is the gate voltage source, about 12V above the negative rail, "COM". Like the UCD, the upper gate voltage comes from a bootstrap capacitor that is charged when the output is low through a diode from VCC to VB. So if you want to use a bipolar power supply, you will have to use an optocoupler or other level translator between the uP (or PWM input) and the IR2110. Note that the upper gate drive "HO" goes above the positive rail by about VCC, ie about 90+12V=102V, so the 12V buffer will not work. And, the upper gate "HO" must fall to ~= COM, ie -90V, well below -12V.
Note this application has no negative voltage:
https://microcontrollerslab.com/mosfet-driver-ir2110-pinout-examples-applications-datasheet/
 
C9 is drawn as a polarized electrolytic capacitor, but those are bound to blow up. The output filter inductance and capacitance are unusually high.
Thanks, For both input capacitor that C1 and C2 , I used NP CAPACITOR(Non- Polarised).Whats goings on out there?
C9 is drawn as a polarized electrolytic capacitor, but those are bound to blow up. The output filter inductance and capacitance are unusually high.
 
Last edited:
Example of such driver device is TLP5772 ,available and in stock on mouser.com at this moment .You need 2pcs , one for mosfet at +90V , one for -90V . There are more similar devices ,whose can directly control power mosfets .Depending on your location, you may use different source like digikey or other (beware fakes). Also don't forget galvanically isolated DC-DC converter with two isolated outputs (not + -12v !). Outputs need to have no common pins , like gnd ,must be like seperate batteries .Also you may use small power isolated power supplies ,if your project is AC mains powered .Calculate driver led resistor according to datasheet specifications : Vcpu - Vled / Iled . Vcpu is voltage from mcu ,5V or 3,3V , Vled is forward voltage drop of led , Iled is current ,normal condition ,no need to overload cpu or optocoupler .
Also from schematic i see you tried to use inversion for bottom mosfets ,but you draw two inverters in series ,so both mosfets would operate at same time ,and therefore explode too .Also this may be reason why you see no waveform at output .So this is not correct approach .
If you use TLP5772 , you need to change code to form two pwm in opposite phase and with small deadtime ,when both outputs are inactive ,to prevent mosfets shorting power supplies . Or use all six inverters in parallel of 4049 as inverter ,to invert bottom or upper control signal to TLP5772.
 
I just looked at the schematic, not at the program, but if I understand it correctly, the idea is that an analogue input signal gets converted to digital by the microcontroller, which presumably then converts it to PWM that drives the class-D stage. That is, it's open-loop class D.

If this is correct, then why is there a 101 times amplifying LM324 stage between the microcontroller and the inverters that drive the gate driver? By the way, an LM324 at such high gains has typically only 12 kHz of bandwidth (and an LM324 has lots of crossover distortion, but that doesn't matter much for PWM).
 
Many Thanks to everyone for commenting on my posts. Especially,Ximikas,So I have modified the new working schematic circuit diagram.
And I have tested that this circuit can work effectively.:)
 

Attachments

  • CIRCUIT.jpg
    CIRCUIT.jpg
    280.1 KB · Views: 330
  • COMPONENT PCB.png
    COMPONENT PCB.png
    99.4 KB · Views: 275
  • TOP PCB.png
    TOP PCB.png
    88.4 KB · Views: 161
  • WAVE FORM.png
    WAVE FORM.png
    46 KB · Views: 204
Hi . I see many errors , looks like you need different simulator software . In example , logic circuit 7400 , u7a u7b , where are connected their power supply pins 7 and 14? Their inputs and outputs can swing only in voltage range between these pins , so if lets say you will connect pin7 to -90V , then input must swing -90...-85V if its ttl logic , or -90...-75V if its cmos type like cd4049. Also tc drivers u5 , u6 , how they are powered ? Also q5 will do nothing . You should try with completely isolated solutions like optocoupler, which i had recommended earlier . Also ir2101 is connected incorrectly , it must have its local power supply , refenced to -90v . Also with such connection of q3 q4 you will probably burn mcu outputs.
 
Hi ximikas,
That’s a good idea.Yes,It's exactly as you said.Actually,I used Proteus Design Suite simulator software to test this project.
I’m not sure exactly, I Think that as you mean about TLP5772 and I read a datasheet of
this device I see for the pin-in and pin-out details.You know!No simulation model specified of TLP5772 in proteus.
Do you think it’s possible? What the device replacement of this Photocouplers(TLP5772).
Do you have any opinion on this matter?

Thanks in advanced
UD-Nguan-Y2.23K