The Godfather talking
You may crack software. How about me?
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 25, 2024, 08:34:01 20:34


Login with username, password and session length


Pages: [1]
Print
Author Topic: Measure 12v battery  (Read 5055 times)
0 Members and 1 Guest are viewing this topic.
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« on: March 10, 2016, 05:53:59 17:53 »

I'm looking for a circuit that must be very common place, but I can't find.

Produce an output of 0-4.5v to an ADC (leave a bit of headroom) from an input of 10-16v and provide input protection from over voltage and spikes. Standard car stuff.

I could use a potential divider but that throws away most of the resolution (0-10v). Protection I guess a couple of Schottky diodes?

Please forgive my ignorance of the analogue world.

George
« Last Edit: March 10, 2016, 05:56:19 17:56 by towlerg » Logged

Win 7 Ult x64 SP1 on HP2570p
PICker
Active Member
***
Offline Offline

Posts: 162

Thank You
-Given: 207
-Receive: 110


« Reply #1 on: March 10, 2016, 07:16:17 19:16 »

Few links...
...about ADC input adapters:
http://electronics.stackexchange.com/questions/21017/how-to-convert-0-to-10v-analog-signal-to-0-to-2-5v-for-adc-input
http://electronics.stackexchange.com/questions/6053/voltage-dividers-and-adcs
http://electronics.stackexchange.com/questions/5404/adc-input-impedance-on-mcus
http://electronics.stackexchange.com/questions/812/pic-voltage-measurement
http://electronics.stackexchange.com/questions/12718/voltage-divider

...and input voltage protection
http://www.ti.com/lit/an/slaa593/slaa593.pdf
http://www.analog.com/media/en/technical-documentation/technical-articles/55798267SEN5247e.pdf
https://physics.ucsd.edu/neurophysics/courses/physics_120/AoE_Diodes.pdf
http://electronics.stackexchange.com/questions/59666/protect-dc-circuit-from-too-much-voltage
http://www.onsemi.com/pub_link/Collateral/AND8230-D.PDF
Logged
Signal
Active Member
***
Offline Offline

Posts: 200

Thank You
-Given: 113
-Receive: 81



« Reply #2 on: March 10, 2016, 09:00:16 21:00 »

I'm looking for a circuit that must be very common place, but I can't find.
<...>
I could use a potential divider but that throws away most of the resolution <...>
Simple divider is a common circuit not without reason.
You did not mention a required precision and used ADC if it can not be changed.
The imagined shifter circuit itself could ruin extra 1.4-bits [log2(16/6)=1.41] of ADC precision and requires additional tricks/chips that could be more complicated than just small slow 16-bit ADC in SOT23 package (http://ww1.microchip.com/downloads/en/DeviceDoc/22072b.pdf).
Logged

Give a right name to a right game and play it right
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #3 on: March 10, 2016, 11:53:49 23:53 »

@PICker
Thanks for the input but none of the ADC links seem to address my problem. The voltage protection stuff looks interesting.

@Signal
Point taken. I had intended to use the normal 10 bit PIC onboard ADC. 16/1024=0.016v/step whereas 6/1024=0.006v/step.

Is it really that difficult to "subtract" (is that the right usage?) 10v DC?

George
Logged

Win 7 Ult x64 SP1 on HP2570p
solutions
Hero Member
*****
Offline Offline

Posts: 1826

Thank You
-Given: 656
-Receive: 905



« Reply #4 on: March 11, 2016, 09:44:37 09:44 »

Easy

Connect the GND pin to +10V and power pin to 16V for the PIC

EDIT:Sorry I pressed the wrong button by mistake when o I-pad (fat finger  Grin), I removed other post has it's back
« Last Edit: March 12, 2016, 08:18:44 08:18 by Wizpic » Logged
Signal
Active Member
***
Offline Offline

Posts: 200

Thank You
-Given: 113
-Receive: 81



« Reply #5 on: March 11, 2016, 04:35:34 16:35 »

Connect the GND pin to +10V and power pin to 16V for the PIC
Ha-ha, it is the right answer on such unspecified question!

Is it really that difficult to "subtract" (is that the right usage?) 10v DC?
It is ungrateful work to search for universal abstract "technical" solution for unspecified problem.
On your assumption that with hypothetical "substractor" the things will be "better" I can say that 0.016V resolution is already not bad.

Try to respect our efforts little more by specifying more conditions/requirements.
At first - 1) what is the original (real?) problem that needs to measure battery voltage?
2) Justify requirements for precision in terms of absolute accuracy and resolution.
3) Specify additional conditions: temperature range for operation, calibration is intended or device must work right after assembling, expected price (I mean $$$), e.t.c.

Start to think from selection of appropriate voltage reference. Check parameters of integrated band gap and the _real_ ability of ADC in selected PIC for example. Try to find voltage reference with desired characteristics. Check it's price. Roughly: you will add errors of each used voltage reference to resulting measurement error. The same is true for precision of resistors, but resistors are much more stable devices comparing to semiconductors.

The simplest "substractor" you have to know about is a zenner-resistor divider. You can replace Zenner diode by shunt-type voltage reference (am not sure there is such for 10V value). Think about resistor in this circuit not only as a lower half of divider but also as a current limiter/setter for upper voltage source - changing input voltage will change current through voltage reference device... (Hommage a Sacher-Masoch: try to replace resistor by current source, check its lowest operational voltage)
Next fantasy: add a temperature sensor and build 2D calibration table for used Zenner. (Some voltage reference devices have an integrated heater for temperature stabilization)
Fantasy #3: replace Zenner diode by negative LDO voltage regulator. I do not know if "negative" series voltage reference chips are exist.

