• For a Limited Time the R2R Partner Membership is NOW OPEN! Get some cool swag and chances to win part of over $20,000 in prizes! Click here for more details

reef-pi :: An opensource reef tank controller based on Raspberry Pi.

trustychords

New Member
View Badges
Joined
Aug 17, 2019
Messages
16
Reaction score
12
Location
Virginia, USA
I suppose I should have told the full story and give my full background thinking.

My actual plan is to dose based on one of the popular 2-part dosing regimines with all the normal tests that go along with it. I plan to use the reef-pi control more as a way to actually turn off the dosing if it goes outside my goal parameters and send me alerts. Depending on how you look at it, it's technically the same thing. But in terms of utilizing the reef-pi functionality, it has to be thought of as enabling the dosing within a specified range.

At the moment I'm thinking of a Macro to enable the Doser at the lower threshold and another to turn it off at the upper. My initial thought on this is whether it will only turn the dosing back on at the lower threshold (as I suspect it will) or if there is a way to turn it back on when it's back within range. Playing with a narrow range and the hysteresis settings might be necessary, hence me not wanting to re-invent the wheel if anyone has implemented something like this successfully.
I've wondered if we could use Reef-Pi to control a solenoid valve that is connected to the airline intake of a Co2 scrubber. That would be the best way to consistently maintain a higher pH.
 
Last edited:

Mikeneedsahobby

Active Member
View Badges
Joined
Sep 16, 2018
Messages
394
Reaction score
726
I suppose I should have told the full story and give my full background thinking.

My actual plan is to dose based on one of the popular 2-part dosing regimines with all the normal tests that go along with it. I plan to use the reef-pi control more as a way to actually turn off the dosing if it goes outside my goal parameters and send me alerts. Depending on how you look at it, it's technically the same thing. But in terms of utilizing the reef-pi functionality, it has to be thought of as enabling the dosing within a specified range.

At the moment I'm thinking of a Macro to enable the Doser at the lower threshold and another to turn it off at the upper. My initial thought on this is whether it will only turn the dosing back on at the lower threshold (as I suspect it will) or if there is a way to turn it back on when it's back within range. Playing with a narrow range and the hysteresis settings might be necessary, hence me not wanting to re-invent the wheel if anyone has implemented something like this successfully.
I haven’t tried this. It seems like it could work. Maybe start with dosing ro or saltwater until you have confidence in it. I get a bit noise on my ph line. It’s okay for monitoring but I don’t trust it to control.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
556
Reaction score
925
Location
Durban - South Africa
I've wondered if we could use Reef-Pi to control a solenoid valve that is connected to the airline intake of a Co2 scrubber. That would be the best way to consistently maintain a higher pH.
I live in a part of the world where we don't have very extreme weather and as such, the tank is in a room that always has adequate ventilation. The window next to the tank is wide open 90+% of the time, so I doubt a buildup of CO2 is responsible for suppressing my pH. I have at a time run my skimmer air intake from outside the house and the pH results are the same.

Reef-pi could easily control a solenoid valve as you describe.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
556
Reaction score
925
Location
Durban - South Africa
I haven’t tried this. It seems like it could work. Maybe start with dosing ro or saltwater until you have confidence in it. I get a bit noise on my ph line. It’s okay for monitoring but I don’t trust it to control.
Yes. I would start dosing the 2 part manually starting with lower amounts than I should need and slowly adjust to get stable. I'd then tweak reef-pi around that dosing regimen.
 

merickson45

New Member
View Badges
Joined
Sep 14, 2020
Messages
1
Reaction score
0
Location
Livermore
Hi,

I'm having an issue with the reef-pi dashboard tab. Every time I click "Configure" in the Dashboard tab I get a red "404 page not found | HTTP 404" error and it does not give me the option to configure the dashboard. All other tabs work fine, lights, dosing, temperature, etc. Running reef-pi 3.4 on a pi3. Any idea why this would be happening?
 

