good day, i am doing a project for controling an electric fan using arduino and a keyes 5v relay module , but i dont know how to wire the connection of the fan to the relay module. I want to control the speed of the fan, how will i wire the connections of it to the reley module? thanks
Mechanical relay module? Good for on/off, not good for speed control.
Cut the hot wire on the fan plug, connect one side to C on the relay and the other to NO.
When relay energizes, fan will turn on.
It depends on your fan but most either have no speed control or buttons for low, med, and high. Please note they are interlocked so only one winding can be engaged at any given time. If more then one is energized it will cause the motor to over hear and eventually burn up or cause the protection to fail.
If you are not experienced with mains power STOP!!! YOU CAN KILL YOUR SELF IF YOU MAKE A MISTAKE!.
Replace each of the switches with a form "C" (C, NC, NO) relay. If you connect the first relay to the line, the normally open to a fan winding and the normally closed to the common of the next relay, repeat this for as many relays as you need, this will provide the necessary interlocking to prevent more then one winding energized at any given time. When all three relays are off the fan will be off.
Be careful with your wiring, keep high voltage and low voltage separate and be sure to put the relays in a protective enclosure. Check with your local code to be sure you are compliant. and DO NOT KILL YOURSELF OR GET A SHOCK.