What is the best way to determine the input voltage from the battery? I need to be able to detect if the voltage is getting low so I can alert the user via a LED and then switch off when it gets too low.
I was looking at this: ebay.com.au/itm/LIPO-Battery … 0552092953 but I don’t think I can get a reading back from it to to the Baby Orangutan to tell it to change the LED color or switch off.
Any help would be appreciated.
- Will Kruss
If the battery voltage is less than 5 V, just connect the battery terminal to one of the Baby O’s ADC inputs and measure the battery voltage with the ADC. ADC6 is conveniently labeled and available.
If the battery voltage is higher, you will need a resistive voltage divider to reduce the ADC input voltage to within the 0-5V range. A suitable divider could be 2 10Kohm resistors, which will divide by 2. The 3pi robot uses a 2/3 divider, see the schematic diagram posted at pololu.com/catalog/product/975/resources