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

Aaron Smith

Active Member
View Badges
Joined
Apr 9, 2017
Messages
250
Reaction score
273
Location
Oregon
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,

I can deal with the pain as I get better with the script. I got jobs to work but as you stated before I needed to add high_relay:true
Do you remember if you wired your relay s NO or NC?
A cool feature would be if the equipment tab on off state reflected the actual state the relay was in. For instance if my aux relay 1 was off because of a job action, the equipment tab would show aux 1 as off.
 

Aaron Smith

Active Member
View Badges
Joined
Apr 9, 2017
Messages
250
Reaction score
273
Location
Oregon
Rating - 0%
0   0   0
Even cooler would be if the dashboard showed equipment status. Just throwing out ideas for future ui features. I am stoked to have pi automated lights! Again much thanks for the hard work!
 

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
Thanks for the input @Ranjib. I actually purchased both the pH Ezo circuit and the isolating USB adapter. I come from a programming background and understand Linux, but I'm still somewhat new to electrical engineering and very new to making things with the RPi. So the idea of having an isolated USB adapter was pretty appealing. I didn't want there to be any possibility of me screwing up the soldering or isolation.

Overall it works well. I paired it with a probe from Bulk Reef Supply and have been accessing it using the FTDI sample code found here. I had to do some modification of the included Python script because it only worked in an interactive mode (you had to be sitting at the terminal typing in commands). Probably won't be of much help to the project, but I can at least confirm it works well.

IMG_20170623_100301.jpg
 
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
@chipmunkofdoom2 thats awesome.
@Andrewalex11 has an huzzaz based controller going as well. Last two day I was hacking with my adaboxes, all of them has feather boards. I still like pi-zero over huzzah though. Mostly because of the full blown linux environment.

BTW I published a new build with lighting threshold support (i.e. each channels can have a minimum and maximum value threshold), this has fixed my Kessil blinking issue at low intensity.

Working of the equipment state sync bug,...
 
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
For past few days I am seriously considering doing some of the electronics housing or fixture stuff via 3d printing. I dont have a 3d printer right now, but I used to run a Mini Kossel couple of years back. I gave it away since I had my first kid.
Thinking through now (and after several folks from MakerFaire reached out to me), I think it will be nice to have a full blown controller (like the ones I have have built as of now) or just a kessil controller or ATO controller housing made by 3d printed parts.

@spinycheek @mb165 @cope413 @Windy @PurpleMonster @Glasswalker @805reef @fsamir thoughts? I am including you all, after going through the r2r 3d printing threads. You all have pretty awesome work out these :) . Any of you will be interested in helping us out with this OpenSource raspberry pi based controller ? I can ship you a pi-zero or pi2 preinstalled with reef-pi ...
 

RoddStarr

New Member
View Badges
Joined
Jun 26, 2017
Messages
1
Reaction score
1
Rating - 0%
0   0   0
Hi...i am a new user here. In my case i see a lot of progress of your project, the 3.5 mm jack is for the connection of the temperature sensor.Are you considering adding more probes like PH, salinity ORP? If so, why use the IC MCP3008?
 
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
3.5 mm jack is for kessil control. I use barrel jack and Bnc for probes
Mcp3008 is to read the probe readings straight, without the need of prob specific ic. My understanding is that probes will require specific resistor / capacitor (a dedicated circuit) still. But even without those this pi can read values from them using mcp3008. It was also the first adc example from adafruit ;-) which I use to learn .
If you are using dedicated probe specific boards like atlas scientific you won't need this for the that probe.
I think a more precise i2c based ic like ads1125 will be better than even mcp3008
 
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
Yes , I do want to add more probes , in fact lots. I'll build those (if I can) as and when I need :) . Cutrently I have two pico and a nano and my main goal is to get the basic software down, tested on pi, and support my own tanks. I need temperature controller completely down now. Next should be ph
My nano is still 20 months old, and I'm just started to dose it in preparation of sps , I have some time
Any help on any of the electronics or housing side will be very useful .
And testing of course :)
 

MaccaPopEye

Well-Known Member
View Badges
Joined
Jan 5, 2016
Messages
697
Reaction score
1,234
Rating - 0%
0   0   0
Getting excited :D

Ready and waiting:
- Raspberry Pi
- MCP3008 chip
- Jumper wires and break away pins (hopefully way more than I need lol)
- Two 8x relay boards (they are a bit different looking but were the easiest for me to get)
- 16GB SD card
20170629_172014_zpssmwkzvwe.jpg

20170629_172054_zpsarfg3x7i.jpg


Still waiting on (and will probably still be a few weeks):
- Bread board
- ULN2803A chip
- PCA9685 board
- A few DC plugs and sockets

Going to get to work on an enclosure and wiring up the relays and Pi in the mean time!
 

sector9

Active Member
View Badges
Joined
Jun 26, 2017
Messages
129
Reaction score
190
Rating - 0%
0   0   0
I'm super excited about this project! I have the raspi3 and installed reef-pi a couple days ago. I have some of the other parts which I hope to start setting up soon.
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.
What about this encapsulation on Sparkfun?
https://www.sparkfun.com/products/11050
 
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
Getting excited :D

Ready and waiting:
- Raspberry Pi
- MCP3008 chip
- Jumper wires and break away pins (hopefully way more than I need lol)
- Two 8x relay boards (they are a bit different looking but were the easiest for me to get)
- 16GB SD card
20170629_172014_zpssmwkzvwe.jpg

20170629_172054_zpsarfg3x7i.jpg


Still waiting on (and will probably still be a few weeks):
- Bread board
- ULN2803A chip
- PCA9685 board
- A few DC plugs and sockets

