Go Down

Topic: Looking for a more inexpensive microcontroller for my project. (Read 1 time) previous topic - next topic

adrian_h



The AVR chip itself can monitor its own battery voltage. You have to set the analogReference to INTERNAL (which is 1.1V) or use an external voltage reference such as a TL341 and then measure the battery voltage against that. Once your chip recognizes that the battery is low you can set it into a sleep mode, waking it periodically to blink your LED, etc. and that will be much simpler and more efficient than any external monitoring circuit.

Isn't 1.1 V too low a voltage?  Doesn't that mean that if the voltage goes above 1.1V that the value returned will just be maxed out at 1023?
I'm a programmer dammit, not an engineer! :D
Like this post?  Please give me some karma for it.  Thanks! :)

Chagrin




The AVR chip itself can monitor its own battery voltage. You have to set the analogReference to INTERNAL (which is 1.1V) or use an external voltage reference such as a TL341 and then measure the battery voltage against that. Once your chip recognizes that the battery is low you can set it into a sleep mode, waking it periodically to blink your LED, etc. and that will be much simpler and more efficient than any external monitoring circuit.

Isn't 1.1 V too low a voltage?  Doesn't that mean that if the voltage goes above 1.1V that the value returned will just be maxed out at 1023?

Yes, that's correct; you would need to use a voltage divider to keep it under whatever your reference voltage is. Well, point being that you have to compare the battery voltage against some known reference. Leaving it as analogReference(DEFAULT) would be comparing it to itself.

retrolefty





The AVR chip itself can monitor its own battery voltage. You have to set the analogReference to INTERNAL (which is 1.1V) or use an external voltage reference such as a TL341 and then measure the battery voltage against that. Once your chip recognizes that the battery is low you can set it into a sleep mode, waking it periodically to blink your LED, etc. and that will be much simpler and more efficient than any external monitoring circuit.

Isn't 1.1 V too low a voltage?  Doesn't that mean that if the voltage goes above 1.1V that the value returned will just be maxed out at 1023?

Yes, that's correct; you would need to use a voltage divider to keep it under whatever your reference voltage is. Well, point being that you have to compare the battery voltage against some known reference. Leaving it as analogReference(DEFAULT) would be comparing it to itself.


There are a couple of different methods to allow a arduino to 'measure' it's own Vcc voltage. Perhaps the easiest is to just wire the shield's 3.3vdc pin to a unused analog input pin and use the resulting reading as a compensation value to compute what the internal Vcc reference (actually Avcc) must be.

Another method is to select the analog input mux to read it's internal 1.1vdc band-gap voltage directly and then 'reverse calculate' what the Avcc voltage must be.

Lefty

adrian_h

So, as long as the voltage is higher than 1.1V, even if the rest of the system has dropped below 5V or 3.3V (depending on hardware), it will get an accurate reading for 1.1V?  Does the chip have an on board voltage regulator to ensure an accurate 1.1V over a range of voltages so it can be done just using the bare chip?
I'm a programmer dammit, not an engineer! :D
Like this post?  Please give me some karma for it.  Thanks! :)

retrolefty


So, as long as the voltage is higher than 1.1V, even if the rest of the system has dropped below 5V or 3.3V (depending on hardware), it will get an accurate reading for 1.1V?  Does the chip have an on board voltage regulator to ensure an accurate 1.1V over a range of voltages so it can be done just using the bare chip?


The band-gap voltage can be considered a 'regulated' source not effected by Vcc variation. However while it's a pretty constant value for any specific AVR chip the actual value of the band-gap is subject to a device tolerance specification. So one does have to derive what their specific band-gap voltage is if they are going to use it for 'calibration' purposes.

Lefty

Go Up