My DIY LED Controller - Arduino Style


HISTORY: I just wanted to build a LED lighting for my 75 gallon mixed reef tank. Just a simple LED lighting setup that will turn on and off by means of a simple mechanical timer like my old T5 lighting setup. But I have a habit of "FUTURE PROOFING" things if I can so that when time comes, I dont have to redo or purchase things again. So I ended up going with the dimmable drivers specifically ELN60-48D. Yes 48D, so I can control or adjust the light intensity manually.

Well that was the plan, then I learned about Arduino. The more I read about it the more I became hooked. Imagine a small smart computer for $20-$30 that can control many things, which in this project will control our lights.

So lets start.

You can also find the build thread at REEFFRONTIERS. If you feel like asking a question or simply wants to share your ideas, please join us...


DISCLAIMER:. I'm totally new with Arduino, so if you think you have a stupid question.... ask away! I bet I dont know the answer too... ha ha... But Im sure we can figure it out.


REFERENCE:. Here are some that are related or similar Arduino projects going around...

aOpen Source Aquarium Controller Project - Hoping that someday will be able to do the same. The good thing with Arduino, is its modular. You can add more features as you learn more.

b) Aquarium Controller based on the Arduino Micro-controller - Another build that I believe is very similar to what Im doing.

c) Arduino - . A very simple and cheap computer.



REMEMBER: This project is for you if you have similar or exactly the same hardware that I have...

Meanwell Dimmable Drivers - ELN60-48D or 48P. I believe the key here is that if your driver requires 0-10 volt signal. In case with 48D... 0-10 volt analog signal. And with 48P... 0-10 volts PWM signal. Also, I was informed that it is not good to use Arduino PWM with 48D. Because Arduino have PWM signal and 48D requires analog signal. Its not good but it also does not mean that it wont work... So warning, please use your own disgression if you want to do it or not. Hehehe, I did, and so far so good. Dont blame me ok if you kill your driver....

Arduino Hardware - Im using duemilanove. This is very similar with other Arduino Hardware found here.









PARTS LIST :

1 pc. Arduino Board - it can be Uno, Duemilanove, Mega, etc. We need one that has USB connection.
1 pc. LCD Shield - it can be simple LCD without buttons too. We need HD44780 compatible LCD.
1 pc. DS1307 Real Time Clock - it can be any thing out there. We need the DS1307 type for coding purposes. Also here.
1 pc. Breadboard - Optional. Very useful with the design phase.
Wires (Solid) - #20 or #22 (not stranded), at least 6 feet. We will use this as jumpers.  
Male-Female Breadboard Jumpers - to be used for LCD (remote connection).
Power Supply - recommended 7-12 volts.

Generic NPN Transistor SwitchNPN 2N2222 or similar. How many? Well how many channels you want to control independently. On my 3 rails, I have two channel. One channel to control Blue (2 rails), and another one to control white (1 rail).
1K ResistorHow many? 1 for each transistor.



Misc:
Soldering Iron
Solder
Electric Tape
USB cable - to connect to computer for programming









WIRING ARDUINO + LCD SHIELD :

Arduino Pins used for LCD Shield.
(Digital) 13, 12, 7, 6, 5, 4
Gnd, 5V, Reset

You see, when you put the LCD shield on top of Arduino, it will cover up all the pins. This way (using jumpers), we will be able to free up UNUSED pins. Remember we still need to put the RTC DS1307.

You will also notice that, I avoided as much as possible all PWM pins, 6 of them. This will be very important for our connection to our Transistor/LED/Dimmer.



REMEMBER: Digital Pins 0 and 1 are reserved. 









WIRING ARDUINO + LCD SHIELD + RTC DS1307:

Arduino Pins used for RTC DS1307.
(Analog) 4 and 5
Gnd and 5V









WIRING ARDUINO + NPN TRANSISTOR:

From the original wiring you have.  In order to incorporate Arduino, we just need to 
1) Cut the negative line from 10V adaptor going to the POT.
2) Connect the negative of 10V adaptor to GND of arduino and emitter of the transistor.
3) Connect the collector of transistor to POT (original location of GND).
4) Connect base of transistor to 1k resistor and then to digital pin 2 of arduino.










WIRING ARDUINO + NPN TRANSISTOR + BREADBOARD:











WIRING ARDUINO + NPN TRANSISTOR (SIMPLIFIED - NO POT):

IMPORTANT:. If you look at the diagram below on the right hand side where it tells you COLLECTOR, BASE, and EMITTER, Please pay special attention to this.  Its important that you do not mix and match which side is where.









SOFTWARE:


Copy the original (version1) sketch HERE.

Function:

A simple 2 channel (white and Blue) ramp up and ramp down code.
2 channel, on and off for powerheads to act as wavemaker.
Using 16x2 LCD with 6 non-functioning buttons.


You will nee to download the Libraries here LiquidCrystal  and here Wire.

Download the Arduino software here.  Arduino-0022.zip














I AM CURRENTLY BUILDING ANOTHER (MY 5TH) REEF CONTROLLER. 
I WILL BE DOCUMENTING IT AS I PROGRESS..
SO I HOPE YOU TAG ALONG.






For comments and questions, Email Me