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,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I am completely lost as to what that star tech db9 box would do for us.. I have 4 Items powered and run thru db9 cables.. Each of the devices.. Relays, Lights, Dosing pump , Float and temp sensors... Each item such as the relays , Use there own power supply and only share a common ground with the Break out box and Pi..

Instead of integrating more things thru one Proprietary device There should be A Wide Focus on Optimizing the ability to Make your Controller (Individual users) More Module and each part independent of the other . This will give easier Trouble shooting of issues, Better code Bug workout, Easier integration of updated electronics Design and circuitry without rebuilding the whole controller. and A Much safer project with each item running under its own power source..

Just my Opinion.. Good Luck to everyone ..
I like your opinions. Keep them coming :-)
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Always be pros and cons to everything.

The only thing I really going to have to disagree with is the more power sources. We are dealing with electricity and water, low voltage is a good thing but 5 modules and 5+ power supplies is not a good thing. Plus 8 + more plugs for equipment. By the time it is all said and done you have at least 14 spots where water can get in and cause a fire. Not to mention the space used for all the power bricks and any additional heat created .

I like my setups clean and this is just a equation for a rats nest of wires. Seems like a big con to me.

Cool project but a massive one at that. Got to give the guy props for all the hard work.
I have always pondered about using an computer power supply (ATX SMPS) .. but my tanks being nano and pico, never really needed that many pieces of equipment. At most I need 6-8 equipment per tank, and that fits pretty nicely with AIO build with a single power strip. But I can see that this is not enough for larger tank. But I also wonder if you really need light and few other equipment to be controlled by power outlet.. they are rarely switched off and can be put on manual switched outlets (like the ones trip lite sells)
 

Trickman2

Well-Known Member
View Badges
Joined
Jan 31, 2018
Messages
648
Reaction score
524
Location
Poway, Ca
Rating - 0%
0   0   0
I have always pondered about using an computer power supply (ATX SMPS) .. but my tanks being nano and pico, never really needed that many pieces of equipment. At most I need 6-8 equipment per tank, and that fits pretty nicely with AIO build with a single power strip. But I can see that this is not enough for larger tank. But I also wonder if you really need light and few other equipment to be controlled by power outlet.. they are rarely switched off and can be put on manual switched outlets (like the ones trip lite sells)

http://www.mini-box.com/picoPSU-160-XT
 

MaccaPopEye

Well-Known Member
View Badges
Joined
Jan 5, 2016
Messages
697
Reaction score
1,224
Rating - 0%
0   0   0
As of now, it should be ok to control two power strips using two db9 connector, and total 16 outlets . I have plans to work on adding support for mcp23017 after 2.0 release. That will unlock the use of many more of pins. But I doubt we practically need more than a couple
Me Me Me I want more :p

I think having the ability to have more pins is not essential by any means and ReefPi is amazing with what it can do already, but more pins would certainly help with larger tanks (120G+). Not with the power side of things, 16 outlets really is all I can see myself controlling on my 180G and if I need more than that I can always just use a normal power board for equipment that is always on and doesn't need to be controlled.

But more pins is great for the monitoring and subsequently controlling equipment side of things. When you think about how many places you can put float switches, flow meters, leak detectors etc. on a larger tank, all to let you see the health of your tank from a glance / give alerts when things go wrong the number of pins can add up really fast (large tanks that run on commercial controllers usually have at least a couple of break out boxes full of float switches etc).

For example if you have a tank with an external skimmer, algae scrubber and a UV sterilizer and want to monitor the flow rates through all 3 pieces of equipment that is 3 pins right there. Then I can name at least half a dozen places I can use a float switch to monitor / control my system so the pins really add up fast.

But having said that none of it is essential by any means so it's not a super important feature.
 

aquaalgae

Community Member
View Badges
Joined
Mar 22, 2017
Messages
48
Reaction score
30
Rating - 0%
0   0   0
Me Me Me I want more :p

I think having the ability to have more pins is not essential by any means and ReefPi is amazing with what it can do already, but more pins would certainly help with larger tanks (120G+). Not with the power side of things, 16 outlets really is all I can see myself controlling on my 180G and if I need more than that I can always just use a normal power board for equipment that is always on and doesn't need to be controlled.

