Connect with us

How to control AC current flowing through a transistor with a Arduino Microcontroller?

Discussion in 'Microcontrollers, Programming and IoT' started by GandalfExtreme, May 28, 2015.

Scroll to continue with content
  1. GandalfExtreme


    May 28, 2015
    Hello, i am trying to let the the lights in my stairwell
    blink to music, using a Arduino. But the lamps are
    powered by an AC powersource, and the Arduino only supports
    DC. I thought i ask before i break something.

    So is it possible and if so how do i control my AC lights
    with a DC Arduino Microcontroller?

  2. Gryd3


    Jun 25, 2014
    You need something to sit inbetween the arduino and the lamps.
    The most basic component is a relay. It's simple to use, but is slow, and frequent on/off cycles may wear out the relay excessively.
    Then you can start to look at things like Solid State Relays, or Triacs...

    Additionally, you can also just google something like a 'light organ' . they are easy to build without a microcontroller and have been built for AC in some instances.
    GandalfExtreme likes this.
  3. kpatz


    Feb 24, 2014
    What type of lights are you trying to control? Incandescent? Compact fluorescent? LED? Miniature lights or regular bulbs? Do you need them to dim or just go on/off?
    GandalfExtreme likes this.
  4. GandalfExtreme


    May 28, 2015
    The lights are standard light bulbs, and i want them to switch on and off quite fast, but dimming is an option too.
  5. BobK


    Jan 5, 2010
    An optical coupled triac is a good option.

    GandalfExtreme and Gryd3 like this.
  6. AnalogKid


    Jun 10, 2015
    A typical color organ has three channels, one each for bass, midrange, and treble. These drive three lghts or groups of lights arranged however you want, and the illumination generally moves with the music but changes slightly based on the musical content. Also, most color organs are basically music-controlled dimmers. Switching the lights on and off is more simple. If you just want the lights to follow the music rhythm, you're basically going for the bass channel of a color organ with a comparator driving the triac instead of a phase modulator.

    Audio input, buffer/lowpass filter, rectifier and small filter capacitor, comparator, optocoupler, triac.

    BUT - I just did a quick search for "color organ schematic". Lots drawings, but 1) most were for LED's, not 120 VAC lights); 2) the ones for AC lights used SCRs, not TRIACs. Some of the circuits were very simple, but all of them limit the max brightness to 50% of normal. If that's ok, then the innergoogle is your friend.

    AND - miswiring an AC project like this can kill you. Let's be careful out there.

    GandalfExtreme likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day