Reading a shunt resistor with an adc
mosquito56
Posts: 387
I am trying to find a way to read an alternator output with an adc. The problem is when the curcuit discharges instead of charge as when starting an engine.
·A normal meter has 2 way deflection, neg discharge, pos charge. Does anyone know of a curcuit I can use to read·voltage on a shunt?
Thanx
Don
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·······
······· "What do you mean, it doesn't have any tubes?"
······· "No such thing as a dumb question" unless it's on the internet
········
·A normal meter has 2 way deflection, neg discharge, pos charge. Does anyone know of a curcuit I can use to read·voltage on a shunt?
Thanx
Don
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·······
······· "What do you mean, it doesn't have any tubes?"
······· "No such thing as a dumb question" unless it's on the internet
········
Comments
The LM358 that Parallax carries is an old design, but it can handle voltages up to 30V and is a dual op-amp.
Post Edited (Mike Green) : 7/24/2009 11:36:33 PM GMT
instruct1.cit.cornell.edu/courses/ee476/labs/s2009/LM358.pdf on page 16
http://www.ecircuitcenter.com/Circuits/adcin_fully_diff/adcin_fully_diff1.htm
I found this with a search of differential amplifiers. With voltage dividers from 12 v to 5 volts on the shunt·and a vref of 2.5 volts , the output should be 0-5 volts? I have a feeling this is wrong with the dividers. Maybe the 12v is vcc and the shunt is pos and neg to the opamp?
Ground Referencing a Differential Input Signal only shows 1 op amp but you mention 2.· I have bunches of lm358 and adco832 so we are in the perfect ball bark.
I have only just begun to understand voltage gain op-amps with the thermocouples and differential is a whole new ball game.
Am I in the area anywhere?
Thanx
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·······
······· "What do you mean, it doesn't have any tubes?"
······· "No such thing as a dumb question" unless it's on the internet
········
Say the ADC can read 0..5V, then you dimension the shunt to have a voltage-drop of 2.5V, either + or -.
So the shunt gives you -2.5V ... +2.5V.
To be able to feed that into the ADC, you have to add 2.5V, thus shifting the voltage 2.5V up and giving you 0...5V for the ADC.
And adder with an OpAmp is an easy thing.
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
The alt should only give out as the diodes block it from being a motor,
The ratio of batt in/out is huge and depending on which one you want data on will determin which way you measure. If the battery current is the point of measurement them the large starting ( discharge ) current result is going to have to be clamped off if there is to be any meaningful resolution to the charging level, unless you use more than 8 bits.
Rather than 50/50 it would be 200/10
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
·I am only interesting in the charge and discharge of the battery if that makes a difference.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·······
······· "What do you mean, it doesn't have any tubes?"
······· "No such thing as a dumb question" unless it's on the internet
········
You are measuring on the high side! You might investigate into "high side current sensors".
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Take a look:
http://pdfserv.maxim-ic.com/en/an/AN1949.pdf
My caution is that you probably want to be careful how you connect your circuit - place the shunt between the battery and the load/alternator, but hook the starter directly up to the battery.· Depending on the size of your engine, some starters can draw over 800Amps (and if you only put in a 100Amp shunt for your loads, you'll probably damage the op-amps/ADC). ·If you·NEED to measure the current of the starter (I did in my engine management app, for auto-start), you can calculate the current by measuring the voltage drop across the starter's positive wire (which is actually measurable between 20mV-1.5V), then calculate the current from that.
It's an easy way to tell if the starter is actually under load (contributing to the spin of the engine).
-Tim
·
· I found an ampmeter at autozone for $15. I will probably go that route as the starting current is going to be a bear.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·······
······· "What do you mean, it doesn't have any tubes?"
······· "No such thing as a dumb question" unless it's on the internet
········
http://www.allegromicro.com/en/Products/Part_Numbers/0756/index.asp
I have used them and they work great.
· As soon as I get the engine installed I will start playing with them. I am pretty sure these are what I need.
·Thanx much.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·······
······· "What do you mean, it doesn't have any tubes?"
······· "No such thing as a dumb question" unless it's on the internet
········
It looks like they will do +/- 50A and +/- 100A depending on the model.
I assume this could be increased by paralleling these devices with a larger cable of known resistance... for instance, the alternator problem... If you pass a known load through the cable, and measure the voltage drop across the wire, you can calculate its resistance with R=V/I .. (which no meter would read accurately)...
So, say the resistance of the high current wire is (just for easy math's sake) 13 micro-ohm. Since the chips listed above claim 130 micro-ohm, if you paralleled the two... then the shunt (in this case, the hall effect sensor), would see 1/10 of the current of the larger alternator charging wire... that would allow you to measure currents (granted, with less precision) of up to 500A if you scaled by the ratio of shunt:wire resistance (10 in this hypothetical case).
Does anyone see why that would be a problem?
I was also curious if the same method would work using an ADC0832 (or similar chip) in differential mode. If you connected a voltage probe to both ends of the cable, provided you were certain of its resistance value, the differential voltage from the supply side to the resulting side would relate to the amperage as: I=V/R, correct? (of course, this also assumes the adc received allowable voltage references, not full 12v).
My current project requires me to be able to read amperage spikes over 2000A DC, so this topic interests me a good bit.
Of course, once you get a system working, you can use a (hopefully well calibrated) ammeter or power supply/load combination to check your accuracy, and adjust your scale accordingly.
Wow, sorry for all the parenthesis (it is a bad habit of mine.)
Post Edited (Tired2) : 7/30/2009 1:57:25 AM GMT