But more pins is great for the monitoring and subsequently controlling equipment side of things. When you think about how many places you can put float switches, flow meters, leak detectors etc. on a larger tank, all to let you see the health of your tank from a glance / give alerts when things go wrong the number of pins can add up really fast (large tanks that run on commercial controllers usually have at least a couple of break out boxes full of float switches etc).

For example if you have a tank with an external skimmer, algae scrubber and a UV sterilizer and want to monitor the flow rates through all 3 pieces of equipment that is 3 pins right there. Then I can name at least half a dozen places I can use a float switch to monitor / control my system so the pins really add up fast.

But having said that none of it is essential by any means so it's not a super important feature.
Agreed, more is definitely better. Like I said previously, I am currently using a Reef Angel but am slowly working on replacing it with Reef Pi. On my 500 gallon system, I currently have 16 controlled items and it would be nice to at least have the ability to have more for future expansion (which I'm already planning :) ).
 

aquaalgae

Community Member
View Badges
Joined
Mar 22, 2017
Messages
48
Reaction score
30
Rating - 0%
0   0   0
Code:
import requests
import time

# This script shows how to update a light using the api
# Lets assume we have a light with ID 1 and that light has only one channel controlled by pin 1 (pca9685)

light_id = "1"
pin = "1"
ip = "127.0.0.1:8080" # IP
auth= ("reef-pi", "reef-pi") #  username and password
u = "http://" + ip + "/api/lights/" + light_id

resp = requests.get(u, auth=auth)
light = resp.json()

for x in range(10):
    light["channels"][pin]["auto"] = False # change the light to fixed mode
    light["channels"][pin]["fixed"] = x * 10   # PWM value in percentage
    resp = requests.post(u, auth=auth, json=light) # update light
    time.sleep(1) # wait for a second

keep hacking!
Awesome! Thanks Ranjib! Just one question though, it looks like that is sending a % dimming value (0-100) I would like to send a 0-4095 PWM value. Is that possible?
Thanks again!
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
Got it. So, you want something that will convert the 5v pwm coming from pca9685 to 12v for your LEDs.
Depending upon the current draw, you can start with uln2803 and see if that works out, if not Meanwell drivers will definitely work.

Can anyone perhaps show me the wiring diagram for setting this up with a Pi3, pca9685, uln2803 to control the 5 channels of my 12V led's.

I've got all the bits now, I would like to start experimenting and getting it working.
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
Something else I was wondering......... Would it be possible to add a small monitor - say one of the 4 or 5 inch ones (even monochrome) and have parameters scrolling up on the screen.

For eg

Return : On
Skimmer : On
ATO : Off
Heater : On
Fan : Off
Temperature : 25.7

etc, etc. Say 4 lines of text on a touch screen scrolling on a loop. No control of device. Touch to wake it up and it times out and sleeps after a preset (User definable??) time.

I know I'm often around the tank and don't want to be playing on my phone at the same time, but wouldn't mind being able to see a status "snapshot"
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Awesome! Thanks Ranjib! Just one question though, it looks like that is sending a % dimming value (0-100) I would like to send a 0-4095 PWM value. Is that possible?
Thanks again!
Not currently. I'll keep you posted when I update the code to allow for fractions..
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Can anyone perhaps show me the wiring diagram for setting this up with a Pi3, pca9685, uln2803 to control the 5 channels of my 12V led's.

I've got all the bits now, I would like to start experimenting and getting it working.

This is how pca9685 is wired to pi, the cyan wired are pwm output from pca9685. Here only two channels are used, for you this will be 5
https://reef-pi.github.io/build-guides/lighting/
breadboard.png


And this is how uln2803 is wired to LEDs, in short, the pca9685 pwm output will be its input , and the GND(or -ve) of each LED channel will be its output (because uln2803 is a sync type driver). All LED channels will share a common positive (12v)
LEDs.jpg
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Something else I was wondering......... Would it be possible to add a small monitor - say one of the 4 or 5 inch ones (even monochrome) and have parameters scrolling up on the screen.

For eg

Return : On
Skimmer : On
ATO : Off
Heater : On
Fan : Off
Temperature : 25.7

etc, etc. Say 4 lines of text on a touch screen scrolling on a loop. No control of device. Touch to wake it up and it times out and sleeps after a preset (User definable??) time.

I know I'm often around the tank and don't want to be playing on my phone at the same time, but wouldn't mind being able to see a status "snapshot"
You can use the official pi touchscreen (7"x4"), we have no support for textual summary in dashboard yet, but all these data is shown as chart instead.
For example here is the dashboard of one of my build showingh states of all equipment (green is on, red is off) and two temperature sensor trend
Screen Shot 2018-06-13 at 7.10.32 AM.png
 

tastyfish

Well-Known Member
View Badges
Joined
Sep 7, 2017
Messages
525
Reaction score
447
Location
Hampshire
Rating - 0%
0   0   0
Has anyone sourced a power bar outside of the US? (UK would be great). I'm struggling to find an alternative to the one you guys are using (needs to be 240v, UK 3 pin)
 

aquaalgae

Community Member
View Badges
Joined
Mar 22, 2017
Messages
48
Reaction score
30
Rating - 0%
0   0   0
You know this will be a Bit cpu and ram taxing on the pi-0 .. If your using the zero with this be sure to run it Headless ie NO UI .
I have this currently running on the Reef Angel - Arduino Mega. The Raspberry Pi zero should be much more capable, right?
 

Erica-Renee

Valuable Member
View Badges
Joined
Oct 4, 2017
Messages
1,596
Reaction score
3,288
Location
lost
Rating - 0%
0   0   0
I have this currently running on the Reef Angel - Arduino Mega. The Raspberry Pi zero should be much more capable, right?
Its not a apple to orange Comparison as each one work differently.. The pi-0 is running a OS (Not embedded) Its running reef-pi Program and UI...
With the Arduino you do not have that over head .I have ran reef-pi on pi-0 and it works ok as long as you do not push it and run it headless.....

Short answer.. I do not know for sure.. Please get back to use and let us know
 

jcmental

Active Member
View Badges
Joined
Jan 25, 2018
Messages
114
Reaction score
137
Rating - 0%
0   0   0
You can use the official pi touchscreen (7"x4"), we have no support for textual summary in dashboard yet, but all these data is shown as chart instead.
For example here is the dashboard of one of my build showingh states of all equipment (green is on, red is off) and two temperature sensor trend
Screen Shot 2018-06-13 at 7.10.32 AM.png
I have the official pi 7" touchscreen it works great but when I go to the dashboard I can only see 1 and a bit of the charts, I have to scroll down or across to view the other summery charts. is there a simple fix for this as I know zilch about code n stuff.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
You know this will be a Bit cpu and ram taxing on the pi-0 .. If your using the zero with this be sure to run it Headless ie NO UI .
You brought up a very good point. I have mentioned earlier, but reiterating again, I run all my builds exclusively on headless mode (i.e. raspbian stretch-lite) backed by pi zero. I had me second generation builds (current one is third generation) all with GUI/attached pi touch screen, but after some months of usage i concluded I dont like to tinker with settings a lot , otherthan while setting up, and the only thing i watch mostly is dashboards, which are far easier to view from laptop. I think the fact I mount the controllers backside of the tank, in-wall makes it harder to access as well.. which adds to the disadvantages

On the plus side though, mcp23017 is i2c based, and 1 byte (8 bits) represent 8 outlet state (yay digital logic), which should be way more performant than current 1 outlet 1 RPI GPIO based setup where for each outlet we read/write one fil. Though I think this advantages will be largely overcome by addition logic (more timers, temperature controllers, atos etc) the increased number of outlets will allow. We'll get to know once we do some actual field testing..
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I have the official pi 7" touchscreen it works great but when I go to the dashboard I can only see 1 and a bit of the charts, I have to scroll down or across to view the other summery charts. is there a simple fix for this as I know zilch about code n stuff.
2.0 release brings customizable dashboards. but some amount of support is there in 1.5 already (specifying width and height of each charts)
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 38 27.1%
  • 100% dry rock + 100% live sand

    Votes: 47 33.6%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 31 22.1%
  • 75% live rock, 25% live sand

    Votes: 14 10.0%
  • 25% live rock, 75% live sand

    Votes: 10 7.1%
Back
Top