My DIY Netduino Controller and Multi-channel Multi-chip LED Cannons

Quick question:

The LED chip - how is it protected from the humidity that it'll be exposed to? Are they IP rated? IME the LED's will quickly corrode from the salt/water.
 
First and foremost, it's a test bed setup, the LED chip in this case is a foot over the water and exposed but only for short periods of time while i'm testing, then back on goes the regular Biocube hood etc.

I need to build a shroud that both protects the LED from the water and protects the room from the LED. That's next now that I have a working test setup.
 
Well, got some floats and a pump, here is my ATO logic so far.

This creates an interrupt port that can trigger events:

Code:
static InputPort SumpLevel1 = new InterruptPort(Pins.GPIO_PIN_D8,false,Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeLow);

And then on startupI assign an event to happen if the interrupt fires (water drops) and check to see if the float is already down, if it is, the event won't fire as it fires when it goes down, not while down, so I have to manually fire the event:

Code:
            SumpLevel1.OnInterrupt += new NativeEventHandler(waterLowEvent);
            if (SumpLevel1.Read()==false) // check for low water on start up, if so fire the event manually.
            {
                waterLowEvent(0, 0, DateTime.Now);
            }
            Thread.Sleep(Timeout.Infinite);

Now, the event that is being fired, I replaced turning on / off relays with Debug.Prints of what is going on:

Code:
static void waterLowEvent(uint data1, uint data2, DateTime time)
        {
            if((DateTime.Now - _lastFire).Seconds < 30 || _doneFilling == false) return; 
            else
            {
                _lastFire = DateTime.Now;
                _doneFilling = false;
            }
            ledOnboard.DutyCycle = 1;
            Debug.Print("Pump Running");
            while(SumpLevel1.Read()==false) //while still too low
            {
                Thread.Sleep(1000); //give it a 1 second pause so it doesn't flutter on / off
                Debug.Print("still low on water, pump running!");
            }
            //finished filling, sensor says full.
            Debug.Print("Pump Turns Off");
            ledOnboard.DutyCycle = .25;
            _doneFilling = true;
        }

As you can see, I check to see if the event has fired in the last 30 seconds, and to make sure it's done filling (can't fire two events at once).

Then, I set a flag to say it's filling, and set the last fire time to right now. I light up an LED to tell me that the ATO is running, then go into a while loop. The while loop says basically "While the float stays down, wait for one second, then check again" once it's up, the pump turns off, i shut off the LED and set my variable of _doneFilling to true.

I'll add some additional floats for backup/etc and monitor the level of the ATO container as well eventually but it's a start to test the float.
 
"DreamChip LED" will find them on ebay.

these are NOT the 'dream chip' led multichip that a group of people put together here and elsewhere.
 
that's a nice heatsink. i never knew they made separate strings of leds on one chip, that's really neat. I trying this build also with LDD-1000H drivers, why didnt you go with the typoon LED controller? I was thinking go with that or adruino.
 
that's a nice heatsink. i never knew they made separate strings of leds on one chip, that's really neat. I trying this build also with LDD-1000H drivers, why didnt you go with the typoon LED controller? I was thinking go with that or adruino.

Typhoon or Arduino is fine for most. I happen to know C# and liked the idea of event based control (Plus the typhoon would have to be heavily modified as it's controlling the whole tank).

My favorite part of the Netduino is the interrupts/events. As you can see in my code my program doesn't constantly pole the float switch to see if it is up or down, when it goes down it triggers an event, which I handle, and then it goes back to waiting for an event.
 
Alrighty, so a run down of what is done so far:

Using a Netduino Plus 2 my controller does the following:

  • Sets the time via the network
  • Uses a float switch to fire an ATO via relay when it falls
  • Uses an adafruit 16 channel PWM to dim up to 16 channels of LED lights (currently 5 channels for 1 LED pendant, there will be 3 total (3 x 5 channels), plus a PWM for the ATS)
  • use a DS18B20 temp sensor to check the tank temp and turn on/off a heater via relay

Theoretically it's ready to run my little test reef (29 gallon bio cube). I've got a little more hardware work to do (splash shield for light, fan wiring, tidy up the controller, wire a few more relays) but it could work.

Things that will be added soon:
  • Small LCD Screen for System Status
  • LED's to indicate ATO running, heater running, etc
  • "Feed Mode" where pumps (which need to be added to relays) turn off
  • Fade functions for the light
  • utilize fade function and time to program sunrise/sunset
  • additional float switches to monitor for disaster situations
  • water change mode that disables ATO feature

Things to add later:
  • Other sensors (pH, ORP, conductivity)
  • water sensors for floor/area
  • weather patterns for lights (random cloudy days etc)
  • power head control

I've attached the source here, if anyone cares to look at it.
 

Attachments

Last edited:
Did my first sunrise this morning. Can't wait to coordinate 3 of the pendants to do some awesome things. The possibilities, are endless!

Going to have some time finally to work on it tonight, my first free night in probably 4 or 5 months and I roped it off to JUST this. I'm going to mount all my boards on a backer board, wire all my outlets on my power strip and get the controller board mounted on top of it. Hook up all 8 relays up, and then focus on programming. Hopefully get my LCD going, some more LED functions, etc.

end goal is to have it packaged much better by the end of the night.
 
Day 3 of full LED lighting, color is actually starting to return to a few coral pieces. I'm not saying the LED is that much more awesome than the CF it replaced but what I am saying is that it actually gets light to the poor things.

I added a glare shield about 1 inch big so it doesn't blind me out quite as bad in the office, seems to work well, might go slightly larger.

Coral Notes:
Pink Mille turning bright green vs the brown it had been under CF

Green Acro showing much better polyp extension and skin is darkening vs the bright white under CF

Green Birdsnest: Good polyp color darkening skin

Bird of paradise: showing hints of green no the topmost areas skin still white, polyps white to very light purple

sour apple birdsnest: darkening skin and polyps with a hint of green on the topmost polyps

pink birdsnest: fighting cyno but still darkening up a bit vs bright white before

Red Hyacinth birdsnest: darkening up polyps starting to purple, also battling cyno.

Lots of growth on the birdsnests, some signs of growth starting on the pink mille.


LPS is all going gangbusters and coloration is really picking up.
 
Wow Talk about bright, and your only at 40%. I wish I had the ability to build and program these.

Really I've taken the longest of long roads on it, you could build the pendant easily, put together a driver board, loop the whites on the same PWM and use a typhoon that you buy pre-assembled and be good to go.
 
I need to write some fade methods and a few other things but in order to get it into production I've just set up a simple schedule so that it's daytime after 8AM dusk after 6 PM and blackout after 9 PM.

Working on getting my power strip and ATO working today, then I'll cut heater control over to the controller and fill up the ATO tank and see how it goes for a few days.
 
uploadfromtaptalk1368926346694.jpg

Power strip wired.
 
iced very cool build what kind of power strip is that. got a link for it?

http://www.amazon.com/gp/product/B0...s_o05_s00_i00?ie=UTF8&psc=1&tag=r601000000-20

is it just controllable via relays or is there a manual over ride ?

So with the sainsmart relay's you have some options. They provide a 'normally open' and a 'normally closed' connection for each relay. So in my case two of my outlets (7 & 8) are 'normally closed' - meaning that the outlets are ACTIVE without me doing anything and the relay would turn them off. I used those for my return pump(s) so that if the controller were to have an issue the pumps would run. I also wired the relay after the toggle switch, so you can manually override the relay by flipping the toggle off. If you wired them all normally closed the power strip would function just like normal until you activated a relay to open the circuit.

I have 1->6 normally open, so the outlet is off until I activate it via the relay.

My ATO solution is working great except I sucked up some sand with my aqualifter and now it's no longer pumping. New one ordered and will clean out the ATO container better.
 
Back
Top