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

HM3105

Well-Known Member
View Badges
Joined
Nov 30, 2014
Messages
665
Reaction score
417
Location
United States
Rating - 0%
0   0   0
@Ranjib Very cool project, there was another group building one of these which was based on Raspberry Pi B+. Any chance your software will run on that too?
 
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 Very cool project, there was another group building one of these which was based on Raspberry Pi B+. Any chance your software will run on that too?
It should. I have not tested it though, I have only tested it on pi 2, pi 3 and pi zero. I really dont think anyone will buy B+ given pi zero is cheaper, smaller , more powerful and has same pin configuration. Unless someone is repurposing older pi batch, it will be hard to get those i think.

If you have one and testing out reef-pi, let me know if its not working, I can take a look at it. reef-pi is written in go which allow cross compiling relatively easily, and I am fairly sure resources wont be a constrain (i.e. weaker processor or 512 mb memory limit). The only thing that may be different is ARM processor version
 
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
Temperature sensor integration is here :)
Today I added ds18b20 based temperature sensor integration in reef-pi. Following patches were merged as part of this:

https://github.com/ranjib/reef-pi/pull/153
https://github.com/ranjib/reef-pi/pull/154
https://github.com/ranjib/reef-pi/pull/155

As expected, due to one wire protocol support for ds18b20 this integration was trivial. I removed the mcp3008 based integration that was there from early version, as well as the in-memory temperature data for past 24 hours. I felt sending data to adafruit.io and charting it there is much more convenient. I put this integration to test with pi zero against one my pico tank. The controller circuit is bare bone, just a pi zero , and minimal wiring for the temperature probe (only a 10K resistor is required, other than the probe and pi zero). I tested the integration end to end, from sensing temperature to sending the data to adafruit.io, all worked as expected. I am pretty excited with this, as for the fist time i'll get to see how the temperature varies on this pico tank, day to day, week to week. Here are some photos

Probe + pi zero + add on circuit
IMG_1556.JPG


The add on circuit is simple, only provides a 10K resistor and couple of pins to easily hook up female -female jumper wires. Here is the front face of the add on circuit:
IMG_1560.JPG

And the back side
IMG_1559.JPG

I just finished the wiring couple of hours before, hence adafruit dashboard is really have past few hours of data,

Screen Shot 2017-07-08 at 11.27.22 PM.png

A complete tutorial on how to use this sensor is available on adafruit website: https://learn.adafruit.com/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing
 
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
Temperature sensor is revealing some interesting trends in my reef tank. I think I have daily temperature cycle in my tanks.

Screen Shot 2017-07-09 at 10.30.39 PM.png

I dont know if this is good or bad, but the temperature is certainly not outside the allowed range (76-78F). Now that the sensor code is working, I'll focus on the controller code next, which will switch on/off heater or chiller/fan when the temperature is outside a range. As of now , I am not sure whether the controller should enforce a strict temperature (e.g. 78F) or a range (75->79F). I have started a dedicated thread to get some advice/feedback on this. None the less, it should not change the controller logic, so I can write the code in parallel :)
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
Looks good. Once piece of functionality we might want to codiefy from the STC-1000 is to not allow the chiller /heater to re turn on too quickly after hitting it's intended value. There is code in there to require a 5 minute gap of time from the last time it turned on. For instance if a heater brought the tank up to 79 and then turned off, to fall to 78.5 1 minute later, and then turn on to go back to 79 within a few minutes which would cause many quick on/off cycles in succession. We also might want to code the +- temperature tolerance allowance. Just some ideas. Great job thus far!!! I plan to read this whole forum thread today, and hopefully get to reading the code today too. If you have any recommendations on which files to start with, let me know. Otherwise I'll just jump right in.

Thanks!!!
 
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
Looks good. Once piece of functionality we might want to codiefy from the STC-1000 is to not allow the chiller /heater to re turn on too quickly after hitting it's intended value. There is code in there to require a 5 minute gap of time from the last time it turned on. For instance if a heater brought the tank up to 79 and then turned off, to fall to 78.5 1 minute later, and then turn on to go back to 79 within a few minutes which would cause many quick on/off cycles in succession. We also might want to code the +- temperature tolerance allowance. Just some ideas. Great job thus far!!! I plan to read this whole forum thread today, and hopefully get to reading the code today too. If you have any recommendations on which files to start with, let me know. Otherwise I'll just jump right in.