robsworld78

Active Member
View Badges
Joined
Feb 14, 2020
Messages
203
Reaction score
444
Location
Edmonton, Canada
I am running version 3.4 on my Pi 3b+. Very couple hours it seems I get alert in email for:

Temperature sensor failure. Error:EOF
Any chance you're using Robo-Tank, I think you are? I was just made aware of this and get the same error when running 3.4 but not 3.3.1 but it still appears to be an error related to the controller as no else seems to get this but it's blowing my mind as it works with one but works with errors on the other. I've been working day and night trying things but not really getting anywhere. I've run some off a script in a terminal window and other methods but never an issue so it's not easy to track down.
 

rmilyard

Community Member
View Badges
Joined
Aug 24, 2020
Messages
72
Reaction score
30
Location
Goodyear
Any chance you're using Robo-Tank, I think you are? I was just made aware of this and get the same error when running 3.4 but not 3.3.1 but it still appears to be an error related to the controller as no else seems to get this but it's blowing my mind as it works with one but works with errors on the other. I've been working day and night trying things but not really getting anywhere. I've run some off a script in a terminal window and other methods but never an issue so it's not easy to track down.
Yes I am using Robo-Tank Deluxe controller and Reef-Pi 3.4.
 

lepetitnicolas

New Member
View Badges
Joined
Dec 1, 2019
Messages
4
Reaction score
8
Your set and that sensor looks good but here's another option that works for anyone else looking for something similar. There's a few versions, the V at the end of model is what you want. They go through thick glass and you can take the cap off and adjust the sensitivity.


EDIT: Oops, almost forgot Pi is only 3.3v, the sensor I posted needs 5v and outputs 5v so could damage Pi pin.

Now I look at the other sensor it's 5v too so likely 5v comes out, make sure you check. If it does put out 5v you'll need to add a voltage divider which is 2 resistors, 4.7k and 9.1k.

voltage_divider.jpg
Hello,

I tried this assembly but it does not work, I have a very low signal output voltage of a few mv .... without change of state.

I tried to connect the sensor directly in 3v and it works perfectly !!!
I will now install it on my tank to do a full-scale test

see you soon

Non-contact Liquid Level Switch

6W4A8637_564x376.jpg
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,235
Reaction score
2,438
Location
Sacramento, CA area
My saga of temperature sensor development continues - this time using some of the stock sensors available and not my own potted assemblies. These sensors were purchase awhile back from overseas and were the "best" of the available probes / brand recommended by others (with the orange-red silicone jacket). I never made them into finished sensors since I hadn't setup something for testing yet.

The good news is the available "fake DS18B20" detector developed by others claims the element is real - this is encouraging. I have a whole smorgasboard of sensor cables I was testing and most do not pass this test, as expected.

Next up is a qualification and calibration rig I'm building for my stand-alone temperature sensor. First part of the rig is a Fluke 9102S Dry-well, which is used a stable and controllable temperature source - it can generate a stable temperature at a number of useful room temperature ranges as it has a peltier element to cool as well as heat, and sufficient thermal mass to keep things stable. Its not as good as a wet well of circulating liquid (oil?), but its a lot less messy. The good news is it can check sensors at the one temperature we want, ~78F or 25.5C.

image0(2).jpeg


The dry well is very stable, but its actual temperature is not very accurate over its range. So, part two is directly measuring it:
image1(1).jpeg


Yeah I splurged and "gold plated" the whole thing with the Dostmann P-795 and a calibrated PRTD element.

So, all that fanciness, how does the average sensor match up? About 0.3C higher than reference - nicely within spec.

Now the bad news - I went through about 20 sensors I had kicking around from the same seller that I never put up on the website: all were authentic Maxim/Dallas parts, but 5 of them had an error of 1C, and one extreme example of 1.5C high (thats 80.6F). While there is margin for livestock safety, the results there aren't encouraging for even this sensor.

