Shop OBEX P1 Docs P2 Docs Learn Events
Controlling AC cieling fan and light — Parallax Forums

Controlling AC cieling fan and light

bboy8012bboy8012 Posts: 153
edited 2010-09-17 08:07 in Propeller 1
I was wondering can any one give me guidance on parts to control it with a prop and say PWM? Its just a project I want to try for my house. Thanks

Comments

  • T ChapT Chap Posts: 4,223
    edited 2010-09-16 16:02
    An AC ceiling fan can be turned on with either a relay or solid state relay. You can find SSL's with logic level inputs, so it is easy to buffer the Prop output up to 5volts (ie CD4050). You could pwm the SSL to adjust the fan speed and dim the lights. There is an object for PWM called pwmasm that is very simple. Try to find a zero crossing SSL.
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2010-09-16 20:33
    As T Chap mentioned optically isolated SSRs are the way to go. These typically have an LED on the DC side that can be driven with a resistor and some voltage above the Vforward for the given LED internal to the SSR. The forward voltage is almost always below 3 volts so the prop will have no issues driving it directly with a series resistor to limit Iforward. The light from this LED is what triggers the Triac on the AC output side, so there is no actual electrical connections between mains and your Prop...this is a good thing!

    However you will discover, as I did, that you will need to detect the zero crossing on the AC line in order to activate the SSR synchronously with the AC signal. I used a random type SSR that was pulsed every 1/120th of a second (60Hz, each half cycle) with a pulse that had some delay between the zero crossing and when the LED line was sent high. The longer this delay the dimmer the light would be. If you don't synchronize the pulses you will experience the lights flickering on and off randomly rather than dimming.

    To detect the zero crossing I used a stepdown transformer (it was already available in the system I was integrating the dimmer into and offered isolation) to drive a transistor. when the voltage went above 0.6V the transistor turned on triggering an I/O state change....Since there was a predictable delay for this 0.6V to be achieved I subtracted this delay from the expected 1/60th of a second and used this as the zero crossing for the next full cycle.
  • bboy8012bboy8012 Posts: 153
    edited 2010-09-17 08:07
    Thanks T-Chap, Miner_With_a_Pic, and tonyp12, for the guidance
Sign In or Register to comment.