Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)
User avatar
By liderbug
#75871 Has anyone created a 3 pos switch. I have a old furnace fan - runs Hi, Med, Low. Apply 110v to black=high, 110v to blue=Med, 110v to red=Low. I'm thinking a Sonoff - or 3 - but that leaves the possibility of somehow turning Hi & Low on at the same time (well Low is on - tell it to turn off and turn Hi on - except Low doesn't get the word to turn off)

Racking my brain - I can do it software wise, not a problem. But HW wise....
User avatar
By rudy
#75873 Use relays with both Normally Open and Normally Closed contacts. (along with the Common terminal)

Look at the schematic on the right side.


Assume these are the relay states when the coils are not energized. (not on) The incoming power would connect to COM. The motor windings would connect to CH1, CH2, and CH3. CH0 would be the off path with no motor connection.

All the top connections of the relays are the Normally Closed contact NC. The bottom position is the Normally Open contact NO.

Turning on the top left relay would be the first stage, providing power to CH1.

With the above relay on, and then turning on the right relay, this would apply power to CH2. The second stage.

Turning on the remaining bottom left relay (along with the one on the right) would apply power to CH3, the third stage.

Easy :geek:

Now that is how to accomplish the relay staging. What you also should know is that the Normally Open contact on power relays is typically not rated as high as the Normally Open contact.

The normally open contact has the coil pulling the contacts closed. (when the power is applied to the coil) With the Normally Closed contact the internal spring is what is closing the contacts and it doesn't have the same force as the Normally Open contact would have.

For example a relay with a 1/2 horsepower rating for the Normally Open contact might only be rated for 1/3 horsepower for the Normally Closed contact. So look closely at the ratings. And use only horsepower ratings, or other motor ratings. Not resistive load current ratings. For example a 10 Amp relay might only be rated for 1/4 hp at 120 volts.
User avatar
By liderbug
#75912 Not quite what I'm trying to do, but thanks. In SW:
if (temp > 80)
speed = low;
if (temp > 85)
speed = med;
if (temp > 90)
speed = high;

set.relay.low (off); (off);
set.relay.high (off);
set.relay.$speed (on);
My worry is: let's say "med(on)" was the last setting and we go to low or high and the med(off) fails and the new(on) works. If it is a physical 4 pos switch (off,low,med,high) not a problem. Or am I just being paranoid?
User avatar
By liderbug
#75913 Ah, just looked at your drawing again and I think I figured it out: Can't use Sonoff. Have to use standalone relays.
Hot -> R1.power, -> speed1, R1,nc -> R2.power
R2.power, -> speed2, R2,nc -> R3.power, -> speed3, R3,nc -> nowhere
So, at startup, temp < 80, power to R1NC -> R2NC -> R3. Wifi says R2(on), R2 switches to NO and killing power to R3. If Wifi says R1(on), power to R2 dies. If R1(off) fails R2 never gets power and no feedback is received. Required a bootup delay between switching (?second or 2?)