Voltage divider question

Wawa:
Also sure, can't do that if you don't refer the inputs to some voltage.

Imagine the bottom part of the 1k resistor 'floating' on about -0.5volt.
Then the top part of the resistor is about -0.25volt.
Both inputs are outside the measuring range (GND-VCC), and the A/D will return zero.
As said, both inputs MUST be kept within VCC/GND of the A/D.

That should be the case if the measured device had a common ground shared with the measuring device which is not the case. As far as I understand it, the ADC references differential, meaning A0 against A1 (and not against GND).

@TomGeorge: I am using a hall sensor to measure the current going into electric motors (see attached PFD for more info).

The Schematic of the circuit:

Please note that the GND of the hall sensor is not the same GND as the one of the ADS1115.

CYHCS-WLY-300A.pdf (286 KB)

So the ground to the 24Volts cannot be tied to the Arduino ground?

As far as I understand it, the ADC references differential, meaning A0 against A1 (and not against GND).

No, that is not how the ADS1115 works. The inputs are referenced to the ADC ground and internal VREF, and the difference between them is constructed.

Both of the the input voltages must be positive with respect to the ADC ground and within the allowed range, which depends on how the gain section is configured. Furthermore the difference between the two is also limited, to +/- 4.096/(PGA gain) V.

Please explain the real purpose of this circuit. "crude input protection" does not make sense.

There are a host of schematics where the chip is grounded to the same ground connection as the other device grounds.

jremington:
Please explain the real purpose of this circuit. "crude input protection" does not make sense.

So I need to measure a heck of a current. Therefore I have a hall sensor which gives me an output referenced to its own ground (as seen in the PDF earlier). The potential on that output pin will range from -5V to +5V according to the current (-300A min, +300A max).

Testing this with different voltage sources with different polarities gives me the correct values. So if there is something wrong with this circuit, can you tell me what?

jremington:
No, that is not how the ADS1115 works. The inputs are referenced to the ADC ground and internal VREF, and the difference between them is constructed.

I think this is NOT how ADS1115 works. AFAIK the ADS charges its internal sampling cap to the measured voltage difference, than it disconnect it from input pins and than measures voltage in the cap. I am quite sure it does not measure both voltages in single-ended mode and subtract them later. It makes no sense. I don't see any problem in measuring a floating voltage that does not share common ground with the system containing the ADS1115.

EDIT: this was stupid, see later post

I don't see any problem in measuring a floating voltage that does not share common ground with the system containing the ADS1115.

You may not but the manufacturer certainly does. That is why there are limitations on input voltages.

The ADS1115 is an absolute ADC, with its own internal reference.

jremington:
You may not but the manufacturer certainly does. That is why there are limitations on input voltages.

Sure, but when the measured circuit is floating with respect to ADS's ground the protection diodes will "drag" it to the suitable range. It is the same as measuring part of the circuit with a DMM.

jremington:
The ADS1115 is an absolute ADC, with its own internal reference.

Yes. And compares voltage in the sampling cap to this reference. Internal vs external reference has nothing to do with differential vs single-ended conversion.

EDIT: that part is stupid - it is a sigma-delta ADC, not SAR as Arduino has. I don't know how differential sigma-delta ADCs work and it is well possible they subtract the results.

The potential on that output pin will range from -5V to +5V according to the current (-300A min, +300A max).

That is a 10V swing, which cannot be measured by the ADS1115 anyway.

Use a different sensor, with single ended 0-5V output, and all these unfortunate misunderstandings and problems go away.

jremington:
That is a 10V swing, which cannot be measured by the ADS1115 anyway.

In that case I might just shift the signal up and do a single ended measurement. Shouldn't that do the job? Of course, I will need a common ground in that case and use a voltage divider to split up the 0 -10 volt range.

That is what I was thinking, too. The usual way is to use a summing amp converter (see Fig. 4).

Please post a link to the data sheet for the sensor.

