an Audio Amplifier with PIC

an Audio Amplifier with PIC

Postby DarioG » Tue Nov 14, 2017 1:11 pm

(going on with some funny applications...)

Using a PIC24 or a dsPIC, grab analog input from a Microphone, convert it (22/44 Ksamples/sec) into numbers, scale for PWM and send them to a speaker!

Several types of PICs can be used: a 70MIPS device with remappable pins is best, but not needed.
Using a 140MHz device we set PWM at 35KHz and drive the 2 PWM outputs in order to achieve the "power": keeping in mind the average limit of 20mA per pin/200mA maximum total, in theory up to 10+10 pins could be used - and deliver 3W over a 8ohm speaker.
4+4 output would also be good. At a very basic level, 1+1 pins are a starting point for this demo.

Of course the signal coming from Microphone (or other source) can easily be scaled or filtered in code.

Have (more) fun! :)
Attachments
PICAmplif.pdf
(11.82 KiB) Downloaded 49 times
picfruit24_amplif.zip
(13.18 KiB) Downloaded 35 times
All we are praying / is an earthquake in Chandler
User avatar
DarioG
Verified identity
 
Posts: 34
Joined: Thu May 29, 2014 8:42 am
PIC experience: Professional 5+ years with MCHP products

Re: an Audio Amplifier with PIC

Postby DarioG » Tue Nov 14, 2017 6:02 pm

Some notes:
of course you can use external buffers (darlington, 7404 or 4049) in order to increase the power.

I noticed I made a mistake: 200mA over 8ohm make only 0.32W :)

Another mistake: *all* of the current is coming from the PIC, so only 10 pins can be used (not 20)
All we are praying / is an earthquake in Chandler
User avatar
DarioG
Verified identity
 
Posts: 34
Joined: Thu May 29, 2014 8:42 am
PIC experience: Professional 5+ years with MCHP products


Return to CCP, ECCP and PWM

Who is online

Users browsing this forum: No registered users and 1 guest