Tony - Does anyone have sample code to sense vo...
Does anyone have sample code to sense voltage for a duration? SV Topaz has inspired me to hook up some components to capture on/off cycles of bilge pumps using Signalk
6 Replies
depending on pump wiring and how your detecting “pump is running”.
options on the hw side could be
- opto isolator module, or relay … to give you a clean isolated input to sensESP gpio.
and you then use sensesp to simply read the state of the input, and send state to skserver.
not certain what you mean by “duration “?
are you trying to measure the duration?
Measure voltage, feed it to influx and make it visible with Grafana. It will show when and for how long on/off.
@Tony
this might be of some help … its 2 years old, so built on earlier version (i think) of sensESP,
its setup for 8 inputs, looks for an active high on GPIO inputs , and polls each inout every 2 seconds.
(there are alternate ways to also use interupt driven inputs in sensESP) .. but for my purpose
this worked fine.
https://github.com/gregsyoung/BucketList-Alarm-Interface-sensESP
I have an alarm LED on my bilge switch. I've connected this low current circuit to a Halmet digital input and it works very well for me.and feeds into SignalK and into an InfluxDB.
How did you connect to the LED? Did you solder directly to it?
The connections are spade type, so I added a spade connector doubler.