Thanks for the quick response, as always. I should have added that I
also wanted to measure the voltage coming off my regulator board in
addition to the battery voltage. We have a regulator that we use between
the batteries and the Robostix that drops our 14v down to 5v for the
Robostix and Gumstix. The system requires a 5v and a 12-14v power bus. I
suppose that the regulator is either working or it's not but I'd still
like to be able to keep an eye on it. Although, I guess the point is
moot since the Robostix is going to give up the ghost if I give it less
than 5v anyway?
So, if I scale to 5v I should set up my ADC using ADMUX_REF_AVCC? Or
in my case, with my old Robostix, I guess ADMUX_REF_AREF would be the
same deal since it's tied to AVCC.
And finally, you said "unless you ligt the AREF pin". I hope I'm not
being obtuse but what is "ligt"?
Dave Hylands wrote:
> Hi Jason,
>> My max input voltage from the batteries is about 14.4v, so I'm
>> interested in measuring voltages from 0-15v.
>> So, I was thinking something like:
>> BATT----[1k Ohm]----[TO ADC]----[5.8k Ohm]----GND
>> With the idea that that would scale my 0-15v to 0-2.56v (approx) for
>> input to the ADC.
>> Does this make any sense, or am I completely off base? Is there a much
>> better way to do this?
> You're on track, but I would drop it to the 0-5v range and not the
> 0-2.56v range. The internal voltage reference isn't particularly good.
> It can be anywhere in the range 2.3v to 2.7v and changes with
> By going to the 0-5v range, you can use a 3:1 resistor divider. You'll
> probably want to use 1% resistors.
> Also, you can only use the 2.56v internal reference on the rev 1131
> robostix, unless you ligt the AREF pin (because on the earlier
> robostix, AREF is tied to AVCC).