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

chipmunkofdoom2

Always Making Something
View Badges
Joined
Jun 6, 2017
Messages
2,417
Reaction score
4,505
Location
Baltimore, MD
Rating - 0%
0   0   0
https://io.adafruit.com/ has REST api to send data and chart based on it. By shipping I meant reef-pi can be configured to send data to adafruit.io , where the data will be stored for charting or download for other use
code example is here: https://github.com/ranjib/reef-pi/blob/master/controller/telemetry.go

Very interesting, thanks for posting this. As of now, with my personal project, I'm just using a Python script to parse the values into a crude Charts.js webpage.

chart.JPG
 

Aaron Smith

Active Member
View Badges
Joined
Apr 9, 2017
Messages
250
Reaction score
273
Location
Oregon
Rating - 0%
0   0   0
@Ranjib
Have you got PH running in reef-pi yet? My next task is to set up the temp and PH. Lighting is working fine as long as I dont mess with the sliders too much. I don't have the relays working form the jobs tab yet, but my wish list for now is:
1. Automatic lighting (mostly complete)
2. Multi zone temp monitor (not control)
3. PH monitor (not control)

My ATO is all gravity fed my pumps and wavemakers are controlled via single pole switches. (eventually I'll work these into jobs).
 

chipmunkofdoom2

Always Making Something
View Badges
Joined
Jun 6, 2017
Messages
2,417
Reaction score
4,505
Location
Baltimore, MD
Rating - 0%
0   0   0
Sorry if I missed this, but how are you guys measuring pH? I got something from Atlas Scientific because I didn't want to have to worry about isolating, but I'm curious to see what you're using.
 
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
@Ranjib
Have you got PH running in reef-pi yet? My next task is to set up the temp and PH. Lighting is working fine as long as I dont mess with the sliders too much. I don't have the relays working form the jobs tab yet, but my wish list for now is:
1. Automatic lighting (mostly complete)
2. Multi zone temp monitor (not control)
3. PH monitor (not control)

My ATO is all gravity fed my pumps and wavemakers are controlled via single pole switches. (eventually I'll work these into jobs).
I am experimenting with the temperature controller for the time being. I can get data out from the probe I am using and chart it, but this does not reflect the actual temperature in absolute values (like probe reading varies from 600-870), I am now investgating the probe circuitry that differs between probe to probe and then finalize a particular version. reef-pi already have MCP3008 ADC support to read probe data, but most of the probe needs to pass through a circuit of resistors/capacitors before we hook connect it to MCP3008 or ADC pin. For a popular DIY temp probe like DS18B0 it is straight forward, and reference circuit is available, but I am not confident this is reef safe. The reef safe ones (milawukee, coralife, neptune etc) does not have circuit diagrams available on-line or in the open.

I'll keep you all updated on the temperature probe progress, as and when I can mimic the same readings as we see in LCD display of a digital thermometer. I expect the same development cycle with pH probe as well.

@chipmunkofdoom2 if you are using atlas scientific probes, they also sell the probe reading circuit that we can integrate straight in reef-pi using I2C protocol. They have example code for raspberry pi as well. let me know if you are taking this route, I can help with doing the software part, currently, I will focus on temperature control mostly, hence not ordering and ph probe. But supporting this circuit will open up ph, temperature , orp all sorta things
 

Aaron Smith

Active Member
View Badges
Joined
Apr 9, 2017
Messages
250
Reaction score
273
Location
Oregon
Rating - 0%
0   0   0
I am experimenting with the temperature controller for the time being. I can get data out from the probe I am using and chart it, but this does not reflect the actual temperature in absolute values (like probe reading varies from 600-870), I am now investgating the probe circuitry that differs between probe to probe and then finalize a particular version. reef-pi already have MCP3008 ADC support to read probe data, but most of the probe needs to pass through a circuit of resistors/capacitors before we hook connect it to MCP3008 or ADC pin. For a popular DIY temp probe like DS18B0 it is straight forward, and reference circuit is available, but I am not confident this is reef safe. The reef safe ones (milawukee, coralife, neptune etc) does not have circuit diagrams available on-line or in the open.

I'll keep you all updated on the temperature probe progress, as and when I can mimic the same readings as we see in LCD display of a digital thermometer. I expect the same development cycle with pH probe as well.

@chipmunkofdoom2 if you are using atlas scientific probes, they also sell the probe reading circuit that we can integrate straight in reef-pi using I2C protocol. They have example code for raspberry pi as well. let me know if you are taking this route, I can help with doing the software part, currently, I will focus on temperature control mostly, hence not ordering and ph probe. But supporting this circuit will open up ph, temperature , orp all sorta things

Going the atlas scientific route looks like we can do PH / ORP / Salinity all in separate kits. By the time you have all 3 we are looking at close to a $500 bill!
 

Aaron Smith

Active Member
View Badges
Joined
Apr 9, 2017
Messages
250
Reaction score
273
Location
Oregon
Rating - 0%
0   0   0
Is the issue with the DS18B0, a rust issue as I read in previous posts? I wonder if we could shrink tube or something? I have a 3 pack I could run some testing on.
 
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
Is the issue with the DS18B0, a rust issue as I read in previous posts? I wonder if we could shrink tube or something? I have a 3 pack I could run some testing on.
Yup.
Coralife digital temperature comes for 20$, including the LCD screen. So I am pretty sure we are missing something here, we may not get the highest precision, but we should be able to detect +/- 2 F with it. I am planning to take a look
 
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
@Aaron Smith your relay is working as expected? I remember you were mentioning something not correct in their behavior too. Can take a look tonight.
I have added a patch for the lighting code where it will respect a minimum and maximum threshold, to avoid blinking errors :)
I have a feeling this error only happens in pwm based circuit, I am planning to test out 0-10v analog using a digital pot and see what happens
 

Aaron Smith

Active Member
View Badges
Joined
Apr 9, 2017
Messages
250
Reaction score
273
Location
Oregon
Rating - 0%
0   0   0
@Aaron Smith your relay is working as expected? I remember you were mentioning something not correct in their behavior too. Can take a look tonight.
I have added a patch for the lighting code where it will respect a minimum and maximum threshold, to avoid blinking errors :)
I have a feeling this error only happens in pwm based circuit, I am planning to test out 0-10v analog using a digital pot and see what happens

