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

InactiveAcct

Well-Known Member
View Badges
Joined
Dec 2, 2019
Messages
520
Reaction score
539
Rating - 0%
0   0   0
I would like to move to the Grafana / Prometheus setup, but I am still doing my research, as I don't fully understand the "installation guide". It seems to assume the reader has a more intimate knowledge of Linux etc than I do. Working through all the steps so I at least get a partial understanding of what I'm doing. Then I can abandon the Adafruit idea.

I'm also running a Pi4 2GB. I have just upgraded an old desktop PC, so have the old one sitting as "spare" - thinking to set that up as the server.
I struggled a little with the guide, ChatGPT got me through it. You can tell it what you’re doing and copy/ paste the code, it’ll tell you if it sees errors and give you something to copy and paste back in. You can also drop long error codes into it and it can usually figure them out
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
978
Location
Germany
Rating - 0%
0   0   0
https://github.com/reef-pi/pH-Board This board!

can I use the temperature from my sensor to optimize my ph reading? the ph is influenced by temperature.

:)
Ah, cool. That would make this rather easy regarding adresses ^^

Reading from this document mostly the pH of a solution is affected by temperature. Temperature does affect the probe and reference solutions rather little. From the docs is looks like the reference is afftected very little (maybe to 0.05 pH) and the probe is also not affected much (+/- 2% of the difference to pH 7.0 between 20C and 30C).

This should mean that temperature effects create deviations less than 0.1pH, whereas people I have read typically don't expect to be able to calibrate better than 0.1pH anyways.

You could try to do two things to compensate:
- When calibrating, make sure your solutions have the same temperature as your probe and tank and use the appropriate pH value for that temperature. You should be able to find that on the reference solution package.
- Use a transform formula to compensate for the change in probe behavior with temperature:
(v-7.0)/(1.0+0.99/5/59.16*T_diff) + 7.0
For T_diff you just enter the temperature difference that your tank has to 25°C. E.g. if your tank is kept at 28°C, just enter 3.0 there. FOr a temperature of 22°C, you enter -3.0
For that example this will result in a pH value of 8.2 to be corrected to 8.19

I don't think it's worth the effort.
 

bh750

Active Member
View Badges
Joined
Nov 17, 2016
Messages
418
Reaction score
267
Rating - 0%
0   0   0
Hi all, I'm a 10 year survivor of Apex. I will never, ever invest in their products again. More frustration than problems over the years. I came on here to see what its like in the DIY / open source world.

Just scanning through the pages my first reaction is ReefPi seems very technical and may have to spend lots of time troubleshooting. I'm not a developer but I work in technology and am fairly tech saavy.

- Is this something for a somewhat techy person but not an engineer?
- How much better than Apex?
- Is there a basic / newbie / beginner path? I dont need to control a ton of things but would be nice to automate things like lights and get some basic readings an monitoring

Back to more reading here! Thanks in advance!
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
reef-pi is a DIY project, it can be as hard as a furniture making/fine woodworking or even more (if you do not have any prior experience with computer stuff). Expect some learning, time involvement etc. It's an involved thing. its a project :-/

There are some off the shelf components that you can use to make it simpler and less cumbersome, albeit with compromises.

Its no where near as smooth experience as Apex. But it does the basic jobs (equipment control, temperature, ato control, ph monitoring etc ) fairly well. Many of us are running it for years now. I am of course biased :0) , I have been running 5+ tanks for 3+ years, few of them are more than 7 years old. All are on reef-pi from ground up, they are not super fancy, but also proper mix reef tanks (with beginner to intermediate level acros)


Hope this help,
 

Lingwendil

Well-Known Member
View Badges
Joined
Jul 23, 2012
Messages
529
Reaction score
450
Location
Antioch, California
Rating - 0%
0   0   0
Hey Ranjib, just a question on PWM with the PCA board for lighting.

I know that the PCA9685 supports 12 bit PWM, which accounts to 4096 steps. Is it possible to break the selected percentage down lower than 1% steps manually in reef-pi for sub 1% PWM output?

The reasoning behind this request is as follows-

