Little background:
I'm working on a project with the TI MSP430 microcontroller. Ultimately I'll have to monitor my battery voltage with the chip. There are 2 ways to do this, one using the a/d converter and another using the chip's built-in SVS feature that will raise a flag if the voltage falls below a user set threshold.
My problem is this:
I'll be using a 12v battery and the chip can take a max of 3.6v to it's input pins. No problem, I'll use a voltage divider to knock that down to that ballpark. So, I'm going to represent 0-12v with 0-3.6v. If I want to alarm on 10.4v; i would just use this equation to get my resulting threshold right:
12 : 3.6 , 10.4:x >>> which ultimately ends up being 12x = 10.4(3.6) >> x = 3.12v.
So in order to alarm on 10.4v; I'd just set my chip to alarm when the a/d converter "sees" 3.12v coming in on the input.
I set up the circuit with the chip but the voltage values coming off the resistor don't really coincide with my calculated values. Obviously they won't be exact; but i'm getting discrepancies of .2-.3v which is too much when I'm working on this small scale. Any tips, advice? If it doesn't make sense please ask questions.
Thanks!
I'm working on a project with the TI MSP430 microcontroller. Ultimately I'll have to monitor my battery voltage with the chip. There are 2 ways to do this, one using the a/d converter and another using the chip's built-in SVS feature that will raise a flag if the voltage falls below a user set threshold.
My problem is this:
I'll be using a 12v battery and the chip can take a max of 3.6v to it's input pins. No problem, I'll use a voltage divider to knock that down to that ballpark. So, I'm going to represent 0-12v with 0-3.6v. If I want to alarm on 10.4v; i would just use this equation to get my resulting threshold right:
12 : 3.6 , 10.4:x >>> which ultimately ends up being 12x = 10.4(3.6) >> x = 3.12v.
So in order to alarm on 10.4v; I'd just set my chip to alarm when the a/d converter "sees" 3.12v coming in on the input.
I set up the circuit with the chip but the voltage values coming off the resistor don't really coincide with my calculated values. Obviously they won't be exact; but i'm getting discrepancies of .2-.3v which is too much when I'm working on this small scale. Any tips, advice? If it doesn't make sense please ask questions.
Thanks!