Go Down

Topic: Voltage divider question (Read 517 times) previous topic - next topic

Smajdalf

#15
Jun 18, 2019, 09:39 pm Last Edit: Jun 18, 2019, 09:55 pm by Smajdalf
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.

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.
How to insert images: https://forum.arduino.cc/index.php?topic=519037.0

jremington

Quote
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.

Vulpecula

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.

jremington

#18
Jun 19, 2019, 12:12 am Last Edit: Jun 19, 2019, 12:19 am by jremington
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.

Vulpecula

#19
Jun 19, 2019, 12:31 am Last Edit: Jun 19, 2019, 12:45 am by Vulpecula
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.

Wawa

#20
Jun 19, 2019, 01:53 am Last Edit: Jun 19, 2019, 02:07 am by Wawa
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..

jremington

#21
Jun 19, 2019, 02:01 am Last Edit: Jun 19, 2019, 02:01 am by jremington
Quote
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.

Wawa

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

Vulpecula

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.

Wawa

#24
Jun 19, 2019, 05:27 am Last Edit: Jun 19, 2019, 05:30 am by Wawa
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..

Southpark

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.

Smajdalf

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.
How to insert images: https://forum.arduino.cc/index.php?topic=519037.0

Vulpecula

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.)

Wawa

Measuring supply current single-ended with the ADS1115 could work.
Don't overthink protection. The internal clamping diodes of the ADS are rated for 10mA max.
No need for external ones.
I would only use a single 10k resistor between sensor output and ADS input.
And a smoothing cap from ADS input to ground if the motor is PWM-ed.
The PGA gain setting can be used as current range select.
Could ofcourse also use the sensor in the + power wire.
Leo..

Go Up