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

Heater operation is something that's interesting to look at, in my 29 gallon tank with a 400 watt heating tube it's a possible 105 degree disaster as I've seen- in a 300+ gallon system two 400 watt heaters things will take quite a while longer to end up at inevitable death and major issues. I've actually got some nice code that handles issues and reboots the board now as well, so if it can't turn off the ATO or heater it just reboots itself.
That failsafe is a great idea! I might implement something like that into my own controller.
 
I wrote a fairly lengthy heater article for my website several years ago covering most of the fail-safe logic for these situations....

The 30,000 foot flyover = multiple small heaters are better than one larger heater, especially of there is no controller. This prevents a stuck heater from quickly overheating the system and allows the system to maintain heat of one of the several small heaters fails to turn on.

Likewise, the heaters internal thermostat is a reasonable fail-safe if an external controller is being used to turn it on and off. In this case, the internal thermostat or inline controller could be a backup to the DIY controller. There, the more probable failure mode is failure to heat, not failure to stop heating... in most cases a much less deadly failure mode for the system.
 
Bean - exactly my line of thinking, I will end up with heating tubes (multiple) on some sort of temp controller set slightly higher than I normally keep it, and the worst case scenario will be no heat, not over heat.

It was this way, prior to my Jager 150 watt heater sticking on. In the flurry of a hot, then cold tank I put in the heating tube without flipping the logic to account for a lack of middle step, so the default was on, not off. on with a heater controller as backup == still in operation if the controller was down (which it was a lot then, with lots of development happening, I didn't want to have to have it running for the tank to survive).

Anyway, off we go on some more testing it's been 3 days and so far so good!
 
Also going to have a PAR meter stop by today and take some readings, so that should be interesting and of course with an asterisk as all strong LED PAR measurements are.
 
For me I like the aproach of keep it simple as the morte complex you make something the chances you have of something going wrong.

As far a heaters are concerned I like to start with a calculation that accounts for the worst case senerio of the heaters not turning off. Look at the difference between the air temopreature of the room the tank will be in and the desired water temperature you want to maintain. If the room temp at its coldest is 68 degrees and the desired water temp is 80 degrees your now looking at a 12 degree increase max. For your heaters then calculate how many watts are required to raise the temp 12 degrees and then add an additional 15%. This will assure a system failure if all the heaters fail to turn off the max temp will be only about 2 degrees more that calculated.

As far a heater failure to turn on by having multi heaters you also create a saftey net with 4 heaters the lowest the tempo will fall with one failing would be about 2 degrees again because of slight increase in the capability of the other three heaters.

With metal hides and the heat they produced the saftey neet is not as sure because the lights themselves could bring up the water temp alone by a few degrees. But since your using LED's that will located well above the water surface heating the water from the lights should only extremly minimal.
 
5->600 at the top right out of the water
450 right below the surface
between 60->100 at the sand bed depending on the setting.

Full blast it was 160->180 at the sand bed.

I think I'll ease a little more light into the tank. The water was a little more cloudy than usual since the GFO got turned back on, but I don't think it is a big deal.

Over all, pretty happy with the light, with three of them should be in good shape in the 180 with no optics.
 
Awesome project so far! Wondering two things,

Bean, every find a good way to monitor current usage throughout the day? Might I suggest a large value resistance in parallel with your outlets, measure voltage drop, wouldn't be too hard to do some math to find current and power. This is a slightly less elegant solution than the current transformers, and less fun to implement, but I would think that it would be a much more controllable measurement? Correct me if I'm mistaken, because this was my plan...

Also iced, I really like the methodology of your lighting schedule. Are you planning on putting in small variations in overall intensity over the corse of the year? This can also easily be represented with a polynomial equation, or just a trigonometric function if you want it to be symmetrical.

Thanks for a great read all, after reading this I am much more inclined to use a NETduino. I think the idea of event based programming makes much more sense for something like a controller, very similar (on a basic function level) to MSC (MIDI show control) which is something I am all too familiar with.

Thanks again all!
 
Awesome project so far! Wondering two things,

Thanks!! Glad someone enjoyed the ride so far!

iced, I really like the methodology of your lighting schedule. Are you planning on putting in small variations in overall intensity over the corse of the year? This can also easily be represented with a polynomial equation, or just a trigonometric function if you want it to be symmetrical.

The idea is to have a collection of "Days" with some variation in each one. I'm contemplating having a overlay that runs a second calculation that has the potential to reduce output by a bit- we'll call it the "Cloud" layer and have a bunch of those to pick from too. 30 days and 30 cloud patterns == lots of possibilities. Toss in 3 pendants (or more?) and you can have clouds go from one side of the tank to the other!!
Thanks for a great read all, after reading this I am much more inclined to use a NETduino. I think the idea of event based programming makes much more sense for something like a controller, very similar (on a basic function level) to MSC (MIDI show control) which is something I am all too familiar with.

Thanks again all!

The netduino platform has been excellent for this, and I haven't just decided to fudge it and go arduino, so I guess it works okay!
 
Wow

Looking at the timing and intesity variables you can take this as far and complicated as you want to. An example might be to run a moon light cycle that not only varies by intensity but also on timing where the start time varies by roughly 51 minutes every day. This would mean every 28 days the cycle would repeat.

Yes for the main lighting you could also do something simular. Dependent upon the location and time of the year the lenght of a day always varies. On the shorter days the light from the sun is not as intense as it is on the longer days. I would pick a geographical location near where a majority of your corals come from and try to duplicate the lighting cycle for that area.

If your doing a cloud cover variable as well you could have this come in randomly as well. Take a time period of about 3 hours where you reduce all the lighting slowly to about 20 of where they normaly would be at that time of the day. Often when you have clouds you also have lightening so during the center of this period you could create lightenigh flashes by pushing all the LED to 100% power for several milli seconds.

Another factor to consider is the enviromental lighting of the room that the aquarium is located. This will have a drastic effect on the visual color balance your eye transulates to your brain. It could be possible to consider incoming sunlight into the room and also vary the room lighting to corespond with the aquarium lighting.

The question being how complex do you want to make it?
 
I wrote code (eons ago) that calculates the solar and lunar times for any location on earth (using formulas from several astronomical references).

You will find that for the most part, we want to choose a location somewhat close to the equator, other wise the day lengths are highly variable over the year.
 
Wow

Looking at the timing and intesity variables you can take this as far and complicated as you want to. An example might be to run a moon light cycle that not only varies by intensity but also on timing where the start time varies by roughly 51 minutes every day. This would mean every 28 days the cycle would repeat.

Yes for the main lighting you could also do something simular. Dependent upon the location and time of the year the lenght of a day always varies. On the shorter days the light from the sun is not as intense as it is on the longer days. I would pick a geographical location near where a majority of your corals come from and try to duplicate the lighting cycle for that area.

If your doing a cloud cover variable as well you could have this come in randomly as well. Take a time period of about 3 hours where you reduce all the lighting slowly to about 20 of where they normaly would be at that time of the day. Often when you have clouds you also have lightening so during the center of this period you could create lightenigh flashes by pushing all the LED to 100% power for several milli seconds.

Another factor to consider is the enviromental lighting of the room that the aquarium is located. This will have a drastic effect on the visual color balance your eye transulates to your brain. It could be possible to consider incoming sunlight into the room and also vary the room lighting to corespond with the aquarium lighting.

The question being how complex do you want to make it?

I wrote code (eons ago) that calculates the solar and lunar times for any location on earth (using formulas from several astronomical references).

You will find that for the most part, we want to choose a location somewhat close to the equator, other wise the day lengths are highly variable over the year.


You both illustrate the point I struggle with the most - How complicated!? As for getting solar and lunar times from real world places (or even weather patterns, which is doable) I tend to error towards the side of 'creating' them knowing that the ideal coral growing and coloring "Weather" often isn't real life, no matter how hard we try to recreate the ocean in our homes.

After my overheat disaster I'm battling phosphates that are undetectable due to uptake by GHA and still a decent amount of Cyano. Because I don't want to complicate the small tank setup anymore than I need to for purposes of testing this stuff (I had added GFO, other reactors) I am going to stick to simple upkeep (water changes, filter floss and purigen changes) and keep my one lone surviving coral (Pink Mille) as a test bed of the controller: if the GHA and cyano go nuts so be it: the clowns and yellow goby dont' seem to mind. I'm working now to package the hardware into a case and I've asked 02Surplus here on the forum to help me design a shield to make connections easier/better vs a solder breadboard. He's offered to help assuming I get time to map it all out for him. (community members like him, Bean and others are what make projects like this possible for people like me lol)

I have had one lockup since the big overheat- I am convinced the bug is in my webserver and happens when it gets overwhelmed though I can't yet find conditions to re-create it reliably, so work continues there. Otherwise it's been the last few weeks just running normal without issues.
 
I took the approach of calculating them instead of writing code to rely on any number of webservices that may or may not be there down the road, but fully understand the choice to simply create a reasonable lighting profile.

As you elude to, our tanks really have very little in common with a real reef. In that context, it may not be ideal to follow the solar schedule for a chosen location. I suppose I complicated things far too much for the sake of doing so but..

I can use the chosen calculated solar and lunar data to build the basic profile and then manually adjust any of the points in time. I can allow a single "day" to be the profile for every day, or allow the software to calculate the points for each day of the year.

Where the flexibility comes in is the magic. I can used a fixed offset (in either direction) in minutes for any of the points (rises, sets, midday, etc), or as a percentage of the distance between the points. I can also allow the rise and set times to occur naturally, or force a min and/or max day length and/or offset the local timzone synchronization.

So the fixed points: I can choose to observe any combination of astronomical, nautical, and civil twilights, rise, pre-noon , noon, post-noon, civil nautical and astronomical twilights... And offset any of those points as stated above (a fixed amount, as a percentage of the distance to the next point, etc.) This is all done via a graph where I can scroll through the days and see what each day of the year "looks" like. Each lamp (or channel) has its own schedule. Once I am happy the software saves the base equation for the points. Each time a point is created the base equation is solved for OutPut power with any offsets for that day (looked up in the settings table) applied.

While the GUI is a bit complex, the resulting calculations are about the same complexity as what you have in choosing the manual profile.

Don't get me wrong, your method is likely all that is needed. In fact after playing with the software for a while, I have come to the conclusion that any near equatorial profile is about the only good match for a captive reef and human viewing schedule. Move further away and the day lengths swing drastically from summer to winter.
 
Hi Iced98lx
any new updates on your controller? been reading this thread and haven't seen any post in a while
 
Hey rott, indeed, sadly I haven't had time to document but just a few functional updates- I added a catch in case the internet is down and it can't get the time so things don't fail there plus lots of debugging code. so far (fingers crossed) not a single lockup since. I really had a ton of house projects in progress so will update a big update soon now that winter is setting in :)
 
The calculations would not have to be extremly complex.

A. a cycle created with a sine wave that is roughly 709 hours long would cover the phases of the moon. Yoiu could offste it with a +0.05 to compansate for the curvature of the light and make the lunar phase slightly longer than the lunar darkness.

B. You can run a earth rotaion phase again using a sine wave only now wth a 24 hour but again add a light ovvest to compensate for the curvature of the earth of roughly +0.05.

Now the tricky parts are combining the two factors together. I would think the simplest way would be do a multiplication of the A and B factor however some additional factor might be needed to be included in the equasion to adjust for the imput range of the lighting controler.

You need to keep in mind that wen working with LED's an input of 50ma may not be producing 1/2 the light as for an input of 100ma, or an input of 350 ma does not produce the 1/2 the amount oflight as an imput of 700 ma. Most LED's do have a cut off and turn on level so where you might get no light at 70ma on the turn on phase you may still have a low level of light at 35ma on the downward ramp. Keep in mind that different LED's rect differently to this.

Then there is the question how much accuracy on this is realy needed? As was mentioned earlier we ask ourselves is the conditions in nature truely ideal at any given point on earth? Could the ideal for Coral A be far from ideal for coral B? Could we also tweek nature and create better conditions in the aquarium? And finaly how much do lunar phases even come intro play in the home aquarium when we also have artificial room lighting comming into play.

There is another interesting thread on lighting cycles. Does 200 PAR for 14 hours produce better corals than 400PAR for 7 hour? or 800 PAR for 3.5 hours? The answer here is every coal is different the 800 PAR could burn some corals to a crisp while the 200 PAR could be insuffecient for other corals.
 
The calculations would not have to be extremly complex.

A. a cycle created with a sine wave that is roughly 709 hours long would cover the phases of the moon. Yoiu could offste it with a +0.05 to compansate for the curvature of the light and make the lunar phase slightly longer than the lunar darkness.

B. You can run a earth rotaion phase again using a sine wave only now wth a 24 hour but again add a light ovvest to compensate for the curvature of the earth of roughly +0.05.

Now the tricky parts are combining the two factors together. I would think the simplest way would be do a multiplication of the A and B factor however some additional factor might be needed to be included in the equasion to adjust for the imput range of the lighting controler.

You need to keep in mind that wen working with LED's an input of 50ma may not be producing 1/2 the light as for an input of 100ma, or an input of 350 ma does not produce the 1/2 the amount oflight as an imput of 700 ma. Most LED's do have a cut off and turn on level so where you might get no light at 70ma on the turn on phase you may still have a low level of light at 35ma on the downward ramp. Keep in mind that different LED's rect differently to this.

Then there is the question how much accuracy on this is realy needed? As was mentioned earlier we ask ourselves is the conditions in nature truely ideal at any given point on earth? Could the ideal for Coral A be far from ideal for coral B? Could we also tweek nature and create better conditions in the aquarium? And finaly how much do lunar phases even come intro play in the home aquarium when we also have artificial room lighting comming into play.

There is another interesting thread on lighting cycles. Does 200 PAR for 14 hours produce better corals than 400PAR for 7 hour? or 800 PAR for 3.5 hours? The answer here is every coal is different the 800 PAR could burn some corals to a crisp while the 200 PAR could be insuffecient for other corals.

Exactly why I haven't really worried about pulling "Real life" in- The "cloud" layer is really designed to not interfere with the real, basically identical from day to day, light cycle. All that I want is a slight change now and then for visual interest. Likely I'll not notice and it's a waste of time. I don't want to end up putting something in that is 'more real' and has negative effects on the coral.


cool... hope it all the house stuff goes well for you

New deck, new hot tub on deck, new front and back doors, garage overhaul, all complete before the snow flew this morning! Whoopie!


I added a big step to the project today: it now has a degree symbol after the temp. :lolspin::lolspin:

Working on an enclosure solution now, along with an external 5v power supply since my LCD dims when my relay's fire- probably pulling too much through the board's 5v supply.
 
Fun/interesting read,...I'm subscribed. Your cold writing is more than I care to learn.lol I've put together the Jarduino, and I'm able to alter the code somewhat (mainly time duration) as I can bring it up to see what to change. I am going to incorporate your idea of the outlet strip with the relays.(thanks for the link). I do have a question regarding heating. I agree the best fail safe is multiple heaters as stated, and turning them on/off, controlled with my Jarduino @ powerstrip/relays to a set temp. and also using their internal thermostats set a couple degrees above the controller is a good heating method.. Any thoughts on how to be alerted if your controller ON to one of the heater relays has failed, so the heater is not working on it internal thermostat only? Maybe not a big deal with multiple heaters, but I always like to know if something is not working. Thanks,---Rick... ps looking forward to pics. of your enclosure.
 
Back
Top