Author Topic: Help with reducing DC - Data logging  (Read 3647 times)

0 Members and 1 Guest are viewing this topic.

Dave B

  • Hero Member
  • *****
  • Posts: 1014
  • Country: 00
    • DCB Energy Systems
Help with reducing DC - Data logging
« on: April 25, 2011, 01:14:56 AM »
Silly simple I'm sure but I need to tap off my 48 volt bank to log battery voltage. Problem is my data logger input is +- 10vdc max. A voltage divider circuit that will not burn anything up to get me below 10v input that I can calibrate to actual battery voltage ? Say like 6 vdc in for 48 vdc actual. Obviously I don't want a DC to DC converter, I need to monitor the battery voltage range and yet keep the power consumption of the circuit to a minimum. I guess my concern is resistor minimum wattage, power consumption and letting the smoke out etc. I sure would appreciate help, it's so simple I know I am making it tough. It happens when you get older. Thank you,  Dave B.
DCB Energy Systems
http://dcbenergy.com/

rossw

  • Hero Member
  • *****
  • Posts: 834
  • Country: au
Re: Help with reducing DC - Data logging
« Reply #1 on: April 25, 2011, 01:34:17 AM »
You need to come into irc more :)

<RossW> !divider 4700 1000 48 0
<RossBot> 4700(Rtop) + 1000(Rbottom) across 48 V draws 8.4 mA, out = 8.4 V

across 50 V draws 8.8 mA, out = 8.8 V
across 55 V draws 9.6 mA, out = 9.6 V

<RossW> !ohmslaw 48v 5700r
<RossBot> 48.000 volts at 8.421 milliamps through 5.700 kiloohms for 404.211 milliwatts

The downside with such a simple divider is that you get very little variation - from 8.4V to 9.6V from 48V to 55V


If it were me, I'd probably use something like a couple of zeners (chosen so their temperature coefficients cancel as far as practical, or several 5V6 which are already almost zero temperature coefficient), and a smaller resistor at the top of the divider

Something like (say), 6 x 5V6 zeners in series to "wash off" 33.6V, leaving you with a 14.4V to 26.4V variation for 48-60V input.
Then, series "high side" 1.8K and 1K bottom for a divider will give you 9.4V (with 60V in) and 5.1V with 48V in, while pulling 9.5mA at 60V (should be comfortably within the zener current range).
 

Rover

  • Hero Member
  • *****
  • Posts: 788
Re: Help with reducing DC - Data logging
« Reply #2 on: April 25, 2011, 06:54:08 AM »
If this is for a digital meter, do you know the bit depth of the voltage input ?

If the bit depth is high enough and covers the full range 0-10 , then you may get away with the resistor voltage divider circuit.

example, if it has a 12 bit ADC (0 - 4096 steps)  then you have roughly 409 steps per volt when stepped down to the 10 volt range

somebody check my math, I just woke up :)



 
Rover
<Where did I bury that microcontroller?>

rossw

  • Hero Member
  • *****
  • Posts: 834
  • Country: au
Re: Help with reducing DC - Data logging
« Reply #3 on: April 25, 2011, 07:40:53 AM »
If the bit depth is high enough and covers the full range 0-10 , then you may get away with the resistor voltage divider circuit.

example, if it has a 12 bit ADC (0 - 4096 steps)  then you have roughly 409 steps per volt when stepped down to the 10 volt range

Most of the inexpensive ADCs nowdays are 10-bit.
Allow for jitter, and +/- LSB, it's probably not much better than an effective 8-bit.
Thats near enough 40mV minimum resolution in a 0-10V, but if it's scaled down from 60V thats 234mV/bit.
Getting a bit lumpy - and I certainly wouldn't want to use it for float or dump load control.

We didn't get enough real detail in the question to be able to give a proper answer though :(

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Help with reducing DC - Data logging
« Reply #4 on: April 25, 2011, 08:01:17 AM »
I'm reducing the 9V---16V (and possibly up to 25V) power inputs to my server's step-down DC-to-DC converter to fit within the 0V--5V range of the ADCs on the USB I/O board I happen to be using.

I'm using a plain resistive divider (plus a bit of series resistance to avoid latch-up or such nasties on the inputs if there's a spike of some sort), and rather than going all out to maximise resolution I've just tweaked it to be 100mV per LSB, which seems to be good enough for my purposes, and makes my scripts easy, see:



A bit noisy, but it works, and varying loads are enough to cause more than 100mV/1LSB errors because of where I'm monitoring remotely from the batteries, so any extra precision would probably be illusory.

Rgds

Damon
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

boB

  • Sr. Member
  • ****
  • Posts: 389
  • Country: us
    • boB
Re: Help with reducing DC - Data logging
« Reply #5 on: April 25, 2011, 02:14:33 PM »

Average in software to make readings more stable and it will virtually get rid of the jitters.

boB

Dave B

  • Hero Member
  • *****
  • Posts: 1014
  • Country: 00
    • DCB Energy Systems
