ST_Anything v2.9 ESP8266 - 5V hobby Servo Control?

Here is the idea - I am very interested in feedback and validation.

My home has well water - and the pump is 220V. The pump can be turned off via a 220V switch.

I would like to use a ESP8266 and somehow interface with a digital servo to ‘physically turn the switch on/off’ with the servo horn.

I currently have a smartthings DOME valve that will shut off a ball valve that is on the water line to the house, if it senses a water leak on any of my water sensors.

If I ever get a leak - BEFORE that valve - then I would be flooded. I would also like to also shut off the well switch when a leak is detected.

I am currently using ST_Anything for some contact sensors & relays & PIR motion sensors.

How much work would it be to get a library that interfaces with a hobby Servos? Is there already a library that is similar enough that it could just be tweaked?

I understand that the servo will have it’s own power source of 5v - that is not an issue.

Interesting idea. I’ve not messed with one of these but it might get you half way there.

Thanks Scott !

not to try to be discouraging of doing it that way, would it not be considerably easier to use something like this:

to switch the pump?

1 Like

One of the important thngs to consider when using ST_Anything is that you need to avoid using any blocking calls. The Arduino Loop() needs to execute continuously to allow it to service the network communications in a very timely fashion.

So, if you go the servo motor route, you may need to find a library that is non-blocking.

Of course, I like the suggestion of using a high voltage/current Z-Wave relay, as @Aesgarth linked above. Right tool for the job, IMHO.

1 Like

I have looked at the Aeotec Heavy Duty Smart Switch - and I don’t think I can use this.

"The documentation explicitly says “neutral required” " - I’m not positive but I don’t think I have a neutral wire in that circuit.

You could use a zwave relay like the FortrezZ or any other dry contact zwave or zigbee relay with the sparkfun board. All you need then is a 5V power supply for the board and servo.

It does seem like a convoluted way to do it though.

Another route would be to get any 220 v relay or motor starter and then pull it in with any zwave or zigbee 110v switch/relay.

You have to have a neutral in the circuit somewhere…that’s how wiring works. And if it’s 220, I’m willing to bet that the power goes out to the outlet and back to the breaker box (if you’re in the US at least).

A normal 220 V circuit would have two hot wires and one ground. No neutral.

But the electricity has to go somewhere? You have to complete the circuit somehow…isn’t the center tap the neutral? I mean…you have to have a complete circuit.

Remember it is alternating current, changing direction of flow 60 times per second.

A 110 volt circuit has one hot wire that alternates between plus and minus voltage.
+110 -110 +110 Hot wire - either phase
000000000000 Neutral
From the Neutral wire to the hot wire you get 110V

A 220 volt circuit has two hot wires that are out of phase.
+110 -110 +110 Hot wire phase 1
-110 +110 -110 Hot wire phase 2
Across the two wires that are out of phase you get 220V

My illustration is not perfectly correct as the voltages measured are really an rms average. But it shows how you can get 220V from two hot 110V wires. Notice that your 220V breakers pull power from each supply main in your breaker box (every other lug) and that there are two connections on them for your wires.

1 Like


Can you possibly install the Aeon Z-Wave relay (or similar) near the breaker panel? Plenty of neutral wiring there. You could have an electrician install everything to make sure it is up to code.

Yes - I think I could mount it near the panel and tie into a neutral. That would solve my 220 Well switch issue.

I still would like to entertain the idea of a servo motor to ST_Anything - it has several good use cases.

a.) Turn the blinds to open / close - with a continuous rotation servo.
b.) I could use a servo motor to ‘push a deadbolt’ open or closed on the shed.
c.) Any physical job - such as opening and closing a vent damper.

There is a continuous motion version of the SparkFun servo Trigger too. It could spark some fun!

There is a few project out there for blinds.

Yea I’ve slightly modified my blinds project here to have one nodeMCU throw a relay and open my garage door, another nodeMCU and a relay turns on and off my hot water heater, and a nodeMCU and a servo controls my fireplace.

And you don’t need any special boards or shields, not even a smartapp, just the nodeMCU and its device handler.