Haunt Forum banner

1 - 20 of 117 Posts

·
Registered
Joined
·
1,026 Posts
Discussion Starter · #1 ·
Hi there. I'm a newbie to electrical circuitry, but I have done some simple projects with LEDs and 9v Batteries. I am making a bunch of LED spots and was wondering how difficult it would be to somehow control them so that they dim and different LEDs are light at different times. I'd like to do some sort of sequence where my cemetery is all dark and then the warm whites come on, then maybe some different colored spots to add drama. I'm thinking something like the x-mas lights to music, but on a much simpler scale. I've just started looking into arduinos and I have my first basic circuitry class this week.
 

·
Registered
Joined
·
385 Posts
If you just want to turn them on and off by controlling them with an Arduino, then it's pretty simple. Dimming is more sophisticated. I suggest for your first project you group the colors of lights into different groups; start with them all off, turn on your whites, then your other colors when you want.

One of the other users here found a relay board for a great price:
http://www.futurlec.com/Opto_Relay_4.shtml

With one of these and an Arduino, you can control four lights, or four sets of lights. Have it use the relays to turn the power to the lights on and off. You could also have the Arduino play a music track as well, if you're willing to work out the timing and put it into the code.
 

·
Registered
Joined
·
27 Posts
Hi there. I'm a newbie to electrical circuitry, but I have done some simple projects with LEDs and 9v Batteries. I am making a bunch of LED spots and was wondering how difficult it would be to somehow control them so that they dim and different LEDs are light at different times. I'd like to do some sort of sequence where my cemetery is all dark and then the warm whites come on, then maybe some different colored spots to add drama. I'm thinking something like the x-mas lights to music, but on a much simpler scale. I've just started looking into arduinos and I have my first basic circuitry class this week.
Arduinos are an awesome way to get things started. I use them extensively in my projects. What's great is that they have abstracted the C language so beginners don't have to deal with so many low level chip-specific details.

Using the "analogWrite(pin, value)" function will get your lights to dim. one thing to note is that you probably don't want the arduino to be driving the LEDs directly because you most likely won't have enough current for more than a few LEDs.... if you're driving 5 or more LEDs, I would recommend having the arduino control a transistor that feeds current through the LEDs instead.

I'll be providing a tutorial on LED circuits in a week or so. Stay tuned =)
 

·
Registered
Joined
·
1,026 Posts
Discussion Starter · #5 ·
Just an update on my previous post

I shared this with the Arduino Forum and I figured I'd beat this dead horse some more. I am still determined to figure this project out.

I originally ordered a bunch of prewired 5mm ultra bright LEDs that had resistors already soldered in place to run off a 12V DC power source. I was going to make four sets each of a different color ie: 10 white spots, 10 green ones, 10 blue ones, and 10 violet ones. They were going to be set up for my Halloween display. Pretty easy stuff. But now I have and Arduino Uno and I really would like to somehow control each set of each color as channels via PWM. I can't figure out how to power the sets of LED spots with the output of the arduino. I need an external power source and don't want to scrap all the wired LED's I bought. What I would like is to control each channel either through a manual control, or better yet have then light according to sound frequencies to slowly fade in and out along with ambient music. I've already posted this before, but I wasn't clear on the parameters I imposed on myself by needing to use the 12 V LEDs. Here are the specs for the blue ones:

High Brightness 5mm LEDs - 8000mcd
12V DC
Presoldered Resistor
20 mA
20 cm Wire Length
High Intensity - Low Power 0.36W

I need to figure this out by October and I know I have bitten off more than I can chew, but I really would love to be able to figure this problem out. I'm not looking for one of those light-o-rama style light shows, just simple fading in and out to help make the ambiance for my display.

Thanks in advance for any help.
~GF
 

·
Registered
Joined
·
291 Posts
SInce you are using the pre-wired 12V LEDs, you will need to use transistors in between the Arduino and the LEDs. This is because 12V is too large a voltage for the Arduino to handle directly. You can either use individual transistors, or a ULN2803 IC.

If you are using individual transistors (such as the 2N3904 or 2N2222A) you will need to use resistors (perhaps 2.2K or 4.7K) to connect the output of the Arduino to the base pin of the transistors.

The ULN2803 has can handle eight LEDs, and the inputs to the ULN2803 can be directly connected to the Arduino pins.

The easiest way to do all of this is to search the internet for an appropriate shield for the Arduino and purchase it. For where you are at I think that this is better than spending time and effort trying to do everything yourself.
 

·
Registered
Joined
·
291 Posts
Also, if you're not totally fixated on the Arduino, the PICAXE is another attractive alternative. Something like this would work I think:

http://www.sparkfun.com/products/8330