My current Arduino setup uses a PCA9685 board for PWM, with Meanwell LDD -L and LDD-H drivers. The output is set by manually filling in the value from 0000-4095. I run my white channels at a 0001 or 0002 value, as anything higher is much too bright on my main channels. I also am not interested in adding specific moonlights at this time, as the main lights are excellent when appropriately dimmed.

Is this something that can be done easily in reef-pi, or does the ability to set/view actual steps versus 0-100% not currently exist?
 

InactiveAcct

Well-Known Member
View Badges
Joined
Dec 2, 2019
Messages
520
Reaction score
539
Rating - 0%
0   0   0
Hi all, I'm a 10 year survivor of Apex. I will never, ever invest in their products again. More frustration than problems over the years. I came on here to see what its like in the DIY / open source world.

Just scanning through the pages my first reaction is ReefPi seems very technical and may have to spend lots of time troubleshooting. I'm not a developer but I work in technology and am fairly tech saavy.

- Is this something for a somewhat techy person but not an engineer?
- How much better than Apex?
- Is there a basic / newbie / beginner path? I dont need to control a ton of things but would be nice to automate things like lights and get some basic readings an monitoring

Back to more reading here! Thanks in advance!

It wasn’t too bad for me but things that help are knowing how to use a multimeter for continuity/ resistance and voltage, good soldering / wire splicing skills with a good soldering iron (I prefer a solder gun which heats up really fast), using a heat gun and shrink sleaving, CAD and 3D printing. Programming skills come in handy but are more accessible with chatGPT etc. Will also save time and headache to do the more complicated circuits like L293D motor driver with an off the shelf breakout board so you can just connect leads to it.

An old version of my wiring diagram is below (had to make some changes, float switches each needed their own 10kohm resistor was biggest change) along with some pics. With time and patience it will be a rewarding project.

IMG_8115.jpeg IMG_8130.jpeg IMG_8129.jpeg
 
Last edited:

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
160
Location
indo-pacific
Rating - 0%
0   0   0
I know that the PCA9685 supports 12 bit PWM, which accounts to 4096 steps. Is it possible to break the selected percentage down lower than 1% steps manually in reef-pi for sub 1% PWM output?
I'm never used it for light, but you can just type float value in interface.
Like 0.024%...
 

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
160
Location
indo-pacific
Rating - 0%
0   0   0
Hi all, I'm a 10 year survivor of Apex. I will never, ever invest in their products again. More frustration than problems over the years. I came on here to see what its like in the DIY / open source world.

Just scanning through the pages my first reaction is ReefPi seems very technical and may have to spend lots of time troubleshooting. I'm not a developer but I work in technology and am fairly tech saavy.

- Is this something for a somewhat techy person but not an engineer?
- How much better than Apex?
- Is there a basic / newbie / beginner path? I dont need to control a ton of things but would be nice to automate things like lights and get some basic readings an monitoring

Back to more reading here! Thanks in advance!
What problems do you want to solve by switching to reef-pi?

I can say that the biggest challenge that you are going to face in this way - commercial equipment like dosers, KH auto-testers etc just do not have any API or interfaces for reef-pi integration.

So you will use "Apex" any way because functionality is limited by available hardware, not software.
 
Last edited:
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hey Ranjib, just a question on PWM with the PCA board for lighting.

I know that the PCA9685 supports 12 bit PWM, which accounts to 4096 steps. Is it possible to break the selected percentage down lower than 1% steps manually in reef-pi for sub 1% PWM output?

The reasoning behind this request is as follows-

My current Arduino setup uses a PCA9685 board for PWM, with Meanwell LDD -L and LDD-H drivers. The output is set by manually filling in the value from 0000-4095. I run my white channels at a 0001 or 0002 value, as anything higher is much too bright on my main channels. I also am not interested in adding specific moonlights at this time, as the main lights are excellent when appropriately dimmed.

Is this something that can be done easily in reef-pi, or does the ability to set/view actual steps versus 0-100% not currently exist?
Reef-pi accepts a float value 0-100, for jack control (Pwm connector ) and the individual drivers maps it back to corresponding range (0-4095 for pca9685) .. this should not require any software changes .. on reef-pi side, you should be able to get this working by standard pwm circuitry,.. software drivers should take care of rest
 

