Battery Monitoring aktualisiert

Baran Schöneberg 2024-10-13 16:33:28 +02:00
parent 31fea5a2ae
commit ce3041ffc6

@ -15,9 +15,13 @@ Use the ADC pin (A0) to read the scaled-down voltage.
The ADC on the ESP-8266 can read voltages from 0V to 1V. You need to scale down the battery voltage (up to 8.4V) to this range.
Use two resistors, R1 and R2, to create a voltage divider. The output voltage ( V_{out} ) is given by: [ V_{out} = V_{in} \times \frac{R2}{R1 + R2} ]
Use two resistors, R1 and R2, to create a voltage divider.
For example, if ( V_{in} ) is 8.4V, and you want ( V_{out} ) to be 1V: [ \frac{R2}{R1 + R2} = \frac{1}{8.4} ] Choose R1 = 7.4kΩ and R2 = 1kΩ (or any other ratio that satisfies the equation).
The output voltage ( V_{out} ) is given by: [ V_{out} = V_{in} \times \frac{R2}{R1 + R2} ]
For example, if ( V_{in} ) is 8.4V, and you want ( V_{out} ) to be 1V: [ \frac{R2}{R1 + R2} = \frac{1}{8.4} ]
Choose R1 = 7.4kΩ and R2 = 1kΩ (or any other ratio that satisfies the equation).
* Connect the Voltage Divider: