My DIY Tank & Light Controller + DIY LED Cannons

Do It Yourself projects.

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Mon May 27, 2013 10:56 pm

Image


Image


LCD is functioning and useful, shows 'ATO' when the ATO is running, mode, (currently "Night") and Temp (77.56).

Used some command strips to pin everything down to a board for prototyping. Turns out turning the power supply for the LED's on and off wreaks havoc on my i2c communication. Tossing pauses all over to try to get things straitened out, but using i2c for two devices across 10 threads is getting interesting.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby spartman » Tue May 28, 2013 9:12 am

Dang man you are way more nerd than I am!

I bow down and offer my pocket protector up as a sacrifice.
If your ship doesn't come in, swim out to it." - Jonathan Winters

He attacked everything in life with a mix of extraordinary genius and naive incompetence, and it was often difficult to tell which was which.
- Douglas Adams
User avatar
spartman
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 246
Joined: Sun Oct 14, 2012 10:39 pm
First Name: Steve
Tank Overview: 55,20,10 gal freshwater tanks, 55 gallon salt water tank

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Tue May 28, 2013 9:41 am

This has been a really fun project to keep me distracted from work when I'm not supposed to be working. I shudder to think of the investment vs an off the shelf controller, I know I'm right up there with a good APEX type setup. This morning the LCD was blank (?WTF!*!) so I restarted the system expecting either the Lights to work or the LCD (haven't seen them both work since I was working on it during "NIGHT" Mode) but lo and behold they both are going fine right now. Not sure what changed but it appears my aqua-lifter decided to magically start working again too, as I'm down 1/4 gallon of topoff water.

I turned the LED up a bit, more white in the morning, 55% or so for high noon and a little more blue in the afternoon as it comes down from high noon.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Fri Jun 07, 2013 3:49 pm

Image
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby black hills tj » Fri Jun 07, 2013 3:57 pm

Shouldnt you be doing just married people stuff instead of posting on SFAAS??? Congrats :)
Plant Geek
black hills tj
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 1561
Joined: Sun Sep 16, 2012 6:34 pm
Location: Sioux Falls, SD
First Name: Michael
Tank Overview: Which one?

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby wichers » Fri Jun 07, 2013 4:48 pm

He couldn't resist but to visit us, it's in his blood now! Congrats!!
MATT
User avatar
wichers
Board Member
Board Member
 
Posts: 2226
Joined: Sun Mar 20, 2011 6:35 pm
Location: Sioux Falls, SD
First Name: Matt
Tank Overview: Sioux Falls Aquatics, 75G Mixed Reef and 300G Mixed Reef

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby Railcar79 » Mon Jun 10, 2013 5:59 pm

Congrats.

Sent from my phone
User avatar
Railcar79
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 1051
Joined: Mon Jun 04, 2012 11:07 pm
Location: Colton, SD
First Name: Nik
Tank Overview: .5g Betta, 20g l Turtle, 72 bow lps reef, and a 55g fresh IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby Railcar79 » Mon Jun 10, 2013 6:00 pm

What he isn't saying is her ring was carved from a piece of dead coral with an LED frag glued in

Sent from my phone
User avatar
Railcar79
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 1051
Joined: Mon Jun 04, 2012 11:07 pm
Location: Colton, SD
First Name: Nik
Tank Overview: .5g Betta, 20g l Turtle, 72 bow lps reef, and a 55g fresh IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby shifty51008 » Mon Jun 17, 2013 11:28 am

Railcar79 wrote:What he isn't saying is her ring was carved from a piece of dead coral with an LED frag glued in

Sent from my phone

:lol: :lol:
User avatar
shifty51008
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 446
Joined: Fri Aug 05, 2011 8:21 am
Location: NW iowa
Tank Overview: 75 gal mixed reef

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby Railcar79 » Fri Jun 21, 2013 4:46 pm

I have seen the light, and now my skin has a nice bronze tone. The cannon at 60% is impressive, 100% is deceptive, not all bands of lights are visible. I am anxious to see the 3 light setup
User avatar
Railcar79
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 1051
Joined: Mon Jun 04, 2012 11:07 pm
Location: Colton, SD
First Name: Nik
Tank Overview: .5g Betta, 20g l Turtle, 72 bow lps reef, and a 55g fresh IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Tue Jun 25, 2013 2:24 pm

