Shop OBEX P1 Docs P2 Docs Learn Events
How to use propeller micro controller to control ac current load — Parallax Forums

How to use propeller micro controller to control ac current load

WakkonyiWakkonyi Posts: 5
edited 2014-10-17 22:23 in General Discussion
Hello. I am developing party lights and using the propeller micro controller. I want to use ac current for my lights as they will be a long distance from my control point because dc current can't go very far. How can I go about it using NPN or PNP transistors? I am in Uganda. Patrick Wakkonyi.

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-09-04 14:31
    The easiest way to do this is with a relay. Parallax sells a couple different relay boards.

    When using a mechanical relay, you need a transistor to power the coil. Many ready made relay boards include the transistor but if you're making your own board you'll need to add one yourself.

    A solid state relay (SSR) doesn't require a transistor. If you use a SSR make sure you get the kind made for AC loads. SSR will only work with the current type they are designed for while mechanical relays can be used with both AC and DC.
  • tonyp12tonyp12 Posts: 1,951
    edited 2014-09-04 14:37
    Are the party-light from off the shelf that runs on 240V?
    DC voltage goes pretty far, though some voltage drop but unless you are talking Kilometers should be no problems.
    To turn on A/C voltages use Triacs, here is youtube video (very dangerous to mix parts a human can touch with 240v mixed in !!!)
    https://www.youtube.com/watch?v=ZXXup79B6Gc
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-09-04 14:47
    tonyp12 wrote: »
    To turn on A/C voltages use Triacs, here is youtube video (very dangerous to mix parts a human can touch with 240v mixed in !!!)
    https://www.youtube.com/watch?v=ZXXup79B6Gc

    That was interesting.

    Is the advantage of the triac cost? Are there some AC loads you wouldn't want to control with a triac?
  • WakkonyiWakkonyi Posts: 5
    edited 2014-09-04 15:08
    Thanks Duane but I have read about relays and the problem lies with the frequency they can switch on and off.

    Wakkonyi
  • WakkonyiWakkonyi Posts: 5
    edited 2014-09-04 15:12
    Thanks. I am designing my own lights and I surely need the ac. Are Triacs not latching?

    Wakkonyi
  • tonyp12tonyp12 Posts: 1,951
    edited 2014-09-04 15:25
    >Are Triacs not latching
    Yes they are On until next QUADRATURE (or maybe next zero crossing)
    But at 50Hz you can dimm without flicker,
    and for your party lights you would not turn on/off faster than 50Hz as that would just look half-on to a human.

    With LED there can be a visual flicker compared to incidence light bulb when dimming at 50Hz

    read this post on how to sync your mcu up with 50Hz zero crossings. (But these SSR will only turn on a zero crossing by themselves, so it was not useful for dimming)
    http://forums.parallax.com/showthread.php/149577-Dual-SSR-inside-a-PowerStrip
  • WakkonyiWakkonyi Posts: 5
    edited 2014-10-17 12:35
    Sorry I have been silent since I last posted. Anyway I have been working on the solution for this question and I now have the answer on using the micro controller to control the switching on and off of ac current using NPN and PNP transistors. I have a working model giving me 40A at 12V of AC and switches on and off at high frequencies just like it works for DC. Is this a big deal? I hope it should. No triac nor relay.

    Wakkonyi
  • Heater.Heater. Posts: 21,230
    edited 2014-10-17 13:19
    I want to use ac current for my lights as they will be a long distance from my control point because dc current can't go very far.
    Who on Earth said that?

    The resistive losses through short cables is the same for AC as DC.

    If you have really long distances to cover the cables can act as antennas and radiate power away when using AC. For this reason modern long distance power cables are starting to use DC.

    I guess your lights are not so far away that this is an issue.

    So the real question is what kind of lights do you actually want to control?
  • WakkonyiWakkonyi Posts: 5
    edited 2014-10-17 15:52
    I surely had a voltage drop with 12V DC at 50 meters but is now solved with 12V AC.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-10-17 21:44
    Ummm. PNP and NPN transistors are always going to contribute to a voltage drop and a lot of wasted energy -- especially when you expect to control 40amps at a voltage as low as 12VAC.

    You would be much better off with MOSfet devices. The AC or DC are not going to make as much a difference.

    What you may being seeing is that 12VDC is a true 12Volts, whereas 12VAC is 70.7of actual peak voltage. But that adjustment is provided to assure that Amp x Volts = Power are the same.

    Other sources of the 12VDC voltage drop might be that your power source was not up to snuff. If you use a small battery for 12VDC and expect it to provide a constant 40amps -- it just won't happen. You have to at least use something as large as a car battery.

    40 amps over 50 feet of wire is NOT trivial. You need something like 10 gauge copper wire to reduce losses.
  • evanhevanh Posts: 15,921
    edited 2014-10-17 22:23
    There has historically been a layman misunderstanding that AC travels more efficiently than DC. This likely harks back to the outcome of the AC vs DC transmission wars. Of course, the real benefit of AC is it's robust and easy transformer application. And the advantages of transformers (High voltage (eg: 200kV) for long distance, low voltage (mains) for short distance) being where the real efficiency gains are made.

    Wakkonyi,
    I recommend you use a higher DC voltage, say 50 Volts at 10 Amps. Of course, this depends on the lighting controller accepting a higher voltage.
Sign In or Register to comment.