# Chads Arduino Build



## tenthe (Dec 29, 2013)

Are you reading water temperature? Where did you place the probe?


----------



## benjaf (Mar 27, 2012)

This looks interesting, going to follow your progress.
May I suggest using the EEPROM in stead of the RTC memory? It serves the same purpose but is much easier to work with and has much larger capacity.


----------



## Chiefston (Dec 25, 2011)

tenthe, I will be reading the water temperature. I have a cable gland on order from adafruit that I will be using to place the temp probe somewhere in the pump line. I'm hoping it may fit into a cerges reactor...
Benjaf, I would use the EEPROM, however I will be reading/writing to it a lot over time, and EEPROM has a limited lifespan. The RAM on the DS1307 however, is unlimited read/writes


----------



## tenthe (Dec 29, 2013)

Please let us know how the inline temperature probe works out! I just ordered an arduino to control my lights, and I'd love to be able to get my temperature probe out of the tank. I might try something similar.


----------



## benjaf (Mar 27, 2012)

Chiefston said:


> Benjaf, I would use the EEPROM, however I will be reading/writing to it a lot over time, and EEPROM has a limited lifespan. The RAM on the DS1307 however, is unlimited read/writes


How often do you dose ferts? AFAIK only writing to the EEPROM cause wear, and even then the 100.000 cycle limit is said to be a very conservative estimate.


----------



## hamato (Jun 7, 2008)

tenthe said:


> Please let us know how the inline temperature probe works out! I just ordered an arduino to control my lights, and I'd love to be able to get my temperature probe out of the tank. I might try something similar.


Here's how I do mine. Works pretty well!


----------



## Chiefston (Dec 25, 2011)

That looks nice hamato! Might I ask what temp probe you are using? I just received my cable gland from adafruit, however the probe wire is too small for it to make a tight fit. I'm thinking of maybe adding some shrink tubing to the probe wire to make it thicker, however I'm not too sure how that will work when it comes to being watertight...

PG-7 Gland nut from adafruit











Doesn't quite fit...









Also, got some more goodies in the mail today. RGB strip light, 12V power supply, motor shield for the dosing pumps, and a capacitive touch sensor board. I'm hoping to place some sensors inside the stand, and be able to "hit" the buttons from the outside of the stand, no physical buttons required... Not too sure if that will pan out or not


----------



## hamato (Jun 7, 2008)

I got it from ebay, basically the waterproofed ds18b20 but the shorter version. An ebay search for "mini Thermometer waterproof model temperature sensor temperature probe" will bring it up.

For the fitting I used a Heyco M4518 RLTCG 1/2 NPT BLACK-NO NUT


----------



## Chiefston (Dec 25, 2011)

hamato, I went ahead and ordered the ds18b20 myself. I looked it up, and there seems to be a one-wire library that is available for it, and it seems pretty easy to use. I am thinking that I will keep the thermistor, and use it to regulate the temperature inside the project box via a 12v computer fan.

I made quite a bit of headway in the programming today. I now have the RGB strip lights working, and have the ability to program the light timers and RGB values for morning, daytime, evening, and moonlight. I was also able to get the capacitive sensing working and tested. It appears that I will be able to use the capacitive buttons through the 3/4" plywood of my stand. This makes me happy, as I no longer need to figure out a way to have buttons unobtrusively stick out of my stand 

I ran out of time today, but I'm hoping to get a quick video of my progress up to this point posted tomorrow. It'll be nice to have a video snapshot of the project for when I get it all finished, and maybe I can get some constructive criticism from the folks who've already blazed this trail.

Until then, enjoy planting tanks!


----------



## Chiefston (Dec 25, 2011)

*Partial build video*

So, I posted a video of my controller in action today. It's probably 50% done being coded now. Right now, I can set the times for the lights and co2, however there is no function to actually use that info! So, I still need to add the actual alarm function, a feeding function (to turn off the pump and heater for like 5 min), options to turn each of the components on/off individually, and probably a whole bunch more that I haven't even thought of. But, here it is anyways. Enjoy!

http://youtu.be/AZbJ8RELvgg

P.S. I can't figure out how to embed video, so there is just the link above...


----------



## Chiefston (Dec 25, 2011)

*Quick update*