Added a webserver to the device, currently outputs status type stuff. Not sure which direction I'd like to go- I do know I want history graphs and what not because I'm nerdy like that and I don't want this device to make those/keep the records etc. So pulling that into another webserver is going to have to happen. It's just if I want to have one web site (reefin.net for instance) be a proxy to my device, what it knows/logs on it's own is there + pulls some info in real time... not sure yet. Was a bit reluctant to add a webserver but this one is pretty light weight and ignores most of the complications of handling things it won't have to.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby black hills tj » Tue Jun 25, 2013 5:27 pm

So I can theoretically sneak onto your webserver and turn your lights on and off ;) Hope you dont suffer from epileptic seizures ;)
Plant Geek
black hills tj
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 1561
Joined: Sun Sep 16, 2012 6:34 pm
Location: Sioux Falls, SD
First Name: Michael
Tank Overview: Which one?

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Tue Jun 25, 2013 5:38 pm

black hills tj wrote:So I can theoretically sneak onto your webserver and turn your lights on and off ;) Hope you dont suffer from epileptic seizures ;)


Yea, if you had the address, and proper codes and what not you could control the whole controller, when it's done.

I think I'll likely not build an entire web control for it, but rather let another site/application control it and just use XML & commands to do the dirty work. Keep the code on the device to a minimum. Right now I have to say it's running awesome, so hopefully it continues.

Right now I'm just exporting some XML for a status offering:

<status>
<temp>78.349999999999994</temp>
<memory>95820</memory>
</status>

Tells me temp and free ram on the device. I'll add light stage, ATO etc then let reefin.net grab that data real time to display (with a bit of caching, of course, to prevent accidental DDOS happenings on the controller itself) then add controllable items, program a windows status and control program, then start getting serious about logging things long term graphs etc etc.

somewhere in there work on the controller itself- add my shift register, figure out an enclosure, add my pH probe and conductivity probe.

*Sigh* turns out there is a lot left to do.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby Railcar79 » Tue Jun 25, 2013 6:44 pm

Might I suggest adding this?

http://www.robotshop.com/dagu-6-degrees ... mpaign=jos

with that you can add a webcam to feed your fish, take care of other random tasks while you are away from home. not to mention the bad a** factor of a robotic tank controller. Ultimate high tech tank, heck with 2 you could automate water testing too

pair it with this
http://www.saltysupply.com/AquaGenesis- ... ag1111.htm
User avatar
Railcar79
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 1051
Joined: Mon Jun 04, 2012 11:07 pm
Location: Colton, SD
First Name: Nik
Tank Overview: .5g Betta, 20g l Turtle, 72 bow lps reef, and a 55g fresh IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Tue Jun 25, 2013 8:06 pm

LOL at the robosnail!!! Since I stare at my tank all day I think I can handle cleaning off the glass (though history shows otherwise lol)
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby Railcar79 » Tue Jun 25, 2013 8:11 pm

I am seriously thinking about robosnail, one less thing the wife would have to do while I am gone.
User avatar
Railcar79
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 1051
Joined: Mon Jun 04, 2012 11:07 pm
Location: Colton, SD
First Name: Nik
Tank Overview: .5g Betta, 20g l Turtle, 72 bow lps reef, and a 55g fresh IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Tue Jun 25, 2013 8:13 pm

Railcar79 wrote:I am seriously thinking about robosnail, one less thing the wife would have to do while I am gone.


appears to be single pane of glass only though, yea?
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Tue Jun 25, 2013 9:26 pm

Here is where I am data pulling wise:

Code: Select all
<status>
     <temp>78.462500000000006</temp>
     <memory>96600</memory>
     <heating>True</heating>
     <ato>
          <status>False</status>
          <lastRun>06/25/2013 21:29:27</lastRun>
     </ato>
     <lights>
          <phase>Dusk</phase>
          <light1>
               <ch1>11</ch1>
               <ch2>78</ch2>
               <ch3>117</ch3>
               <ch4>78</ch4>
               <ch5>11</ch5>
         </light1>
     </lights>
</status>
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby Railcar79 » Tue Jun 25, 2013 10:21 pm

as long as it cleans the front is all that really matters. no thoughts on the robotic arms?
User avatar
Railcar79
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 1051
Joined: Mon Jun 04, 2012 11:07 pm
Location: Colton, SD
First Name: Nik
Tank Overview: .5g Betta, 20g l Turtle, 72 bow lps reef, and a 55g fresh IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Tue Jun 25, 2013 10:28 pm

