I'm using a protected lipo to power an arduino, I'd like to monitor its own power supply. The only way I can think of doing this is with a voltage divider circuit.
Is this safe to do? Is there a better way?
I'm using a protected lipo to power an arduino, I'd like to monitor its own power supply. The only way I can think of doing this is with a voltage divider circuit.
Is this safe to do? Is there a better way?
What is the LiPo voltage? If it's not >6V you can't plug it in to the Vin input and get a 5V output (it will always be less than the input voltage).
You can use the voltage divider circuit to measure the battery if you do have a battery >6V into the Vin pin.
--
The Flexible MIDI Shield: MIDI IN/OUT, stacking headers, your choice of I/O pins
RuggedCircuits:
What is the LiPo voltage? If it's not >6V you can't plug it in to the Vin input and get a 5V output (it will always be less than the input voltage).You can use the voltage divider circuit to measure the battery if you do have a battery >6V into the Vin pin.
--
The Flexible MIDI Shield: MIDI IN/OUT, stacking headers, your choice of I/O pins
I'm using a 3s lipo (9v - 12.6v). My main concern is that this would possibly fry the a0 pin via overcurrent.
Nope, it will be fine as long as you choose your resistors right. For a 12.6V maximum voltage, you want to divide that down to 5V so you need a voltage divider ratio of 5/12.6 = 0.4. You can use r1=3.3k ohms and r2=5.1k for a pretty good approximation to that.
--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons
RuggedCircuits:
Nope, it will be fine as long as you choose your resistors right. For a 12.6V maximum voltage, you want to divide that down to 5V so you need a voltage divider ratio of 5/12.6 = 0.4. You can use r1=3.3k ohms and r2=5.1k for a pretty good approximation to that.--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons
Awesome. Thank you very much for your help.
How can I measure current in the same circuit?
RuggedCircuits:
Nope, it will be fine as long as you choose your resistors right. For a 12.6V maximum voltage, you want to divide that down to 5V so you need a voltage divider ratio of 5/12.6 = 0.4. You can use r1=3.3k ohms and r2=5.1k for a pretty good approximation to that.--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons
If you use 15k and 22k then there's less risk of overloading the input protection diodes if the voltage should stray higher and you'll save about 1mA of supply current. You can use even higher value resistors but then you'll possibly have to call anaogRead() twice in a row to allow sufficient settling time (if you are measuring other analog pins in the meantime).
Use a 10K trim pot for the 5K resistor, that way you can fine tune the circuit to get exactly the voltage you want.