Disclaimer: I know nothing about electronics but can be taught!
I have a couple of lengthy threads here on this forum but am starting a new one due to a rather significant change in my application.
In late 2018 I built a system to control a water pump in a well that is 1000 feet from its associated storage tank. It uses Particle Electrons attached to NCD MCP23008 relay boards. The firmware running on the Electrons simply turns the pump on or off as a function of the tank’s water level, signaled by a float switch. All works great.
Now I want to embellish the system with the ability to remotely monitor the water level between its high and low levels. Based on the recommendation of others here, I started looking at an AMS5812 pressure transducer. This device would connect to the MCP23008 via the I2C interface and connect to the water tank via a silicone tube. Unfortunately, several issues have got in my way, not the least of which are 1) the requirement to keep the sensing tube under water at the bottom of the tank, 2) the need to keep the tube from freezing and 2) the risk of contaminating the potable water if there should ever be damage to or a leak in the tube. Just too mechanical for me to feel comfortable.
Consequently, I am thinking that it might be better to switch to an ultrasonic sensor. They are cheap ($5+/-), apparently reliable and accurate, connect to the electronics via wire, do not reside underwater at the bottom of the tank but above the high water mark, etc., etc.
There are lots of tutorials online on how to build an ultrasonic water level gauge using Arduino, but so far I have not yet found any info on how to achieve the same objective with an Electron.
My desire is to interface the sensor to my existing Electron using either a direct connection to my MCP23008 if possible or, I suspect more likely, some kind of PCB/shield that is powered off the MCP’s I2C interface. Appropriate firmware would be added to the existing code running on the Electron.
If there is no way to interface to my existing Electron, I can acquire an Arduino and build an entirely independent system, but that would add additional cellular charges which I’d prefer to avoid.
Is there anyone out there that can offer some guidance or point me to any online resources that I have not yet found?
Many thanks in advance!