bh750

Active Member
View Badges
Joined
Nov 17, 2016
Messages
418
Reaction score
267
Rating - 0%
0   0   0
Thanks for the insight and feedback....

reef-pi is a DIY project, it can be as hard as a furniture making/fine woodworking or even more (if you do not have any prior experience with computer stuff). Expect some learning, time involvement etc. It's an involved thing. its a project :-/

There are some off the shelf components that you can use to make it simpler and less cumbersome, albeit with compromises.

Its no where near as smooth experience as Apex. But it does the basic jobs (equipment control, temperature, ato control, ph monitoring etc ) fairly well. Many of us are running it for years now. I am of course biased :0) , I have been running 5+ tanks for 3+ years, few of them are more than 7 years old. All are on reef-pi from ground up, they are not super fancy, but also proper mix reef tanks (with beginner to intermediate level acros)


Hope this help,

Thanks this is encouraging, altho would never attempt making fine furniture :) As I'll detail below I am looking to do the most basic stuff.

It wasn’t too bad for me but things that help are knowing how to use a multimeter for continuity/ resistance and voltage, good soldering / wire splicing skills with a good soldering iron (I prefer a solder gun which heats up really fast), using a heat gun and shrink sleaving, CAD and 3D printing. Programming skills come in handy but are more accessible with chatGPT etc. Will also save time and headache to do the more complicated circuits like L293D motor driver with an off the shelf breakout board so you can just connect leads to it.

An old version of my wiring diagram is below (had to make some changes, float switches each needed their own 10kohm resistor was biggest change) along with some pics. With time and patience it will be a rewarding project.

Oh good - I'm very comfortable with basic wiring, using a multimeter, soldering skills, shrink sleeving. But no experience with CAD or 3D printing. Will I need a 3D printer? I have basic programming skills. Thanks for sending the diagram. How large are those boxes you show with all of the circuits?

What problems do you want to solve by switching to reef-pi?

I can say that the biggest challenge that you are going to face in this way - commercial equipment like dosers, KH auto-testers etc just do not have any API or interfaces for reef-pi integration.

So you will use "Apex" any way because functionality is limited by available hardware, not software.

So I'm really only looking to do some basic things: read temp, PH, Salinity, and turn on and off things like lights and pumps.

Is this something that can be kept as simple or complex as desired?

I also read somewhere someone mentioned their chip catching fire and had someone not been there could've burnt down the house (always a consideration with reef tanks) but is this a real risk?

Ideally I'd love to make something a simple as possible to:

1) Reporting of Parameters:
- Temperature
- Salinity
- PH

2) Turn on and off outlets:
- LED lights (Kessil A360) and maybe ramp up and down like I could with my apex
- pumps / powerheads on an off as needed
- Skimmer
- Heaters


If I could do that without burning down the house or my bank account I'd be thrilled!
 

InactiveAcct

Well-Known Member
View Badges
Joined
Dec 2, 2019
Messages
520
Reaction score
539
Rating - 0%
0   0   0
Thanks for the insight and feedback....



Thanks this is encouraging, altho would never attempt making fine furniture :) As I'll detail below I am looking to do the most basic stuff.



Oh good - I'm very comfortable with basic wiring, using a multimeter, soldering skills, shrink sleeving. But no experience with CAD or 3D printing. Will I need a 3D printer? I have basic programming skills. Thanks for sending the diagram. How large are those boxes you show with all of the circuits?



So I'm really only looking to do some basic things: read temp, PH, Salinity, and turn on and off things like lights and pumps.

Is this something that can be kept as simple or complex as desired?

I also read somewhere someone mentioned their chip catching fire and had someone not been there could've burnt down the house (always a consideration with reef tanks) but is this a real risk?

Ideally I'd love to make something a simple as possible to:

1) Reporting of Parameters:
- Temperature
- Salinity
- PH

2) Turn on and off outlets:
- LED lights (Kessil A360) and maybe ramp up and down like I could with my apex
- pumps / powerheads on an off as needed
- Skimmer
- Heaters


If I could do that without burning down the house or my bank account I'd be thrilled!

