Jump to content
SaltCritters.com

Arduino Pico Controller


plantarms

Recommended Posts

Very cool project!

 

To answer your last questions, there are salinity probes you can get (they are hella expensive, they are plated in platinum), and there are ORP probes, but they need calibration almost daily to be truly effective from what a few experts on the subject have to say. It's really only necessary, IMHO, if using ozone.

Link to comment
  • Replies 88
  • Created
  • Last Reply

Hey thanks for the input! I'm certainly not looking to calibrate a probe everyday so I might just forget those for now. Any thoughts on what I could use to detect if a relay fails and my ATO gets stuck open and it starts to flood? Not very likely I know, but I would hate to have my tank hosed and carpet soaked at the same time. I could handle one or the other.

 

Very cool project!

 

To answer your last questions, there are salinity probes you can get (they are hella expensive, they are plated in platinum), and there are ORP probes, but they need calibration almost daily to be truly effective from what a few experts on the subject have to say. It's really only necessary, IMHO, if using ozone.

Link to comment

A lot of people use double float switches for that reason, the highest one being the fail-safe to cut power in case the lower one gets stuck.

Link to comment
Any thoughts on what I could use to detect if a relay fails and my ATO gets stuck open and it starts to flood?

 

 

I used to use double float switches. One time had an escaped snail manage somehow to get to the bottom one and stick it "on" but thankfully the top one didn't have a snail hanging from it at the time, and did exactly what it was supposed to.

 

Now I have a pH meter as part of my Reefkeeper, and since I dose kalkwasser in my ATO, I can use that as a failsafe. Big jump in pH = the ATO has probably developed an issue. I'd probably still be better off with double switches, though.

Link to comment
Hey thanks for the input! I'm certainly not looking to calibrate a probe everyday so I might just forget those for now. Any thoughts on what I could use to detect if a relay fails and my ATO gets stuck open and it starts to flood? Not very likely I know, but I would hate to have my tank hosed and carpet soaked at the same time. I could handle one or the other.

 

Two ideas off the top of my head:

 

1) What if you set a maximum amount that the ATO can dump in specified time period -- say every 12 hours for example? There still might be some flooding, but by the time you get home or wake up it wouldn't be as massive as if the pump keeps going.

 

2) A more elegant and fun solution might be using one of these liquid level sensors. This also has the added advantage that you could detect a leak!

 

10221-01a.jpg

 

I found this one here Sparkfun Electronics but I know I've seen smaller and cheaper ones out there.

Link to comment

That tape fluid sensor is wild! Lots of interesting ideas from that one.

 

I found this optical sensor - similar to the ones used on the tunze osmolator ato.

http://www.fluidswitch.com/pages/OpticalLi...ensorOS-900.htm

It won't stick like the float switches.

 

You could code a maximum time for the pump to run - if > 5 minutes, kill the system until hard reset.

If runs longer than 5 minutes you know you're out of water and you don't burn the pump.

And use a cheap float switch to detect high water also to kill the pumps.

Link to comment
A lot of people use double float switches for that reason, the highest one being the fail-safe to cut power in case the lower one gets stuck.

Are you referring to double float switches in the reservoir? My tank is too small to fit two float switches in the back fuge.Then again i'm using a 5 gallon water jug for an ato reservoir so I can easily mount float switches in that either.

 

I used to use double float switches. One time had an escaped snail manage somehow to get to the bottom one and stick it "on" but thankfully the top one didn't have a snail hanging from it at the time, and did exactly what it was supposed to.

 

Now I have a pH meter as part of my Reefkeeper, and since I dose kalkwasser in my ATO, I can use that as a failsafe. Big jump in pH = the ATO has probably developed an issue. I'd probably still be better off with double switches, though.

I can definitely see how those would be useful. As of right now I'm just crossing my fingers hoping my single one won't fail.

 

Two ideas off the top of my head:

 