Railcar79 wrote:as long as it cleans the front is all that really matters. no thoughts on the robotic arms?


Really expensive for some servo's and metal. The controller part is the expensive bit I'd guess, but my controller can control those servo's without the inbetween.


http://reefin.net/ now has LIVE real time stats from the controller!!! I grab, parse and display XML from my controller on the website. I'll be implementing some serious caching rather quickly to make sure I don't crash the controller. Right now 1 pageload of reefin.net = 1 hit on the controller's HTTP server. It doesn't seem to be too system intensive, but there isn't any need to get that more than once every 30 seconds or so, really.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Tue Jul 16, 2013 8:40 pm

I can now send commands to the controller via URL so I can now override my light phase manually, then reset it, and within 60 seconds of resetting it starts fading to the proper light phase for the time of day.

Next? Adding a couple "Modes"- feed mode, water change mode. I'm also getting the ATO re-set-up with a better pump and water storage since I'll be gone for a week.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby Railcar79 » Wed Jul 17, 2013 8:34 am

If you want a 10 gal for ATO water, I got one laying around. Needs some cleaning, but it should work, just come take it

Sent from my ADR6350 using Tapatalk 2
User avatar
Railcar79
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 1051
Joined: Mon Jun 04, 2012 11:07 pm
Location: Colton, SD
First Name: Nik
Tank Overview: .5g Betta, 20g l Turtle, 72 bow lps reef, and a 55g fresh IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Thu Jul 18, 2013 9:21 am

Railcar79 wrote:If you want a 10 gal for ATO water, I got one laying around. Needs some cleaning, but it should work, just come take it

Sent from my ADR6350 using Tapatalk 2


Thank you for the offer sir, I appreciate it but I am using a 20 gallon container. It appears to work well in limited testing this morning. Will put in a float for low water in the ATO container but so far so good.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Tue Jul 30, 2013 4:56 pm

well, I think I settled on a 5th order polynomial as my basis for the curves I'm building to calculate lights. Right now my example curve is calculating and work just fine, here is the code:

Code: Select all
            double[] day1 = new double[] { -0.002, 0.4539, -18.728, 253.68, -936.89, 286.05 };
            double CurrentPower = day1[5];
            double calcTime = DateTime.Now.Hour; // hours in 24 hour format
            calcTime += (((double)(DateTime.Now.Minute) / 60)); // convert minutes to fractional hours
            CurrentPower += day1[4] * calcTime;
            CurrentPower += day1[3] * System.Math.Pow(calcTime, 2);
            CurrentPower += day1[2] * System.Math.Pow(calcTime, 3);
            CurrentPower += day1[1] * System.Math.Pow(calcTime, 4);
            CurrentPower += day1[0] * System.Math.Pow(calcTime, 5);
            if (CurrentPower < 0)
                CurrentPower = 0;
            Debug.Print(CurrentPower.ToString());


the equation is this:
y = -0.002 * x^5 + 0.4539 * x^4 - 18.728 * x^3 + 253.68 * x^2 - 936.89 * x + 286.05

that's an example of one I might use for a blue channel: fading in starting as early as 5 AM with no significant light output until 7 AM, peaking at just over 2000 out of 4000 right at 1:30 in the afternoon and fading out to darkness at about 6:00 PM.

I have the code running, but not controlling the lights yet. Did add an LCD message telling me it's "Overriding" the lights when override is active, and that works well.

Also started working the layout for the shield that will have all the connectors etc on it for various things and ordered my pH kit from Atlas Scientific.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby black hills tj » Tue Jul 30, 2013 10:06 pm

Thanks for posting all of this Chris. Eventually I'd like you to show me a thing or two.
Plant Geek
black hills tj
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 1561
Joined: Sun Sep 16, 2012 6:34 pm
Location: Sioux Falls, SD
First Name: Michael
Tank Overview: Which one?

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby Railcar79 » Tue Jul 30, 2013 10:51 pm

I just ordered a RKL, and I may be tapping some of this programming knowledge.
User avatar
Railcar79
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 1051
Joined: Mon Jun 04, 2012 11:07 pm
Location: Colton, SD
First Name: Nik
Tank Overview: .5g Betta, 20g l Turtle, 72 bow lps reef, and a 55g fresh IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Mon Aug 05, 2013 2:49 pm

Began using the calculated light values today. Right now it's mid day so not much to see, but as the day goes and the lights dim very, very slowly towards zero it will be fun to watch.

When I put your equation into google, it gives me a really strange graph. It starts out as a bell curve, but then on the drop, just goes to the negatives.
How are you implementing this?


Good question! The current curve I"m using looks a bit like this over the 24 hour span we'd calculate for:

Image

When anything comes back from the calculation as negative, I simply use 0. This gives me a little more control of the curve while being able to bury the 2nd 4th and 5th terms negative to get the shape above 0 how i want it, and simply substitute 0 for a negative number.


I'm now setting the lights based on this calculation. Thank you BeanAnimal for the prodding in this thread to get it done.

I'm also just using 1 equation and scaling blue vs white vs UV. Code time:

Code: Select all
public void calculateLights()
        {
            double[] day1 = new double[] { -0.0346, 2.5909, -69.363, 763.25, -2716.8, 11.33 };
            double CurrentPower;
            double calcTime;

            while (true)
            {
                CurrentPower = day1[5];
                calcTime = DateTime.Now.Hour; // hours in 24 hour format
                calcTime += (((double)(DateTime.Now.Minute) / 60)); // convert minutes to fractional hours
                CurrentPower += day1[4] * calcTime;
                CurrentPower += day1[3] * System.Math.Pow(calcTime, 2);
                CurrentPower += day1[2] * System.Math.Pow(calcTime, 3);
                CurrentPower += day1[1] * System.Math.Pow(calcTime, 4);
                CurrentPower += day1[0] * System.Math.Pow(calcTime, 5);
                if (CurrentPower < 0)
                    CurrentPower = 0;
                int SetPower = (int)(CurrentPower);
                caclLights[0] = SetPower * .75;
                caclLights[1] = SetPower;
                caclLights[2] = SetPower * .25;
                caclLights[3] = SetPower;
                caclLights[4] = SetPower * .75;
                if (mainLights.Override != true)
                {
                    mainLights.fadeTo((int)(caclLights[0]), (int)(caclLights[1]), (int)(caclLights[2]), (int)(caclLights[3]), (int)(caclLights[4]), 2);
                }
                Thread.Sleep(3000);
            }
        }


Edit: caclLights is a double array I initialized elsewhere.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Thu Aug 08, 2013 10:13 am

Realized last night laying in bed I approached the fade method poorly. I knew it had work to be done to make it the best it could be but my solving for step size is silly.

What i should be doing?

Solving for delay. I can fade from zero to 100% very quickly, in only very very special circumstances will I need to go faster than 1 unit per millisecond and I can handle those separately. I think I'll re-write my fadeto method to calculate delay and assume 1 unit step size.

I laid awake last night writing the code in my head, so there isn't much besides finding time in the next few days to get it onto a computer left.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby Railcar79 » Mon Aug 12, 2013 7:01 pm

Darn you and your techo geek controller. I got my RKL to play with while doing one of these myself. Looking at Arduino 2560R3 board, but the shields are a bit confusing. Hope to have one built by Christmas
User avatar
Railcar79
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 1051
Joined: Mon Jun 04, 2012 11:07 pm
Location: Colton, SD
First Name: Nik
Tank Overview: .5g Betta, 20g l Turtle, 72 bow lps reef, and a 55g fresh IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Thu Aug 22, 2013 12:25 pm

Okay haven't re-written the fadeto method but have sat down and fixed up and tested the webserver a bit more after the controller locked and nuked my tank :shock: :oops: . My own fault, I felt good enough to use it with a titatinum heating tube (either heating or not, no built in temp control), not a regular heater, so there was no fail safe. I was also running with normal on (since it had been using a normal heater) which led to an overheat.

No worries, it is now normal off, adjusted that code flipped the relay, and have done some stress testing to ensure the controller doesn't lock up when swamped with web requests, seems stable now so that's one bug worked out.

Also begun work on a windows program that get status and has ability to set functions as well, so that will arriving soon, so you don't have to be in the same room to view tank status.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Mon Aug 26, 2013 1:30 pm

special thanks to Matt (wichers) who dropped by and brought his par meter.

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.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Sun Nov 10, 2013 10:14 pm

