Fan controller

It was kind of hard to make out all the connections in the photos. One thing I noticed was the ESP was powered via USB and not the relay module. The relay module has a 5V power supply and on board drivers to trigger the relay. The usb power to the ESP32 can be removed and the 5V and COM from the relay board should be used to power the ESP32. Your picture only showed the 4 signal wires between the two boards. There needs to be a common reference voltage shared between the two boards for the logic to reference.

@mulcmu, thank you for your advice. It worked! However, I had to connect both the micro USB power supply and the relay board power supply to the ESP32 in order for it to boot up. Is it safe to have two power supplies connected to the ESP32?

I don’t think having the two 5V power supplies connected in parallel is ideal. I would test to see if it works with just the COM shared between the two boards.

For the 2 relay version of the board there was an amazon review that stated adding an extra capacitor was sufficient to keep an esp8266 from brown out reset. If you have a 1000 to 4700 uF capacitor, I would test just the relay 5v supply again with the capacitor installed into the screw terminals on the esp32 5V/COM with the wires from the relay board.

I’m not sure I understand what you mean by the COM port. Could you please explain what you are referring to?

The common for the 5V supplies would stay connected but the 5V connection would be removed. Connection would look like this:

Thank you for your help! It is now working with the com connection only. How can I thank you?

I have recently begun building two additional controllers and have encountered an unexpected issue with both of them. Whenever I activate the relay, it remains on even after deactivation. Has anyone else had this same problem?

Sorry I am jumping in; some relays are latching. That means they open and close on receiving voltage pulse. Just check by applying required volt and repeat. Check the relay each time with multimeter.

Thanks for your suggestion @JulianDH, but unfortunately it didn’t work. I’m using an interlock system with a controller that doesn’t have 220V relay outputs connected to the fan yet. Could this be the reason for the issue?

Admittedly this is very late to the discussion but I thought that I would share how I interfaced my fan using a low cost 3-channel Zigbee switch from Aliexpress.

image

This achieves the same result without the need for an external relay board, the H/M/L connections would be made onto terminals L/L2/L3 of the Zigbee switch. It is also possible to connect local override switches via the S1/S2/S3 white flying leads on the Zigbee switch.

1 Like

@CooleRnax I should have kept quiet. I am loath to start reading a whole project.

I would go into full fault finding mode:
what is different from your previous controllers that were working? Same board and pins; same relay; same software?
when it you say it doesnt work, what do you mean? If you apply the required voltage to the relay does the relay work. In other words can you isolate that the relay is working. In which case we can move onto the board? Do you have a multimeter? You would use the multimeter across the relay COM/NO or NC pins to see that the relay is being activated and when. And I mean when it is not connected to the ESP32

@Jonah1970 looks good. I used Sonoff 4ch pro for my three roller blinds. works like a dream after flashing with esphome

Seems like some of the relays are sticky or faulty. I’d try to exchange or replace the boards. Are you able to make the relay deactivate with some mechanical agitation (mild tapping with a hammer)?

(mild tapping with a hammer)?

LOL

1 Like

Hi sorry for very late reply,

but i want to ask, are you using the interlock between the switch or each speed? in my case, I need to interlock between switch to make sure there is no more than 1 wire is live (L1/L2/L3).

thanks

Hi,

There was no need for interlocking in my case as in the original setup (before adding the Zigbee switch) it was wired like this:

  • Low speed permanently connected to 240V (for permanent background extraction);
  • Medium speed not used;
  • High speed wired to the main bathroom light so 240V was connected to the fan when the light switch was turned on.

Basically with this fan you can connect 240V to any or all or the 3 speed connections and it will run at the highest speed out of the 3.

I believe that you can get interlocked switches which are generally marketed as garage door openers (or covers) as obviously you don’t want to be commanding a garage door to open and close and the same time. The problem is that I have only eve r seen these with 2 outputs but I think you need 3.

You might we able to achieve the same effect with an automation by first turning all outputs off before turning on just the one that you want. However you will need to think carefully about this to ensure that there could be no possibility of switching on multiple outputs at the same time.

Alternatively if you only needed 2 speeds then you could externally interlock the low/high speed outputs by using a double pole relay.