Want to measure 0-24V value with 0-5V A/d

Discussion in 'General Electronics Chat' started by fastwalker, Jun 24, 2009.

  1. fastwalker

    Thread Starter Active Member

    Jun 24, 2009
    38
    0
    Hi There,

    I want to measure the voltage on a 24V battery using a microcontroller 0-5V analog input. What would be the best way of scaling the voltage down for measurement?

    Thanks.
     
  2. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,347
    Hello,

    You could make a voltage divider with two resistors.
    You need a division of 24 / 5 = 4.8.
    The nearest two resistor will be 3k9 / 1 K , this will give a factor of 4.9.
    This way you will be able to measure upto 24.5 Volts.
    The next possibility is 4K7 / 1K , this will give a factor of 5.7.
    This way you can measure upto 28.5 ( this will give some headroom for a very full battery).

    The used factor must be used for calculating teh "real" voltage.

    Greetings,
    Bertus
     
  3. fastwalker

    Thread Starter Active Member

    Jun 24, 2009
    38
    0
    Thanks for the response, I was thinking of using a voltage divider, wanted to see if anyone had any other ideas.

    Do you think going straight from the voltage divider to the uC input would be OK?
     
  4. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,347
    Hello,

    How accurate a voltage divider is is also dependend on the tolerance of the resistors and the input impedance of the controller.
    If you want to be less dependend on the input impedance you can use a rail-to-rail opamp as a voltage follower between divider and controller input.

    Greetings,
    Bertus
     
  5. fastwalker

    Thread Starter Active Member

    Jun 24, 2009
    38
    0
    Thanks Bertus, what op-amp would you recommend if I wanted to use one, LM324 be OK or need something more fancy?

    Fastwalker
     
  6. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,347
    Hello,

    I think you can use the LM324.
    You will probably not measure near 0 Volts.

    Greetings,
    Bertus
     
  7. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Which microcontroller are you using?
     
  8. fastwalker

    Thread Starter Active Member

    Jun 24, 2009
    38
    0
    Haven't chosen the exact hardware yet, was thinking of using one of the Rabbit single board PCs.
     
Loading...