Ceiling FAN DC motor ESPHome

Hi!

I’m nooby in ESPHome and Home Assistant stuff. I’ve just bought a ceiling fan and i would like to integrate it in my HASS.

The fan isn’t a smat device, so I haved a look for some solutions. I have readed about Sonoff iFan03, but is only for AC motors. Other people use RF solutions but I don’t know if it’s the best way because the server won’t have the feedback from the fan about his current state (run/stop, speed, etc.).

This is the controller board:

Any idea or help?

Pd: Sorry about my english :stuck_out_tongue:

Hi,
It rather depends on your knowledge of microelectronics - if in doubt, please stop and don’t injure yourself or someone else. Mains voltages are rather dangerous, and large electrolytic capacitors (like those on the PSU section of this board) can hold a 400V charge for hours (good kit uses bleed resistors to discharge, but not all kit is good…).

I can see:

  • dedicated driver chip in the middle
  • Power section on the right with common mode filters, and two relays
  • Top left has an interesting board slot - just the sort of slot a Tyua or similar control board would solder into.

There’s three main approaches:

  • Find a similar device, or upgrade module to replace the control gear (you’ve already found the common AC fan control modules)
  • Work out what the motors use, and replace the lot with a custom board (e.g. trace out the relays and power control section, and replicate using an ESP). Flipped digital camera photos make PCB reverse engineering easier.
  • Reverse engineer the possible missing control board connections, and possible interface to the uP top-right. Logic analyser and isolated oscilloscope probe not included!

If this helps, :heart: this post!

1 Like

Thank you!

I saw the slot in the board but I don’t know if there is an ESP board that could match in.

Do you know any external smart device that could control DC motors? This would be the best solution with my knowledge.

Basically any device with “dry” relays are the simplest option. Relays could be a single pole (SPCO) or double pole (DPCO) with the latter more likely for reversing direction.

HINT: the existing board seems to have 2x relays - check their PCB pinout to see what would might need, trace the motor voltage (12V or 24V are relatively safe, but what the motor does can still give a risk). I’d then try connecting a PSU manually to the motor to see what happens as a test.

A simple example is the Sonoff 4CH which can run Tasmota or ESPhome firmware and control 4x SPCO relays.

These days, motor control is more usually done using a H-bridge - dedicated small boards for prototyping are available which connect directly to ESP modules like the Wemos D1 Mini. These basically give FORWARD and REVERSE logic inputs which can be pulsed (PWM) for some speed control.

1 Like