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

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
NAd do you recoment noobs or raspian? I currently have Rasperian
Raspbian.
You have to create outlets under configuration => connectors. They they'll start appearing in the equipment list. Are you following the guides?
 

NewbyREEF

Active Member
View Badges
Joined
Dec 21, 2018
Messages
136
Reaction score
102
Location
Springfield
Rating - 0%
0   0   0
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
im joining nano-reef
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
I've been following here...Since I already have most of the equipment I'd like to use with reef-pi, I know it will take a little extra effort to make it all work together.

I'm wondering if anyone has used the Tunze Osmolator w/ reef-pi. Not for the control, just for retrieving pump on/off times so the data can be plotted. Are there any headers or pinouts on the Osmolator's board to get that info?

My equipment is as follows:
  • Ranco ETC 1110000 thermocouple and controller (http://www.rancoetc.com/ranco-etc-111000-000-digital-temperature-controller) - need to see if I can retrofit the 0-10V DC output on it to get the readings for reef-pi to display. Have had it for years and it's been rock solid. I'd rather not drop more $$$ on the model with the DC output if I don't have to.
  • Digital Loggers Pro Switch (https://dlidirect.com/products/new-pro-switch) for power control. Easy API to interface to from reef-pi, not worried about this. I've already written an app to control it remotely.
  • Osmolator for top-off.
  • BuildMyLED light fixture. Uses a generic 0-10VDC pot to dim, driven by an Iventronics EUC-052S105dT driver. Shouldn't be an issue.
  • ReefBrite blue LED fixture. Powered by a generic 0-24VDC power brick. They do make a dimmer - http://www.reefbrite.com/product/led-line-dimmer/ that claims to be able to be controlled by "any other 0-10V based controllers"...
I think the ReefBrite and the Osmolator are going to be the big question marks here, assuming I can get the output from the Ranco...
 
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've been following here...Since I already have most of the equipment I'd like to use with reef-pi, I know it will take a little extra effort to make it all work together.

I'm wondering if anyone has used the Tunze Osmolator w/ reef-pi. Not for the control, just for retrieving pump on/off times so the data can be plotted. Are there any headers or pinouts on the Osmolator's board to get that info?

My equipment is as follows:
  • Ranco ETC 1110000 thermocouple and controller (http://www.rancoetc.com/ranco-etc-111000-000-digital-temperature-controller) - need to see if I can retrofit the 0-10V DC output on it to get the readings for reef-pi to display. Have had it for years and it's been rock solid. I'd rather not drop more $$$ on the model with the DC output if I don't have to.
  • Digital Loggers Pro Switch (https://dlidirect.com/products/new-pro-switch) for power control. Easy API to interface to from reef-pi, not worried about this. I've already written an app to control it remotely.
  • Osmolator for top-off.
  • BuildMyLED light fixture. Uses a generic 0-10VDC pot to dim, driven by an Iventronics EUC-052S105dT driver. Shouldn't be an issue.
  • ReefBrite blue LED fixture. Powered by a generic 0-24VDC power brick. They do make a dimmer - http://www.reefbrite.com/product/led-line-dimmer/ that claims to be able to be controlled by "any other 0-10V based controllers"...
I think the ReefBrite and the Osmolator are going to be the big question marks here, assuming I can get the output from the Ranco...
The temp controller 0-10v output is analog? If it’s a either on or off then I think you can setup some circuit to model it as ato , since that works with digital input . Just make some circuit to convert the ranco output to 3.3v dc . There are couple of folks here who have worked with reef brite lights.
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
The temp controller 0-10v output is analog? If it’s a either on or off then I think you can setup some circuit to model it as ato , since that works with digital input . Just make some circuit to convert the ranco output to 3.3v dc . There are couple of folks here who have worked with reef brite lights.
The temp controller output is 0-10V DC analog, yes. I need to see if it's a simple terminal block that outputs the signal though. (IOW the signal is already there but the terminal block is all that's missing)

I'll do some digging when I get around to the ReefBrites.
 
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
The temp controller output is 0-10V DC analog, yes. I need to see if it's a simple terminal block that outputs the signal though. (IOW the signal is already there but the terminal block is all that's missing)

I'll do some digging when I get around to the ReefBrites.
reef-pi does not have any support for raw analog input as of now. I am working on a ads1115 based ph driver currently, but I am not sure if it can read 0-10v analog.
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0
Based on a quick perusal of the ADS1115 docs, it should be able to.

Just toss a resistor divider + LPF in front (reduce input voltage, and so source impedance doesn't get sky high). Some types of analog inputs may require an active buffer (e.g., pH, ORP, photodiode sensors, other electrochemical probes).
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
I've been following here...Since I already have most of the equipment I'd like to use with reef-pi, I know it will take a little extra effort to make it all work together.

I'm wondering if anyone has used the Tunze Osmolator w/ reef-pi. Not for the control, just for retrieving pump on/off times so the data can be plotted. Are there any headers or pinouts on the Osmolator's board to get that info?

My equipment is as follows:
  • Ranco ETC 1110000 thermocouple and controller (http://www.rancoetc.com/ranco-etc-111000-000-digital-temperature-controller) - need to see if I can retrofit the 0-10V DC output on it to get the readings for reef-pi to display. Have had it for years and it's been rock solid. I'd rather not drop more $$$ on the model with the DC output if I don't have to.
  • Digital Loggers Pro Switch (https://dlidirect.com/products/new-pro-switch) for power control. Easy API to interface to from reef-pi, not worried about this. I've already written an app to control it remotely.
  • Osmolator for top-off.
  • BuildMyLED light fixture. Uses a generic 0-10VDC pot to dim, driven by an Iventronics EUC-052S105dT driver. Shouldn't be an issue.
  • ReefBrite blue LED fixture. Powered by a generic 0-24VDC power brick. They do make a dimmer - http://www.reefbrite.com/product/led-line-dimmer/ that claims to be able to be controlled by "any other 0-10V based controllers"...
I think the ReefBrite and the Osmolator are going to be the big question marks here, assuming I can get the output from the Ranco...

I took a look at my Osmolators control board. It's powered by an Atmel ATMega, and appears to have a few headers/pins available, but I don't know what they do. Tough to determine based on the description of the pins for the microcontroller.

20181229_151340.jpg
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0
I took a look at my Osmolators control board. It's powered by an Atmel ATMega, and appears to have a few headers/pins available, but I don't know what they do. Tough to determine based on the description of the pins for the microcontroller.

20181229_151340.jpg

Those pins on the right look like standard AVR ISP header (6 pin). Only used for programming. No idea on the 3 pin.

You’ll want to trace to the motor control FET and use that pin.
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
Hmmm...would it be possible to just to a line detect on the output to the osmolator pump? It's a 3-12VDC line, so checking when it's at/over 3V would be sufficient to know that the pump is on...
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
Bah, I was wrong. The big '78M05' MOSFET isn't the one driving the pump - it only goes up to 5V. The small SMD above the lowest LED is an International Rectifier power MOSFET, good up to 30V...
 

sfgabe

Active Member
View Badges
Joined
Sep 7, 2018
Messages
172
Reaction score
264
Rating - 0%
0   0   0

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
2,223
Reaction score
3,632
Location
Sacramento, CA area
Rating - 0%
0   0   0
Bah, I was wrong. The big '78M05' MOSFET isn't the one driving the pump - it only goes up to 5V. The small SMD above the lowest LED is an International Rectifier power MOSFET, good up to 30V...

Is that a relay under the sticker?

(The sticker was supposed to stay on the beeper until after the board was washed. Looks like someone got lazy and just moved it)

And yes you can just detect the motor voltage. Use a resistor divider to drop it from 12V to 3V or lower.
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
Is that a relay under the sticker?

(The sticker was supposed to stay on the beeper until after the board was washed. Looks like someone got lazy and just moved it)

And yes you can just detect the motor voltage. Use a resistor divider to drop it from 12V to 3V or lower.

Yes, it's a relay. I'll probably just go the resistor divider route - least invasive on the Osmolator board.
 
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
Nice write up @Ranjib ! Question - what are the correct settings for getting a dosing pump running off of the PCA9685? If I put in a pin number for "outlets" it seems like it's looking for the pi pin, not the PCA9685 pin.
dosing pump pins are always pwm pin or jack. For rpi its either 0 or 1 and for pca9685 it can anything between 0 to 15. The outlets are seperate from doser tab and only used to control the direction of the pump, thats because of l293d chip offering that feature. But reef-pi dosing module is not aware of directional control as such. Its something done out of band using outlet/equipment
 

HAVE YOU EVER KEPT A RARE/UNCOMMON FISH, CORAL, OR INVERT? SHOW IT OFF IN THE THREAD!

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top