- Sat Feb 20, 2021 1:43 pm
Old-school is an analog multiplexer like the CD4051B
. If you have a perf board shield
for the D1 Mini then all you need is the mux chip
and a 0.1uF bypass capacitor and some wire. That solution is handy if you need some extra resistors to scale the voltage with a divider(s) for different levels. Another way is with a CD4051 breakout board
The only problem with a mux is that the analog input on the ESP is poor accuracy due to the noise from the CPU and WiFi. It's really only about equivalent to a 7 or 8 bit A/D. If you need better accuracy than that, the ADS1015 4 channel 12-bit A/D converter is an option, or the ADS1115 4-channel 16-bit A/D converter. They're both here
. There's lots and LOTS of examples around the internet with either method (CD4051 mux or ADS1015/ADS1115 4-channel A/D converter). Google it!