Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] low-battery detection, ADC, and ICP of mega16

2004-05-21 by Mike Murphree

Kathy Quinlan said:
> jay marante wrote:
>
>> are you sure you got your formulas right?!
>> that's just a voltage divider and im pretty sure you can't generate
>> 650kV from a 12V battery. im sorry but i can't remember the formula
>> for  the voltage divider circuit.
>> maybe someone might confirm that the multisim was right with its
>> output.  as far as i know, current can be computed by dividing Vbatt
>> over the  total resistance, which is 1,300,010 ohms. pretty low
>> current there!
>
>>      >
>>      >       battery
>>      >          |
>>      >         <
>>      >         > 1.3 Mega ohm
>>      >         <
>>      >          |
>>      >          |------------------- ADC7   ~ 5V as simulated in
>> multisim |
>>      >         <
>>      >         > 10ohm
>>      >         <
>>      >          |
>>      >      GND
>>      >
>
>
> Work it the other way, I = V/R = 12/1,300,010 =
> 9.2306982253982661671833293590049e-6 A
>
>
> Now we know that V=IxR = 9.2306982253982661671833293590049e-6 x 10 =
> 9.2306982253982661671833293590049e-5V or ~10uV at the ADC7 input...
>

There's quite a few ways to do this, but one of the easiest to remember
is to name the top resistor as R1, the bottom resistor as R2, then the
output voltage to the ADC is given by the formula:

Vout = R2/(R1+R2) * Vbatt

Then you don't have to suffer through all the intermediate results...

:)
Mike W4LNA

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.