Going to get to work on an enclosure and wiring up the relays and Pi in the mean time!
Awesome :)
Let us know if you need any help. Do you have any plan for the housing? What light you plan to control?
 
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'm super excited about this project! I have the raspi3 and installed reef-pi a couple days ago. I have some of the other parts which I hope to start setting up soon.

What about this encapsulation on Sparkfun?
https://www.sparkfun.com/products/11050
I think this will work too. In fact I'll say it will be easiest and cheapest to start with. If you plan to get this one, let me know, I'll add all the code.
 

MaccaPopEye

Well-Known Member
View Badges
Joined
Jan 5, 2016
Messages
697
Reaction score
1,234
Rating - 0%
0   0   0
Awesome :)
Let us know if you need any help. Do you have any plan for the housing? What light you plan to control?

Thanks I certainly will :)

I plan to have 16 outlets and GPO outlets in Australia aren't exactly cheap so it will be more cost effective to cut up 2x 8-outlet power boards and keep their built in surge protection (one per relay) so the housing will have to be fairly wide to fit at least 8 outlets across. I'm going to check our local hardware store and see if they have any plastic "project boxes" wide enough to fit the 2 power boards on the front. If not I will just make one out of wood. I'm more than capable of making a wooden enclosure I would be happy with, I'm just a bit time poor :p

And I will be controlling 3x mars aqua 165W LED lights for now, and I will maybe be adding a 4th light in the future.
 
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
Thats awesome @MaccaPopEye . I am planning to run a AC outlet only reef-pi (powered by pi-zero) next. I realized for the biocube 29 i want the display outside the tank hooked up in the wall, while the power cables will all go inside the stand/cabinet, so relay controls has to be inside the cabinet.
I too do all my housing with wood. I'll post when I build the relay only reef-pi. I plan to hook up 8 channel relay biocube 29 does not need that many equipment
 
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
For those who are already running reef-pi, I finished testing the telemetry integration, that sends telemetry data of any type to adafruit.io. If you are interested in this, please sign up for a free account at adafruit.io, and then you can configure reef-pi to send data to adafruit.io and make fancy graphs.

For example, I am currently using this to check how the lighting module is working. To do this:
- Update reef-pi config with adafruit.io key (can be obtained from adafruit.io website), and enable telemetry
- Create feeds, one for each led channel with same name as the led channel, in adafuit.io (Make sure all LED channel names in reef-pi config is in lower case).
- Restart reef-pi
And reef-pi will start sending the led channel values its enforcing to the corresponding feed to adafruit.io. You can now create a dashboard from this data, use them to see historical patterns, cross check if reef-pi is doing what you expect.

I'll release a new build this weekend which has all these features, probably share an image of my lighting cycle as well :)
 
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
Lighting schedule for one of my pico. Its mostly paly , zoa and acan . I aim to keep it low light (i acclimate new corals in this tank as well)

Screen Shot 2017-06-29 at 9.30.26 PM.png

And the result, as graphed in adafruit.io

Screen Shot 2017-06-29 at 9.22.14 PM.png


This controls Kessil A80 . The lighting cycle might look aggressive, but its not :) . This particular controller has only PCA9685 hooked, hence PWM output is only 0-5 volt, which means 100% in the reef-pi web ui corresponds to 50% of the total strength of the channel. Notice the sudden start and decline of intensity, which is the result of minimum threshold, below which the controller sets the value to zero, this was introduced to avoid blinking

I am excited to see this. After noticing the blinking effect couple of weeks back I was very worried about the effect of the controller, as my tanks health is of utmost importance to me. I had decided to take a step back, make the existing code better, and have instrumentation to validate its doing what it supposed to do before proceeding further. I wanted to be thorough, safe instead of adding whole lot of feature that are shaky/unstable.
 

Cary

Well-Known Member
View Badges
Joined
Feb 19, 2016
Messages
638
Reaction score
767
Location
Allen, Tx
Rating - 0%
0   0   0
Thanks I certainly will :)

I plan to have 16 outlets and GPO outlets in Australia aren't exactly cheap so it will be more cost effective to cut up 2x 8-outlet power boards and keep their built in surge protection (one per relay) so the housing will have to be fairly wide to fit at least 8 outlets across. I'm going to check our local hardware store and see if they have any plastic "project boxes" wide enough to fit the 2 power boards on the front. If not I will just make one out of wood. I'm more than capable of making a wooden enclosure I would be happy with, I'm just a bit time poor :p

And I will be controlling 3x mars aqua 165W LED lights for now, and I will maybe be adding a 4th light in the future.


MaccPopEye. I watched a video on youtube yesterday about how to convert the sbreeflight (a similar light to the MarsAqua) to 1-10v control. It looked rather simple. is part 1. I believe he said that this conversion would work on most of the Chinese Black Boxes as they are made by a single company. I could not find anything on conversion to PWM. BTW, I am following along and trying to understand all of this. Soon to purchase a Raspberry pi and begin working. Thanks Ranjib and all for the great work.
 
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
@Cary Thanks for sharing this video. Very informative. Unlike Kessil, these are isolated outputs (i.e. each channels has dedicated +ve and gnd ), ULN2803a should be good enough to power these things.
 

Cary

Well-Known Member
View Badges
Joined
Feb 19, 2016
Messages
638
Reaction score
767
Location
Allen, Tx
Rating - 0%
0   0   0
Ranjib that is good to hear. That will be my first effort (controlling the LED light). After that I think monitoring or graphing Salinity, PH, and Alkalinity are my top items. It would be great to be able to graph those as you did for your light levels. BTW, I just realized your avatar is from an old Jimi Hendrix album. ;-}
 
Back
Top