Well i have to say there are not to many great feelings than ticking another smart home item off the list.
We are in pretty bad drought atm and i am sick of getting up on the tank every few weeks to check the situation. This is pretty much the slippery slope that got me into IoT.
I wanted to do it all off a ESP-01 due to the size… And i have loads of them. I used JSN-SR04T2.0 to do the distance sensing.
My big challenge is the lack of IOs on the ESP-01, if I have the echo on GPIO 0 or 2 it pulls low at boot and this will be no good when entering deep sleep. So I ended up using the RX pin as I could still use the TX for debugging in serial and I have OTA updates in the sketch anyway.
I still got a few things to do like adding the reset pin to GPIO16 for deep sleep waking, and to finish programming the reading interval.
I have it subscribed to a topic that I can send a string of 24 hour times separated via comma and it automatically calculates the time to next wake.
Hopefully, this saves me some amps, I may also use a buck converter when they arrive instead of the regulator as its stepping down from 8v to 3.3v so a lot of wasted heat with and LD1117.
Think a glass of pepperjacks is on the cards.
That’s awesome- and a great use of technology to make your life easier!
How are you consuming the data? NodeRed dashboard? OpenHAB or HA?
Have you measured current consumption to estimate battery life?
At the moment i am using openhab, mostly all setup paper ui with a habpanel display.
I send all the readings to a MySQL DB for charting later on.
Off a quick test without deep sleep mode it won’t last very long, 2 weeks tops with 2 readings a day. Once i get deep sleep going it should last 12 months, the batteries are 4000ma each.
Just have to think of more useful things now to automate lol
That is a great idea! I like the assembly with a metal divider panel that acts as part of the battery retention… and I assume ground? Super clean. Kudos.
EDIT: Oh duh… a black and red wire going to one end… lol. I am being Mister Observant today I guess. Also, if you can get a few weeks out of the batteries on their own, you could easily add a tiny solar panel with charge controller to the mix and you’d never have to crack the case again. That is until you upgrade your prototype of course:0)
That is an excellent idea, omg can’t believe that didn’t even think of that.
The divider is steel but I insulated it in the end, it was actually part of the series battery setup but I couldn’t solder the spring to the galv and ended up just wrapping it in tape and gluing the contacts. I will probably add plastic one when I get a 3d printer but I did notice an unforeseen advantage to using the steel, it acts as a spring when inserting the battery.