I have noticed a weird behaviour while doing some testing with a SRF05 ultrasonic sensor. When a digital pin is switched on (with a LED), it makes the SRF05 unstable for a very small amount of time (one reading is false). Sometimes it even freezes for a second. I have almost fixed thoses issues with the NewPing library.
But something is still bothering me. When I turn on a LED from the Arduino, the LED behind the SFR05 vary a little bit. I have also noticed that when I play a sound throught a piezzo speaker, I can hear (from the speaker) something each time the LED state changes.
So it makes me think that when current is drawn from one pin, it slightly affectcs the others.
It is not a major issue, since I can easily find a software work aroung but I am still confused. Is it a normal behaviour from the board ? Am I missing something ? Is there "electronic workaround" (capacitors... ?) ?
How much power? Typical effects like this indicate an inadequate power supply which
droops under load. How much current is the LED taking? You have a current limiting
resistor? (essential).
The LED is given for 20mA and yes, I have a resistor between the Arduino pin and the LED (220 ohms).
You are probably right about the power supply (I'm not home, I can't check now), I provide the board with 5V on the Vin and I've juste checked the specs of the board :
"The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts. "
It might explains the small instability problems I am running into !
Vin goes to the input of the on-board regulator. That has to be at least 6.6V,
for the regulator to regulate, if I remember the measurements I took with my
Uno (ie its not an LDO regulator)