|
11/07/2013, 02:13 PM | #1 |
Registered Member
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
|
Arduino Aquarium Controller
I thought i would share what i have going so far for my aquarium. A few months back i purchased a 90 gallon tank with built in over flow. Since then i have been working on building the stand, canopy, and sump. Most of it is complete, i have been working with arduino and web server to setup the automation and control processes of the tank. Here is what i have so far...
http://www.rareglitch.net/overview.htm Lets not try to break it or guess the password =) So currently i have: -automated control for the heater, with set point of 77.80 decreasing, resets at 78.20. -auto top off via a solenoid and ultrasonic range finder. -automated lights that get brighter/dimmer depending on the schedule i have set. -cooling fans for LEDs will kick on at 85 and off at 80. -ph probe i am able to track and trend whatever i want on the web site.i am also able to control every process after inputting a password. A quick explanation of how it works: Inputs are provided to the arduino which processes the data and provides any outputs(relays,solenoids). The inputs/outputs are also sent to the web server via HTML get requests. The server process any incoming data with a php script and stores the data in a mysql database. The overview page pulls the data from the database and is displayed in tables and charts(charts from highcarts.com) If anyone would like any more info or would like to see some code then let me know! i have had blast designing and building everything and cant wait to start filling up the tank/sump. |
11/11/2013, 09:36 AM | #2 |
Registered Member
Join Date: Oct 2013
Posts: 43
|
Oh! Oh! More info, please!!
|
11/15/2013, 10:36 PM | #3 |
Head zoo keeper
Join Date: Nov 2005
Location: Toledo ,Ohio
Posts: 710
|
wow looks great would you share the code that makes all that happen for the website and the arduino
|
11/18/2013, 04:14 PM | #4 |
Registered Member
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
|
here is the arduino code... i have added a blocked=) to areas that i thought may compromise security of my fish tank. there are still plenty of ideas i'd like to add/fix, but here is what i have so far.
PHP Code:
|
11/19/2013, 08:58 PM | #5 |
Head zoo keeper
Join Date: Nov 2005
Location: Toledo ,Ohio
Posts: 710
|
would you please share the html files?? or email them to me I would like to start using this very soon
|
11/19/2013, 09:01 PM | #6 |
Head zoo keeper
Join Date: Nov 2005
Location: Toledo ,Ohio
Posts: 710
|
you replaced your local ip and password with blocked=) did you also replace a FQDN also with blocked=)
|
11/19/2013, 09:54 PM | #7 |
Registered Member
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
|
i don't believe i replaced a FQDN with blocked... I block out some URLs for the get requests. Showing the way i have the get request set up for the trender function would allow anyone to insert data into my data tables. I'm sure what i have going is not very secure but seems to be ok so far... I am going to add interlocks so that if someone was able to gain access they wouldn't be able to do much. I just hard code it so that the sump level will never drain below x inches, or fill over x inches. same with heater, and lighting. So the main page is generated from a couple of php files and javascript for the charts.AJAX makes server calls to update the server without refreshing. here are some example links of how i get the tables:
http://www.rareglitch.net/getTables.php?tables=TEMP_% http://www.rareglitch.net/getTables.php?tables=LED_% http://www.rareglitch.net/getTables.php?tables=LEVEL_% if you guys know of,or find any vulnerabilities id hope you would let me know =). i hope my code will help, and i will try to answer any questions. I am no web developer, i just took the time to learn and understand what to do and piece it all together. as far as charting please see http://www.highcharts.com/. i used the highstock for plotting my points. It needs a json output to load the points. here is the json output of the temp_return table: http://www.rareglitch.net/get_json.p...le=TEMP_RETURN php file to generate the tables and format the table names and data to be more appealing: PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
11/20/2013, 06:04 PM | #8 |
Head zoo keeper
Join Date: Nov 2005
Location: Toledo ,Ohio
Posts: 710
|
I all ready have a machine setup with wamp for internal use so that should work
|
11/22/2013, 03:10 PM | #9 |
Head zoo keeper
Join Date: Nov 2005
Location: Toledo ,Ohio
Posts: 710
|
Anytime your ready I can be
|
12/03/2013, 03:22 PM | #10 |
Registered Member
Join Date: Nov 2011
Posts: 67
|
Joopie, thanks for sharing your code and actual internet view of your program! It has given me a lot of ideas for my new project!
__________________
Mike 40L Reef Tank, 10 Gallon Nano, 5 Gallon Pico |
12/06/2013, 02:06 PM | #11 |
Registered Member
Join Date: May 2004
Posts: 70
|
Wow, this is awesome! Thanks for sharing!
Glancing at your code, it seems that you are using an analog output instead of PWM. Is that correct? If so, what is the max output voltage, and what drivers are you using with it? Also, which Arduino board are you using? |
12/06/2013, 05:50 PM | #12 |
Registered Member
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
|
I'm using an arduino mega. The analogwrite is outputing a 0-5v pwm, see http://arduino.cc/en/Reference/analogWrite
im using a transistor and seperate 10v power source to up it to 0-10v pwm. here is a good example:http://arduino-for-beginners.blogspo...-with-pwm.html the led drivers i have are the Mean Well ELN-60-48P dimmable driver: http://www.rapidled.com/mean-well-el...mmable-driver/ they are nice but they cut out at ~15%, so i recommend going with the Mean Well ELN-60-48D dimmable driver that cut out around 5%. |
12/06/2013, 08:24 PM | #13 |
Registered Member
Join Date: May 2004
Posts: 70
|
Good to know. I'm planning to use the LDD-L drivers, which allow a 0~2.5V analog input for dimming OR a 0~2.6+V PWM input. When using the analog dimming mode, the LED's dim range is something like 20%-100%, so thinking about using PWM for the high power LED strings, and analog for the low power LED strings.
|
12/14/2013, 01:33 AM | #14 |
Registered Member
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
|
Updated site so that each column header is a link to that data points chart.Charts with a lot of data points may take a awhile to load.
http://www.rareglitch.net/overview.htm Also check out my "mobile" version of the site(no charts). http://www.rareglitch.net/lite.htm |
12/18/2013, 01:35 PM | #15 |
Head zoo keeper
Join Date: Nov 2005
Location: Toledo ,Ohio
Posts: 710
|
wow that is very nice took a few minutes to load but I did like it
|
12/18/2013, 04:43 PM | #16 |
Registered Member
Join Date: May 2004
Posts: 70
|
|
12/18/2013, 08:30 PM | #17 |
Registered Member
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
|
I'm sure there is a better way but this works well for me since i'm usually loading the site off the lan.
|
12/25/2013, 10:37 PM | #18 |
Head zoo keeper
Join Date: Nov 2005
Location: Toledo ,Ohio
Posts: 710
|
joopie merry christmas
|
12/31/2013, 09:17 PM | #19 |
Registered Member
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
|
So i got a new toy for Christmas, you can see it in action at http://www.rareglitch.net/overview.htm or http://www.rareglitch.net/fishcam.htm
May not work for older IE browsers. recommend chrome or firefox. |
12/31/2013, 10:13 PM | #20 |
Registered Member
Join Date: Oct 2006
Location: Fort Worth, TX
Posts: 43
|
joopie can you provide a parts list? This I love the added video feed!
|
01/01/2014, 07:45 AM | #21 |
Registered Member
Join Date: Nov 2013
Location: Louisville,Kentucky
Posts: 1,208
|
Looks like your fish cam is knocked out of view. I have to straight web cams at work all the time for monitoring production in a factory.
|
01/01/2014, 10:04 AM | #22 |
Registered Member
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
|
yeah seems to reset after awhile. i think i fixed it, now it should look at the tank when it boots up.
|
01/01/2014, 01:09 PM | #23 |
Registered Member
Join Date: Nov 2013
Location: Louisville,Kentucky
Posts: 1,208
|
Love the wrasse swimming up down the one side.
|
01/05/2014, 01:49 PM | #24 |
Registered Member
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
|
So the camera thing is cool but the wife doesn't like random people looking into our fish tank, and possibly whatever is reflected off the glass lol. so that wont be on there anymore.
|
01/05/2014, 02:06 PM | #25 | |
Registered Member
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
|
Quote:
https://www.sparkfun.com/products/11061 Ethernet Shield to talk with database and time keeping: http://yourduino.com/sunshop2/index....t_detail&p=291 Temperature Sensors DS18b20(7 in use): http://www.amazon.com/DS18b20-Waterp...erature+sensor LED 90g Dimmable Solderless Kit: http://www.rapidled.com/standard-sol...-dimmable-kit/ Opto-Isolated 2 Channel Relays for fans,heater and water change pump: http://yourduino.com/sunshop2/index....t_detail&p=218 Power strip with above relays mounted inside to control outlets: http://www.amazon.com/Technical-Pro-...dj+power+strip Solenoids for auto top off, draining, water changes: http://www.adafruit.com/products/996 I do have some flow meters installed but not in use: http://www.adafruit.com/products/828 Ultrasonic range finder for sump level: http://yourduino.com/sunshop2/index....t_detail&p=115 A PC for web server running Ubuntu and LAMPP. I also use this computers power supply to power the relays and solenoids. I think that pretty much covers the arduino electronics. |
|
Tags |
aquarium, arduino, automation, control |
|
|