So, I've now got the controller programmed at about 90%. I have all the alarms currently working, and everything is currently operating as I want minus the pumps. I just received the pumps in the mail, so now I can get that out of the way...
Meanwhile, I have started to get the proto board ready to go. Here is the voltage regulator I put together today. It uses a LM317T variable voltage regulator set to output 8.12v (close enough to 8!). I chose around 8v to power the arduino as 7v is the minimum cutoff, and 9v or higher would simply create excess heat on the arduinos voltage reguator. The circuit is one I copied from ladyada on her webpage. Seems to work well so far!










Also, I received the DS18B20 in the mail and have that hooked up and reading correctly. It is nice that the cord is larger and now fits into my cable gland snugly!










So, now that I have the programming almost done, and the perfboard getting setup, I am now on the hunt for a box to fit everything. The biggest concern I have now is that the 12V power supply I have is relatively huge. Not too sure where I'm gonna get a wooden or plastic box that big. Oh well... Progress is being made!


----------



## Chiefston (Dec 25, 2011)

*Big update*

Ok, So I am finally done programming this thing. The final tally was a 42.2kB sketch, and roughly 2000 lines of mostly unoptimized code. But, I managed to get all the ideas I had floating around realized. So, here is the mess I have created, which is everything minus the motor controller board which I took off for measurements:










The next step is to take all of the stuff on the breadboard and move it to the perfboard, and clean it up to look neat. Then its moving to this box:










