Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
So much awesomeness here!! I started building my reef pi about a week or so go, I'm following a tutorial on learn adafruit, decided to go with making my own 8 channel relay outlets, I'm not exactly sure what is going on, I can get in2 to come on and off, in4-8 stay on, and 1&3 do nothing. Did you have to do any coding on python to get your relay to work? I've noticed theres 2 different gpio pinot diagrams, not sure which one to follow. But I'm slowely getting it going, in the tutorial they are using a premade relay outlet, so it's definitely been an interesting trial and error so far. But I'm glad I stumbled upon your post, I'm going to read through it and see what valuable info I can get!Welcome to the development thread of reef-pi, an open-source, affordable, modular DIY reef-tank controller based on Raspberry Pi.
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.
reef-pi provides following functionalities:
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.
- 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.
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
- Setup and installation
- Power controller
- Temperature controller
- Auto Top Off
- Light controller
- pH monitor
--------------------------- 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
Sorry to Jest but this error message sort of makes it sound like your ATO bucket is empty. lol Anyways hopefully figure it out.Hi, I've got an issue with My ATO pump that I've now got working properly, but can't seem to reset so the charts look normal... I get this error
{"error":"Failed to update. Error: can't set output on channel 8: open /sys/class/gpio/gpio8/direction: no such file or directory"} | HTTP 500
Welcome to the club !So much awesomeness here!! I started building my reef pi about a week or so go, I'm following a tutorial on learn adafruit, decided to go with making my own 8 channel relay outlets, I'm not exactly sure what is going on, I can get in2 to come on and off, in4-8 stay on, and 1&3 do nothing. Did you have to do any coding on python to get your relay to work? I've noticed theres 2 different gpio pinot diagrams, not sure which one to follow. But I'm slowely getting it going, in the tutorial they are using a premade relay outlet, so it's definitely been an interesting trial and error so far. But I'm glad I stumbled upon your post, I'm going to read through it and see what valuable info I can get!
Unfortunate to hear.Hi all, i am just looking for some advice.....
My reef-pi setup has been working wonderfully for the last 2 years without any hiccups whatsoever but unfortunately this changed on friday night when i could not access the UI via my phone or browser and Putty would not allow me to access the Pi via ssh despite the right password etc being used
So my only remedy i could think of was to pull my sd card and put it into another raspberry pi and temporarily adding init=/bin/sh to the end of /boot/cmdline.txt and resetting the pi password.
i was then thankfully able to ssh back into the Pi and disable/re-enable the reef pi service and POW i was back up and running with access via the UI
Now unfortunately i am left with a couple of problems.........7 of my 8 relays on the power module have failed and one of my temp sensors has gone haywire - it was the one controlling my heater so i have had to plug the heater into this last functioning relay and use my secondary temp probe to control it. All my equipment still works as they were initially wired up NC so they have power still, just now cannot be controlled. Will have to do a rebuild and sort that issue out as i dont think the last relay has much life left as it is clicking like crazy when the heater needs to be on.
So there is my story - now for the request for some assistance if i can?
on one of my channels in the Equipment section of the UI (Channel 2) even though it has no function now given the relay has failed it gives me the following error if i turn the channel on/off
Anyone care to enlighten me as to why this is the case? Is it something as simple as the wire has come loose somehow or is this software side?
I will be completely starting a fresh with this build - i just need to figure out a new housing as i originally have it as an all in one enclosure - but have found that it would probably be best if i split it into at least 3 seperate modules for future maintenance and especially keep my AC side away from the controller side..........not sure if this is why the problem started in the first instance with some sort of power surge or something? cant see it has given the tank is meant to have a surge protector at the outlet..........
Anyway some guidance on the above error would be apprecited thanks!
Hope you are all good and happily reefing!
I would recommend to save your Reef-PI's database using WinSCP for example. Settings are pretty much the same as for Putty.
You're very welcome !Thanks for the reply Sral
I have followed the advice - but there only appears to be old databases (reef-pi 3.5 and 4.0) in there and nothing with the newer more recent database for 5.3...........This is not really an issue as i need to do a full rebuild anyway, just something that caught my eye.
i do like the look of WinSCP - so thanks for that!
Database storage file (default "/var/lib/reef-pi/reef-pi.db")
Hmm, the relay is the same one I found on amazon, granted I wish I remembered robo-tank haha prices are cheaper than the one I got on amazon! Anyway, interesting that your using the uln2803a, none of the tutorials I've seen mentioned anything about it. I'll pick one of those guys up and try it again, also!! Thabk you for providing the wiring diagram! That's by far the most detailed drawing ive seen so far. I'm sure it's going to help me out and a bunch of others tremendously!Welcome to the club !
I didn't have to do any coding for my Outlets. Personally I used an 8 channel Relay board from Robotank and connected that to my Raspberry Pi Zero on the GPIO Pins Number 7,8,9,10,11,23,24,25 using a ULN2803A transistor brick (Bottom part of the circuit drawing):
OUT1 to OUT8 feed directly into the Relay board IN1 to IN8 as displyed here (not that visible, but the DB9 connector pins at the bottom feed directly into the IN1 to IN8 pins of the board, which are soldered directly to this mint board, just in front of the DIP18 socket and the lower row of screw terminals with the color coded wires from the DB9 connector):
I defined the PIns as outlet Connectors in the Configuration Tab:
I then defined some Equipment that uses those Outlets in the Equipment Tab:
You’re welcome ! Those relay boards can be a little tricky, you need to supply them their VCC (for me 5V), GND and the 8 signal pins. The relay actually activates when the Input Pin is connected to GND and can sink around 5mA.That’s why you should use a transistor, be it a n-MOSFET or npn transistor. You actually don’t even need the pull-up resistors I have used there, since the signal is a current, not a voltage.Hmm, the relay is the same one I found on amazon, granted I wish I remembered robo-tank haha prices are cheaper than the one I got on amazon! Anyway, interesting that your using the uln2803a, none of the tutorials I've seen mentioned anything about it. I'll pick one of those guys up and try it again, also!! Thabk you for providing the wiring diagram! That's by far the most detailed drawing ive seen so far. I'm sure it's going to help me out and a bunch of others tremendously!
Very nice!!!On another note. I have fully 3d printed a rollermat that is now controlled by Pi.
right now I’d like setup it up a timer to activate the motor until I get the float switch fully dialed into position.
The best I found was user manuals from robotank who has a load of useful manuals in Google docs....Can anyone point me to a guide for the syntax on timers?
Tremendously helpful. Thanks!The best I found was user manuals from robotank who has a load of useful manuals in Google docs....
Reef-pi User Manual.docx
Reef-pi User Manual May 25, 2020 – Version 1.0 Table of Contents Table of Contents 2 1. Setup Reef-pi – Configuration 4 2. Setup Reef-pi – Settings 5 Advanced Settings 6 3. Setup Reef-pi – Telemetry 7 Adafruit IO Logging 7 Email Alerts 8 4. Setup Reef-pi – A...docs.google.com
The information you want is in there....
Id like to make one, have you posted the files on thingiverse or how can I get a hold of the files. Would also love to know about the dimensions, I have a small sump but would love to figure out how to incorporate it into my setup.On another note. I have fully 3d printed a rollermat that is now controlled by Pi.
right now I’d like setup it up a timer to activate the motor until I get the float switch fully dialed into position.
I have not yet. It has only been on my tank for a few days. The print was also rather large about the size of shoebox once assembled. Most components were printed on my sidewinder x1, as the parts were too large for the prusa.Id like to make one, have you posted the files on thingiverse or how can I get a hold of the files. Would also love to know about the dimensions, I have a small sump but would love to figure out how to incorporate it into my setup.
Thanks
Bummer I have a smaller 3d printer but I would still be interested in the files since I would like to try to scale things down for my nano tank, looks like something that would be neat to play with over the winter. Even if I can get the stl files I can chop and slice things up, once you have it fully operational would be nice to see all the details. I would probably just use it on a timer, would be a simple path and probably work most of the time.I have not yet. It has only been on my tank for a few days. The print was also rather large about the size of shoebox once assembled. Most components were printed on my sidewinder x1, as the parts were too large for the prusa.