1) What if you set a maximum amount that the ATO can dump in specified time period -- say every 12 hours for example? There still might be some flooding, but by the time you get home or wake up it wouldn't be as massive as if the pump keeps going.

 

2) A more elegant and fun solution might be using one of these liquid level sensors. This also has the added advantage that you could detect a leak!

 

I found this one here Sparkfun Electronics but I know I've seen smaller and cheaper ones out there.

I actually saw this the other day when I was browsing sparkfun.com as well. Any experience with that sensor? Looks pretty cool. I am planning on coding some logic to limit the amount the ATO can dump, but my concern is if the relay fails on, then it would be constantly powering the ato pump no matter what I code.

 

That tape fluid sensor is wild! Lots of interesting ideas from that one.

 

I found this optical sensor - similar to the ones used on the tunze osmolator ato.

http://www.fluidswitch.com/pages/OpticalLi...ensorOS-900.htm

It won't stick like the float switches.

 

You could code a maximum time for the pump to run - if > 5 minutes, kill the system until hard reset.

If runs longer than 5 minutes you know you're out of water and you don't burn the pump.

And use a cheap float switch to detect high water also to kill the pumps.

That sensor is awesome, I will have to check that out and see how it works. Maybe I can add some redundancy with two sensors and two relays.

Link to comment

This totally worked for me -- and on the first try! It was really nice to not have to troubleshoot the code and the hardware at the same time. Thanks again!

 

Rescue12g, that code I linked previously was confusing and not very user friendly, so I wrote some simpler stuff. Still needs to use the OneWire and DallasTemperature libraries, but this should be very straightforward. It's currently setup for my 4 temp sensors, but you can remove or add the extra lines as needed. Good luck

 

//customTemp_sep12f code created by plant_arms 2012-09-12#include <OneWire.h>#include <DallasTemperature.h> // Initialize Temperature Sensor Library on pin 3#define ONE_WIRE_BUS 3OneWire oneWire(ONE_WIRE_BUS);DallasTemperature sensors(&oneWire);//create deviceaddress objectsDeviceAddress addrZero, addrOne, addrTwo, addrThree;//create floats to store temp sensor valuesfloat tempZero, tempOne, tempTwo, tempThree, avgTemp;int sensorCount;void setup() {  // Begin Serial Communication  Serial.begin(115200);  sensors.begin();    //add some code here for future to output errors if device count < 4 and output which temp sensor has no data  sensorCount = sensors.getDeviceCount();  sensors.getAddress(addrZero, 0);  sensors.getAddress(addrOne, 1);  sensors.getAddress(addrTwo, 2);  sensors.getAddress(addrThree, 3);	}//outputs all 4 temp sensor data and an avg tempvoid loop(){  sensors.requestTemperatures();  getTemp();  Serial.print(tempZero);  Serial.print(" ");  Serial.print(tempOne);  Serial.print(" ");  Serial.print(tempTwo);  Serial.print(" ");  Serial.println(tempThree);  Serial.print("Average: ");  Serial.println(avgTemp);  delay(3000);}//pulls the fahrenheit value of each temp sensor and then adds them and divides by the sensorCount to get an avgTemp void getTemp()  {  tempZero = sensors.getTempF(addrZero);  tempOne = sensors.getTempF(addrOne);  tempTwo = sensors.getTempF(addrTwo);  tempThree = sensors.getTempF(addrThree);    avgTemp = ((tempZero+tempOne+tempTwo+tempThree)/sensorCount);}

Link to comment

Awesome, glad to hear it.

 

This totally worked for me -- and on the first try! It was really nice to not have to troubleshoot the code and the hardware at the same time. Thanks again!
Link to comment
have to find a larger project box.

 

I like the project box from digikey. It holds the mega very nicely and there is room for a shield on top too depending on the shield.

 

More coming but this was the simplest answer to write in my limited time right now.

 

it starts to flood? Not very likely I know, but I would hate to have my tank hosed and carpet soaked at the same time. I could handle one or the other.

 

My solution for this is a PVC overflow that is set above the water level. In my case it is hooked up to the drain so if my pump goes indefinitely it will pump the whole of one of the clear or salt reservoirs into the tank and it will overflow into the drain and then stop. I need two of these overflows, one for the display tank and one for the sump (in case the main system pump fails at the same time ... paranoia!)

 

A lot of people use double float switches for that reason, the highest one being the fail-safe to cut power in case the lower one gets stuck.

 

This won't catch the failure mode he was worried about in which the relay itself fails and keeps the pump running indefinitely regardless of its inputs. I didn't look @ his datasheet for the relays but this is possible depending on the relay and I think only physical fallbacks will work at that point.

 

For your case, my code for the ATO will only pump for a few minutes a day. So it's impossible to overshoot the float sensor by much and would take days of ignoring it to not notice the failure light.

 

Osric

Link to comment
Ordered the following to add to the build today, I now have way more i/o pins then I know what to do with. On another note, does anyone have any experience with ORP, EC, or DO probe readings?

 

I don't have any experience with it but I plan to use an EC meter to get salinity. I don't know any way to get calcium/dK elecronically. I ordered my EC probe but it's on backorder for weeks.

 

For pH you can use the 3.3V output of the arduino as ground, the ground as the negative voltage reference, and the +5V as the positive rail for a circuit like the simplest possible pH circuit. I struggled over which op amp to use and eventually picked one based on looking at a variety of circuits online. I also ordered the Atlas pH stamp and will use it to validate that my other circuit works and then post the info.

 

Osric

Link to comment
I like the project box from digikey. It holds the mega very nicely and there is room for a shield on top too depending on the shield.

 

More coming but this was the simplest answer to write in my limited time right now.

I will check that out. I am looking for an aluminum box about 5''l x 5''w 3''h so it will fit the arduino mega, one or two PCBs, and be able to mount my screen on the front panel.

 

My solution for this is a PVC overflow that is set above the water level. In my case it is hooked up to the drain so if my pump goes indefinitely it will pump the whole of one of the clear or salt reservoirs into the tank and it will overflow into the drain and then stop. I need two of these overflows, one for the display tank and one for the sump (in case the main system pump fails at the same time ... paranoia!)

That is an excellent idea. Adding a threaded pvc overflow to the back fuge area of my all in one tank would solve that problem and I could even route the overflow back to my ato reservoir so the pump wouldn't run dry.

 

This won't catch the failure mode he was worried about in which the relay itself fails and keeps the pump running indefinitely regardless of its inputs. I didn't look @ his datasheet for the relays but this is possible depending on the relay and I think only physical fallbacks will work at that point.

 

For your case, my code for the ATO will only pump for a few minutes a day. So it's impossible to overshoot the float sensor by much and would take days of ignoring it to not notice the failure light.

Yeah, all relays can fail in an open or closed position while some are more likely than others to do so. And that logic to limit the time it will run could help keep it in check now that I'm thinking it through.

 

I don't have any experience with it but I plan to use an EC meter to get salinity. I don't know any way to get calcium/dK elecronically. I ordered my EC probe but it's on backorder for weeks.

 

For pH you can use the 3.3V output of the arduino as ground, the ground as the negative voltage reference, and the +5V as the positive rail for a circuit like the simplest possible pH circuit. I struggled over which op amp to use and eventually picked one based on looking at a variety of circuits online. I also ordered the Atlas pH stamp and will use it to validate that my other circuit works and then post the info.

Where were you able to find the EC probe? Was it a reasonable price? How are you able to measure the salinity with that probe, I was under the impression that there was a lot more than goes into that reading.

Link to comment
I will check that out. I am looking for an aluminum box about 5''l x 5''w 3''h so it will fit the arduino mega, one or two PCBs, and be able to mount my screen on the front panel.

 

...

 

Where were you able to find the EC probe? Was it a reasonable price? How are you able to measure the salinity with that probe, I was under the impression that there was a lot more than goes into that reading.

 

The project box I've suggested is too small for your requirements.

 

For the probe, I decided to splurge on the Atlas Scientific version with stamp. You send the stamp the temperature of the water (by positioning your temperature probe near the salinity probe) and it gives you back compensated readings. Should be pretty plug'n'play, and it better be ... the probes and stamps add up to a fair chunk of cash.

 

Osric

Link to comment
The project box I've suggested is too small for your requirements.

 

For the probe, I decided to splurge on the Atlas Scientific version with stamp. You send the stamp the temperature of the water (by positioning your temperature probe near the salinity probe) and it gives you back compensated readings. Should be pretty plug'n'play, and it better be ... the probes and stamps add up to a fair chunk of cash.

 

Osric

After doing some more research I am really interested in having a conductivity probe in this build. They are certainly expensive, but having an on the fly salinity reading for the tank would be worth it. Do you know how often they have to be calibrated to stay accurate?

Link to comment

On the question of calibration, I don't know. The Atlas Scientific people make it sound like their equipment is meant for long-term deployment in the field, so I was assuming that it'd be all good once calibrated. We'll find out the hard way soon enough - I'll check the salinity with my refractometer occasionally...

 

I am also going to attempt to create an ato solution using this optical liquid level sensor. I've been browsing around looking for a suitable sensor after getting the idea from uglyfish, and I believe this one will work great.

 

http://www.newark.com/honeywell-s-c/lle101...782?Ntt=31H9782

 

This sensor looks pretty cool - a solid state float switch, essentially - but doesn't look like it can handle immersion. How are you going to drill the tank to get the sensor into it, or do you plan to waterproof it somehow? I guess I could imagine drilling a hole through an endcap of PVC, and embedding the sensor and wires in a short PVC tube that could be immersed. For myself, I'm using standard float switches that I found on digikey and just planning for their possible failure.

 

Osric

Link to comment

If the ATO is working properly, salinity won't move much at all (as long as you use a refractometer for water changes). Instead of the conductivity probe for salinity, maybe consider a dissolved oxygen probe or ORP probe. It may be useful in a small tank to tell you if the water is getting stale. The calcium probes are pretty delicate and become useless if the sensor element gets gunked up. They're meant for one quick reading, then clean and store - not continuous use.

 

You could waterproof the top of the optical level sensor with some hot melt glue, or silicone if needed.

 

I don't understand how the pH stamp works without calibration - are all probes made the same way? I can't wrap my head around it.

Link to comment
On the question of calibration, I don't know. The Atlas Scientific people make it sound like their equipment is meant for long-term deployment in the field, so I was assuming that it'd be all good once calibrated. We'll find out the hard way soon enough - I'll check the salinity with my refractometer occasionally...

 

This sensor looks pretty cool - a solid state float switch, essentially - but doesn't look like it can handle immersion. How are you going to drill the tank to get the sensor into it, or do you plan to waterproof it somehow? I guess I could imagine drilling a hole through an endcap of PVC, and embedding the sensor and wires in a short PVC tube that could be immersed. For myself, I'm using standard float switches that I found on digikey and just planning for their possible failure.

 

Osric

I haven't decided how to mount that sensor yet, but I believe all but the wires on the sensor are waterproof. I would just need to drill the side of the tank. I think adding an EC probe to my build might be overstretching what I can handle right now. I might look into that after I've got everything up and running. Keep me posted on how yours works out.

 

If the ATO is working properly, salinity won't move much at all (as long as you use a refractometer for water changes). Instead of the conductivity probe for salinity, maybe consider a dissolved oxygen probe or ORP probe. It may be useful in a small tank to tell you if the water is getting stale. The calcium probes are pretty delicate and become useless if the sensor element gets gunked up. They're meant for one quick reading, then clean and store - not continuous use.

 

You could waterproof the top of the optical level sensor with some hot melt glue, or silicone if needed.

 

I don't understand how the pH stamp works without calibration - are all probes made the same way? I can't wrap my head around it.

What exactly does an ORP or a dissolved oxygen reading do you for tank? For example, if the reading is low or high on either one, what do you do to rectify that? Waterchange?

 

Also I will let you know how that pH stamp works once I get it. I'm assuming there is some sort of calibration needed for it.

Link to comment
I haven't decided how to mount that sensor yet, but I believe all but the wires on the sensor are waterproof. I would just need to drill the side of the tank.

...

Also I will let you know how that pH stamp works once I get it. I'm assuming there is some sort of calibration needed for it.

 

Ah, I'm trying to avoid drilling as much as possible. As for pH calibration you'll need calibration solutions and you put the probe in each one and then tell the stamp what it's reading. After that the probe should be accurate. I am not sure how often recalibration might be needed.

 

If you're not doing automatic water changes I don't think you need the EC sensor so passing on it and getting the basics of what you want working makes sense to me!

 

Osric

Link to comment
What exactly does an ORP or a dissolved oxygen reading do you for tank? For example, if the reading is low or high on either one, what do you do to rectify that? Waterchange?

 

ORP or dissolved oxygen sensor - I would choose one or the other.

 

ORP more than complicated than I understand (though I've tried). I have to take Randy Holmes Farley's word on the subject. In a nutshell, it's a wide indicator of overall water quality - where other tests don't give the full picture. ORP isn't something to chase with additives - but it gives an indication that something is going on that needs to be addressed (water changes).

 

Here is one of the best links to explain ORP:

http://www.reefkeeping.com/issues/2003-12/...ature/index.php

 

I'd be curious to see how ORP works in a 2.7g.

Link to comment
Ah, I'm trying to avoid drilling as much as possible. As for pH calibration you'll need calibration solutions and you put the probe in each one and then tell the stamp what it's reading. After that the probe should be accurate. I am not sure how often recalibration might be needed.

 

If you're not doing automatic water changes I don't think you need the EC sensor so passing on it and getting the basics of what you want working makes sense to me!

 

Osric

Agreed, I might try to find another way if at all possible, but drilling really would be the best way to mount it in the tank.

 

ORP or dissolved oxygen sensor - I would choose one or the other.

 

ORP more than complicated than I understand (though I've tried). I have to take Randy Holmes Farley's word on the subject. In a nutshell, it's a wide indicator of overall water quality - where other tests don't give the full picture. ORP isn't something to chase with additives - but it gives an indication that something is going on that needs to be addressed (water changes).

 

Here is one of the best links to explain ORP:

http://www.reefkeeping.com/issues/2003-12/...ature/index.php

 

I'd be curious to see how ORP works in a 2.7g.

Thanks for the info on ORP. I'm probably leaving this out of the build for now as well though.

Link to comment

I am just getting started with the arduino board and I am excited to have a goal that is not "get it to blink an LED without letting the smoke out!"

 

Thanks and I will stay to date with this post!

Link to comment
I am just getting started with the arduino board and I am excited to have a goal that is not "get it to blink an LED without letting the smoke out!"

 

Thanks and I will stay to date with this post!

Haha excellent, good luck with your build

Link to comment

Quick update:

 

Upside:

The power center is complete and is nice and clean. Only got shocked once. I will post some pics up soon.

 

Downside:

My roof was struck by lightning (when does that ever happen?) and it fried my ac adapter, arduino, rtc module, and one of my led lighting power supplies. It also put a hole in the roof and drained water onto the floor. So i've ordered some new parts and am working on putting this back together. Computer didn't get fried and I still have the code, so not a huge loss.

 

Non-tank related:

I also built a laser trip wire using a laser and a photo resistor. It currently lights an led when the laser beam is broken. Trying to figure out what to use it for

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recommended Discussions


×
×
  • Create New...