Biasing arduino ground with a higher potential

Thread Starter

darkc0der

Joined Dec 20, 2023
14
When i connect arduino ground to a 2V point in another circuit (the circuit is powered by 5V), the ground and Vcc are shifted up by 2V and the adc readings get messed up, but i don't get it? Shouldn't the adc still measure corrrect voltage...since it measures with respect to arduino ground?..but this is not happening with my case...I suspect the usb device is affected by this voltage shifting? ....a bit confused here :(
 

k1ng 1337

Joined Sep 11, 2020
960
'Ground' is a term for the point in a circuit where the potential is 0V relative to another point in the circuit. Therefore, all ground connections should be connected only to other ground connections to maintain exactly 0V (we need an unchanging starting point to measure from). I don't like the term ground so I always rename it to 0V in my head.

It is hard to say what you are actually seeing without a schematic but if you place two circuits in series each with a voltage potential across them, those voltages will be added. Roughly speaking, it is like putting two 1.5V batteries in series.

If one battery is present, the positive terminal is designated +1.5V and the negative terminal is 0V. However you look at it, there is 1.5V of potential energy available at the terminals.

But if two batteries are connected in series, the positive terminal (highest potential) is now 3V and the negative terminal is still 0V by definition. However, the midpoint will be +1.5V relative to the negative terminal AND the positive terminal because half of the total potential is available at that point.

If this is unclear I can provide a simulation but I highly recommend you learn how to solve DC circuits with Kirchhoff's Voltage Law.

Sometimes we want to add voltages like in the example above but for an ADC this is exactly what we don't want. You'll have to experiment to find out why this is.
 
Last edited:

Thread Starter

darkc0der

Joined Dec 20, 2023
14
It would be helpful if you provided a diagram of how the power supplies are connected to each module.

Is the sensor ground the same as Arduino ground?
This is the circuit being tested, arduino gets 5V and GND from usb to ttl device pl2303:
Screenshot_2023-12-24_00-05-37.png
 

panic mode

Joined Oct 10, 2011
2,736
looks like you are trying to measure voltage of the 5V circuit and
for whatever reason you chose to not keep gnds at same potential like here:
1703355702159.png
either way can work but you need to scale the reading.
since your input is really 3V but you want that value to represent 5V,
just multiply result by 5/3
 

dl324

Joined Mar 30, 2015
16,909
This is the circuit being tested, arduino gets 5V and GND from usb to ttl device pl2303:
Is "arduino a0" power to the Arduino? Where is power/ground to the sensor?

Whatever you're doing, it's not likely to work because the voltage divider isn't very stiff. You can only draw a few mA before the divider voltage changes significantly.
 

Thread Starter

darkc0der

Joined Dec 20, 2023
14
looks like you are trying to measure voltage of the 5V circuit and
for whatever reason you chose to not keep gnds at same potential like here:
View attachment 310716
either way can work but you need to scale the reading.
since your input is really 3V but you want that value to represent 5V,
just multiply result by 5/3
Connecting grounds at same potential works, but it is only when they are not common readings get bizzare, does the adc require arduino ground to be at 0 volts?
 

Thread Starter

darkc0der

Joined Dec 20, 2023
14
Is "arduino a0" power to the Arduino? Where is power/ground to the sensor?

Whatever you're doing, it's not likely to work because the voltage divider isn't very stiff. You can only draw a few mA before the divider voltage changes significantly.
it is analog input i mean the a0, and i am trying to measure voltage across resistor no sensor.
 

k1ng 1337

Joined Sep 11, 2020
960
Connecting grounds at same potential works, but it is only when they are not common readings get bizzare, does the adc require arduino ground to be at 0 volts?
Did you read what I said..? Unless you explicitly want to add voltages, all 0V ground connections should be tied together.

Your readings are whack because one of the ground connections is floating (not 0V) when it should be 0V.

If you don't want to do the math, you'll have even more trouble when you have a circuit with negative voltages which simply means the current will flow in the opposite direction towards the 0V potential.

I see people get confused by this all the time and it's usually because they didn't do the calculations. KVL and KCL are your friends!
 

BobTPH

Joined Jun 5, 2013
8,938
Are those two wires the only connections between the two circuits?

What about the two power supplies? You mention one is USB powered. What is the other one powered by?
 

Thread Starter

darkc0der

Joined Dec 20, 2023
14
Are those two wires the only connections between the two circuits?

What about the two power supplies? You mention one is USB powered. What is the other one powered by?
yes these wires are the only connections between arduino and the test circuit...arduino is getting power directly from a usb to ttl device which is plugged into my laptop...i am basically using serial protocol to send voltage readings to my pc
 

dl324

Joined Mar 30, 2015
16,909
it means that the new ground potential is now = old gnd + 2 so vcc should also be vcc + 2 to maintain the same potential difference between arduino vcc and gnd
Okay, I'll ask again. Post a diagram showing how power for all of the modules is connected.
 

Thread Starter

darkc0der

Joined Dec 20, 2023
14
I will post the diagram tomorrow i am going to bed now...one question..will an opamp solve this problem?..it can measure the differential voltage...and produce an output relative to arduino ground...do i still have to connect arduino ground with the test circuit? how does a multimeter handle its ground that is the black probe? We dont have to connect multimeter's black probe to the gnd 0V of the test circuit right?
 
Last edited:

dl324

Joined Mar 30, 2015
16,909
I will post the diagram tomorrow i am going to bed now...one question..will an opamp solve this problem?..it can measure the differential voltage...and produce an output relative to arduino ground...do i still have to connect arduino ground with the test circuit? how does a multimeter handle its ground that is the black probe? We dont have to connect multimeter's black probe to the gnd 0V of the test circuit right?
I still don't have a clear picture of how you have things connected, or why.
 

nsaspook

Joined Aug 27, 2009
13,260
I will post the diagram tomorrow i am going to bed now...one question..will an op-amp solve this problem?..it can measure the differential voltage...and produce an output relative to arduino ground...do i still have to connect arduino ground with the test circuit? how does a multimeter handle its ground that is the black probe? We dont have to connect multimeter's black probe to the gnd 0V of the test circuit right?
Your isolated multi-meter with a single-ended inputs is reading a differential voltage because, all voltage readings are a difference (that can be measured with differential or single-ended input systems) in some matter. A single-ended voltage is measured with respect to a common circuit reference point ground and the difference between that common ground and another point in the circuit.

The key here is, isolation. Isolation is independent of the type of measurement input system but is constrained by the capabilities of the measurement device requirements like input bias current, etc ... What people are saying is they need both the measurement system power and Device Under Test connection diagrams for a correct answer to your question.

http://www.mosaic-industries.com/em...nstrumentation-amplifier-ground-loop-isolator
1703368577287.png
Differential amplifier circuit.
 
Last edited:
I believe this is a classic example of the XY problem.

https://xyproblem.info/

Perhaps if the TS would care to explain exactly what he/she is attempting to do, it would save everyone a lot of aggravation and useless discussions. But based on similar previous threads, it won’t happen.
 
Top