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

Found the problem with the probe haha. Where can I get heat shrink tubing that is thermally conductive? (For my new probes)
Don't worry too much about thermal conductivity, it doesn't really matter if you see a 0.1 degree change now or in 3 minutes. I use aquarium silicone, which is rather isolating thermally, and it's fine, if i put it from 19° air into a 25° bucket of saltwater, it takes maybe a minute, 2 at most, until the sensor shows 25. And if i open a window for fresh air for 5 minutes, it picks up the change in air temperature no problem.

I'd definitely value reef safe materials vs unknown plastics and plasticizers higher than having the sensor be faster by a few seconds
 
Last edited:
I've been away for a few years but I'm back, I have a version of blueacro that I just saw is no longer available, does the latest version of reef-pi still support the ph module of this board? Is the calibration visual or is it still with the json file?
 
I've been away for a few years but I'm back, I have a version of blueacro that I just saw is no longer available, does the latest version of reef-pi still support the ph module of this board? Is the calibration visual or is it still with the json file?
If it worked with the old reefpi it should work with the current version as I don't believe they removed any previously supported PH boards. Ph calibration has a GUI.
 
Omg, you just made my life! *swoon!* so doing this ASAP

Welcome to the development thread of reef-pi, an open-source, affordable, modular DIY reef-tank controller based on Raspberry Pi.

aio.jpg

If you are trying to build a reef-pi controller, please check out the build guides linked below. You can use this thread to seek help and to stay updated with the latest development.

Screen Shot 2018-11-04 at 8.38.50 PM.png



reef-pi provides following functionalities:
  • Equipment control or automated power strip (including digital timers to switch on/off equipment at periodic intervals)
  • LED light control (24 hour cycle), diurnal cycle, fixed dimmig
  • Auto Top Off (based on photoelectric water level sensor or float switch)
  • Temperature monitoring and control (switch on/off heater & chiller)
  • pH monitoring
  • Dosing automation
  • Macro (feed mode etc)
  • And several other features like camera controls (periodic image capture and upload on google drive), telemetry (dashboard and alerting based on sensor values using adafruit.io), mobile friendly UI etc.
A beginner friendly list of reef-pi build guides are available on adafruit.io, if you are planning to build a reef-pi controller start with them.
  1. Setup and installation
  2. Power controller
  3. Temperature controller
  4. Auto Top Off
  5. Light controller
  6. pH monitor
Since reef-pi is modular and customizable, the cost of individual builds varies. In our experience reef-pi controller are almost always cheaper than the commercial alternatives and costs anywhere between 100 to 550 USD. An example bill of materials can be found here as amazon list. If you are building a reef-pi controller, I highly encorage you start a build thread and tag it with #reefpi to seek help with your build


--------------------------- Original thread start ---------------------
Hello friends,
I am starting a master thread for a DIY reef tank controller that is based on all opensource software and hardware. I had started with this project with following goals:
- Build an opensource software and hardware based reeftank controller that anyone can use and hack
- Keep the controller well tested against a set of standard equipment I use, while make it possible for other equipment to be used
- Maintain my own tank build threads and their evolution, backed by this controller.
- Learn electronics and reef keeping along the way (I am biologist by education & software engineer by occupation)

Following are the details of what I have developed & tested till now:
Controller software:
- The main controller software is called reef-pi. It is written in go, its fast and performant. It used embd for hardware communication. It also runs a little web server which provides the UI for the controller. UI is written in React , and can be accessed from anything that has web browser. As of now, the reef-pi supports following things:
- AC 110/220 V socket on/off (uses optocoupled relays underneath). This is used to remotely switch on/off return pump, LED bulb, heater etc.
- 0-20 Volt DC PWM. This is used to control things like dimmable LEDs, DC pumps. I use it to control my Kessil A80, A360. As well as a 5V DC pump (i use it as wave maker in one of my pico with SPS). PWM is done using PCA9685 breakout board from adafruit. This board supports 16 channels. I am using only 5 at max, as of now.
- Analog sensor support using MCP3008 analog to digital converter. This supports 8 channels. i.e. I can use up to 8 sensors/probes. As of now, I have only tested temperature sensor with it.
Other than the following basic hardware/equipment support, the controller software provides following additional features:
- Setting up daily/weekly/monthly scheduled jobs. Like turning on/off certain equipment. I use this feature to run my AC20 HOB filter nightly.
- Setting up dusk-to-dawn like lighting using PWM. The UI gives 12 vertical slider based 0-24 hours (each slider representing 2 hours gaps). I combine two of these two control the kessil LEDs.
- Authentication using Google OAuth. Since the whole controller runs on raspberry pi and provides an web frontend, security of one of my concern. To mitigate this, I have added google authentication support, which when configured will allow only certain users to log in (email specified in the configuration value).

