Reef Central Online Community

Go Back   Reef Central Online Community > General Interest Forums > Do It Yourself > The R3CA Project
Blogs FAQ Calendar Mark Forums Read

Notices

User Tag List

Reply
Thread Tools
Unread 01/06/2014, 08:28 PM   #26
dre7606
Registered Member
 
dre7606's Avatar
 
Join Date: Oct 2006
Location: Fort Worth, TX
Posts: 43
Thanks Joopie!!


dre7606 is offline   Reply With Quote
Unread 01/06/2014, 09:11 PM   #27
tidalwave1
Registered Member
 
tidalwave1's Avatar
 
Join Date: Sep 2013
Location: Port St. Lucie, FL
Posts: 62
Joopie I am going to order rapid LEDs and I was thinking about building an arduino controller. Can I use the 1-10v drivers with an arduino controller or do I have to order the pwm drivers? The reason i am asking is because I was going to use the analog dimmers in the beginning and build the controller later.


tidalwave1 is offline   Reply With Quote
Unread 01/07/2014, 03:44 PM   #28
joopie
Registered Member
 
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
Quote:
Originally Posted by tidalwave1 View Post
Joopie I am going to order rapid LEDs and I was thinking about building an arduino controller. Can I use the 1-10v drivers with an arduino controller or do I have to order the pwm drivers? The reason i am asking is because I was going to use the analog dimmers in the beginning and build the controller later.
yep you sure can do a 0-10v output, just google for some examples.I would have gone with the analog dimmers if i saw the 15% cutoff on the pwm ones before i bought the kit.


joopie is offline   Reply With Quote
Unread 01/21/2014, 09:49 PM   #29
Yunghov
Registered Member
 
Join Date: Jan 2014
Posts: 17
Hi there, new to the DIY fish projects and ardiuno and this forum. Couple ?s if you don't mind. Y use the mega over the uno, as I have the uno. Can I use my uno. Is it possible to provide a wiring diagram because I want to use the temp sensor control led lights white and blue and provide a storm if that is possible. Thanks in advance.


Yunghov is offline   Reply With Quote
Unread 01/29/2014, 07:26 PM   #30
gam3ovr
Registered Member
 
gam3ovr's Avatar
 
Join Date: Dec 2013
Posts: 90
Very cool stuff - wish I had the know-how to mess with this!


gam3ovr is offline   Reply With Quote
Unread 02/07/2014, 12:43 AM   #31
dre7606
Registered Member
 
dre7606's Avatar
 
Join Date: Oct 2006
Location: Fort Worth, TX
Posts: 43
Joopie i have a couple of questions. Is the arduino sending all it data to the mysql database and then the website is retrieving it data from the database and then the refresh is doing another database query to pull the latest data? Also are you able to manually control the lights once you are on the password protected part of your site. Thanks for sharing.


dre7606 is offline   Reply With Quote
Unread 02/07/2014, 05:57 AM   #32
joopie
Registered Member
 
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
yep that's exactly whats going on. Once i put the password in, the slots with "Disabled" will show a combo box/number box that lets me select what i want it to do. i can set the % brightness for blue/white LEDs then put LED mode to On and it will set them to that.


joopie is offline   Reply With Quote
Unread 02/07/2014, 01:54 PM   #33
clay12340
Registered Member
 
Join Date: Dec 2013
Location: Bloomington, Indiana
Posts: 312
Could you explain how the ultrasonic module is determining water height in your sump? Also are you using it in a way that provides any sort of overfill protection should it fail?

This looks really interesting.


clay12340 is offline   Reply With Quote
Unread 02/07/2014, 03:40 PM   #34
joopie
Registered Member
 
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
the ultra sonic measurement returns the distance from the water height back to the module. So i subtract that from the distance of the module from the floor. it will kick on at 11 inches and off at 12. i actually soaked it in salt water last night so it was outputing ~27 inches. i have some stuff coded in were it will not allow stuff to happen when there is an alarm condition. Since it was over my alarm set point of 15 inches the auto fill will not turn on. if it wanted to fail low, i have one of these installed that works great! http://www.amazon.com/Kerick-Valve-M...ds=float+valve
it will stop the fill process around ~16 inches.
now that the module is all dried out it seems to be working fine lol.


joopie is offline   Reply With Quote
Unread 02/08/2014, 05:56 AM   #35
clay12340
Registered Member
 
Join Date: Dec 2013
Location: Bloomington, Indiana
Posts: 312
Thanks, so it is just up above your sump measuring the distance to the water's surface? What happens if you get a pipe in the way or something of that sort? Just sets off your water is too high alarm and shuts down the ATO?

This looks like a really fun project. I've spent the last decade coding whatever I'm told for work, so I've not actually had a fun project for myself in a long time. I may have to give this a whirl.


clay12340 is offline   Reply With Quote
Unread 02/08/2014, 02:09 PM   #36
dre7606
Registered Member
 
dre7606's Avatar
 
