diyAudio (
-   Class D (
-   -   pic microcontroller pwm for H bridge (

jlind54 29th November 2012 03:35 AM

pic microcontroller pwm for H bridge
I'm new to the forum but I've have some experience working with micro chips such as PIC16F887. I got to thinking what kind of sound quality could be achieved using a micro chip to convert low level audio to digital then create a pwm signal to drive an high powered h-bridge to achieve approximately 1500 watts peak power into 4 ohms for subwoofer duty.

Anyone have any experience with something similar or is this something that will not have satisfactory results?

Thanks in advance!

JC_Est 29th November 2012 04:26 AM

A similar project was published on Hack a Day: 70 watt amp uses an ATtiny

It uses the other type of MCU but the idea is same. It drives the mosfets directly. For higher power it's not enough, I guess you could add some mosfet drivers. No idea about the sound quality, it has no feedback too.

jlind54 29th November 2012 04:31 AM

Thanks for the link. That looks about like what I would want to try and build except with a bit more power. Is the no feedback thing good or bad?

theAnonymous1 29th November 2012 06:03 AM

I don't think open loop is ever really considered a good thing. Here's a thread that touches on the topic....

jlind54 30th November 2012 12:39 AM

Ok so it is probably a lot easier to not use a microchip to create the pwm signal to feed the output. Next question... which produces better sound a single push-pull output or a balanced output from an h-bridge?

tomi 30th November 2012 07:01 PM

An H bridge gives twice the voltage swing for the same rails, so if you're interested in high power then it might be worth thinking about in order to keep the rail voltages low - that way you can use cheaper and/or better performing MOSFETs and make smaller explosions. Assuming you don't mind building twice the circuitary that is. Can't comment about differences in sound quality though.

My concern would be whether you can get a high enough switching frequency and enough resolution with typical uC clock speeds. As a quick back-of-an-envelope guestimate, A 50kHz switching speed divided up into 256 steps (as in 8-bit audio) means that the clock doing the timing needs to be at 12Mhz. That's the clock rate, not the oscilator that you put into the uC which will need to be at least twice that.

Maybe the PIC has special facilities for accutate timing though (I've never used one), or maybe there are cleaverer modulation schemes that relax the timing demands?

tomi 30th November 2012 07:04 PM

That said, of course if you're driving a sub the switching speed can be lots lower, if you can build a good enough filter to keep it out of the speaker (bleed from 5kHz switching us going to get anoying pretty damned fast).

jlind54 3rd December 2012 03:34 AM

After some readings and looking at some chip specs I believe it would be possible to go the microchip route but at the expense of writing some assembly code and messing with some extra circuitry for no real accomplishments... I think its probably best to go with a more traditional proven route. Thank you for the input.

nigelwright7557 4th December 2012 09:45 PM

You could use a pair of ir2110 to drive an H bridge from a micro.

kdpbcx 30th January 2013 04:32 PM

I just got done breadboarding 70 watt amp uses an ATtiny. The sound is not bad.

I had to substitute IRFZ34 and IR9Z34. Couldn't find a reasonable price for the others. They are running hot using a 12vdc supply. I assume this is because the RDS is lower than the IRFZ14. Adjusting the 12v supply down to 10v allows it to run cool with no heat sinks.

The sound is not bad. The only major snag I hit was programming the fuse bits on the attiny85. You have to make sure to switch the clock to PLL. Cost me a little time because it wasn't spelled out and I'm not an Atmel expert.

All times are GMT. The time now is 02:50 AM.

Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 18.75%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Copyright ©1999-2018 diyAudio