Controlling an inductive AC load
I am looking for a way to do speed control of a ceiling fan. The motor is obviously an inductive load and from my understanding is not too friendly to triacs. Is there a way that I can create a MySensors controller for ceiling fan speed control? What I might like to do on some is create a dual purpose ceiling fan and light dimmer as I have some combinations like this in some rooms. The light dimming I can do easily with a triac, it's the fan I am having trouble with.
I am pretty new to MySensors, so a question I would have is when creating a node that has more than one sensor/controller on it, how do you define each so they are seen as separate devices on that node?
I'm not much of a hardware guy so I'll leave that question up to others to answer.
Regarding how to add different sensors/actuators to a node, you do this (for mysensors 1.5 releases):
You can call this method multiple times in the node sketch for each sensor or actuator you want to add. Increment child-sensor-id each time and use the appropriate sensor-type.
See the "Presentation" section here:
and the serial API for the sensor and value types here:
Martin, Thanks for the response. I just wired up a serial gateway last night and now I need to build me a sensor to test it with. I may try some kind of multi-sensor node to test this
For testing the radio coms and mysensors protocol, I recommend this sketch that will mock sensors:
This will let you test node to gateway coms without having to add any real sensors.
@dbemowsk Buy a speed controller then MySensorize it.
@dbemowsk I agree with @m26872 to have it save . There are many different types of ceiling fan types. Most available where I live are multiple (3) speed types which can easily be controlled with 3 "on/off" triac circuis (do include a snubber for the inductive load).
I suppose you are familiar with building triac circuits, make sure you have galvanic isolation (optocoupler).
I have done a few triac circuits in past years. I wouldn't interface a triac circuit with anything but an optocoupler.
@m26872 I have never taken a dimmer apart myself. Is the circuit complex? I would prefer a schematic, but if the circuit is as simple as the one above I may be able to figure it out.
alexsh1 last edited by alexsh1
@dbemowsk You need to get the SSR relay connected to your arduino. I have it hooked up to my raspberry to remotely control 240V devices. You need to apply 3V to it in order to relay to switch on. Crydom is the top name though expensive. The same relay I have to control my hot water tank, which is heated at night (due to lower electricity cost).
This is a link to a similar relay. I have 50A one as I need to control 3kW heater:
@alexsh1 An SSR will only turn the fan on and off. It will not allow any speed control which is what I am looking for. I currently have them connected to X10 inductive load dimmers and they work, but I am trying to see if I can move away from my X10 setup.
alexsh1 last edited by
@dbemowsk Ok, how is it set-up now? More voltage - more speed?
These are the dimmers I use: https://www.x10.com/xpdi3-dimmer-120-vac-500w-inductive.html . I never pulled the dimmer apart and scoped it or anything like that, so I am not sure. Could use PWM for all I know.
@dbemowsk this article describes how to build triac dimmers for inductive loads. The x10 dimmer you use is most probably like the type 2. And thus a phase cutting dimmer.
The circuit above is for on/off (SSD) and would need to be switched synchronized with the net frequency. There are a few examples on the forum on how to let the Arduino take care of that.
All assuming that your fan can take phase cutting dimming.
So, do you think it would be possible to use something like this:
and control it with something like an AD5171 Digital Pot in place of the pot that comes with the kit?
@dbemowsk No... looking at the diagram there is no galvanic isolation.. .
This one requires to be isolated with plastic (including knob).
The AD5171 is a nice piece of circuit but is not isolated either, would need a seperate power supply from your arduino and is not suited for high voltage/current AC environment. (and would make an expensive solution)
If you want to meet you expected lifetime (I don't want to contribute to someone death) you better take a safer approach..
A few options:
Another option mentioned by @m26872 was modifying an existing switch. I was thinking a switch like this:
I could use the LED, LDR and shrink tube solution to get isolation as I would imagine that the switch just has 2 VR sliders. With that I would already have a combination switch that is designed to do what I want, I would just have to MySensorize it as @m26872 says.
alexsh1 last edited by alexsh1
You may want to read this:
@dbemowsk what you will find is a circuit very comparable to the ones mentioned.
To "MySensor"ize you you still need to control it from an arduino with (safe) stable power supply and isolation.
Maybe easier to dismantle your x10 device.
It's hard to determine your experience level from your questions but you need to be able to:
- Build a (semi) digital motor control.
- Have little experience with an arduino MySensors device.
3.tie these together
@awi I have one of the X10 switches that I dismantled the other day and the issue with trying to use that is that there is so much circuitry for the X10 portion of the thing that without having a schematic, I wouldn't know exactly what to disconnect to only leave the triac motor control circuit. Also where and how to connect in my galvanic isolation circuit.