Join Date: Oct 2006
Location: Fort Worth, TX
Posts: 43
I think I understand how you are sending the data to the mysql database. What I am having issues understanding is how you can change the LED brightness from the website. Can you expand on that a little?
Again thanks for sharing!


dre7606 is offline   Reply With Quote
Unread 02/08/2014, 05:48 PM   #37
joopie
Registered Member
 
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
Quote:
Originally Posted by clay12340 View Post
Thanks, so it is just up above your sump measuring the distance to the water's surface? What happens if you get a pipe in the way or something of that sort? Just sets off your water is too high alarm and shuts down the ATO?

This looks like a really fun project. I've spent the last decade coding whatever I'm told for work, so I've not actually had a fun project for myself in a long time. I may have to give this a whirl.
Yeah its on the top of my sump in the open area, so it has a clear shot all the way down if there was no water in it. If something gets in the way it just depends on how far. I have it only working within 6-15 inches, if the arduino gets a value outside of this range it will not turn on the ATO. I have yet to program an "automated" water change but right now i turn my level mode to off so the ATO will be disabled. Then i turn drain mode to on and it'll drain down to 6 inches(for a 30 gallon water change). I then have the water change mode which is my fill pump from a trash can that i use to mix salt water. So i just sit at my computer to do my water change once i have the salt mixed lol.



Last edited by joopie; 02/08/2014 at 06:07 PM.
joopie is offline   Reply With Quote
Unread 02/08/2014, 05:59 PM   #38
joopie
Registered Member
 
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
Quote:
Originally Posted by dre7606 View Post
I think I understand how you are sending the data to the mysql database. What I am having issues understanding is how you can change the LED brightness from the website. Can you expand on that a little?
Again thanks for sharing!
This part took me awhile to figure out how to do it. The arduino can read a string from a website. So when things are set on the web site they are updated in the database. The arduino calls this website: http://www.rareglitch.net/get_json.php?&table=CONFIG
which builds a custom string from the database for the arduino to parse. You can see below that RX() will call the website to get the json string thats buffered in readString. When readString is done it goes to parseString(String str) to separate the command and value. Once a command, value pair is separated it gets passed to setInput to assign the variable.