Re: Help with reducing DC - Data logging
« Reply #6 on: April 26, 2011, 04:49:49 AM »
Thank you for the help. The ADC is 10-bit and the input range is +-10 VDC  I am just wanting to monitor the 48 volt battery voltage, it seems to me that to the tenth of a volt would be fine. I'm a little rusty on this but wouldn't a simple 2 resistors in series voltage divider do this for me like what RossW mentioned ? I'd like the range to be 45-65 VDC and keep the voltage in well below the max 10 VDC of the logger. 50K - 5K ohm should give me 4 vdc @ 45 v and 5.9 vdc @ 65 v across the 5K ohm resistor in series with the 50K ohm correct ? Am I figuring correct that 1/4 or 1/2 watt resistors would be fine for this ? I do remember the sound and smell of getting the wattage wrong. Thanks again for the help,  Dave B.   
DCB Energy Systems
http://dcbenergy.com/

rossw

  • Hero Member
  • *****
  • Posts: 834
  • Country: au
Re: Help with reducing DC - Data logging
« Reply #7 on: April 26, 2011, 05:26:00 AM »
Thank you for the help. The ADC is 10-bit and the input range is +-10 VDC  I am just wanting to monitor the 48 volt battery voltage, it seems to me that to the tenth of a volt would be fine. I'm a little rusty on this but wouldn't a simple 2 resistors in series voltage divider do this for me like what RossW mentioned ? I'd like the range to be 45-65 VDC and keep the voltage in well below the max 10 VDC of the logger. 50K - 5K ohm should give me 4 vdc @ 45 v and 5.9 vdc @ 65 v across the 5K ohm resistor in series with the 50K ohm correct ? Am I figuring correct that 1/4 or 1/2 watt resistors would be fine for this ? I do remember the sound and smell of getting the wattage wrong. Thanks again for the help,  Dave B.   

If your ADC is 10 bit, thats basically (rounding off) 1000 steps. That'd be 0.01V/step for a 0-10V range.
You have -10 to +10 so thats 0.02V/step.
If you want to divide by 6 (to give you 60V FSD) you will have in effect 0.12V/step.
Add in jitter etc and I think you will be somewhat dissatisfied with the result.
Go the fixed resistors PLUS some zeners like I said. Its only SLIGHTLY more complex, but gives you WAY more useful data.

Rover

  • Hero Member
  • *****
  • Posts: 788
Re: Help with reducing DC - Data logging
« Reply #8 on: April 26, 2011, 12:52:29 PM »
Agreeing with RossW and using his numbers, and  without knowing what the data logging system is behind the ADC, frequency of measurement, averaging etc .

The realization that before it even hits the meter after the ADC, it could have a variance of > 120 mV per reading, is something to take into account. I build my own and use ADC's with greater than 12 bit resolution, and I just use resisitor base voltage dividers.  But I'm measuring 12V levels, into a 4.096 V ADC (not +/-) , or better yet a 16 bit ADC. I also calibrate via software using the best meter or meters I have at hand and use fudge factors where necessary.

However it all depends on what the intended purpose is. If there is averaging, based on # reads  over a period of  time , it will get smoothed somewhat. If you concern is over 10's of minutes you may be fine.

Just think though that if you have jitter noise (er you will) , any one value may cross the threshold to another 120 mV step, either up or down. But you will still see voltage trends, etc. 





Rover
<Where did I bury that microcontroller?>

Tight Yorky

  • Newbie
  • *
  • Posts: 15
  • Country: gb
Re: Help with reducing DC - Data logging
« Reply #9 on: April 26, 2011, 01:49:14 PM »
Hey Dave,

RossW is right about the loss of resolution. Trying to measure the range 45V - 65V using a simple potential divider wastes a lot of the ADC's range. You may also experience issues with the source impedance for your ADC.

A circuit (old school) for dropping a voltage to a manageable range is shown below. You may find it useful.

2820-0

Note that the circuit is for a current source but contains a differential instrumentation amp. The section you may find useful is the bottom left. The op-amps U1 and U2 are used to bring a higher voltage down for use within the 5V rail. In this circuit the value to be subtracted (Vd-) is measured on the other side of a resistor (100R) but this measurement could be replaced by a fixed value of 45V.
The value being measured (Vd+) is through a potential divider. Note that the measurements are into very high impedance + op amp inputs and give stable measurements. ;)
The difference is produced out of U2 (Vfb) and can be used to feed your ADC. That is everything above 45V and above. The range above 45V is dependant on your resistor values.
Only problem is that the range of Vfb is max of 5V. You could use a different rail (12V ?) but you would need to source another type of op amp. MC6002 only 5V.

Food for thought. Hope this helps.

Clive


Dave B

  • Hero Member
  • *****
  • Posts: 1014
  • Country: 00
    • DCB Energy Systems
Re: Help with reducing DC - Data logging
« Reply #10 on: April 26, 2011, 04:23:07 PM »
Thanks to all for trying to help with a circuit. I'll experiment and make it happen. Dave B.
DCB Energy Systems
http://dcbenergy.com/

SparWeb

  • Global Moderator
  • Super Hero Member Plus
  • *****
  • Posts: 5452
  • Country: ca
    • Wind Turbine Project Field Notes
Re: Help with reducing DC - Data logging
« Reply #11 on: April 26, 2011, 04:56:24 PM »
I drew up a few diagrams and then worked a few calculations last night.
It turns out that Ross' trick with the Zeners makes the ADC about 3 times more sensitive.  Wow.

Thanks Ross!
No one believes the theory except the one who developed it. Everyone believes the experiment except the one who ran it.
System spec: 135w BP multicrystalline panels, Xantrex C40, DIY 10ft (3m) diameter wind turbine, Tri-Star TS60, 800AH x 24V AGM Battery, Xantrex SW4024
www.sparweb.ca