This is the summary of the core controller software and what features it has as of now. I am constantly writing/improving things around it. As of now, I have two reef tank powered by this. I 'll have seperate threads on the individual builds that will include the housing and ancillary hardware in nano-reef.com, as my tank build threads are there, but I'll share all the controller specific common bits here, including UI screen shots, and tank pics :)

20161115_081550.jpg
 
Is there a way to change the date formats for graphs? For me, the x axis labels are almost unreadable because they contain 2 or 3 points covering the whole axis with the full timestamp, day, 3 letter month, year, and time. On the 24 hour graphs, hours alone would suffice, and be much more readable, the pop-ups for individual data points have the full timestamp anyway. For the historical graphs maybe only month and day as axis labels, or only month even

Maybe a dynamic switch between different label ranges depending on the time span of the graph for a really fancy solution
 
Last edited:
@Ranjib
Error in a ph calibration?
maybe i have a problem in my ph probe, but, when i calibrate it, the program says "mid value" and "second value". There is any difference if "mid value" is > "second value" or "mid value" < "second value" because it seems that if the "second value" is less than the "mid value" the real value is not correct.
i made ax example, yesterday i calibrate my ph probe in my tank,
"mid value" = 7
"second value" = 4
now in my tank, the ph is 6.4! if i put the probe in the 7 calibration liquid and i read 7 (+- 0.1 decimals) the same in the 4 calibration liquid.
fortunately, with the liquid test, the ph is 8. (or everything in my tank are dead).
today i'll try with
"mid value" = 4
" second value" = 7

(i tried to read the program on github, but is very difficult without comment :( )
 
@Ranjib
Error in a ph calibration?
maybe i have a problem in my ph probe, but, when i calibrate it, the program says "mid value" and "second value". There is any difference if "mid value" is > "second value" or "mid value" < "second value" because it seems that if the "second value" is less than the "mid value" the real value is not correct.
i made ax example, yesterday i calibrate my ph probe in my tank,
"mid value" = 7
"second value" = 4
now in my tank, the ph is 6.4! if i put the probe in the 7 calibration liquid and i read 7 (+- 0.1 decimals) the same in the 4 calibration liquid.
fortunately, with the liquid test, the ph is 8. (or everything in my tank are dead).
today i'll try with
"mid value" = 4
" second value" = 7

(i tried to read the program on github, but is very difficult without comment :( )
What circuit are you using?

As I understand calibrating Mid value should be 7.0 and second either 4.0 or 10.0. I think going other way around would mess things up. The value you expect to measure should fall between the two calibration values, as you expect 8 you should be using 7.0 and 10.0 for best results. Not sure if that could cause what you are experiencing though. Do you get close to 8 with no calibration? When viewing the calibration window you see the non-calibrated pH so you should be seeing something different when calibration is open vs closed.

EDIT: @Ranjib, not sure if you ever looked at presenting the slope of a pH probe so users can tell when a probe is bad or getting old.

 
Last edited:
What circuit are you using?

As I understand calibrating Mid value should be 7.0 and second either 4.0 or 10.0. I think going other way around would mess things up. The value you expect to measure should fall between the two calibration values, as you expect 8 you should be using 7.0 and 10.0 for best results. Not sure if that could cause what you are experiencing though. Do you get close to 8 with no calibration? When viewing the calibration window you see the non-calibrated pH so you should be seeing something different when calibration is open vs closed.

EDIT: @Ranjib, not sure if you ever looked at presenting the slope of a pH probe so users can tell when a probe is bad or getting old.

I don't have at home the ph10 solution now, but my previous ph value was nearly correct from 7,9 to 8.2, I've deleted the ph probe to reset some strange value (for cable management I disconnect the probe but it was always in the water ), after re-adding it I've found this strange values.
I check the cable, i check the solutions (i have another probe in my calcium reactor), i'm using a self-made ph-board from Roberto Buti, so i read the raw value (like 13600 now. )

in the afternoon (im living in italy) i'll try to recablibrate the probe, middle value 4 and second value 7. i'm read both raw value and calculate the slope and the hypothetically correct value, then i will compare with the ph value of reefpi
 
Recalibration done!
Mid value, ph 4 raw 32350
Second value, ph 7 raw 11600

Tank value, ph 7,83 raw 6106, ph test kit 7,8

Conclusion:
my ph probe has a lot of offset value, it's time to replace it
There is a difference between the two calibration
 
Recalibration done!
Mid value, ph 4 raw 32350
Second value, ph 7 raw 11600

Tank value, ph 7,83 raw 6106, ph test kit 7,8

Conclusion:
my ph probe has a lot of offset value, it's time to replace it
There is a difference between the two calibration
I think it's ok to use 7 and 4 to calibrate, just better to use 10, either way it should be close. Hopefully a new probe gets it sorted.
 
I think it's ok to use 7 and 4 to calibrate, just better to use 10, either way it should be close. Hopefully a new probe gets it sorted.
ph8 is near ph7, the point of calibration, so theoretically the value is correct

I also have a redox probe the ph increase but the redox goes down... problably I need another calibration. Probably the biggest raw value is the "mid value" the second one is the "second value"
 
ph8 is near ph7, the point of calibration, so theoretically the value is correct

I also have a redox probe the ph increase but the redox goes down... problably I need another calibration. Probably the biggest raw value is the "mid value" the second one is the "second value"
I found it, was looking for this yesterday. This explains nicely how pH is calculated and shows the formulas. It's all based on mV so I'm not sure how those analog values reef-pi gets from the circuit are translated. This is what my circuit is based on.

 
I found it, was looking for this yesterday. This explains nicely how pH is calculated and shows the formulas. It's all based on mV so I'm not sure how those analog values reef-pi gets from the circuit are translated. This is what my circuit is based on.

the ph probe has a linear trend, so i can use the equation of a line passing through two-point to calibrate my probe and convert my mV to my ph. But, first of all, the signal (mV) needs to be amplified and elaborated by an ADC. So my raw signal is between +32767 -32768.
If i had a little slope but the signal in mV has always a linear trend and i can calibrate between my two point (4ph and 7 ph or 7 ph and 10 ph) the slope is irrilevant!
 
I am in the process of redoing one of my original reefpi since I want to add an additional light. I have 2 lights and one of them is what I thought just a straight forward 12v led light being controlled via pwm with a mosfet. The original reefpi is on a bread board and I have used one of these in the past - mosfet board On my new set up I have it working but the LED's are very dim, nothing like how it looks with the current reefpi that is in use. I am using an @Michael Lane goby hat and I have pwm and ground going to the mosfet board and have 12v input to the board and then the output from the mosfet going to the led's.

Anyone have any suggestions on why it appears to not be getting full power? It does change when I increase the value but even at 100% its more like 5%, just trying to think what I may have missed.

Thanks :)
 
I am in the process of redoing one of my original reefpi since I want to add an additional light. I have 2 lights and one of them is what I thought just a straight forward 12v led light being controlled via pwm with a mosfet. The original reefpi is on a bread board and I have used one of these in the past - mosfet board On my new set up I have it working but the LED's are very dim, nothing like how it looks with the current reefpi that is in use. I am using an @Michael Lane goby hat and I have pwm and ground going to the mosfet board and have 12v input to the board and then the output from the mosfet going to the led's.

Anyone have any suggestions on why it appears to not be getting full power? It does change when I increase the value but even at 100% its more like 5%, just trying to think what I may have missed.

Thanks :)
Do you have +12v coming out of the mosfet going into the light?
 
