PWM audio amplifier circuit crashes arduino.
i'm trying implement variable frequency buzzer using pwm pin, , works other resetting arduino. here's circuit:
the speaker 8 ohm , hooked pin connector in diagram. transistor bases go pin 13. has nice side effect can hear program uploading.
my code causing problem this:
i borrowed oscilloscope, , saw 5v line has pretty big spikes above , below 5v suspect causing resets.
what's best way fix this? decoupling capacitor between +5 , gnd?
the speaker 8 ohm , hooked pin connector in diagram. transistor bases go pin 13. has nice side effect can hear program uploading.
my code causing problem this:
code: [select]
analogwrite(13,100);
i borrowed oscilloscope, , saw 5v line has pretty big spikes above , below 5v suspect causing resets.
what's best way fix this? decoupling capacitor between +5 , gnd?
quote
decoupling capacitor between +5 , gnd?
yes , need big one. start off value of 220uf , go not cure.
you can use series inductor amplifier supply last circuit on page:-
http://www.thebox.myzen.co.uk/tutorial/de-coupling.html
Arduino Forum > Using Arduino > General Electronics > PWM audio amplifier circuit crashes arduino.
arduino
Comments
Post a Comment