PHP Code:
void RX(){
  if (
client.connect(ipport))
  {
    
client.println("GET /get_json.php?&table=CONFIG");
    
client.println();
  }
  if (
client) {
    while (
client.connected()) {
      if (
client.available()) {
        
char c client.read();
        if (
== '!') {
          
client.stop();
        }
        
readString += c
      }
    }
    
parseString(readString);
    
readString "";
  }
  
client.flush();
  
client.stop();
  
client.flush();
}
void parseString(String str){
  
keep true;
  
int offset 0;
  while(
keep){
    
int start str.indexOf('#',offset) + 1;
    
int mid str.indexOf('@',offset);
    
int finish str.indexOf('$',offset);
    
int endloop str.indexOf('!');
    
offset finish 1;
    
String name str.substring(start,mid);
    
float value strTofloat(str.length(),str.substring(mid 1,finish));
    
setInput(name,value);
    if(
offset == endloop){
      
str "";
      
keep false
    }
  }

}
void setInput(String name,float value){
  if(
name == "Heater_Mode"){
    
IN_HEATER_MODE = (int)(value);
  }
  else if(
name == "LED_Mode"){
    
IN_LED_MODE = (int)(value);
  }
  else if(
name == "LED_Fan_Mode"){
    
IN_LED_FAN_MODE = (int)(value);
  }
  else if(
name == "LED_Blue"){
    
IN_LED_BLUE = (int)(value);
  }
  else if(
name == "LED_White"){
    
IN_LED_WHITE = (int)(value);
  }
  else if(
name == "Password"){

  }
  else if(
name == "Level_Mode"){
    
IN_LEVEL_MODE = (int)(value);
  }
  else if(
name == "Level_PH_Mode"){
    
IN_LEVEL_PH_MODE = (int)(value);
  }
  else if(
name == "Level_Drain_Mode"){
    
IN_LEVEL_DRAIN_MODE = (int)(value);
  }
  else if(
name == "AUX_Mode"){
    
IN_AUX_MODE = (int)(value);
  }
  else if(
name == "Arduino_Mode"){
    
IN_ARDUINO_MODE = (int)(value);
  }
  else{
    
Serial.println("INVALID ARGS PASSED TO SETINPUT");
    
keep false;
  }




joopie is offline   Reply With Quote
Unread 02/08/2014, 06:26 PM   #39
joopie
Registered Member
 
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
Here is what it looks like when i put the password in. All the "Mode" settings have an On Off or Auto. PH Mode has continuous, off or calibration modes.




joopie is offline   Reply With Quote
Unread 02/10/2014, 06:56 AM   #40
dre7606
Registered Member
 
dre7606's Avatar
 
Join Date: Oct 2006
Location: Fort Worth, TX
Posts: 43
Joopie, thank you so much for sharing!


dre7606 is offline   Reply With Quote
Unread 04/17/2014, 06:56 PM   #41
rott
Head zoo keeper
 
Join Date: Nov 2005
Location: Toledo ,Ohio
Posts: 710
I have not for got I want to try to build this and make it work I have all the parts just need to get the website part set up to run on my website and domain


rott is offline   Reply With Quote
Unread 05/21/2014, 09:08 AM   #42
joopie
Registered Member
 
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
I am replacing my current solenoids with these: http://www.wicvalve.com/
They are excellent and a good price. You can even select your coil voltage! I will be building a salt water mixing station next. My plan is to only dump a bag of salt in and it will do the rest. I will also experiment with a better web site GUI.


joopie is offline   Reply With Quote
Unread 05/26/2014, 09:00 PM   #43
rott
Head zoo keeper
 
Join Date: Nov 2005
Location: Toledo ,Ohio
Posts: 710
cant wait to see your new Gui and mixing station


rott is offline   Reply With Quote
Unread 05/29/2014, 04:32 PM   #44
joopie
Registered Member
 
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
I have been working on the web page mostly. Some of the physical parts are built. This wont be using an arduino but a beaglebone black instead.
Since nothing is really working yet i made a simulated site to show how it'll work. Click on parts and turn them on or off. I will prob make another thread with a complete explanation of everything once its near complete. Let me know what you guys think! After this project i think ill be updating the display tanks controller and web site.

http://www.rareglitch.net/SWMS/index_sim.html


joopie is offline   Reply With Quote
Unread 06/12/2014, 05:11 PM   #45
ElmoC
Registered Member
 
Join Date: Jun 2013
Posts: 93
Was wandering around the site and came across your thread. Really nice stuff. Been playing around some with an arduino so was interested to see how you had done things.

However, the thing that caught my attention and wanted to ask about is those solenoids you gave a link to. Is it safe to use brass on the aquarium's plumbing? Since brass is a copper/zinc alloy, I would be worried about copper getting into the system. Is this not an issue with brass?


ElmoC is offline   Reply With Quote
Unread 06/12/2014, 05:29 PM   #46
joopie
Registered Member
 
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
yes it is an issue, that's why i have upgraded my solenoids to the plastic WIC valve solenoids. Like this one: http://www.wicvalve.com/1-2-Inch-Pla...2PCG-1-2-D.htm


joopie is offline   Reply With Quote
Unread 07/11/2014, 02:46 PM   #47
rott
Head zoo keeper
 
Join Date: Nov 2005
Location: Toledo ,Ohio
Posts: 710
joopie any new updates?


rott is offline   Reply With Quote
Unread 07/23/2014, 08:08 PM   #48
joopie
Registered Member
 
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
Not much to report yet. I have made some progress on the beaglebone code with python but have been busy with other stuff so haven't had much time to complete this project. Should be able to resume work on it soon.


joopie is offline   Reply With Quote
Unread 07/31/2014, 09:41 AM   #49
Sonicboom
Addicted to salt
 
Sonicboom's Avatar
 
Join Date: Mar 2013
Location: Carrollwood, FL
Posts: 2,450
Hi Joopie, so glad i found this. I have been reading all i can on the arduino and was about to start my controller project. do you know if the new Adruino Tre can serve as an upgrade to the Mega?


__________________
"60% of the time it works every time..." - Anchorman

Current Tank Info: 180 Aqueon RR / SRO3000Int / BLDC15 / TriggerSys custom Sump / AI Hydra 52 and Hydra 26
Sonicboom is offline   Reply With Quote
Unread 08/01/2014, 06:30 PM   #50
joopie
Registered Member
 
Join Date: Apr 2013
Location: New Hampshire
Posts: 37
Quote:
Originally Posted by Sonicboom View Post
Hi Joopie, so glad i found this. I have been reading all i can on the arduino and was about to start my controller project. do you know if the new Adruino Tre can serve as an upgrade to the Mega?
Definitely looks like an upgrade. I just took a look at the specs and saw the new web IDE it uses. Looks awesome! My new project is using a beaglebone black, which i love since i can host everything from it(web server,database,IO,controller). According to the article they developed the Tre from arduino and beaglebone. If you are familiar with the arduino platform i would hold out for the Tre, otherwise check out beaglebone. The beaglebone is not as well documented as arduino but if you know linux then you should be able to figure it out. Once i finish this project i plan on converting over the fish tank controller to the beaglebone(or maybe a Tre =) ) Then ill host the web server and database off of it and can remove the PC under the stand. That'll lower the power bill slightly.

I use SSH to remote into my beaglebone from any location so i can work on it. I am able to access the files from my network and can just program that way as well. Here is a screen shot of my SSH session.



joopie is offline   Reply With Quote
Reply

Tags
aquarium, arduino, automation, control

Thread Tools

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 On



All times are GMT -6. The time now is 04:26 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Powered by Searchlight © 2024 Axivo Inc.
Use of this web site is subject to the terms and conditions described in the user agreement.
Reef CentralTM Reef Central, LLC. Copyright ©1999-2022
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.