Right now, I have everything in there just for reference. I will begin cutting holes for all the plugs and everything once I get the controller cleaned up. Right now, you can see the 12v power supply on the left, with the cooling fan sitting on top. Along the bottom are the 3 hobby peristaltic pumps. On the right side is the solid state relays (3 of em, one for the filter, one for the main lights, and one for the heater. The CO2 solenoid doesn't draw enough current to work with the SSRs, so it gets a reed relay.) On the bottom right is the USB extension cable so I can reprogram the board later if need be without taking everything apart. Along the top are the outlets for the filter and lights to plug into. I have a Duemilanove sitting in the middle for reference.


----------



## Chiefston (Dec 25, 2011)

*Program breakdown*

Ok, as far as the program goes...

Here is the main screen:









On the main screen, you can see the temperature of the tank, the day of the week, the time in hours:minutes:seconds. Then I have symbols for which 120v things are currently on. They are from left to right: filter, CO2, heater, main light. Then on the bottom I have the micro ferts on the left and Macro ferts on the right, with each block representing 20% of the bottle full, and each half block being 10%.


By hitting the select button, you get this screen:









This screen you can see the enclosure box temperature, the actual mL of the micro and macro bottles, and the cooling fan RPMs. After 5 seconds, this screen disappears and you are taken back to the main screen.

From the main screen, if you hit the enter button, it takes you to:









and hitting yes:









The feeding screen turns off the filter and heater for 5 minutes to allow the fish some quiet time to eat. I have an inline heater, which is why the heater is turned off with the pump. After the 5 min, it kicks you back to the main screen.

Moving on past the feeding selection screen, you are taken to the reset bottles screen. Selecting this just resets either the micro or Macro bottles back to being full.


----------



## Chiefston (Dec 25, 2011)

*More program updates*

Moving on past the reset bottle screen, you are taken to the set light times screen.


















Selecting Main Light gives you:

































Selecting Aux Lights takes you to:

















After the Sunrise RGB, you are taken to similar screens for Sunset RGB, Moonlight on time, Moonlight RGB, and Daytime RGB.

After setting the light times, you can set the main time.


----------



## Chiefston (Dec 25, 2011)

*More program....*

After setting the main clock, you can set the LCD backlight brightness. This brightness is dimmed down to after 5 seconds of being on the main screen. The LCD will be visible on the outside of my tank stand, so this is needed to keep it from being full brightness all the time.









From there, we can turn on/off all the components independently:


























And so on for the CO2, filter, and heater. Next is setting up the dosing pumps.




































If you noticed, I have 3 pumps but only the micro and Macro ferts setup on the main screen. I have the 3rd pump setup so that if I keep it at 0 second on time, it just gets skipped over. But if I decide I need it at some point, be it for adding glut or iron or whatever, I can set the timer >0sec and it will dose along with the first two.









After setting the pump speeds and times (which I will use to calibrate the pumps to inject a certain amount of fert...) I will then set how much fert I just calibrated the pumps to. I wanted to keep the freedom of being able to decide later down the road to maybe inject 10mL of fert at a time, or maybe 5mL will be enough. I will be mixing up my liquid ferts using dry powders, so I will have a lot of flexibility. I'm currently thinking of dosing 10mL per dose, and having 500mL bottles. That sets me up for 50 doses, every other day, which means they'll last like 4 months. That may be too long... I dunno :icon_conf









And finally the size of the bottles I'll be filling. Again, I don't know if 500mL bottles will be what I finally decide on. I have this to be set between 100mL and 2000mL. That should cover me.


----------



## shift (Jan 7, 2013)

Looks like you are off to a good start! i like how you are hiding the sensor inside


----------



## Chiefston (Dec 25, 2011)

*and finally...*

After setting the pump parameters, I can set the temperature alarms.

















If the tank or box temperatures go over the alarm setting, it will start an audible alarm that will continue until it is acknowledged by hitting the menu button on the main screen. The alarms are setup so that if the tank temp alarm is reached, the power to the heater is cut. Once the temp goes back below the alarm temp, power is restored to the heater. This gives me protection from the thermometer on the heater going out and frying my fish, and will keep the tank temps hovering around the alarm setpoint until I can fix the problem. The box temp alarm doesn't do anything except alert me to a problem. Speaking of alarms, the alarm is tripped whenever the fertilizer levels reach 10% of the max bottle amount. This alarm is tripped each time the ferts are <10% of max and the ferts are injected. I put this in there to remind me of when its time to mix up a new batch.

And thats pretty much it! As I make progress getting this rats nest of wires cleaned up and put into the box, I will post more pictures and keep ya up to date. Hope this wasn't too long winded!!!


----------



## shift (Jan 7, 2013)

Rather then setting a temperature alarm .. use it as a temp controller. You should be able to power your thermometer though a relay and discount the power when it gets to warm.


----------



## Chiefston (Dec 25, 2011)

*Controlling heater*

Shift,
I would rather rely on the Hydor to keep the temps stable and use my own temp probe as a backup, as that gives me redundancy. The heater is being powered through a SSR, so I could just use the Arduino to control the heater using a PID algorithm, but then I'm solely relying on my controller to keep temps in check. I'd rather rely on the engineers at Hydor first, and use myself as a last resort :red_mouth


----------



## Chiefston (Dec 25, 2011)

*Temp probe fitting*

So, while I wait on some connectors to come in the mail, I tackled how I intend to get the temp probe connected to the filter piping. I was able to cobble together a 3/4 x 3/4 x 1/2 pvc fitting, with the 1/2 side being threaded









I then drilled out the middle of a 1/2 threaded cap and tapped the hole









After tapping the hole and using some teflon tape and an added o-ring, I was able to get the PG-7 cable gland to thread into the cap. Now the temp probe is sitting right in the middle of the 90, which will be coming out of my cerges reactor


----------



## JoeFL77 (Sep 18, 2013)

Dear Chiefston, 
do you have a schematic and parts list for the main part of this. I have looked at the sketch and can figure out some. It would save me a tremendous amount of time and trying to figure out things that above my level. Your design looks like it is the perfect prototype for a fresh water planted tank. The code looks well structured and commented.
Thanks,
Joe


----------



## Chiefston (Dec 25, 2011)

Hey Joe, I can post up the final code later tonight. It is rather messy, as I am not a professional programmer. I will also try and get a parts list out together for ya as well. Thanks for your interest!


Sent from my iPhone using Tapatalk


----------



## Whiskey (Feb 15, 2005)

This is a REALLY nice project! My Arduino controllers are much simpler, and one major upgrade I'm looking to do to them is add a menu but I must admit I'm a little lost. I'll definitely be looking at your code for some ideas 

Thank you!
Whiskey


----------



## Chiefston (Dec 25, 2011)

*Code*

Ok, here is my final code. I THINK i have all the bugs worked out. It can get rather messy, especially when setting the aux lights. It kinda grew organically as I went. If you have questions, fire away!

http://s000.tinyupload.com/index.php?file_id=61684929673841655159


----------



## Cyanider (Mar 1, 2013)

Awesome journal. I'm actually getting parts together to build a similar system. Can't wait to see the final product all boxed up!


----------



## JoeFL77 (Sep 18, 2013)

Thanks for code so quickly. It is a large project that looks great. It is like old times. I got a Comp Sci degree in 79. I did a little programming but am a professional pilot to pay the bills. 

When I say like old times, I will be printing out the 60+ pages like I used to do. Trying to figure out what it is doing. I love to tinker with things and making a computer control 
makes it so much fun.

I bought a leaking 120 gallon aquarium and am resealing it. Making a LED light and want to control everything with the Arduino. You have no idea how great your project is. Getting that amount of code to work is quite an accomplishment.

Got to finish the tree trimming and other projects so I can concentrate on this!

Thanks,
Joe


----------



## Chiefston (Dec 25, 2011)

Thank you for the kind words Joe! I commented the heck out of the program, so hopefully that'll help you follow along. Lemme know whatcha think when you get done looking it over 


Sent from my iPhone using Tapatalk


----------



## Fluffles (Jul 12, 2012)

This is looking great!
Thanks for sharing the code.

EDIT: Quick question. You use millis() at times to check for updates in your program. Have you considered the case when millis() overflows and restarts at 0? It does take 49 days to overflow, but might be worth considering!


----------



## Chiefston (Dec 25, 2011)

Fluffles,
I did look into that. With the changes in Arduino 1.0, when they made the millis() an unsigned long, as long as you subtract the previous millis from the current millis, the math works out so that you need not worry about rollover. Or at least thats what I've gathered from reading some posts. I am not entirely positive about that, but thats my understanding

edit: Here is a link explaining. There are many articles explaining this in excruciating detail if you care to read
Working with arduino millis (Easy)
Arduino playground explanation in excruciating detail


----------



## mistergreen (Dec 9, 2006)

[strike]Are there any devices for the aquarium that uses the Analog write pins?[/strike]
OOps, nevermind. Analog write is pwm.

I can see a sensor using analog read.

I'm building a controller myself using the arduino but web based.


----------



## Fluffles (Jul 12, 2012)

Chiefston said:


> Fluffles,
> I did look into that. With the changes in Arduino 1.0, when they made the millis() an unsigned long, as long as you subtract the previous millis from the current millis, the math works out so that you need not worry about rollover. Or at least thats what I've gathered from reading some posts. I am not entirely positive about that, but thats my understanding
> 
> edit: Here is a link explaining. There are many articles explaining this in excruciating detail if you care to read
> ...


Wow, thank you! I didn't know that unsigned long would take care of it. Seems like a very easy and elegant solution to the rollover.


----------



## Chiefston (Dec 25, 2011)

*Box updates*

So, I've been working on the project box. I have everything drilled out now, which makes me pretty happy! Now I need to start the final wiring

Top of the box. I have a hole cutout for the fan, which is blowing air out, and the speaker grill which i just drilled a ton of holes for










The front of the box. Here are the pumps and some DIN connectors. The DIN connectors have 5 wires a piece, as well as a gnd if you wanted to use that. 15 connections should be enough for what I'm doing










Here is the USB extension, in case I need to fix some code or add something to it









And the inside of the box as stands. I still need to place the arduino, motor shield, and the perf board in there, but it should all fit easily.


----------



## Chiefston (Dec 25, 2011)

*More build pics*

So, I have the 120v wiring done, and everything has been test fitted. Here are some more build pics for you guys.

Close-up of the back of the plugs. All the neutral and ground wires are ran together in parallel. The hot wire goes from the inlet plug, to the SSR's, and then back to the outlet plug hot terminals.











Here I have the fan and speaker mounted. You can see the DIN connectors up top, ready to be soldered to.










Here is a closeup of the SSR's. I have one side of the 120v all tied together to the main hot, then the other side of them goes to the outlet plugs. These SSR's are entirely overkill, they are 220v/25A. The most power I will be drawing is from the 200W Hydor heater, and at 120v that only pulls 1.67A. The Finnex Ray 2's are 20W lights, which pull .67A. The Eheim 2217 is also 20W, and pulls the same. The CO2 solenoid is so weak, it doesn't even manage to pull the minimum required current to make the SSR work properly! I tested it out, and it sure enough, it did not work  Instead it gets a reed relay from RadioShack. 










And finally, everythings final resting place. The perf board will get many more things added to it. It needs the relay for the CO2, the resistor for the thermistor, two potentiometers (one for the speaker volume, one for the LCD contrast), and a transistor to control the LCD backlight with PWM.










After this is completed, then I get to cut a hole in my stand. I am very worried that I will screw up making the hole for the display...


----------



## JoeFL77 (Sep 18, 2013)

There are many ways to cut a square hole in wood. You may want to practice on a piece of scrap. A router pattern cutting bit works well. A full size router may be too big but a 1/4 trim router is very easy to handle. Harbor Freight sells them very cheap. 

I had tried a saber saw to cut the pattern or hole out, but could never cut an absolutely straight line. My solution was to cut rectangles of thin wood on a table saw to make a pattern. Then I would run the router base or pattern bit along the straight wood.

Hope this helps,
Joe


----------



## Chiefston (Dec 25, 2011)

*Update*

Joe,
I have a dremel with the router attachment... It has a straight edge guide, so thats what I'll be using! Hopefully I don't ruin the cabinet, or make it look awful. My woodworking skills are terrible enough as is, that I dont need obvious screw-ups making things worse :icon_neut

I did get some more wiring done today. Wiring this thing is rather tedious... It was much easier just plugging stuff into the breadboard. Oh well, it'll be worth it when I'm done


----------



## GraphicGr8s (Apr 4, 2011)

Sweet.

You do have separate misspelled however


----------



## Chiefston (Dec 25, 2011)

*My big screwup*

So, I made a pretty huge mistake. 
The way I built the box, with the plugs on the long side, leaves no room for the plugs to fit! When I mount the box inside the stand, there isn't enough room on the front and back to for the plugs in the back, and the din connectors in the front! I'm not really sure how I'm gonna go about getting around this. I could just cut holes in the back of the stand for the plugs to feed through, but then that still leaves the front of the box to shallow for the din connectors! I am very very disappointed in my gross oversight on this matter


----------



## mistergreen (Dec 9, 2006)

Yeah, I have no idea where I'd put my box either. I built a drawers for fert and fish food. I could clear that out. 

Whats the din connector for? I'm planning to use Ethernet rj connectors. Those wires can bend easily in tight spaces.


Sent from my iPad using Tapatalk HD


----------



## Chiefston (Dec 25, 2011)

mistergreen,
Ethernet connectors would work great for connecting the LCD display, I wish I would've thought of that! The RGB strips can pull up to 2.4 amps when using four 24" strips, if all of 3 colors are on full brightness. Even though I won't be keeping the strips on full blast, I don't want to risk melting wires.

I guess since the project enclosure box won't be seen, I can cut new holes for the outlets on the bottom, and I will just have huge holes in the back where they used to be. It will be ugly, but I think it will work. I'm not too enthused about ordering a new box and starting over...


----------



## Chiefston (Dec 25, 2011)

*Stand work*

Ok, so I attempted to salvage the project enclosure, but I eventually gave up and ordered a new box. I am SO angry with myself for not taking the time to check out obvious fit issues. :angryfire It is just a painful lesson learned. Always take your time and do things right the first time!!

So, after pouting about that for awhile, I went ahead and tackled the cutout for the stand. All in all, I think I did pretty well for only having a Dremel tool to work with! Heres the final result:









And with the backlight off:









I ended up putting some window tint on the back of the window, which makes the window look nice, however it really dims down the LCD. It's not obvious in the pic, but you can see the overexposure above the stand. I think I will keep the tint on, but it may get taken off or replaced with some less dark tint in the future.


And heres some pics I took while working on it


----------



## Whiskey (Feb 15, 2005)

That's really cool! This is exactly what I plan on doing with my display. I'm happy to see it looks as good as I imagined it would!!!

What dremel attachment did you use to route out the area for the glass insert? Do they make a plunge router attachment?

Whiskey


----------



## Chiefston (Dec 25, 2011)

Whiskey,
Yes, I used the plunge router attachment. I cut the hole for the LCD first, then used a 1/4" router bit set to the depth of the plexiglass. The plexi was 1/8" thick, and I set my router just a hair shallow of that. The Dremel plunge router isn't the greatest tool in the world, as there is a lot of play in it. However, it was great enough to get the job done. It just required a lot of patience and going slow. I had to re-rout the lip for the plexiglass like 3 times to get the depth right.
Also, I used 50% tint for the window, and I feel that is probably too dark. I would go with something a little less dark if you choose to go that route


----------



## Whiskey (Feb 15, 2005)

I just ordered the plunge router attachment and some bits! I am going to get a ton of use out of this little thing I think. I regularly have to spend way too much time doing something by hand that a little router would make a breeze.

Thanks,
Whiskey


----------



## Chiefston (Dec 25, 2011)

Nice whiskey. The little dremel that could! I have competed quite a few projects with just a dremel and a handful of attachments. Good luck with it 


Sent from my iPhone using Tapatalk


----------



## Chiefston (Dec 25, 2011)

*Light done*

So, I finished the light mod today. I did what AnotherHobby did almost exactly. The only difference is he used c-channel for the sides, and I used L-bracket. It ended up working very well, the sides now help keep the light spread from being annoying when sitting in the room. The light is directed downward much better now. Heres the pics of mine:

Light and stand with light turned off









With light turned on:









The underside where I made screwed the 1.5" aluminum piece to the legs:









And above that:










It took me about 3 hours to get it done. I had to use 3/8" rubber weatherstripping between the aluminum and the light to prevent light from leaking through. It sandwiched in there pretty well, it isn't very noticeable at all

Here's the link to AnotherHobbys mod: Fallen Tree Branch 60cm pg. 10


----------



## Chiefston (Dec 25, 2011)

*Update*

So, I thought going in, that the wiring part would be fairly easy and straightforward. In actuality, the wiring part may have taken the longest of all! I attempted to keep my wires in check, but it didn't turn out quite as neat as I'd like. Oh well, I am almost done with the box. I have to attach the dosing pumps, and I will be finished with the project enclosure! I am going on vacation for the rest of the week, so I am hoping to have this all done and ready for planting next weekend 
Heres some build pics:


----------



## ctaylor3737 (Nov 14, 2013)

Awesome, build man. One day I'll build one of these. Hide all my equipment and focus on the scape more

-Chris


----------



## Chiefston (Dec 25, 2011)

Thanks Chris! It has been a much bigger endeavor than I anticipated. I have learned a ton during the build though, and it has been fun. 


Sent from my iPhone using Tapatalk


----------



## Bryanmc1988 (Apr 3, 2012)

is there a arduino script you can provide? i would like to build one of this myself but not sure where to begin i can look over the script and see if i can edit or change a few things to get it to work for what i need it too... great project tho


----------



## Chiefston (Dec 25, 2011)

Bryan, I posted the code earlier in the thread. Feel free to download it and tweak it as you see fit


Sent from my iPhone using Tapatalk


----------



## Bryanmc1988 (Apr 3, 2012)

ok i see it now lol skimming and passed it the first time xD thanks i will take a look into the code and see what its using and how it operates


----------



## Fluffles (Jul 12, 2012)

Hi Chad,
Just wanted to say I've been following your build with a lot of interest.
Your code has helped me out a *tonne *to figure out some sequences for my own controller.
Please keep posting updates. I'd love to see the final version of your controller up and running!
Good luck with the wiring! (zip ties are your best friends)


----------



## Chiefston (Dec 25, 2011)

*Issues*

Thanks for the kind words fluffles.

I have the project far enough along to begin final testing, and I seem to have run into a snag. I had planned on using the capacitive buttons, thus keeping the front of my stand clean (plus adding a little cool factor :icon_cool)
However, it seems that there is too much noise going on inside my project box, as the buttons keep hitting themselves repeatedly. The breakout board I bought from adafruit has a self-calibration feature, and it seems that the board keeps self calibrating itself too sensitive, and the buttons just go nuts. I'm not sure how to fix this, however if I can't find a solution I will just use regular old tact switches, and that will make me sad.


----------



## bigd603 (May 10, 2011)

Have you tried posting your issue on the Adafruit forums? They are super helpful, and a lot of times you will receive responses from their engineers. 

Sent from my Galaxy Nexus using Tapatalk


----------



## Chiefston (Dec 25, 2011)

BigD, I did post a help thread on Adafruit, and they were very responsive and helpful. Looks like I will be relocating the capacitive board outside the project enclosure and just running the data wires back to the box. This should eliminate the problems I am having. It just so happened that while I was troubleshooting, I made a separate board just for the touch sensor, so that board will go right next to the buttons on the inside of my stand.
Here is my help thread:
Adafruit help forum

And here is the new board I made that I will be relocating outside the box


----------



## Chiefston (Dec 25, 2011)

*Working!*

Ok, I finally have everything working like its supposed to  I had to relocate the capacitance sensor board to the inside of my stand, but once I did that, it worked like a charm. I am using 1.5" x 1.5" copper clad board as my sensors, right now they're just taped to the inside. However, even as-is, they are sensing through 3/4" plywood. I am sure once they are securely screwed down they will work even better. Right now they work great, but only within a tight area.

Here's a pic from inside the stand, facing outward. You can see the LCD glowing on the right hand side:









I also made a quick video after I got the project working. It is kinda crap, as I took it quickly with an Iphone :icon_redf

Project Demo

So, the plan is to have the plumbing done, and plants ordered this weekend!!! As I live in Phoenix, I'm hoping that Arizona Aquatic Gardens is open for walk-ins, as they are only an hour drive away. 

Stay tuned for more pics as things end up in their final resting places!


----------



## bigd603 (May 10, 2011)

All I have to say is...holy crap that is awesome! I love the invisible buttons! Looks like Adafruits gonna get some more of my money today. 

Sent from my Galaxy Nexus using Tapatalk


----------



## Chiefston (Dec 25, 2011)

*Ideas?*

So, I'm having some issues trying to figure out how I'm going to plumb the dosing pumps into the filter hose lines.... The peristaltic pump tubing is 3/16" OD, which can be fit inside standard airline tubing, which is 5/32" ID. Then that leaves me with 1/4" OD tubing. I can get the standard press fittings, however I am somewhat nervous about using those, as I feel they may leak. However, finding barbed fittings for 1/4" OD tubing seems very difficult. I am lead to believe that airline tubing is 1/4" OD, 5/32" ID.
Any ideas here?


----------



## Chiefston (Dec 25, 2011)

*Box done*

Here some pics of the box in its final form. There are a couple code changes I wanna make, now that I've had it running for a little bit. But the physical box is now complete!! Now just to figure out the plumbing situation....

Bottom. I drilled out the group of holes under the USB port for ventilation. The cheap-o box didn't really like having so many holes drilled so close together, and kinda splintered some.










Left side. The DIN connectors from left to right are: RGB lights; Buttons and temp sensor; LCD; LCD. The LCD takes 10 wires by itself.










Front. The red button on the right is wired to reset. It has come in handy as I troubleshot problems when moving from the breadboard to the box. I def recommend adding one to your box if you decide to make your own controller!










Right side. Self explanatory. Three dosing pumps, the #1 reason I built this thing! The tubing is 3/16" OD silicon tubing, which is not easy to find fittings for. Airline tubing fits pretty well over it, but I'm not to confident in that holding for extended periods of time. usplastics.com isn't the easiest site to browse, but I think they may have some sort of adapter to take this tubing to 1/4", which would make everything much much easier


----------



## Chiefston (Dec 25, 2011)

*Chemical injection*

So, after a couple trips to Ace, I got some good advice from one of the guys there. Instead of trying to cobble together a bunch of fittings, why not just use the same idea as the CO2 into the cerges reactor? So, I simply drilled a 3/16" hole in a 1/2" PVC plug, and pulled some air line tubing through. Add a couple check valves, and now my dosing pumps can pump into the filter line after the cerges reactor.


----------



## sketch804 (Mar 2, 2011)

Great project you have going on here! I would like to do something similar. Definitely following.


----------



## Chiefston (Dec 25, 2011)

Thanks sketch! It has been a very long journey. I have everything hooked up now, however since I mounted my project box, it is now in close proximity to the capacitance sensor, and I am getting the ghost readings again :icon_frow So now I will have to move the sensor board again... Oh well. In better news, the tank is being put back together. Since I intend to have such a pronounced slope, I am going to use egg crate under the substrate to help with erosion. Work has begun on that part, and I intend to flood the tank sometime this week

Underneath the tank. Still a little messy, but I'll do some cable management down there soon.











Closeup of the chemical injection port. I drilled a 3/16" hole in a PVC cap and pulled some air line tubing through. There is a check valve just outside of it. I have two lines running into the top cap, as I didn't really have room for another PVC "T" fitting. I will run micros into the single port, and macros into the T fitting to keep them from mixing and precipitating. I also was able to calibrate the pumps today. 











Shot of the tank with the egg crate being built. I need a couple more levels of the crate and then I start scaping!


----------



## redfire123au (Jan 26, 2014)

G'day was wondering if you could re upload the Arduino code?


----------



## PhysicsDude55 (Oct 24, 2011)

Very cool build. Nice use of an arduino.


----------



## Chiefston (Dec 25, 2011)

Heres a new link for the code. Mind you, its rather messy...

https://www.dropbox.com/s/9sjpbdw5ih743q4/LCD_and_RTC.ino?dl=0


----------



## kman (Dec 11, 2013)

Been quiet... how's it all working?


----------



## Notorious93 (Jun 3, 2013)

mind if i steal your inline dosing invention? lolol it was exactly what i was looking for


----------



## Chiefston (Dec 25, 2011)

Notorious, I'm glad my posts have helped someone! I haven't had any problems with my dosing setup since I started using it. I have mL markings on my bottles, and it's been injecting 15mL rock solid since the initial calibration.

kman, I'll have to get some new pics up soon. I replaced the Ray2 with a Ecoxotic E-series recently, as my previous RGB led setup was not built to withstand the test of time. Been looking at AnotherHobbys setup, and have to reprogram my controller to use those IR codes.

Thanks for the interest!


----------



## Notorious93 (Jun 3, 2013)

im making my version slightly more compact, and using quick connect adapters to connect the dosing line so its much more convenient. if i decide to add an ATO i might add a third line for it and see how if it works

and this gave me an idea to do an inline water changer if the inline ATO works


----------



## Dead2fall (Jun 4, 2014)

Chiefston said:


> hamato, I went ahead and ordered the ds18b20 myself. I looked it up, and there seems to be a one-wire library that is available for it, and it seems pretty easy to use. I am thinking that I will keep the thermistor, and use it to regulate the temperature inside the project box via a 12v computer fan.
> 
> I made quite a bit of headway in the programming today. I now have the RGB strip lights working, and have the ability to program the light timers and RGB values for morning, daytime, evening, and moonlight. I was also able to get the capacitive sensing working and tested. It appears that I will be able to use the capacitive buttons through the 3/4" plywood of my stand. This makes me happy, as I no longer need to figure out a way to have buttons unobtrusively stick out of my stand
> 
> ...


What capacitive buttons are you using? I'm thinking of setting up some controls like this myself. Was curious about them.


----------



## mrpreston (Dec 18, 2013)

Wow Chiefston, great job here, i decided to grab a mega and started getting to work replicating this project as it is what i was envisioning myself anyways and had all the other parts(code from post 66). I have the code uploaded along with connecting the rtc, lcd, DS3231 and some buttons, the problem i am having atm is setting the fert levels and testing out that part of the code. I am able to get to pump settings 1 2 and 3 then the problem starts, i can set ml amts for pump 1 ONLY, and on top of that no amts are showing when i return to home screen, and this is where i get stuck..

Hopefully this message reaches you or anyone else that has used this sketch, any help would be greatly appreciated, thanks,
Matt


----------



## ichy (Apr 6, 2015)

what a project! Nice work!


----------



## jbullfrog (Apr 24, 2015)

Quite impressive. That takes quite a bit of research to get everything wired safely in addition to learning how to code the Arduino. Nice code by the way! I only looked at the most recent upload but its very clear and easy to follow from what I skimmed of it. That, after all, is all that matters after functionality! 
I was wondering something though. Sorry if you answered it already but you have a lot of power going into the box and I was wondering how you delivered power to the lights, filter, heater, pumps, co2, etc. Are you using the 12V power supply to power all of these parts?


----------