Link to the hall sensor datasheet: http://www.hallsensors.de/CYHCS-WLY-300A.pdf

A summing amplifier will actually require a -Vcc rail, right? I'll have look into that. Don't know how I'll handle that.

Sensor must have an internal DC/DC converter, otherwise a single supply and a bipolar output doesn't make sense.
I agree with using an opamp/converter (jremington, post#18) in front of the A/D.
Could be hard to keep zero current drift at bay with an absolute A/D (ADS1115).

Maybe easier to just use Arduino's ratiometric A/D.
10k resistor between sensor output and analogue input, and 10k resistor between analogue input and 5volt.
That will give a 0-current value of about 512, with a deviation from that for positive and negative currents.

Next time buy a current sensor with unipolar output, like 4-20mA.
Leo..

A summing amplifier will actually require a -Vcc rail, right?

Yes, bipolar power supply with center ground. +/- 15V modules are common and readily available, but for testing, two 9V batteries in series with center tap as ground will work for a while.

What are you actually measuring.
AC current?, DC current uni-polar? or bi-polar?
Leo..

Wawa:
Maybe easier to just use Arduino's ratiometric A/D. 10k resistor between sensor output and analogue input, and 10k resistor between analogue input and 5volt. That will give a 0-current value of about 512, with a deviation from that for positive and negative currents.

Next time buy a current sensor with unipolar output, like 4-20mA.

That is the sensor I got at hand. I considered to buy a proper one but I got this one basically for free so I'm giving it a shot.

And yes... I guess I could try to use the Arduinos own ADC. I'll lose a lot of my resolution but I'll have a look at it.

I am measuring DC bi-polar.

Vulpecula:
And yes... I guess I could try to use the Arduinos own ADC. I'll lose a lot of my resolution but I'll have a look at it.

A trade-off between resolution and a drifting zero point.
Again, depends on what you're measuring (which you didn't say yet).
Zero current drift is irrelevant with A/C, because the code takes care of that.
But it could be a pain when measuring DC.

You could get a resolution (steps) of 1Amp with this sensor and Arduino's 10-bit A/D.
Maybe 0.5A with good smoothing code.
Leo..

Vulpecula:
Hey there!

I have a voltage divider which is supposed to function as a crude input protection for an ADC (differential reading). I am familiar in calculating basic voltage dividers and this basically is just that, but somehow I am stuck now.

The ADC will see 0.24 volt since that is the differential voltage between the points A and B. But I am struggling to find the right equation to calculate the actual input voltage.

The diagram symbols with the arrows marked with 2.38V and 2.62V don't appear to clearly indicate what voltages they are representing.

Oh god, OP has -5V to 5V output (it is not the same as 0V to 10V!) and ADC able to measure -5V to 5V differential voltage. It looks like a perfect match! Why do you suggest to use summing amplifier or similar crap? If you don't trust ADS1115's ESD clamp diodes to keep the input within its rails (do you have a reason for this distrust?) you can always add external clamping diodes.
And of course adding voltage divider from #8 will reduce the input from -5/5V to about 1/20. I am not sure if it is needed but if the input swing is reduced this way it may be connected to ADS's Vcc/2 by simple voltage divider.
The above is true only if the supplies of the two devices are truly independent ofc.

Okay, the topic of this thread and the title don't really match anymore but anyways... My intention was to measure the current flow through DC motors using the hall sensor I have at hand. The motors can turn in either direction - so does the current flow accordingly. Brief overview:

Now... What if I pick up the current somewhere else instead of inside the motor loop? For instance on the common ground line which is connected to the systems batteries? Okay, that would not resemble the sole motor current but I could live with that. A little something like this:

In that case, the hall sensor will only output in a range of 0V to +5V since the current will only flow into one direction. This means I could skip the differential reading and go for the single ended measurement with a proper protection on the input:


(Don't mind the voltage divider, I'll have to change the values to come closer to the measured range. Also: The GND in this picture is the same potential as the GND of the hall sensor.)