ESP8266 - two A2D inputs

I have a working circuit that gives me two A2D inputs to an ESP8266. There’s a simple CMOS analog switch controlled by a bit. Once an hour, the board sets the bit to 0, reads the analog data, sets the bit to 1, reads the other analog data, then emails me the readings.

I’d like these readings to appear in Home Assistant and ESPHome seems like the right choice. But I don’t want to design a new board with an ESP32 if I don’t have to.

Is there a way to do this in ESPHome? Clear a bit, analog read one variable, set a bit, analog read a second variable ?

Yes you could probably program that in esphome. But why not get a supported multiplexer?

Because it’s already built and working.

The device has the right connectors to a whole variety of other devices (that ESPHome does support) and has the right form factor, fitting a very particular spot on a crowded boat, and has a robust noise-free power supply built in. In short, it would be a lot of work to build new hardware just because I can’t figure out a few lines of code.

Forgive me, I thought you were referring to some significant piece of hardware. I was unaware that ESPHome supports a 4067! That’s not exactly the chip I’m using, but it’s close enough. That could be all I need!

Thanks for the time!

Look fair enough on the pre built hardware. I guess what you have built is your own multiplexer. I just thought you might be better with a device that works ootb. But you might have solved it anyway.

I did, many thanks. I use a 4051, which is the 8 input version of 4067, so I just lied about the fourth address bit and it’s working great!

Thanks again for pointing me that way!

Now on to the other devices.

1 Like