Chads Arduino Build - Page 2
Planted Tank Forums
Your Tanks Image Hosting *Tank Tracker * Plant Profiles Fish Profiles Planted Tank Guide Photo Gallery Articles

Go Back   The Planted Tank Forum > Specific Aspects of a Planted Tank > DIY


Reply
 
Thread Tools Display Modes
Old 03-04-2014, 04:35 AM   #16
Chiefston
Algae Grower
 
Chiefston's Avatar
 
PTrader: (1/100%)
Join Date: Dec 2011
Location: Tempe, AZ
Posts: 132
Default

Chads Arduino Build


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


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.
Chiefston is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old 03-04-2014, 04:37 AM   #17
shift
Wannabe Guru
 
PTrader: (0/0%)
Join Date: Jan 2013
Location: Kelowna
Posts: 1,669
Default

Looks like you are off to a good start! i like how you are hiding the sensor inside
__________________
84G - The Osaka Forest
12G Fluval Edge - Celestial pearl Danios, Boraras urophthalmoides & PFR shrimp
5.5G Fluval Chi - Pumpkin shrimplets
10G - CRS/CBS
10G - Red Rilli's
10G - Yellow shrimp
shift is offline   Reply With Quote
Old 03-04-2014, 04:42 AM   #18
Chiefston
Algae Grower
 
Chiefston's Avatar
 
PTrader: (1/100%)
Join Date: Dec 2011
Location: Tempe, AZ
Posts: 132
Default 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!!!
Chiefston is offline   Reply With Quote
Old 03-04-2014, 04:46 AM   #19
shift
Wannabe Guru
 
PTrader: (0/0%)
Join Date: Jan 2013
Location: Kelowna
Posts: 1,669
Default

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.
__________________
84G - The Osaka Forest
12G Fluval Edge - Celestial pearl Danios, Boraras urophthalmoides & PFR shrimp
5.5G Fluval Chi - Pumpkin shrimplets
10G - CRS/CBS
10G - Red Rilli's
10G - Yellow shrimp
shift is offline   Reply With Quote
Old 03-04-2014, 04:54 AM   #20
Chiefston
Algae Grower
 
Chiefston's Avatar
 
PTrader: (1/100%)
Join Date: Dec 2011
Location: Tempe, AZ
Posts: 132
Default 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
Chiefston is offline   Reply With Quote
Old 03-06-2014, 12:23 AM   #21
Chiefston
Algae Grower
 
Chiefston's Avatar
 
PTrader: (1/100%)
Join Date: Dec 2011
Location: Tempe, AZ
Posts: 132
Default 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



Chiefston is offline   Reply With Quote
Old 03-06-2014, 08:05 PM   #22
JoeFL77
Algae Grower
 
PTrader: (0/0%)
Join Date: Sep 2013
Location: Melbourne, FL
Posts: 11
Default

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
__________________
Repairing 120XH, building a LED light
JoeFL77 is offline   Reply With Quote
Old 03-06-2014, 09:07 PM   #23
Chiefston
Algae Grower
 
Chiefston's Avatar
 
PTrader: (1/100%)
Join Date: Dec 2011
Location: Tempe, AZ
Posts: 132
Default

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
Chiefston is offline   Reply With Quote
Old 03-06-2014, 09:20 PM   #24
Whiskey
Planted Tank Enthusiast
 
Whiskey's Avatar
 
PTrader: (1/100%)
Join Date: Feb 2005
Location: Vista, CA
Posts: 561
Default

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
__________________
Current work in progress:
10G Arduino Controlled CRS Playground
Whiskey is offline   Reply With Quote
Old 03-06-2014, 11:46 PM   #25
Chiefston
Algae Grower
 
Chiefston's Avatar
 
PTrader: (1/100%)
Join Date: Dec 2011
Location: Tempe, AZ
Posts: 132
Default 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...29673841655159
Chiefston is offline   Reply With Quote
Old 03-07-2014, 12:12 AM   #26
Cyanider
Planted Tank Enthusiast
 
PTrader: (11/100%)
Join Date: Mar 2013
Location: Baltimore, Maryland
Posts: 517
Default

Awesome journal. I'm actually getting parts together to build a similar system. Can't wait to see the final product all boxed up!
__________________
Josh
---
46G Bowfront | Mini-M
Cyanider is online now   Reply With Quote
Old 03-07-2014, 12:36 AM   #27
JoeFL77
Algae Grower
 
PTrader: (0/0%)
Join Date: Sep 2013
Location: Melbourne, FL
Posts: 11
Default

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
__________________
Repairing 120XH, building a LED light
JoeFL77 is offline   Reply With Quote
Old 03-07-2014, 12:49 AM   #28
Chiefston
Algae Grower
 
Chiefston's Avatar
 
PTrader: (1/100%)
Join Date: Dec 2011
Location: Tempe, AZ
Posts: 132
Default

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
Chiefston is offline   Reply With Quote
Old 03-07-2014, 12:49 AM   #29
Fluffles
Algae Grower
 
PTrader: (1/100%)
Join Date: Jul 2012
Location: Canada
Posts: 38
Default

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!

Last edited by Fluffles; 03-07-2014 at 01:03 AM.. Reason: asdf
Fluffles is offline   Reply With Quote
Old 03-07-2014, 01:50 AM   #30
Chiefston
Algae Grower
 
Chiefston's Avatar
 
PTrader: (1/100%)
Join Date: Dec 2011
Location: Tempe, AZ
Posts: 132
Default

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

Last edited by Chiefston; 03-07-2014 at 05:01 AM.. Reason: Edit to add link to explanation
Chiefston is offline   Reply With Quote
Reply

Tags
arduino, controller

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:22 PM.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright Planted Tank LLC 2012