Each sensor was first left to settle for 30min, and then averaged over 5 minutes. The sample to sample reading was nearly always within a few ADC counts (good). I don't have an explanation for the outliers yet, but measurements have been repeatable.

Each DB18B20 was powered from a "worst case" on the voltage model: 3.3V supply, 3.3V pull-up (2.6k), and read once a second (higher self heating potential).

Screening sensors is still important :)
 
Corals.com
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
8,222
Reaction score
14,671
Location
Palo Alto, Bay Area
My saga of temperature sensor development continues - this time using some of the stock sensors available and not my own potted assemblies. These sensors were purchase awhile back from overseas and were the "best" of the available probes / brand recommended by others (with the orange-red silicone jacket). I never made them into finished sensors since I hadn't setup something for testing yet.

The good news is the available "fake DS18B20" detector developed by others claims the element is real - this is encouraging. I have a whole smorgasboard of sensor cables I was testing and most do not pass this test, as expected.

Next up is a qualification and calibration rig I'm building for my stand-alone temperature sensor. First part of the rig is a Fluke 9102S Dry-well, which is used a stable and controllable temperature source - it can generate a stable temperature at a number of useful room temperature ranges as it has a peltier element to cool as well as heat, and sufficient thermal mass to keep things stable. Its not as good as a wet well of circulating liquid (oil?), but its a lot less messy. The good news is it can check sensors at the one temperature we want, ~78F or 25.5C.

image0(2).jpeg


The dry well is very stable, but its actual temperature is not very accurate over its range. So, part two is directly measuring it:
image1(1).jpeg


Yeah I splurged and "gold plated" the whole thing with the Dostmann P-795 and a calibrated PRTD element.

So, all that fanciness, how does the average sensor match up? About 0.3C higher than reference - nicely within spec.

Now the bad news - I went through about 20 sensors I had kicking around from the same seller that I never put up on the website: all were authentic Maxim/Dallas parts, but 5 of them had an error of 1C, and one extreme example of 1.5C high (thats 80.6F). While there is margin for livestock safety, the results there aren't encouraging for even this sensor.

Each sensor was first left to settle for 30min, and then averaged over 5 minutes. The sample to sample reading was nearly always within a few ADC counts (good). I don't have an explanation for the outliers yet, but measurements have been repeatable.

Each DB18B20 was powered from a "worst case" on the voltage model: 3.3V supply, 3.3V pull-up (2.6k), and read once a second (higher self heating potential).

Screening sensors is still important :)
Whoa, pretty interesting findings :) . Thank you for sharing
 
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
8,222
Reaction score
14,671
Location
Palo Alto, Bay Area
Hello,

I tried this assembly but it does not work, I have a very low signal output voltage of a few mv .... without change of state.

I tried to connect the sensor directly in 3v and it works perfectly !!!
I will now install it on my tank to do a full-scale test

see you soon

Non-contact Liquid Level Switch

6W4A8637_564x376.jpg
Thank you for sharing the details. Keep us posted,
 
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
8,222
Reaction score
14,671
Location
Palo Alto, Bay Area
Hive minds,
I have just cut a new reef-pi release, 3.5. Its been almost 4 months sine the last stable reef-pi release and lot has piled up since then. Hence this release brings a handful of goodies. Key highlights are

New features:
  • Availability of ADS1015/ADS1115 series analog to digital converter. This will allow a wide range of analog sensor, including alternate temperature sensor, UV/Lux sensors, anemometers, VOC/CO2/Gas sensor and many more system to seamlessly integrate with reef-pi and used for controlling equipment.
  • We have introduced a special feature called "One Shot" in temperature , ph and ATO controllers. When enabled reef-pi will run the controller till the sensor reaches its target point instead of running perpetually. For example an one shot ATO controller will run the ATO pump till the sensor detect water level has reached the level and stop there. Same for temperature and ph, where the controller will stop soon the read reaches within min/max zone. When used within macro, this step will block the next step instead of running parallel. Intention of this feature is to help model auto water change and other scenarios.
  • Macros now have a new step called "alert". This can be used to send sms/email as part of a macro
  • Lighting module UI now support lunar, random and sine profile in addition to the existing ones (auto/interval, diurnal and fixed). Decimal/fractional values are also allowed in light profiles.
  • API documentations are now bundled with reef-pi code itself. The footer section in the UI will link to API documentation.

