Maker Pro
Maker Pro

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

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?

Thanks.
 
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?

Thanks.
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.
 
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?
 
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.

ak
 
Top