Tonight's progress:
  • Added uptime to the XML status (can be seen on reefin.net!)
  • Checking to see if SD Card is present and if so, launching SD thread (not saving anything to it, so the thread start is commented out still but it's the start of an intelligent SD card use, I think..)
  • Added a folder for "ProjectObjects"
  • Started Xively Integration
  • Added a class: Heater (see details below)
Heater Class-
 I've always enjoyed the simplicity of this project's code but it was time to abstract a few things. First and foremost, I will want to be able to control multiple heaters and do some intelligent things (if it's VERY cold, turn them both on, alternate between the two, detect if one is possibly not heating, etc) and in order to do that I need to abstract the heating system a little further than just an output port.  The heater class is designed to be consumed by a "heaters" class which can take in N number of heaters,  and allows you to tell it to heat the tank, and keeps track of the 'advanced' bits. 
 
A "Heater" consists of:
  • output port (_relay) to control the heater on/off
  • dateTime (_onTime) to dictate when it was last turned on
  • bool _suspect to note the heater is suspect of being non-functioning
  • timespan totalTime to keep track of the total time this heater has ran [[currently volatile]]
  • bool heating to note if the heater is currently heating
  • one constructor which takes an outputPort and sets the heating status based on what that port is currently doing
  • Heat() which turns the heater on, sets the _onTime and returns
  • TurnOff() which turns off the heater, calculates how long it's been on this run and adds it to the total time and returns

Not using the Heater class as I haven't had time to write the Heaters class yet.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Sun Nov 17, 2013 11:47 am

Image
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Tue Mar 04, 2014 11:08 am

Picked up a lot of 4 dual head parastalic pumps today for a good price. Going to set them up for automatic water changes. They are 110v so they are easy to use with any controller if someone wants one- I really probably only need 1 of the 4.

Looking forward to automated water changes.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby Railcar79 » Tue Mar 04, 2014 2:12 pm

I would be interested, looking for pumps to use for dosing
User avatar
Railcar79
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 1051
Joined: Mon Jun 04, 2012 11:07 pm
Location: Colton, SD
First Name: Nik
Tank Overview: .5g Betta, 20g l Turtle, 72 bow lps reef, and a 55g fresh IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Tue Mar 04, 2014 2:24 pm

Railcar79 wrote:I would be interested, looking for pumps to use for dosing

will let you know if they are in good shpe when they arrive, looking to order hose etc to complete the setup. great for waterchanges with two heads on one pump.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby Railcar79 » Tue Mar 04, 2014 2:26 pm

sounds good, you have to come on over tonight, I am getting my canopy after work.
User avatar
Railcar79
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 1051
Joined: Mon Jun 04, 2012 11:07 pm
Location: Colton, SD
First Name: Nik
Tank Overview: .5g Betta, 20g l Turtle, 72 bow lps reef, and a 55g fresh IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Tue Mar 04, 2014 3:02 pm

Railcar79 wrote:sounds good, you have to come on over tonight, I am getting my canopy after work.

in an airport on my way to Tulsa lol
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby kevine9723 » Tue Mar 04, 2014 3:18 pm

Damn i want to go to Tulsa at least it would be warm

Sent from my SCH-I545 using Tapatalk
kevine9723
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 766
Joined: Fri Jun 14, 2013 1:25 am
Location: Tea, SD 57064
First Name: Kevin
Tank Overview: 55 gallon, 40, 75, 75, 65, 120, 10, 24x3

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby Railcar79 » Tue Mar 04, 2014 3:28 pm

You get around about as much as I do. Let me know when you are back around.

Sent from my ADR6350 using Tapatalk 2
User avatar
Railcar79
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 1051
Joined: Mon Jun 04, 2012 11:07 pm
Location: Colton, SD
First Name: Nik
Tank Overview: .5g Betta, 20g l Turtle, 72 bow lps reef, and a 55g fresh IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Tue Mar 04, 2014 9:07 pm

kevine9723 wrote:Damn i want to go to Tulsa at least it would be warm

Sent from my SCH-I545 using Tapatalk


Was home one day from Phoenix where it was warm, this is ok.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby kevine9723 » Tue Mar 04, 2014 9:25 pm

We will have to chat sometime been looking at controllers also looking at building one and have mixed reviews also getting mixed reviews about dosing and reactors still fairly new to the salty side of things buy for now I have the cube going and the 75 is up and wet and starting to look like a salt tank

Sent from my SCH-I545 using Tapatalk
kevine9723
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 766
Joined: Fri Jun 14, 2013 1:25 am
Location: Tea, SD 57064
First Name: Kevin
Tank Overview: 55 gallon, 40, 75, 75, 65, 120, 10, 24x3

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Tue Mar 11, 2014 9:00 am

Well how depressing. I got my package of pumps- problem is there was only one pump in the box.

Opened a claim on ebay we'll see what happens.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby Railcar79 » Tue Mar 11, 2014 9:19 am

did you get a 40 or a 25? cause if it is a 25 you can feel free to bring it over tonight after 6 and we can hook it to my controller so I can compare the 10s to the 25s
User avatar
Railcar79
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 1051
Joined: Mon Jun 04, 2012 11:07 pm
Location: Colton, SD
First Name: Nik
Tank Overview: .5g Betta, 20g l Turtle, 72 bow lps reef, and a 55g fresh IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Wed Mar 26, 2014 9:11 am

Been wrestling hard with what I want to do to contain this wiring mess, and with the 180 getting closer to completion, and with the relay board connection failing yesterday leaving the heat off for a couple hours (no harm no foul) I figured it was time to figure it out. I was looking hard at the project boxes I had gotten and realized the real solution might be on the floor in the furnace room.

I had sitting there, an old UPS that was defunct (not a battery but rather the logic portion). The case is decent sized (12 inches by 18 inches probably) and has 8 outlets on the back (oh hey, I have an 8 place relay board!) with an Ethernet jack, and two RJ11 jacks, and lots of flat plastic to put jacks on, with a bonus fan for cooling!

I'm going to gut it and see if it could work out as well as I thought, I would be stoked to get this thing all boxed up so it stops flaking due to hardware connections.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Wed Mar 26, 2014 12:01 pm

Okay, so the insides of the UPS:

Image

Image

There is an area for where the batteries were, and an area with the controls, will gut the controls area later, looks like this might work pretty well. The outlets are all strung together, so I'll have to snip, solder and glue them in so they don't move, but it apppears workable, which is great. I am going to add a second power cord so that I can power the controller and 5v power supply from a different outlet (and breaker) than the 120v source for the relayed driven outlets.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby kevine9723 » Wed Mar 26, 2014 12:07 pm

That will be sweet when Ya get it all done good thinking

Sent from my HTC6435LVW using Tapatalk
kevine9723
SFAAS Supporting Member
SFAAS Supporting Member
 
Posts: 766
Joined: Fri Jun 14, 2013 1:25 am
Location: Tea, SD 57064
First Name: Kevin
Tank Overview: 55 gallon, 40, 75, 75, 65, 120, 10, 24x3

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Wed Mar 26, 2014 12:34 pm

I am excited as it appears I'll be able to re-use the button on the front and the LEDs as well.
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Wed Apr 02, 2014 4:36 pm

So besides buttoning it into a container, I'm also working on a good way to control the sucker without using hardware buttons. I'll eventually have a web front end but for now the controller provides xml status and lets me override the lights and turn on feed mode through simple query strings. As such, a nice little desktop program that shows me some information seemed like a good disctraction while I am battling this viral infection.

I got and parsed the XML into some objects, and then started updating labels on a simple windows form. Curiosity suggested I check out the "Chart" item, and it turns out that is pretty easy to use as well. What I have now is super crude but working. It gets fresh XML data every 3 seconds (not sure on frequency) and adds a new point to the temp chart each time it gets it (so it starts out empty). Once it hits 100 points it starts removing the first one each time so it stays at 100. I'll probably bump this to a higher number later. The chart auto-scales and keeps moving so it's kind of nifty. I'll add the rest of the stats and control to override the lights and make it look decent.

Image

(Ignore the "Refresh" button, it all happens automatically)
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

Re: My DIY Tank & Light Controller + DIY LED Cannons

Postby iced98lx » Wed Apr 02, 2014 5:16 pm

here is what it looks like when the heat kicks in:

Image
User avatar
iced98lx
Board Member
Board Member
 
Posts: 1524
Joined: Wed Apr 18, 2012 10:21 pm
Location: Colton, SD
First Name: Chris
Tank Overview: 29g BioCube & 180RR Build IP

PreviousNext

Return to D.I.Y.

Who is online

Users browsing this forum: No registered users

cron