PDA

View Full Version : AMP measuring



algufo
- 18th January 2006, 09:58
I'm a newby in the PIC world but I've been fashinating by the power of these small incredible devices.

I'm building an application to control charge and switching between thetwo lead batteries in my motorhome. The PIC I'm using is a 16f876.

I have to measure the current fowing in (charge) or out (discharge).

The batteries are 12v (nominal, up to 14,8 real) and currents may be up to 40 AMP.

I thought to use a shunt of 0.01 ohm th have 1mV/Amp.

So I tried to measure the 2 voltages at the end of the shunt and make a difference.
The problem is that I notice the reading quite unstable. Maybe that the 10bit resolution isn't enough to measure the difference of 1 mV.

Do you have any suggestion (maybe using Vref or some different methodology)?

Of course I wouldn't use an higher value for the shunt for not dropping too much the voltage.

Thanks

Acetronics2
- 18th January 2006, 10:08
Hi, algufo

For this kind of measure, you should use a (very) low pass filter before entering the A/D, then take, say 16 or 32 samples to get the mean value.

That's the way to get rid of A/D input noise.

Alain

dw_pic
- 6th February 2006, 00:34
1 mV is pretty small.

I would try uping my shunt to a .1 high wattage R.

The filter is a good idea agains the transients, so if you are using a 10K R for your series R to the A/D input, put a 1uF cap on the shunt side of this resistor. I would think that would be enought to smooth out the rough edges.

I would be checking this with an O-scope, just to verify that it is the problem.

A general purpose op-amp could be used to boost the signal up by a factor of 100 once you get the transients under control.

Also, check out ALLElectronics, I think they have a current donut pretty cheap.

Have fun
dw

Acetronics2
- 6th February 2006, 09:39
see here for a non intrusive measure :

http://www.siliconchip.com.au/cms/A_30551/article.html

all documents downloadable ...

Alain

algufo
- 6th February 2006, 10:14
I'm currently trying with an op amp using differential config and 10X amplification. The measurement if by far better.
The problem I'm experiencing is that I could find only an LM324 and has an offeset output that influences the reading.

Do you see any solution to reduce this behaviour or can you suggest some precise (cheap and easily available) op amp?

Thanks

Al

Squibcakes
- 7th February 2006, 23:26
Algufo,

Try this post....

http://www.picbasic.co.uk/forum/showthread.php?t=2610&highlight=allegro

You'll find that the Allegro Current Sensor will do the trick, best of all you can get free samples from the manufacturer!

J

sougata
- 8th February 2006, 19:41
Hi,

Since the floating voltage is not higher you can use an instrumentation amp to amplify the signal then have some sort of integrator circuit. Have a sign indicator / inverter to tackle charge discharge. A good option is to use an AD625 programmable gain intrumentation amp package. Then do the AD as normal. I use this in my industrial battery charger design and cannot give you code and schematic as it is a commercial design.Good luck.


Regards

Sougata