Ok Here is my latest update. I've ran into several problems with circuit design, electronic devices and led choice but i've finally got most of the bugs worked out so its time for an update and a bit of a how-to. My first problem was one I couldn't avoid since i'm going DIY with my reef LED lighting, There is no set color ratio to use as every pre-built fixture like THIS are all made to be dimmable through a off the shelf reef controller like THIS. That controller is basically the premium choice of the saltwater hobbyist, and does in fact do everything i'm attempting to do and more, for not that much more than DIY cost of materials.That being said DIY is fun and a huge learning experience. I am on my Third attempt at getting the proper color ratio that suits the Corals needs and overall appearance for my eyes. A good rule of thumb for choosing lighting is 2.5w to per gallon for Soft corals and Fish only, or 3.5w per gallon for LPS, SPS, and Mixed Reef systems. Since mine is a 56 gallon display tank (dont include your sump tank in this figure), I need just shy of 200w of LEDs. The best place i've found for LEDs is HERE and they even have some pre packaged DIY systems should you choose to. The LEDs you want to use for the lighting do produce a large amount of heat so you need an aluminum heatsink. the above link has some pre drilled options, but I went with THIS and a thermal epoxy to give me more freedom on placement.
Now for choosing your colors. I'm only going to cover Saltwater but this project can easily be used for Horticulture and freshwater. Your going to want Royal Blue, White (usually Coolwhite), UV (both 405nm and 415nm), and if your system is large enough some deep red/green/cyan to help soften the blues. My system is just too small to NEED the red/green so I choose a mix of Cool and Neutral White to add some of that spectrum without need the actual Red/Green LED. The ratio I went with is 2:1:1 of RB:WH:UV, some systems i've seen use a 2:2:1 ratio but this depends on the depth of reef your trying to imitate (the more blue the deeper the reef).
Now you have the option of Lense choice to focus the LEDs light into your tank where you want it. The rule of thumb ive found is 12-18" tank depth uses an 80° lense, 18-24" is a 60° lense and 24"+ is a 40° lense. My tank is 24" tall and most of the corals will be at or lower than 18".
TIP: First fasten your leds to the heatsink, then solder/connect the wiring, and last attach the lenses after testing the LEDs are functioning.
Ok time to talk about the powering of the LEDs. I chose to build my own constant current Driver that I can interface with a PWM controller thats operated by the RasPi. Another option if the electrions seem too complicated is to use a DIMMABLE DRIVER. Please note they have both analog and PWM verions you want to choose the PWM, and then you can ignore the rest of this paragraph. If you choose to Build your own, follow THIS instructables guide. I'm using circuit variant #5 for reasons ill explain in a bit. The suggest current to run the Royal Blue and Whites is 1.3A and the UV is 0.6A - 0.7A (im using .7) buy doing the math in the guide youll have your resistor size that selects the appropriate current. Keep in mind you will need a heatsink on the MOSFETs, They consume any excess voltage to keep the current at the set value, and thus produce heat. Im using an old pentium heat sink with a fan. it has enough room to cool 5 driver channels, Im pulling around 10A through 5 channels. My powersupply is an old PSU supply that ive modifyed to come on with the external switch, added a micro usb cord to power the pi, and removed several excess wires from the 12v+, 12v-, 5v+, 5v-, 3.3v+ and gnd. I may also swap the internal fan for a more silent model, the PSU in only using 1/3 capacity and doesn't produce that much heat. when choosing your power supply it needs to be DC and support the current required, mine is a 400w psu with a 30A 12v+ rail so it fits the bill, and was free .
Now to talk about dimming....
More to come, my fingers need a break.
Ive got the included RGB Led & two switches wired up to select two different Loops of color patterns.
IMG_20140426_1530101.jpg 59.84KB 11 downloads
here is a link to my gdrive of said config in action. I've remoted into the Pi via SSH from my Gaming Rig
With the script I have so far I can easily swap the button switches for other on/off inputs, and/or the LED outputs to signal other devices to engage.
My overall goal is a system to:
monitor my Reef tank (temp, Ph, and water flow are the only sensors ive found so far)
Control banks of LED lighting of varring outputs to mimmick natural weather conditions (including moonlight)
Control Chemical pumps to meter in precise measurements of a handful of treatment chemicals on a monthly schedule
I've removed all the things that i had set up to learn the very crude basics of python and the GPIO pinout. As of today I have two 1 wire DS18B20 temp sensors, found HERE, (Thank You s3inks) pulling a reading every 6 seconds/10 times a minute. From everything i've read, you can have 10 1-wire logic devices on a single pin. I followed THIS guide to get one sensor working, but no sample was given for multiple sensors, so I built my own pulling from the sample found in that guide I linked.
THIS is what I've built feel free to use and modify for your needs.
*NOTE* I still need to add data logging to my script and multi-threading so that this module can run at the same time as any future modules I build. Eventually ill add support to control a relay(s) and/or scale down my LED lighting array to Maintain a steady water temp.
Edited by soocold, 02 September 2014 - 07:35 AM.