Thanks!!!
Temperature reading code is here : https://github.com/ranjib/reef-pi/blob/master/controller/temperature.go
I am working on the controller logic that will turn on off things right now, expect a pull request in this week against the same file

Thanks for chiming in :)
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
Thank you @Ranjib

Just finished reading the 20 page forum thread.

Looking to get the temperature module up and running with reef pi. On previous post you referenced this as your source for the waterproof probe.
https://www.amazon.com/gp/product/B01B27R21Y
It looks like it's currently sold out. Any other recommendations on sourcing this probe?

I also noticed a reference to the rust issue for the DS18B20. How can you tell if one DS18B20 is better than another DS18B20? Or should I just find the cheapest sourcing for one?

Thank you!!!
 
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
Thank you @Ranjib

Just finished reading the 20 page forum thread.

Looking to get the temperature module up and running with reef pi. On previous post you referenced this as your source for the waterproof probe.
https://www.amazon.com/gp/product/B01B27R21Y
It looks like it's currently sold out. Any other recommendations on sourcing this probe?

I also noticed a reference to the rust issue for the DS18B20. How can you tell if one DS18B20 is better than another DS18B20? Or should I just find the cheapest sourcing for one?

Thank you!!!
I had chosen that particular probe because it was coated black (plastic or some other paint), you can get those from sparkfun as well.
I think those who have noticed rusting is due to steel probes (most of the probes available in amazon uses bare steel probes ).
Let's see how mine goes,
 
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
I name all my tanks. Bozeman, the 3.7 gallon pico is named after a small town in montana, one of america;s prettiest small town, like this small town my 3.7 gallong pico has lush green valleys with GSP and radioactive dragon eye zoa. My other pico tank, a 2.6G fluval spec 3 is a zoa garden, and named after another american small town called healdburg (CA), famous for its floral valleys. ....
hence, reef-pi will allow configuring name for every controller,

https://github.com/ranjib/reef-pi/pull/156
name your tank, name your controller. If left blank, reef-pi will show default name of the controller 'reef-pi' on its UI
 
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
Not sure if anyone has mentioned this previously, but did this just make the whole monitor solution a whole lot easier -
https://www.atlas-scientific.com/product_pages/components/tentacle-t3.html

I have been looking at this recently. Cost is one big factor, for which I am holding off on Atlas scientific products.
From an architectural/design standpoint, I want to keep reef-pi modular. i.e. one should be able to use a component on its own, to keep thing simple and cheap. Tentacles combine 5 probes, I really dont know if I need all 5. Other than pH probe, I have heard ORP is nice to have but not really that critical (compared to nitrite or alk or ph). For temperature ds18b20 is just way better suited for our case, its temperature range, as well as simplicity of 1 wire protocol (with in-kernel drivers), makes it cheapest yet more robust (we dont need 0.001 precision probes). This is why I started with ds18b20 on the temperature controller.

That said, as I mentioned Atlas scientific probes is in my mind, particularly for pH and may be for ORP. Last week one of the local reefer (Dustin, are you around here ? :) ), who is also interested in reef-pi informed me he has a tentacle board, so we might have support for that sooner than later. We have to write the go based i2c driver for ezo/tentacle from my initial investigation on this board.

Personally, I would priority will be temperature, ATO and then doser. This is just reflection of my own requirements from the controller, but this is also how I can keep it tested, at least against my own tanks
 

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
I have been looking at this recently. Cost is one big factor, for which I am holding off on Atlas scientific products.

+1. I have their pH chip and the USB isolating adapter, and while it works, the pair was $80+. And that's without a pH probe. A lot of money for the convenience. I'm quite a novice in electrical engineering, so for me it was the right choice. But, if you could figure out the isolation and noise issues, DIYing your own circuit to read the pH probe output would likely be much cheaper.
 
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
How much are they? Couldn't you use the generic probes on amazon etc?
Cheaper ph probes will have low life span (6 months ) and not for continuous monitoring.
Last time I checked I found a 35$ probe that's OSHWA as well as for continuous use and have around 2 year lifespan. Whenever I start working on the ph stuff, I am likely to use that one
 
Back
Top