Bugfixes:
  • Pi 4 driver detection failures are resolved for upgraded raspberry pi os.
  • Temperature calibration bug was fixed
  • Equipment chart rendering bug was fixed
  • Temperature chart bounds are now removed, light chart rendering bug fixed.
  • Erroneous and out of acceptable range temperature sensor values are now ignored and retry logic has been implemented to address ds18b20 sensor reading issues.
Other than these critical features and bug fixes a number of tech chores across package updates, automated user acceptance test , performance improvement have also went in this release. I want to thank @Michael Lane from the bottom of my heart for his tireless contribution across drivers, backend and UI bugfixes. Without his work this release wont be happening in this challenging times.

Release builds are available in usual location: https://github.com/reef-pi/reef-pi/releases/tag/3.5

Please help us make reef-pi better by testing and providing feedback. You all, including the pre-built hardware vendors, have been absolutely awesome and we appreciate your effort and interest in this project. You, the users and builders, constitute the best of this project.

Yours truly
ranjib on behalf of reef-pi development team.
 

Yov

Community Member
View Badges
Joined
May 24, 2020
Messages
41
Reaction score
37
thanks @Ranjib and @Michael Lane for this effort and work you put in this project! (and keeping this free to use for everybody!)

Is there a methode to update this on a running project? wil this influence existing macro's etc?

Edit; found an answer to my question! ;)

Now i get the error that there is no more room left on my device... Gues its full of sensor data...
 
Last edited:

elysics

Community Member
View Badges
Joined
Jan 15, 2020
Messages
92
Reaction score
85
Hive minds,
I have just cut a new reef-pi release, 3.5. Its been almost 4 months sine the last stable reef-pi release and lot has piled up since then. Hence this release brings a handful of goodies. Key highlights are

New features:
  • Availability of ADS1015/ADS1115 series analog to digital converter. This will allow a wide range of analog sensor, including alternate temperature sensor, UV/Lux sensors, anemometers, VOC/CO2/Gas sensor and many more system to seamlessly integrate with reef-pi and used for controlling equipment.
  • We have introduced a special feature called "One Shot" in temperature , ph and ATO controllers. When enabled reef-pi will run the controller till the sensor reaches its target point instead of running perpetually. For example an one shot ATO controller will run the ATO pump till the sensor detect water level has reached the level and stop there. Same for temperature and ph, where the controller will stop soon the read reaches within min/max zone. When used within macro, this step will block the next step instead of running parallel. Intention of this feature is to help model auto water change and other scenarios.
  • Macros now have a new step called "alert". This can be used to send sms/email as part of a macro
  • Lighting module UI now support lunar, random and sine profile in addition to the existing ones (auto/interval, diurnal and fixed). Decimal/fractional values are also allowed in light profiles.
  • API documentations are now bundled with reef-pi code itself. The footer section in the UI will link to API documentation.

Bugfixes:
  • Pi 4 driver detection failures are resolved for upgraded raspberry pi os.
  • Temperature calibration bug was fixed
  • Equipment chart rendering bug was fixed
  • Temperature chart bounds are now removed, light chart rendering bug fixed.
  • Erroneous and out of acceptable range temperature sensor values are now ignored and retry logic has been implemented to address ds18b20 sensor reading issues.
Other than these critical features and bug fixes a number of tech chores across package updates, automated user acceptance test , performance improvement have also went in this release. I want to thank @Michael Lane from the bottom of my heart for his tireless contribution across drivers, backend and UI bugfixes. Without his work this release wont be happening in this challenging times.