You also need to purchase the PICAXE chip and the ULN2803 separately, I think. AFAIK they are available from Sparkfun.

One of the benefits of the PICAXE is that there several very active members of this forum who are quite familiar with that approach.
 

·
Registered
Joined
·
1,026 Posts
Discussion Starter · #10 ·
Shield

The funny thing is that I feel more comfortable doing it myself than using some "magic" shield that I don't understand how it works. At least with doing it myself, I am really learning the basics. Every time I look into shields, it makes the arduino more mystifying. It may be that I'm from a generation of women that were taught that women don't get math or electronics, anywhoo... I think setting up 4 outputs with a transistor for each will provide me with basically 4 independent channels that I can then figure out how to control by some sort of input, be it manual or audio. I'll have to find a sketch for that.

As far as the arduino, its what I have and I don't want to buy another thing to figure out for this project. I have set the challenge for myself.

I LOVE all the help I'm getting. If I figure this out, I'll post a huge how to.
 

·
Registered
Joined
·
349 Posts
At the risk of sounding like a broken record, I would recomend using Light-O-Rama. These controllers work for everything, from props to lights. Each controller box has 16 channels, and you can run just about as many controllers as you like with Wi-Fi. You can make your lights do almost anything and synch it all with music or sound effects. I use mine on Halloween, Christmas, and pretty much any other holiday where I can get away with using lights and making them do stuff. The downside to these things are the price. 1 box and the software will set you back about $450.00 plus shipping, but trust me, if you can afford it they are WELL worth the price.
 

·
Registered
Joined
·
1,031 Posts
Probably overkill for what you want, but I'm starting in on a 'smart string' system from DIYlightanimation.com.

In essence, you'd program the light pattern, fades, flickers, strobes, color switches, brightness, etc in free software such as Vixen, the computer/software sends those commands through USB port to the dongle where they are converted to 'pixelnet' commands. Those commands are then relayed to a central hub where 12V power is injected, then out to LED pixel nodes. Just like a pixel on your TV, the nodes have red, green, and blue lights - so they can basically be any color you want, just by varying the amount of red/green/blue.

So you could program a whole sequence where the cemetery comes on warm white, maybe turns yellow orange and flickers like fire, fades out, then turns red, blue, orange, green, purple, then various tombstones light up at different intervals, finally ending with blue-white 'strobe' - or just about any other sequence, color and effect you can dream up. Take the lights down, program in red, green, blue, yellow and they are then your christmas or holiday lights.

They -and several other places have DMX control type lights which are a bit more simple to run, but still offer quite a bit of flexibility.
 

·
Registered
Joined
·
349 Posts
To piggy-back onto corey872's post, the Light-O-Rama WILL NOT let you switch colors the way the system he described will. You would have to use multiple channels with different colored LED's to do that. His system sounds cool, especially if you can make 1 LED switch to 3 or 4 different colors
 

·
Registered
Joined
·
291 Posts
Meanwhile, back at the ranch...

Basically, I agree with what KE7GKP said in the first reply to your question on that other forum. One thing that I would do a little bit different, though, is to limit the current through each 2N2222 to some smaller value, perhaps 100 mA each. The reason that I say this is that the gain of the transistor goes down at the higher current levels, which means that you need a smaller base resistor than what he described, which in turn increases the output current that the Arduino must provide. While I'm not sure of the specs of that Arduino chip, I think that it would be a good idea to keep the current from each output below 5 mA or so (unless you know a better number).
 

·
Registered
Joined
·
1,031 Posts
... His system sounds cool, especially if you can make 1 LED switch to 3 or 4 different colors
LOL - Technically 16,581,375 colors - each R, G, or B LED in the pixel can be programmed to levels from 0 to 255* - so they mix to just about any color you can dream up, but yeah there are some benefits! Though for Halloween I'd mainly stick to the saturated colors...red, green, blue, yellow, orange, purple.

Somehow a corpse or tombstone lit with a lovely shade of pastel pink with an apricot fringe just doesn't look right. :)
 

·
Registered
Joined
·
1,098 Posts
The ideal solution would be to head down the dmx route but that might be a bit pricey.

Sparkfun do individual mosfet boards that you could use with an arduino or picaxe instead of a shield or specific board.

http://www.sparkfun.com/products/10256

The high output Picaxe board is this one:

http://www.techsupplies.co.uk/epage...ath=/Shops/Store.TechSupplies/Products/CHI035

The nice thingabout this is that each channel could be controlled by a separate program as the 18m2 chip for this board will run 4 programs in parallel. You could for example have 2 set sequences and 2 other sequences that change with a pir trigger event (for example)
 
1 - 20 of 117 Posts
Top