-
Notifications
You must be signed in to change notification settings - Fork 1
input hardware
The input module offers extensive support for measuring and converting voltages.
- pin limitations (ADC2 and WiFi)
- averaging
The input pins of the ESP32 can only measure up 3.3 V, which means that higher voltages need to be "broken down" before they can be measured correctly. For this purpose a voltage divider with two resistors of known resistance,
U0 o
|
R1 █
U ├----o input pin
R2 █
GND ⏚
It is a good idea to limit the current to about 10 mA and the maximum pin voltage measured to 3 V, which yields a value of about 300 Ω for
As the input is limited to measuring voltages, a variable resistance can only be evaluated indirectly, by using both a reference voltage and a reference resistor.
- U_0 = 3.3V
- R_2 = wanted
- R_1 = R_ref
$R_\mathrm{ref} = \sqrt{R_\mathrm{max} - R_\mathrm{min}}$