ADC Voltage scaling

Discussion in 'Homework Help' started by tehoaislimau, Mar 20, 2012.

  1. tehoaislimau

    Thread Starter New Member

    Mar 20, 2012
    5
    0
    Hi

    Planning on using a STM8 microcontroller as an ADC to measure battery voltage.
    Battery voltage range 5.5v to 9v (5-10v is a safe range if it makes the calculation easier).
    The STM8 will be running off a 1.8v LDO supply.

    How do I use a op-amp to voltage scale and offset the battery input so that I have maximum dynamic range for the ADC.
     
  2. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Which STM8 are you using? Please attach the datasheet, or provide a link to it.
     
  3. tehoaislimau

    Thread Starter New Member

    Mar 20, 2012
    5
    0
  4. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    How accurate do you need the measurement to be?
    This is going to require a resistive voltage divider. If you can tolerate a small resistive load on the battery, you can avoid the use of an op amp.
    Do you have a good digital multimeter that you could use to do a software calibration on the ADC output, to compensate for resistor tolerances?
     
Loading...