Is there a way to output the synthesized sound to a speaker?

65 views
Skip to first unread message

DIBYAYAN MANDAL

unread,
Oct 1, 2024, 12:10:46 PM10/1/24
to Mozzi-users
I want to play the synthesized sound directly on the speaker (8 ohm ones) connected to arduino pwm pins. Is it possible?

tomco...@live.fr

unread,
Oct 2, 2024, 6:05:58 AM10/2/24
to Mozzi-users
Hi!

Straight from an Arduino that might be problematic: as per https://electronics.stackexchange.com/questions/67092/how-much-current-can-i-draw-from-the-arduinos-pins one can draw around 40mA on a pin. Now, outputting a signal of maximum 5V into 8ohm leads to (roughly, not taking AC nature of the signal into play) 5/8=0.625A = 625mA so more than 15 times to much. The pin won't resist which could lead to it no drawing the current (if the pin is protected, I am never sure of that) in the best case to the Arduino frying as a whole.
This can be achieved quite easily by plugging a small audio amplifier, there are small modules like that available on the net.

Hope this helps,

Steve R

unread,
Oct 2, 2024, 3:58:53 PM10/2/24
to Mozzi-users
An 8 ohm speaker doesn't behave like an 8 ohm resistor - it's an inductive load so has an even lower impedance at low frequencies.  

If the current doesn't kill the Arduino, the back-EMF probably will.  If you stick a pulse of current into a speaker, when the pulse ends (as it would with PWM) the speaker will try to keep that current flowing, and it will generate a negative voltage, which is very likely to damage the Arduino output pin and possibly do further damage.  Same thing happens if you connect a relay directly to an Arduino. 

Plenty of small cheap amplifiers on ebay.   That's the only sensible option.

Steve

max powe

unread,
Oct 13, 2024, 2:56:44 AM10/13/24
to Mozzi-users
I tried it and it didn't fry mi arduino, but the sound was mild. In order to amplify it I arranged a basic amplifier using a Tip31C and a 320 Resitor

tomco...@live.fr

unread,
Oct 14, 2024, 4:59:04 AM10/14/24
to Mozzi-users
Nice! I am always amazed how these things resist!
If that sounds good would you mind sharing the schematic? Sounds like some other people would also be interested in.

Best,
Reply all
Reply to author
Forward
0 new messages