Trying to determine dc current - 12v lead acid battery charger


Closed Thread
Results 1 to 32 of 32

Hybrid View

  1. #1
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Trying to determine dc current - 12v lead acid battery charger

    Thanks Guys,

    I probably confused you a bit.

    The 1000mA unit is the one already built which i wanted to upgrade to 5amp later. It used a .1 ohm resistor in the positive output which I removed and linked out. I then added a .47 in the ground leg.

    I then intended to design and build a multi function charger/desulphator unit which would probably be capable of 10amp.

    I would be quite happy with 10mA resolution on any of them. It's just that the counts I'm getting from the ADC just don't seem right anyway.

    I have another new 16f877 which i will test out.

    I mentioned the advertised unit because of it's specs and it's circuit. 3W .47ohm resistor in ground leg with 10amp measurement ? Capable of recalibration to greater amps?
    Probably a catchpa in the instructions when you get it.

    Rob

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Trying to determine dc current - 12v lead acid battery charger

    As Barry pointed out, if you use a 0.47 ohm shunt and are planning to draw 10 amps through it, the resistor will need to be rated for at least 47 watts!!! Thats a lot of wasted power!! And one big honking resistor! What you may need to do is supply a Vref for the ADC that is lower than Vcc and use a smaller shunt resistor. Or put an op-amp across a smaller shunt resistor to amplify the difference. You may need to drop the shunt down to 0.01 ohm in order to get a reasonable sized resistor. That would be a 1 watt resistor. If you drop Vref down to about 1V, then should be able to get 1 mV resolution. With a 0.01 ohm shut, that would give you about 100 mA per step. So you may still need to use an op-amp if you want better resolution.
    Tim Barr

  3. #3
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Trying to determine dc current - 12v lead acid battery charger

    I've looked at a shunt that I have for a 100A meter which I can use.

    Out of interest today I programmed the code that fratello posted and tried it on my board after changing the lcd defines etc.

    RESULT !

    Well, the voltage code is incorrect BUT the current code works just fine. Now if only I could get my head around the language used

  4. #4
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Trying to determine dc current - 12v lead acid battery charger


  5. #5
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Trying to determine dc current - 12v lead acid battery charger

    Yes interesting chip, that'll do nicely for the large current version.

    Finally success with the 'current' routine.


    I've been completely puzzled by the readings and results so I rewrote the code just to get the adc counts.

    The adc count for the current input mirrored the current output of the unit. Great, now just alter the code again and run.

    Hmm no joy, it was out again by a long way. So I isolated the code to study the routine, no it was correct. Then I wondered why the routine should be so far out from the count. Logic said it wasn't the count but something else. So I checked the defines. Argh, the ADC osc had been commented out and I had another oscon0 that set it at 8Mhz.
    Changed the adc back to internal rc osc and the routine now worked.

  6. #6
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Trying to determine dc current - 12v lead acid battery charger

    Regarding the 0.47 ohm resistor.

    As it's in the ground leg am I not correct in thinking the power rating is different, as it's current is say, 1amp, but it's the voltage drop across the resistor that counts which is in mV.

    Put it this way with real world on the board. On the positive output it ran quite warm at 1amp. In the ground leg it is still cold at 1amp.

  7. #7
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: Trying to determine dc current - 12v lead acid battery charger

    Quote Originally Posted by tasmod View Post
    Regarding the 0.47 ohm resistor.

    As it's in the ground leg am I not correct in thinking the power rating is different, as it's current is say, 1amp, but it's the voltage drop across the resistor that counts which is in mV.

    Put it this way with real world on the board. On the positive output it ran quite warm at 1amp. In the ground leg it is still cold at 1amp.
    It doesn't matter whether the resistor is 'in line' with the 12V supply wire ....or inline with return to ground wire....the same current will be present (the current leaves the charger, goes through the battery & returns to the charger's negative reference .....one current path if you like)

    If it was hot before & it isn't now, then that can only mean one of three things...

    1. You had more than 1A running through the resistor in its original position.

    2. You've not got 1A running through the resistor in it present/new position (what does a DVM say the voltage drop is) ....at 1A through a 0.47R resistor, should see a voltage drop across the resistor of 470mV. You've got 470mW being disppated across the resistor...which I reckon should be warm to touch.

    3. You somehow connected the resistor in situ wrong....it should sit between the negative return wire from the battery & the circuit's 0V reference.

  8. #8
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Trying to determine dc current - 12v lead acid battery charger

    Thanks for your parience Hank. Sometimes I wonder where my head is. I know all this, but I've been in a blank place since having the head cold, amazing how I can't think straight.

    As for the heat, I realised later that the .1 was in series with regulator which runs quite hot, there was heat transfer. The .47 is in the ground leg which is nowhere near the reg.

    The unit is running fine now and the basic (sic) software works, now I need to add the frills such as logging to eeprom, temperature compensation etc.

    For the larger unit I have in mind making it multi battery, nicad, nimh etc. with menu choices.

Members who have read this thread : 0

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