You risk damaging your Arduino connecting an 8 Ohm speaker to it without a series resistor.
Code: [Select]You risk damaging your Arduino connecting an 8 Ohm speaker to it without a series resistor.thank you for the caution sir, i'm kind of new with arduino, my bad. anyway, my supply is just 5 volts, what resistor value should i use?
At least a 120 ohms or more to stay below the 40ma absolute maximum current draw limit from an output pin. But keep in mind that means the resistor will 'consume' about 95% of the 'audio power' leaving a wimpy amount of about 13 milliwatts of audio power to drive the the 8 ohm speaker. You should look for a speaker with a much higher voice coil resistance or do as most anyone wanting to drive a 8 ohm speaker, use a audio amplifier stage or module to drive the speaker.