Hi There,
Kind of new to electronics, been looking through the forum and I see that the Arduino has a max current output of 40 mA. But my question is that the default current out of the box?
For example, if I just hooked up two wires, one going to GND and the other going to 5V to a piezo buzzer and just put in a digitalWrite() on the pin to make it buzz, is 40 mA current being sent to the buzzer by default? (No resistor is being using in circuit).
My question is a smaller question of a larger question: if I change the voltage to 3.3V and changed the power source to two coin cell batteries, would the buzzer buzz as loud as in the previous example which was powered by USB at 5V?
I could test it myself, but I'm trying to do some prototyping and planning, if I can get a straight answer from someone who's a pro at this, will save me some time to work on the harder things I need to work on.
That would depend on the buzzer/transducer. i.e. With nothing connected, no current flows.
Current depends on voltage and resistance (or impedance). [u]Ohm's Law[/u] describes the relationship between voltage, resistance, and current:
Current = Voltage / Resistance.
More voltage = more current. More resistance = less current.
Resistance is "The resistance to current flow".
You can think of voltage as "pressure", trying to "push" current through a resistance.
If you connect an LED and resistor to a small 12V power adapter or to a 12V car battery capable of a few hundred amps, you'll get the same current in both cases. If you connect a car headlight that takes about 10 Amps to a small power supply that's not capable of supplying the current, the voltage will drop, less current will flow, and you might fry the power supply.
A piezo transducer (one like a speaker without any "buzzer" circuit built-in) is electrically similar to a capacitor. At low frequencies it has high impedance. At DC it's essentially an open circuit (infinite impedance). At higher frequencies it has lower impedance, and you get more current and more sound.
A "buzzer" has a sound-generating circuit built-in so you just apply DC power and it makes a noise.
But my question is that the default current out of the box?
No it is a limit that must not be exceeded.
The actual current that flows depends on the resistance of the load attached to the pin.
The voltage and current are linked by Ohms law, if you have 5V and a 100 ohm resistor then the current will be:-
5/100 = 0.05A or 50mA
if I change the voltage to 3.3V and changed the power source to two coin cell batteries, would the buzzer buzz as loud as in the previous example which was powered by USB at 5V?
No.