Regarding burning down house, really recommend powering your tank via a wall outlet that is properly functioning for both GFCI and AFCI. GFCI protects you from electrocution while AFCI shuts off the circuit if it detects arcing which can lead to a fire. I think we can never fully guarantee that any device won’t burn down the house when it’s plugged in - and your reef-pi is one of those devices that isn’t UL listed. Even Terrance, the face of Neptune Systems for many years, suffered a reef tank-induced house fire and I believe there was a short list of well-established products or associated interconnects that started it. Make sure you do “burn in” testing where you run it through the paces with eyes on the hardware prior to closing up the packages, look and smell for smoke and see if any devices feel abnormally hot.

You can get by without a 3d printer using project boxes. Think my dimensions are 7L x 4.5W x 3H inches or so
 

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
160
Location
indo-pacific
Rating - 0%
0   0   0
So I'm really only looking to do some basic things: read temp, PH, Salinity, and turn on and off things like lights and pumps.

Is this something that can be kept as simple or complex as desired?

I also read somewhere someone mentioned their chip catching fire and had someone not been there could've burnt down the house (always a consideration with reef tanks) but is this a real risk?

Ideally I'd love to make something a simple as possible to:

1) Reporting of Parameters:
- Temperature
- Salinity
- PH

2) Turn on and off outlets:
- LED lights (Kessil A360) and maybe ramp up and down like I could with my apex
- pumps / powerheads on an off as needed
- Skimmer
- Heaters


If I could do that without burning down the house or my bank account I'd be thrilled!
Actually if you already have Apex- why need to switch? For these anything is good enough.

I'm switched from GHL to DIY only because I need programmable logic+ normal notifications to messangers.
And I want to use some custom hardware without struggling with integration.

About burning the house - Raspberry Zero 1/2/3 often likes to die without reason because of poor quality. Fullsize raspberry SBC or analogs are better.
And actually you dont need raspberry pi at all. You can run it on a virtual machine.
 
Last edited:

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
160
Location
indo-pacific
Rating - 0%
0   0   0
And about esp32 integration in reef-pi 6.
I don't like idea of direct Pin control over wifi.
I can easily imagine how it will kill the tank/burn the house if wifi will be disconnected.
Thats why i'm building all system on smart, standalone moduls controlled over REST API.
Reef-pi do not have such functionality to work over API, so I have to make my own realization.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
And about esp32 integration in reef-pi 6.
I don't like idea of direct Pin control over wifi.
I can easily imagine how it will kill the tank/burn the house if wifi will be disconnected.
Thats why i'm building all system on smart, standalone moduls controlled over REST API.
Reef-pi do not have such functionality to work over API, so I have to make my own realization.
What do you mean by reef-pi does not have any api ? Entire ui is powered by api, and the api also exposes lower level direct controls instead of full feedback loops
 

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
160
Location
indo-pacific
Rating - 0%
0   0   0
What do you mean by reef-pi does not have any api ? Entire ui is powered by api, and the api also exposes lower level direct controls instead of full feedback loops
All "drivers" are hardcoded, no way to add random device without updating code of reef-pi.
For example esp32 driver.
By the way, my pool request is still waiting
 

Broady2067

Active Member
View Badges
Joined
Jun 21, 2023
Messages
157
Reaction score
90
Location
Sheffield. UK
Rating - 0%
0   0   0
Just an update on this, I removed all temperature probes except for two and it has been stable. Ill try to add a probe every few days to see if I can find the culprit.

For some reason my google app password for alerts stopped working, so I generated a new password and this seems to be working again. I also created an adafruit.io account and set up alerts for extra safety.

I still need some help on how I can get my relay board to turn off my metal halide light.
I am totally lost with the e-mail alerts. I thought i had set it up correctly but apparently not. is there a link to tutorial.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
All "drivers" are hardcoded, no way to add random device without updating code of reef-pi.
For example esp32 driver.
By the way, my pool request is still waiting
That’s is very different than saying reef-pi has no api. Drivers have specifics (like i2c protocol) that’s very different across .. hence driver types are fixed. There’s file based driver that you can use to integrate arbitrary devices
 
Back
Top