My jobs tab was not initiating relays off or on. I will look at the patch. What is the process for adding the patch?
 
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 there, good work and glad to see someone experimenting with a RPi based aquarium controller. I'm working on something similar myself and had a question.

I'm trying to duplicate the default "on" or "off" functionality some controllers have. This is where the outlet is on even if the device is disconnected from the head or control unit. Have you figured out a way to do this? I'm using a simple relay board similar to the one you're using, but I just can't seem to figure a good way to do this. I'm just trying to think worst case scenario. If the RPi dies, freezes on reboot, or the GPIO SoC dies, the relays would be shut and anything running off a relay (pumps, dosers, lighting, etc) would all be shut down and wouldn't come back on until I was able to manually intervene.

The only thing I could think of was wiring the loads to the NC terminals of the relay and energizing the relays as soon as possible after boot. This would, however, turn on ANY equipment plugged into a relay until the OS boots. This means dosing pumps would be dosing, lights would be on, etc, until a startup script could be run and shut them down. In the event the OS never boots, they would never be shut off. I suppose I could wire some outlets as "default on" for things that we generally want to be on all the time, like powerheads and skimmers, but leave the dosing pumps on the "default off" outlets. This way, worst case scenario, the tank still has flow and some filtration.

What are your thoughts on this?
@chipmunkofdoom2 sorry I seem to have skipped your question somehow. Here are my thoughts:
Most relays will let you configure them either way. Default on or default off. My first controller had all on , second one has two on , two off. This allows me to keep something off unless explicitly switched on (like heater) and some on unless something explicitly switches off (like return pump). This one controls healdsburg, a 2.7G fluval spec 3 pico reef.
 

Aaron Smith

Active Member
View Badges
Joined
Apr 9, 2017
Messages
250
Reaction score
273
Location
Oregon
Rating - 0%
0   0   0
Actually aside from the buttons on the lighting tab not refreshing, my lights are cycling flawlessly.[emoji1]
 
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
My jobs tab was not initiating relays off or on. I will look at the patch. What is the process for adding the patch?
I'll publish a new build tonight. You have to download and reinstall reef-pi.

On this note, one of my goal was to export/import reef-pi's configuration, to better reproduce controller configurations. That way we can easily share how we control a specific tank etc. .... one day :) . Definitely before x-mas
 
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
Actually aside from the buttons on the lighting tab not refreshing, my lights are cycling flawlessly.[emoji1]
Yeah the buttons state does not stay synced with the actual controller state if you change tabs. This is know, and annoying. I have been lazy to fix it because it does not impact any actual functionality (like the temp probe). None the less,,, i'll fix it tab by tab
 

Aaron Smith

Active Member
View Badges
Joined
Apr 9, 2017
Messages
250
Reaction score
273
Location
Oregon
Rating - 0%
0   0   0
I'll publish a new build tonight. You have to download and reinstall reef-pi.

On this note, one of my goal was to export/import reef-pi's configuration, to better reproduce controller configurations. That way we can easily share how we control a specific tank etc. .... one day :) . Definitely before x-mas

This would allow me to share my config so you can see first hand how I messed up the config file #noobs[emoji38]

It would be sweet to not have to redo my config file on re-install. Am I doing something wrong?
 

Aaron Smith

Active Member
View Badges
Joined
Apr 9, 2017
Messages
250
Reaction score
273
Location
Oregon
Rating - 0%
0   0   0
This would allow me to share my config so you can see first hand how I messed up the config file #noobs[emoji38]

It would be sweet to not have to redo my config file on re-install. Am I doing something wrong?

The pin out diagram you sent me is becoming tattered! I may have to print a new one![emoji23]
 
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
You should be able to save the config file and rewrite it.
```
cp /etc/reef-pi/config.yml /home/pi/config.yml
```
keeps a copy of the current config in home directory of pi user
... install... new version
```
cp -f /home/pi/config.yml /etc/reef-pi/config.yml
```
should restore the old config..
This is error prone now, as reef-pi is being actively developed and as part of that I am still changing the config file . Once we have the basic functionality nailed and tested (relay, lighting, probe) I'll release a 1.0 version of the software, after that config file will not be changed per build, and this will work as expected (or better ability to store config in your google drive etc). Till then this will be little painful,
 
Back
Top