-->
Page 1 of 1

esp8266

PostPosted: Fri Feb 19, 2021 4:04 am
by wahusosi
hello guys!!!

Im trying to make some project with the d1 mini but i need 3 analog inputs...
and all the esp8266 have onley 1 analog input as i now.

meybe there is a way to control other bords like uno or mega via the esp8266??
and to control them from the web and get feedback?

Re: esp8266

PostPosted: Sat Feb 20, 2021 1:32 pm
by AcmeUK
What you need is an analog i/o expander.
Try searching Google with esp8266 i2c analog

Re: esp8266

PostPosted: Sat Feb 20, 2021 1:43 pm
by StanJ
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!