Start a new topic

Sonoff with contactor


I am new to this community, I was wondering, to switch on an air conditioner or garage roller door, would I use a NO or NC contactor with a sonoff.

1 person has this question

Can't speak for the ac unit but for most garage door openers the switch is N/O, momentary closure to complete the circuit. Hope it helps.

The schematic below was drawn in the past to illustrate how to connect a 240V heater with a contactor relay and Sonoff Basic.  For a 120V circuit you would use the Neutral instead of L2 and a 120V coil on the contactor.

Hope that helps.


Here are a couple more schematics you may like.



I am experiencing a problem when using my sonoff with contactor.

I have a zbmini connected to a contactor. The contactor is connected to a water pump. Turning the contactor on via zbmini always work fine. Turning it off (via zbmini) occasionally works fine, but often it turns off then immediately on.

Is it a contactor or zbmini problem? I noticed that when I turn it on (via zbmini), zbmini led indicates RED (as expected). When I turn it off (via zbmini) and the issue of turning-off-then-immediately-turning-on problem happens, zbmini led also indicates GREEN only then RED indicating zbmini is the culprit who actually is triggering the contactor to immediately turn back on.

When that problem happens, if I keep trying to turn the contactor off (via zbmini) if eventually work (specially if I try to turn if off right away after it's on).

Another experiment I did was: if I turn the contactor ON via a manual switch (parallel to zbmini), the pump naturally turns on (as expected). Then, if I turn contactor on (via zbmini), its led indicates RED (as expected), if I turn contactor off (via zbmini), its led indicates GREEN only (as expected) --- naturally the contactor and the pump still run on (since the parallel switch is still on). In that scenario, zbmini never fails meaning led indicates RED when turned on, GREEN only when turned off, but it never goes back to RED automatically as I experience in the case mentioned above.

Please, could someone help pointing out what could be wrong? If you need more details let me know. Thanks


Hmmm, the only thing that comes to mind is EMI.  Could be that you are getting a spark from the contactor or relay points inside the sonoff that is generating an RF pulse and messing with the digital circuitry of the sonoff.

1. Try another sonoff.  Yours might be very sensitive to EMI.

2. Try shielding the sonoff by putting it inside a grounded metal enclosure of its own separated from the contactor.  Aluminum foil could serve as a quick test.

3. Try using a RF suppression capacitors such as a 0.01 uf @1500V across the motor leads and to ground.

The issue with inductive loads is that they can generate a "ringback" voltage on the lines as the magnetic field in the windings collapses and their wiring can act as an antenna.  If you happen to disconnect an AC load near the zero voltage crossing point then no pulse is generated but disconnecting the load near the peak sinusoidal voltage will make quite a pulse.

Old trick:  Place an AM radio not tuned to any station near the contactor.  Sometimes you will see a spark and hear a "pop" on the radio when the contactor opens.  Sometimes not and everywhere in between.

1 person likes this

Hi E W,

I picked your option #3, I placed the capacitor as is in the image below (I hope have understood you correctly).

It worked perfectly.

Thank you very much!


Glad it worked for you.  I actually meant across the motor leads which would be between L and N on the "To load" side of the relay.  You can always use more than one cap of course so if that one helps as you say, leave it in place and add another.

1 person likes this
Login or Signup to post a comment