Configure Yaml to read input voltage by ADC

Hello everyone, this is the first time that I am going to try to carry out a project with ESPHome and I am very confused.
I need to read the voltage provided by a sensor through the ADC input of a Wemos d1 mini board. I appreciate any help.

1 Like

You’ll first need to wire up a physical voltage divider (Voltage divider - Wikipedia) if
the voltage you’re measuring is higher than 3.3v. If lower than 3.3v, you won’t need a divider.
The Wemos also has an internal divider that means the A0 pin can accept a voltage from 0-3.3v (do not exceed 3.3v on A0).

So if you’re measuring, say, 0-10V, you’ll need a couple resistors (keep them in the - approximately - 10-100K range so they don’t draw too much current) that will divide that down to 0-3.3v.

Once you have that, then an ADC sensor will measure and report it for you.

1 Like

Thank you very much. They have helped me alot.