ESPHome Saving Battery Power with Vibration Sensor

Just setting up my first ESP32 using ESPHome (thankyou @OttoWinter) and looking for an idea on battery saving.

I want to use the ESP32 on a water softener using a vibration switch (W-18010P), I understand that DeepSleep on a gpio pin will wake up the devise, connect to wifi and send an mqtt message. So far so good.

However the water softener cycle runs for an hour so I’m thinking it will constantly wake up and repeat for the hour. I want it to wake up once, do it’s thing and go back to sleep until the next water softener cycle (7-10 days). Is there a way to achieve that?

I’ve thought of having a second binary file that goes into DeepSleep for one hour, wakes up and reloads the original binary file. Seems like I might be overthinking this?

Thanks for any ideas.

Sorry that this doesn’t exactly answer your question, I am kind of a noob to ESPHome (but I am in love with it, and am looking to use it a lot more). I also have a water softener, and I have plans to add an ESPHome device to monitor it. But my plan was to monitor the salt levels using an ultrasonic sensor, and that’s about it. It seems you are looking to sense when the softener has run. Now you got me thinking mine should be doing the same. :slight_smile:

Using a vibration sensor is interesting. But I wonder if any other vibrations in the plumbing system might translate to false readings.

Is your timer system a mechanical one like mine? Or a more modern electronic timer? I ask because on mine, there is a set of gears/knobs that rotate when the cycle begins. It looks exactly like this one. If there was a way to monitor the rotation, say with a magnetic reed switch or something, that might also work. In my example, the little red knob will rotate counter-clockwise with the cycle. I could probably drill out a small hole on the side where the arrow points, and stick a rare-earth magnet in there to trip a magnetic reed switch. :thinking:

Just thought I would throw an idea out there. Hopefully someone else can answer your questions about ESPHome and deepsleep options. Regarding power, my node will just plug into the same power outlet as the softener timer using a phone charger.

My timer system is digital & I have found out that with multiple loss of power cycles the unit has a mind of it’s own and decides to do whatever it wants. We only find that out when we realize we are out of salt already! (We lose power often especially during summer monsoon season)

I have tried monitoring the power with a wifi plug but the electricity never changes. When it runs it simply opens and closes a water valve. I have also thought of the ultra sensor but placement seems a little difficult since the lid slides open & close.

Looking for a adapter plug to run only 1 wire may be an option.

Is there an indicator light that turns on when the valve is open?

What voltage is the valve control signal?

Is there an indicator light that turns on when the valve is open? No
What voltage is the valve control signal? I don’t know how to answer this question. Probably don’t have that skill.

I see where your thinking is going, interesting. Thanks

With a multimeter and a friend who knows how to use one. :slight_smile:

Jumping on @tom_l’s thought train… Some of the digital timers have an LCD… does yours? If so, does it indicate in any way visually when the process is running? There are image processing components that can look for things like this, and with the ESP32-cam you might be able to capture that while still using ESPHome to manage the node.

Yes it does have a LCD & it has a little circle that goes around & around. I will have to watch it on the next cycle to confirm. If I understood @tom_l’s other thought correctly, I can catch the signal from the controller to the water valve (guessing 12v but will confirm), reduce it to 3v & use that to wake up my esp32.

Don’t need a friend for the multimeter, seems I know more than I thought, lol.

Thanks to you both

1 Like

Picking up the valve signal would definitely be the better option. Good luck, and let us know how it works out.