Do you have +12v coming out of the mosfet going into the light?
Yup, I think its the mosfet that is used in that board. I think it drops the voltage down to where the led's are not getting enough juice. I am going to pick up a IRLB8721pbf that is similar to what I have used in the past. I am using this in another circuit but its for moonlights and they may be dimmer but thats ok for moon lights.

I wish I had another one on had to try but thats my guess right now, it works but its really dim. :(
 
Yup, I think its the mosfet that is used in that board. I think it drops the voltage down to where the led's are not getting enough juice. I am going to pick up a IRLB8721pbf that is similar to what I have used in the past. I am using this in another circuit but its for moonlights and they may be dimmer but thats ok for moon lights.

I wish I had another one on had to try but thats my guess right now, it works but its really dim. :(
Is the PWM signal only +3.3v @ 100%? Check if you see +3.3v on signal wire going into module at 100%, if so and the output from module is only say 8v instead of 12v then it would seem like mosfet needs 5v signal to turn on fully. Maybe when you turn the PWM pin to 100% it only goes to +2v instead of +3.3v which would point to the pca9685 or Pi pin.
 
Is the PWM signal only +3.3v @ 100%? Check if you see +3.3v on signal wire going into module at 100%, if so and the output from module is only say 8v instead of 12v then it would seem like mosfet needs 5v signal to turn on fully. Maybe when you turn the PWM pin to 100% it only goes to +2v instead of +3.3v which would point to the pca9685 or Pi pin.
I'm pretty sure the pwm coming from the hat is only 3.3v and that is causing the issues. I took some measurements and it appears that when no load is on the output it scales from 10.5v to 12v at 100%. But when the light is added to the mix it drops it down to 8v so I think I need a mosfet with a lower gate voltage which is in fact what I used in my earlier build. I've ordered some but will take a day or so to arrive but I think that will solve my issue. Thanks for helping think through this, it's been awhile since I've had to troubleshoot any mosfet/pwm based stuff.

:)
 

TOP 10 Trending Threads

Back
Top
Home
Post thread…
Market
What's new