Shared Ground Issue

Hello there,

I'm developing my first Arduino's project and I'm experiencing a weird problem.

The configuration is quite simple:

  • an Arduino Nano connected to a breadboard
  • a simple circuit with LED and Resistor (330 Ohms) in serie connected to a digital pin
  • a digital voltmeter connected to 5V pin

Both LED and Voltmeter share the same ground. When I switch on/off the LED intermittently, the voltmeter value is moving around 5V.

I would like the voltmeter to be perfectly stable at 5V irrespective of the LED since they are supposed to be independant. I suspect a shared ground issue. Could someone help me?

To give you more precisions, the voltmeter is stable at 5V when the LED is not connected. I have presented a simplified version of the problem. For instance, if I use several RGB LEDs in parallel, the voltmeter shows values from 4.5V (when LED is white) to 5V (when LED is off).

Thank you for you help,
Freeman

No, that describes a schematic better.


Not sure if it's more clear. When Led is off, voltmeter display shows 5V which is normal. But When Led is on, voltmeter display shows slightly less than 5V

Symptoms are the connections in the breadboard. Have you determined the actual current required by a WHITE LED? Do you know a "white LED" is actually two LEDs in series and it takes quite a bit of current. Why do you think they are independent when they are obviously connected to the 5 volt supply. What is your 5 volt supply or are you using the Arduino 5 volt pin and powering the whole thing from a 9 volt battery?
Paul

Hello Paul and thank you for your answer. I'm new to electronic so there are many concepts I don't understand. The Arduino Nano is connected to the computer via USB and I'm using the 5 Volts pin (from Arduino) for the voltmeter and the digital pin 3 for the LED. I thought they were independant since I did not expect that LEDs could interfere with another device plugged into arduino. So basically, I would like the current coming into the voltmeter to be the same no matter if the LED is on or off. I say voltmeter but it could be another LED connected to 5V pin, in this case, the LED from 5V pin would be less bright when the LED from digital pin 3 switches on. How to avoid that?

Everything on the Nano board and everything connected to the pins are all connected to the 5 volts coming from your computer via the USB connection.
You avoid the change in brightness by using the Nano to control a transistor which controls the LED and using a separate 5 volt power supply.
Please explain your concern. No one else seems to have it.
Paul

Thank you a lot for trying to help me! I will try to clarify my question with a simpler problem:

Let's forget everything and start again.
I have the LED #A connected to Arduino's 5V pin with relevant Resistor
LED #A brightness is 100%.
That's fine.

Now, I put another LED, let's say LED #B which will be connected to Arduino's Digital Pin 3 with relevant Resistor.
LED #A brightness is 98%, not 100%.
This is my concern.

I would like the Arduino to adapt the current so that the LED #A brightness is not affected by LED #B.

Well, 98 or 100% is quite the same but the problem becomes real if we plan to put several LEDs #B in parallel. LED #A brightness will drop significantly.

Hello
Do you use LEDs with different colours?

Those two won't go together with a (classic) Nano.
5volt on a (classic) Nano is more like 4.6-4.7olt, because of a more simple (diode) USB backflow protection. An Uno/Mega, with a mosfet circuit, does better there.
Not that it makes any difference in performance though.

Are you sure you can see any brightness difference?
Show us a picture of the build, and the code.
Leo..

Remember, the Arduino A/D input converts the voltage between A0 and the ground at the board. I suspect the way you have the grounds wired there is a sharing of the ground which when the LED is on the ground is at a different potential.

In your sketch, you don't show where the A/D is connected. And where the power supply ground is connected.

Without seeing more of the wiring I can't say what to change but I suggest you use a "star" ground scheme. To do this you connect all the grounds to one point (and not on a solderless breadboard).

Remember, the Arduino is NOT a power supply. IT DOES NOT control current. It controls only voltages in the form of signals.
Paul

[LEDs] do not directly produce white light. There are two ways in which white light is produced from [LEDs] as below:

1: Using a blue [LED] with a phosphor coating to convert blue light to white light by a process called fluorescence. That is how most common 3 & 5 mm "20mA " white LEDs work.

2: Combining red, blue and green [LEDs] to produce white light. White light is produced by varying the intensities of the individual red, blue and green chips.

Firstly, no two LEDs will give exactly the same brightness even if fed from identical circuits.
If you NEED them to be EXACTLY the same you need to provide a feedback circuit to measure the brightness and adjust them.

Secondly the arduino pins are not guaranteed to have identical characteristics.

Also, you are "powering" the arduino from a usb outlet, through rather fine wires and connections. Its NOT a stabilised power supply, and it WILL change as you draw a changing current.

Sounds like your power supply cannot handle the load, try powering the board via VIN pin with an external power supply

Thank you for these explanations. I don't really see any brightness difference, but I can measure a voltage drop

Thank you for that suggestion, I tried to use a star ground scheme as you suggest instead of the solderless breadboard but it didn't fix the problem.

Perhaps I don't understand your circuit. Can you describe "Voltmeter". If Arduino A/D can you report the raw counts?

Paul_KD7HB, killzone_kid and johnerrington thank you a lot, I start to get the point. It seems that I need a stabilised power supply in addition to USB. Nevertheless, I was thinking that USB is "powered" by power supply from PC, since this kind of power supply is very "powerful" (sorry for that word which migh be inappropriate), wouldn't it be acceptable to consider that the drop in voltage in the LED can be balanced by controling the current coming from the power supply to USB Arduino port?

Yes, you got it, my voltmeter is "home-made" and a bit special, that why I reformulated my problem considering LEDs only

"Let's forget everything and start again.
I have the LED #A connected to Arduino's 5V pin with relevant Resistor
LED #A brightness is 100%.
That's fine.

Now, I put another LED, let's say LED #B which will be connected to Arduino's Digital Pin 3 with relevant Resistor.
LED #A brightness is 98%, not 100%.
This is my concern.

I would like the Arduino to adapt the current so that the LED #A brightness is not affected by LED #B."