More universal approach of course is to use operational amplifier (consider voltage offset) to substract/sum signals. See attached schema:
While it will work as you wish I consider it as ineffective usage of additional ICs to achieve better precision (see my previous post).

Another way - search for specialized/suggested solution from different vendors for your exact task (in most cases it will be an appropriate ADC). There are plenty of battery monitoring IC in the world.
« Last Edit: March 11, 2016, 04:49:12 16:49 by Signal » Logged

Give a right name to a right game and play it right
titi
Active Member
***
Offline Offline

Posts: 230

Thank You
-Given: 3807
-Receive: 834



« Reply #6 on: March 12, 2016, 11:17:24 11:17 »

Hi towlerg,

In Elektor 07/2015, there is a monitor for 12v Batterie, if you measure the voltage across R1 you will have the difference between 10v and the voltage of the batterie with a good precision.
I think it is what you are searching for.

Best regards.
« Last Edit: March 12, 2016, 02:56:13 14:56 by titi » Logged
PICker
Active Member
***
Offline Offline

Posts: 162

Thank You
-Given: 207
-Receive: 110


« Reply #7 on: March 12, 2016, 02:37:00 14:37 »

OK,
NOW I undestand...
...the input is between 10 and 16 V (and not 0-10 or 16V)...
and you have to shift (and aventually rescale) it between 0 and 4.5V.
One solution (very simple and elegant) is the @titi's one.
I think that another solution could be to use an OPA-based differential amplifier; one input connected to a 9.5V Zener Diode (driven by your 10-16V input voltage) and another input directly connected to the 10-16V input voltage); The difference should be between 0.5 (input=10V) and 4.5V (input=16V); You may add two 10K resistors just to protect the inputs of the OPA.
I did not try this circuit; You could simulate it.
Logged
solutions
Hero Member
*****
Offline Offline

Posts: 1826

Thank You
-Given: 656
-Receive: 905



« Reply #8 on: March 13, 2016, 05:34:57 05:34 »

Your "simple & elegant", zener, and opamp choices will probably not meet his 1/2048 accuracy requirement without a lot more work than most of you think (Signal's got it right with calibration and tables), though if he was to implement it with a simulator, versus a physical component design, the sim will work like a charm. He can ship simulators in volume.

Show me a 10V zener accurate to 5mV over automotive temp range...

What power supply are you planning to use for your magical OPA circuit where you are bringing 10-16V into the amp? Seems to be a Heisenberg Uncertainty Principle thing going on there.

Wizpic: no worries - I've done the same in another forum I moderate. Good to know I wasn't delusional....I'll cancel Tuesday's psychiatrist appointment....   Tongue
Logged
PICker
Active Member
***
Offline Offline

Posts: 162

Thank You
-Given: 207
-Receive: 110


« Reply #9 on: March 13, 2016, 09:22:51 09:22 »

@solutions, I totally agree with you (my idea will be teorically applicable but in practice...
... it is another story)
and, mainly, I appreciate your sense of humor.
Just for talking, I've found an interestion OPAMP (http://www.ti.com/lit/ds/sbos156b/sbos156b.pdf) and for the power supply I need a little more time...
I consider a pleasure to talk with someone that bring me back to reality!

ps. about your Tuesday's psychiatrist appointment, do not worry, I'm not only an electronic enthusiast, but also a medical doctor expert in psychiatric drugs! Shocked
Logged
zac
Active Member
***
Offline Offline

Posts: 147

Thank You
-Given: 81
-Receive: 57


« Reply #10 on: March 13, 2016, 06:02:18 18:02 »

Your "simple & elegant", zener, and opamp choices will probably not meet his 1/2048 accuracy requirement without a lot more work than most of you think (Signal's got it right with calibration and tables), though if he was to implement it with a simulator, versus a physical component design, the sim will work like a charm. He can ship simulators in volume.

I've never used a zener to drop voltage to an A/D before (and intuitively don't like that arrangement), but there are ic zeners that are supposedly accurately to 0.05% at 25c and have a 10ppm/C temp coefficient.  

http://www.ti.com/product/lm4030/description

http://www.ti.com/product/LM4040-N
« Last Edit: March 13, 2016, 06:05:12 18:05 by zac » Logged
PICker
Active Member
***
Offline Offline

Posts: 162

Thank You
-Given: 207
-Receive: 110


« Reply #11 on: March 13, 2016, 09:54:32 21:54 »

other links with a similar problem:
http://electronics.stackexchange.com/questions/98307/convert-10-5v-to-15v-into-0-3-3v-range-for-adc-input
http://www.picaxeforum.co.uk/archive/index.php/t-7751.html
Logged
myheadhurts
Junior Member
**
Offline Offline

Posts: 35

Thank You
-Given: 99
-Receive: 17


« Reply #12 on: April 20, 2016, 08:50:55 20:50 »

The LTC1286 12bit a/d is quite handy for micropower measurement of 12v batterys.
Wired in differential mode using a 2.5v reference allows you to place its 12bit resolution across a handy 8-16v span. Its an old chip, but works well in this role and is robust.

The datasheet has an example of this usage.
« Last Edit: April 20, 2016, 08:55:35 20:55 by myheadhurts » Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC