woejillis's reef-pi build thread

woejillis

Community Member
View Badges
Joined
Jun 4, 2014
Messages
68
Reaction score
34
Location
United States
Rating - 0%
0   0   0
I'm a long-time lurker of reef-pi and decided to bite the bullet recently. I currently use smart power strips by Kasa and Smartthings to control and automate my equipment and am building a reef-pi system to take over monitoring and automation of my 120 gal (20 gal sump) LPS tank.

Current Situation:
  • Automation equipment
    • Smartthings to manage control and create dashboards through ActionTiles
    • Kasa powerstrips to control on/off of all equipment
  • Sensors
    • Water/flood to detect leaks and shutoff pumps
    • Temperature to notify of overheating
  • Aquarium equipment that is controlled
    • 2 return AC pumps
    • 2 UV lights (1 on each return pump)
    • 3 AC wavemakers (hydor koralia pumps)
    • Protein skimmer
    • ATO
    • GFO reactor
    • Sump light to grow chaeto
  • Automations
    • When main pump is turned off, turn off all other equipment
    • When main pump is turned on, turn on all other equipment
    • Turn on protein skimmer at 8 PM for 10 hours
    • Turn on sump light at 8 PM for 12 hours
    • If water detected behind tank, shut off pump1 (which then shuts off all equipment)

Desired Capabilities with reef-pi:
  • Monitoring
    • Sump temperature
    • pH
    • Sump pump return water level
  • ATO (will replace a Hydor Smart Level Controller)
  • Dosing
  • Automation/Controls (remove automation from Smartthings and migrate to reef-pi)
    • Heater on/off
    • ATO backup shutoff
    • Equipment on/off routines
      • Feeding time automation
      • Water change automation
  • Wavemaker controls (will need to update to DC wavemakers)
  • Lighting control (convert my black-boxes to be controlled with reef-pi)

Parts list:
 
Last edited:
OP
OP
W

woejillis

Community Member
View Badges
Joined
Jun 4, 2014
Messages
68
Reaction score
34
Location
United States
Rating - 0%
0   0   0
Temperature controller: (sensor setup)

I did not need to setup and configure outlets to control the heater on/off but simply wanted to add a temperature sensor for monitoring.

The temperature probe I purchased came with a board so I was not required to build the temperature probe circuit that is outlined in the official reef-pi build documentation. I only needed to follow the configuration/testing guide, here:
https://learn.adafruit.com/reef-pi-guide-3-temperature-controller/configuration-testing

Notes:
1.) VCC from the temp probe circuit board connects to a 3V power pin on the raspberry pi (Pin 1)
2.) DAT from the temp probe circuit board connects to GPIO 4 on the raspberry pi (Pin 7)
3.) GND from the temp probe circuit board connects to Ground on the raspberry pi (Pin 9)

Once connected, I could enable the Temperature capability as outlined in the official configuration guide and then add the temperature sensor, found here:
https://learn.adafruit.com/reef-pi-guide-3-temperature-controller/configuration-testing
 

StlSalt

Active Member
View Badges
Joined
Sep 30, 2020
Messages
480
Reaction score
626
Location
St. Louis, MO
Rating - 0%
0   0   0
I just started my build and while it's not as ambitious as yours, yet, I just ordered the same Temp Probe you used. You mentioned dipping it in silcone to prevent rust. Is this a pretty common issue with these probes? I wasn't going to dip it in silcone but sounds like it might be a good idea. PH probe is next for me but I wanted to get something easy working to give myself confidence before I shell out the dough for the PH probe. Like your build and will be following along thanks for posting it.
 
OP
OP
W

woejillis

Community Member
View Badges
Joined
Jun 4, 2014
Messages
68
Reaction score
34
Location
United States
Rating - 0%
0   0   0
ATO controller:
I just started my build and while it's not as ambitious as yours, yet, I just ordered the same Temp Probe you used. You mentioned dipping it in silcone to prevent rust. Is this a pretty common issue with these probes? I wasn't going to dip it in silcone but sounds like it might be a good idea. PH probe is next for me but I wanted to get something easy working to give myself confidence before I shell out the dough for the PH probe. Like your build and will be following along thanks for posting it.

Thanks for looking. I debated on whether or not to make a post and it's encourage to see someone reference it so quickly! My plan is to make a separate post on my experience with each subject I've tackled so far, including issues I run into along the way.



I am not sure sealing the probe was necessary but I couldn't find anything definitive on the metal-tipped temperature probes in saltwater aquariums. I found posts regarding freshwater where it didn't seem to be an issue but most other posts I read mentioned to simply 'get a plastic-tipped probe' but I couldn't find one readily available on Amazon.

I just wanted to take full precaution and seal it so that the metal wouldn't have any chance to cause harm to my tank.
 

StlSalt

Active Member
View Badges
Joined
Sep 30, 2020
Messages
480
Reaction score
626
Location
St. Louis, MO
Rating - 0%
0   0   0
I just got reef-pi loaded yesterday, and bought that temp probe like 15-30 minutes before your post. Crazy cosmic forces collide and you are using the exact same one. I do like the idea of covering the metal probe in some silicone I think I'll follow your lead here, I already have some aquarium safe silicone so why not?? I'm looking at the whitebox labs stuff but it's kind of pricey so I'm still researching how I'm going to set up my PH probe. Might grab a Kasa smart power strip to start playing around with it.
 
OP
OP
W

woejillis

Community Member
View Badges
Joined
Jun 4, 2014
Messages
68
Reaction score
34
Location
United States
Rating - 0%
0   0   0
I just got reef-pi loaded yesterday, and bought that temp probe like 15-30 minutes before your post. Crazy cosmic forces collide and you are using the exact same one. I do like the idea of covering the metal probe in some silicone I think I'll follow your lead here, I already have some aquarium safe silicone so why not?? I'm looking at the whitebox labs stuff but it's kind of pricey so I'm still researching how I'm going to set up my PH probe. Might grab a Kasa smart power strip to start playing around with it.
When I set out on implementing reef-pi, I didn't realize it worked natively with Kasa and I was trying to figure out how to link the two (as I already had Kasa strips hooked into Smartthings).

I love the Kasa strips (using Smartthings) and was incredibly pleased to see their integration into reef-pi. I would highly recommend you pull the trigger on those.

The pH probe is really pricey. I didn't know enough (and still don't) to determine a cheaper path so went ahead and bought what the original reef-pi configuration guides suggest.
 
OP
OP
W

woejillis

Community Member
View Badges
Joined
Jun 4, 2014
Messages
68
Reaction score
34
Location
United States
Rating - 0%
0   0   0
My optical water level sensor seems to have failed. The ATO in reef-pi doesn't register when the water level meets the contact sensor. The ATO I created in reef-pi worked as expected for 2 days. Then 2 days ago at 11:15 PM , the ATO settings kicked the pump on and doesn't turn off even if the contact sensor is submerged in water.

Upon testing the voltage on the contact sensor, the voltage is erratic and doesn't change whether the sensor is immersed or dry. I'm not sure what I should expect though. I'm expecting a solid reading for one scenario (either wet or dry) and a reading of zero for the other scenario.

I'm communicating with the vendor through Amazon now. Nowhere in the listing does it say the sensor CAN'T be submerged but the vendor is stating that submerging the sensor could damage it.

Anyone else have issues like this? Has anyone had long term success with a specific contact sensor? The sensor from the original documentation doesn't resolve to a legit product page anymore.
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
My optical water level sensor seems to have failed. The ATO in reef-pi doesn't register when the water level meets the contact sensor. The ATO I created in reef-pi worked as expected for 2 days. Then 2 days ago at 11:15 PM , the ATO settings kicked the pump on and doesn't turn off even if the contact sensor is submerged in water.

Upon testing the voltage on the contact sensor, the voltage is erratic and doesn't change whether the sensor is immersed or dry. I'm not sure what I should expect though. I'm expecting a solid reading for one scenario (either wet or dry) and a reading of zero for the other scenario.

I'm communicating with the vendor through Amazon now. Nowhere in the listing does it say the sensor CAN'T be submerged but the vendor is stating that submerging the sensor could damage it.

Anyone else have issues like this? Has anyone had long term success with a specific contact sensor? The sensor from the original documentation doesn't resolve to a legit product page anymore.
I had similar issues with them, hence I went with float sensors for last two years
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
How do you wire in float sensors? Do you connect it to 3.3v power and a GPIO pin?
You'll wire it like the following diagram shows, then set it up as an input on that GPIO.

1610735316515.png
 
OP
OP
W

woejillis

Community Member
View Badges
Joined
Jun 4, 2014
Messages
68
Reaction score
34
Location
United States
Rating - 0%
0   0   0
You'll wire it like the following diagram shows, then set it up as an input on that GPIO.

1610735316515.png
Got it, thanks!

Is keeping the optical contact sensors 'dry' the problem? I'm considering using a square acrylic tube to place into the sump which would create a 'dry tower' of sorts that I could install low/med/high optical sensors.
 
OP
OP
W

woejillis

Community Member
View Badges
Joined
Jun 4, 2014
Messages
68
Reaction score
34
Location
United States
Rating - 0%
0   0   0
I was able to get the pH probe working by following Ranjib's tutorial. The one thing he left out (I saw a post recently where he said he forgot to mention this) was that you have to set the Atlas Scientific EZO pH board into I2C mode by shorting the TX and the PGND pin (page 41 of this document https://atlas-scientific.com/files/pH_EZO_Datasheet.pdf).

I removed the pH EZO board from the carrier board and attached jumper cables to the TX-PGND pins, then connected GND and VCC. The LED switches from Green to Blue to indicate a successful switch to I2C mode.

Once this was completed, Reef-Pi found the probe (I had previously already setup the driver and the analog input).

It took several times to calibrate the pH sensor prior to it providing reliable readings. After each calibration when I put the probe in my tank, the pH would read way high (in the 12-14 range). After about the 4th or 5th time, it read the pH as expected.

Unlike the tutorial, I was only able to perform a 2 step calibration process. The tutorial explains you can choose a 2 or 3 step process but I don't see where to change it to the 3 step process.
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I was able to get the pH probe working by following Ranjib's tutorial. The one thing he left out (I saw a post recently where he said he forgot to mention this) was that you have to set the Atlas Scientific EZO pH board into I2C mode by shorting the TX and the PGND pin (page 41 of this document https://atlas-scientific.com/files/pH_EZO_Datasheet.pdf).

I removed the pH EZO board from the carrier board and attached jumper cables to the TX-PGND pins, then connected GND and VCC. The LED switches from Green to Blue to indicate a successful switch to I2C mode.

Once this was completed, Reef-Pi found the probe (I had previously already setup the driver and the analog input).

It took several times to calibrate the pH sensor prior to it providing reliable readings. After each calibration when I put the probe in my tank, the pH would read way high (in the 12-14 range). After about the 4th or 5th time, it read the pH as expected.

Unlike the tutorial, I was only able to perform a 2 step calibration process. The tutorial explains you can choose a 2 or 3 step process but I don't see where to change it to the 3 step process.
the tutorial was written for 2.0 version, if i recall correctly at the time only ezo board was supported and reef-pi UI used to support both 2 and 3 point calibration (delegated to the EZO chip, and not in reef-pi software itself). the opensource ph board came later, with that we dropped the support for 3 point calibration. There was scarce resources on 3 point calibration and in most of reef use cases two-point calibration is enough, hence only one and two-point calibration code was implemented (in reef-pi software). This does not mean you can not use ezo probes 3 point calibration, it just means that is not implemented via UI to maintain a uniform experience across all sensors. You can always use the atlas scientific python libraries to calibrate your probe directly, outside reef-pi.
 
OP
OP
W

woejillis

Community Member
View Badges
Joined
Jun 4, 2014
Messages
68
Reaction score
34
Location
United States
Rating - 0%
0   0   0
the tutorial was written for 2.0 version, if i recall correctly at the time only ezo board was supported and reef-pi UI used to support both 2 and 3 point calibration (delegated to the EZO chip, and not in reef-pi software itself). the opensource ph board came later, with that we dropped the support for 3 point calibration. There was scarce resources on 3 point calibration and in most of reef use cases two-point calibration is enough, hence only one and two-point calibration code was implemented (in reef-pi software). This does not mean you can not use ezo probes 3 point calibration, it just means that is not implemented via UI to maintain a uniform experience across all sensors. You can always use the atlas scientific python libraries to calibrate your probe directly, outside reef-pi.
That makes a lot of sense!

I'm new to raspberry pi in general but did see where I could program the EZO chip specifically. So far the 2-point calibration seems to be fine in that the pH probe readings are in line with my API pH kit's reading.
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,280
Location
Edmonton, Canada
Rating - 0%
0   0   0
As I understand it 3 point doesn't improve accuracy it just expands the range for an accurate reading. Normally 3 points is 4, 7 and 10, when pH is below 7 it'll use point 1 and 2, when pH goes above 7 it'll use point 2 and 3, all 3 are not part of the equation. Some meters even have 5 point and it's based on the same principle but smaller windows so better accuracy. So with that said for an aquarium you never need 3 point calibration.
 
OP
OP
W

woejillis

Community Member
View Badges
Joined
Jun 4, 2014
Messages
68
Reaction score
34
Location
United States
Rating - 0%
0   0   0
As I understand it 3 point doesn't improve accuracy it just expands the range for an accurate reading. Normally 3 points is 4, 7 and 10, when pH is below 7 it'll use point 1 and 2, when pH goes above 7 it'll use point 2 and 3, all 3 are not part of the equation. Some meters even have 5 point and it's based on the same principle but smaller windows so better accuracy. So with that said for an aquarium you never need 3 point calibration.
Thanks for the additional clarification! This kind of stuff is fascinating to me.
 

Weasel1960

Valuable Member
View Badges
Joined
Aug 22, 2020
Messages
2,139
Reaction score
9,995
Location
Monticello, WI
Rating - 0%
0   0   0
Will definitely be following this thread and using it in the future when I start my build. Thanks for sharing.
 
OP
OP
W

woejillis

Community Member
View Badges
Joined
Jun 4, 2014
Messages
68
Reaction score
34
Location
United States
Rating - 0%
0   0   0
I've been failing at getting the dosing functionality to work.

I'm using this motor driver:
Amazon Link

I have made these connections between the pi and controller:
PI Controller
5v (pin 2) +5v
GPIO 18 (pin 12) ENA 1
GPIO 5 (pin 29) IN1
GPIO 22 (pin 15) IN2
Ground (pin 20) GND

The dosing pump I'm using is this one:
Amazon link

When I connect the pump directly to the 12v power supply, it works so I know it's not the pump or the power supply.


Reef-pi config:
Jack - (Dose 1) - pin 0, driver=Raspberry Pi
Outlet - (Dose 1A) - pin 5, driver=Raspberry Pi
Outlet - (Dose 1B) - pin 22, driver=Raspberry Pi
Equipment - (Dose 1A) - Outlet = Dose 1A
Equipment - (Dose 1B) - Outlet = Dose 1B

Dose config:
Jack = Dose 1
Pin = 0



I've never used a raspberry pi at this level before (or a motor controller) so have zero experience troubleshooting any further.

When I run a calibration on the motor, nothing happens.

I was previously messing around with a relay and I could get the pump to work, however it only worked when the PWM was set to 100 to open the relay and didn't rely on the outlets.


Any help or guidance would be greatly appreciated!
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Among Dose 1a and 1b , one of them has to be on, other off, then only doser will run, if both outlets are on or off at the same time , then doser won’t run.
 
Back
Top