AMP measuring


Closed Thread
Results 1 to 7 of 7

Thread: AMP measuring

  1. #1
    algufo's Avatar
    algufo Guest

    Default AMP measuring

    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

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default

    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
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    dw_pic's Avatar
    dw_pic Guest


    Did you find this post helpful? Yes | No

    Default

    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

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Wink Other measuring way ... for high currents

    see here for a non intrusive measure :

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

    all documents downloadable ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    algufo's Avatar
    algufo Guest


    Did you find this post helpful? Yes | No

    Default

    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

  6. #6
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257


    Did you find this post helpful? Yes | No

    Default

    Algufo,

    Try this post....

    http://www.picbasic.co.uk/forum/show...hlight=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

  7. #7
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Use a differential amp

    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

Similar Threads

  1. Help with using op amp as a sine-to-square converter!
    By achilles03 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th March 2009, 16:06
  2. Air pressure measuring
    By Eugeniu in forum General
    Replies: 10
    Last Post: - 11th December 2008, 01:20
  3. Serin2 - All I Need Is 8 Numbers....
    By SOMRU in forum Serial
    Replies: 4
    Last Post: - 14th December 2006, 13:50
  4. Serout2/serin2 Pbp Problem
    By SOMRU in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th December 2006, 19:55
  5. Measuring Battery voltage
    By BobP in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd December 2006, 23:07

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts