First, I am a complete novice. I am using a Nano to run a 5 volt LED. I am using batteries previously used by my drones so they are 2S (7.4v), 3S(11.2v) & 4S(14.8v). The power from the batteries go through a THIS voltage regulator. The regulator is set to deliver 5 volts to the Nano. This is all working great but I don't want to ruin the batteries by running them too low.
Among many other sources I was looking at THIS tutorial. My question this this, will this determine voltage after passing through the regulator?
The analog pin of the Arduino must be connected to the battery terminals through a voltage divider circuit to be able to monitor the battery voltage. If it is connected to the output side of the voltage regulator, the Arduino will only see the regulator output voltage (5VDC) and the battery voltage will be unknown.
Thank you for the prompt response. I will research "voltage divider circuit" but will one circuit work for any of the three battery types? I was hoping that I could get some idea of voltage programmatically. Doesn't need to be precise.
It is possible to use the same circuit with all 3 battery pack types by using a voltage divider circuit for the highest voltage (4S, 14.6). The measurement precision (~15mV per bit) would be the same for all 3 types.
Be sure to use a divider circuit that will not allow more than 5VDC on the Arduino analog pin to prevent damage to the Arduino.