Arduino controlled lighting

Hi yall,

I wanted to know if this was possible and maybe where I should start.

I want to take a Letterpress type drawer, put an LED in each compartment, then use photo resistors, to gradually turn the light on and off with the sun. With that I may need to add an additional power source so the 40 or so LEDs are bright enough. And if possible I might want to add a second set of LEDs, and a RTC, and have those light up on special days(my partners Birthday as this is a gift).

Is this feasible? If so, where should I start?

Sounds pretty reasonable. You will need a separate power supply/regulator for the LEDs, assuming 40 LEDs that take 20mA each. The arduino's regulator can only handle around 250 mA (I think), so don't try to power them the 5V pin.

Do you want to just switch each LED on in sequence or fade in?

With 40 outputs, you will need external circuits to switch the LEDS.

What is your electronics and programming experience?

Weedpharma

Weedpharma: My goal is to fade the LEDs in with the sun going down, my electronics experience ok, I mostly use Arduinos to build sensors for research work. My coding abilities are getting better, I'm taking python classes this summer, and in fall I will be learning MATlab.

CWashburn: I've never used a separate power supply/ regulator before and I guess that's where I'd like to start. How should I add one in, that lets the Arduino still control the power supply

If you are controlling all 40 LEDs at the same time, you will need to use PWM and a MOSFET.

What you need is a logic level gate mosfet. The gate needs to be fully on or the resistance of the drain/source is not at its least so causes heat.
My favourite small mosfet is NTD5867NL. It works with 5v on the gate and handles a few amps with ease. They are cheap. I bought mine from RS Components.
There are others but make sure they are fully on at 5v on the gate.

You will also need a separate power supply. The size depends on the power of the LEDs. What LEDs are you going to use?

Weedpharma

crossroads. I think, has made a board that uses a LED driver that can handle some vast number of LED's
uses MAX7219,,,,,
handles up to 64 individual LEDs.

http://www.crossroadsfencing.com/BobuinoRev17/

you can see what he has done there.

check this list for max7219 to see what others have done.

Would the RFP30N06LE (N-Channel MOSFET 60V 30A - COM-10213 - SparkFun Electronics) be a reasonable substitute?

I think I get how this works now, I need to connect the LEDs positive lead to the external power source, then run the negative from that power source to the GND on the Arduino. After that run from PWM to the Gate on the MOSFET, connect the MOSFETS drain to the LEDs, and its Source to the GND.

Then with a little coding I should have something that fades the LEDs on and off?

This MOSFET turns on at around 2v and is fully on with over 3v so is suitable.

You will need current control for the individual LEDs in parallel. A suitable R will do for standard LEDs.

Weedpharma

RFP30N06LE

this part is obsolete.

9 amp rating. need 20mA to light an led.

then you need 50
then you need to pwm each to dim.

lots and lots of wiring. a couple mega's would be needed unless you use multiple shift registers. 7 or 8 would do.

lay out the board you would need.

then for S & giggles, lay out the MAX7219
just to compare

edit add:

check out the TPIC6B595 high power shift register.
I think you will find that you will not need any FET's as discrete parts.

I think the OP needs to make it clear if all LEDs are to be run at once or to be controlled individually.

Weedpharma

Just a question here. Could you not use an uno, one pwm output a ssr and an external power supply for the LEDs.

Sorry, I want all the LEDs to turn on at once

Then you need to wire all the LEDs in parallel with current limiting R for each or in series / parallel strings with current limiting R for each string.

What power supply are you going to use? What LEDs are you going to use? We can then recommend a suitable wiring system and current limiting R.

Weedpharma

Check out this sign I made with 23 leds and 2 TLC5940 chips.
Similar to what you want to do.

As for LEDs my hope was to use either Diffused White 3mm LED (25 pack) : ID 778 : $4.95 : Adafruit Industries, Unique & fun DIY electronics and kits or Super Bright White 5mm LED (25 pack) : ID 754 : $6.95 : Adafruit Industries, Unique & fun DIY electronics and kits depending on what may produce a nicer light at night. I just counted the compartments on the letterpress drawer and there is 89 compartments so I'm going to need 89 LEDs. That's about 1.78A total current.

I'm not sure was power supply I should use, I'm guessing it needs to be around 2 amps, but I don't know what voltage is best. Any suggestions?

You can use any plug pack you have available, such as an old laptop charger. You simply connect the LEDs in series to suit the supply you have.

Your calculation of current is only true if all the LEDs are wired in parallel. The current can be reduced by wiring strings of 5 and adding a limiting R then using a 12 volt supply, you need about a 0.5A supply.

Weedpharma