Release builds are available in usual location: https://github.com/reef-pi/reef-pi/releases/tag/3.5

Please help us make reef-pi better by testing and providing feedback. You all, including the pre-built hardware vendors, have been absolutely awesome and we appreciate your effort and interest in this project. You, the users and builders, constitute the best of this project.

Yours truly
ranjib on behalf of reef-pi development team.
Nice work,

But, is it intended to have the temperature graphs go from zero to some margin above the upper level now? Before i actually could see the swings, which was nice because tiny drops would tell me that the ATO was still functioning and the reservoir not empty, now it's all one unidentifiable blob. The same happens if i create a new temp sensor. Theres no 0-value in the graph, checking right now if theres one in the database, although there shouldn't be in my existing data.
1600242665593.png


edit: Nope, no 0 values in the db either
 
Last edited:

stefanm

Active Member
View Badges
Joined
Oct 11, 2017
Messages
257
Reaction score
344
Help!

I got my replacement relay board as the old one died on me, this one has an ULN2803 onboard, it's active high like the previous one.

I've wired it up and the board powers up, but as soon as I attempt to power a relay via the pi the board just switches off, the led of the corresponding relay briefly illuminates, the grounds are tied (I've not messed with anything) power supply is 12v 2amps, so should be enough for energise the relay coils.

IMG_20200910_153944.jpg
IMG_20200910_154018.jpg


Can't understand why it's not working properly, I've soldered the PSU wires and also the signal wires from the pi directly to the board.
 

Yov

Community Member
View Badges
Joined
May 24, 2020
Messages
41
Reaction score
37
Help!

I got my replacement relay board as the old one died on me, this one has an ULN2803 onboard, it's active high like the previous one.

I've wired it up and the board powers up, but as soon as I attempt to power a relay via the pi the board just switches off, the led of the corresponding relay briefly illuminates, the grounds are tied (I've not messed with anything) power supply is 12v 2amps, so should be enough for energise the relay coils.

IMG_20200910_153944.jpg
IMG_20200910_154018.jpg


Can't understand why it's not working properly, I've soldered the PSU wires and also the signal wires from the pi directly to the board.
Ive had a simular problem. But with me it was because i played around with settings and had some outputts state high, after deleting the ports (and only adding them on the go as i needed them) they stayed up high and actet strange from time to time...) hard to explane... but are all connected ports configured on the pi?
 

rmilyard

Community Member
View Badges
Joined
Aug 24, 2020
Messages
72
Reaction score
30
Location
Goodyear

stefanm

Active Member
View Badges
Joined
Oct 11, 2017
Messages
257
Reaction score
344
Ive had a simular problem. But with me it was because i played around with settings and had some outputts state high, after deleting the ports (and only adding them on the go as i needed them) they stayed up high and actet strange from time to time...) hard to explane... but are all connected ports configured on the pi?
Yes configuration is Ok, I think the ground which ties to the pi may have come out as the dosers aren't functioning, I'll need to check in the morning, the lights go out in around 90 minutes, I can check the continuity between the 12v PSU and the 48v PSU that run the lights on the same pi, then I can confirm if this need to investigate any further.
 
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
8,222
Reaction score
14,671
Location
Palo Alto, Bay Area

How often do you have some type of algae issue?

  • Constantly Something

    Votes: 270 42.7%
  • Every Month

    Votes: 37 5.8%
  • Every Few Months

    Votes: 83 13.1%
  • A Few Times A Year

    Votes: 89 14.1%
  • Once A Year Or So

    Votes: 63 10.0%
  • Every Few years

    Votes: 30 4.7%
  • Never.....(are you lying?)

    Votes: 40 6.3%
  • Other (please explain)

    Votes: 21 3.3%

Online statistics

Members online
1,289
Guests online
3,408
Total visitors
4,697
Top