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'm terribly sorry if this has been asked, I used the search but didn't find info on these 2 things
  1. I have enabled the camera module and in the config there is a upload option for Google drive. How do set this up for my drive account?
  2. Again with the camera module, the display only shows the last picture taken, not a live video feed. How would I configure this camera display to use a live feed like a Webcam would be?
Thanks so much! This is awesome so far
Welcome to reef2reef.
Unfortunately the camera module for reef-pi is not documented at all(since its probably the least used one), couple . Here is a quick rundown of the things you need to do:
- install & configure the "drive" command line client in raspberry pi (reef-pi uses this to upload to google drive): You can find details here: https://github.com/odeke-em/drive
- install and configure "motion" on raspberry pi for the video streaming: You can find details here: https://motion-project.github.io/

As it is obvious, reef-pi does not really do a lot on this front by itself, its pretty much offloaded to these highly efficient systems. But reef-pi does let you access/configure these from a single interface. I also hope to integrate some advance object detection/machine learning feature of motion to reef-pi, once we are done with all the basic features.
Lastly, I want to call out that streaming and image processing is pretty computation heavy task on Raspberry Pi, and expect things to slow down. If possible, run a dedicated Pi/reef-pi system for this instead of using a single build for both essential reef keeping chores and video streaming. I have couple of builds that does this, and I use them as baby monitor at night (since theres Infra red/NOIR camera for pi) normally, and set it up in front of my tank using a camera stand when I am on vacation
 
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
@Ranjib would a pi zero w be able to run the following?

Lights via pca9685 own and an 8 channel relay (4 dosing pumps ((jebao dp4-s)), chiller, heater and sump lights via the timer), also a pair of ds18b20's.

I have all the above, except the raspberry pi zero, I'm having problems with my Arduino builds, little misshap today and no lights, far too many wires with screens, rtc's, potentiometer and rotary encoder.

Without all the excess stuff, it'll be so much easier, though having said that, do I just need to install the software and link to the internet and nothing else?

Please advise, thanks...
we have not tested jebao pumps (or any power head ) rigorously with reef-pi yet. Pi zero is sufficient to run all 16 channels of PCA9685, 4 ds18b20 and 16 channels relays without any issue, as long as you dont enable GUI mode (i.e. run raspbian stretch in text mode). You will need some additional components (resistors and transistors) depending upon what light you are trying to control
 

janos

Active Member
View Badges
Joined
Jun 4, 2017
Messages
267
Reaction score
259
Location
Toronto,Canada
Rating - 0%
0   0   0
Hi Ranjib would be that any help?

Screenshot from 2018-09-20 18-53-24.png
 

LionHeart2017

Active Member
View Badges
Joined
Sep 13, 2017
Messages
185
Reaction score
321
Location
Lincolnshire
Rating - 0%
0   0   0
we have not tested jebao pumps (or any power head ) rigorously with reef-pi yet. Pi zero is sufficient to run all 16 channels of PCA9685, 4 ds18b20 and 16 channels relays without any issue, as long as you dont enable GUI mode (i.e. run raspbian stretch in text mode). You will need some additional components (resistors and transistors) depending upon what light you are trying to control
I did a little testing on a faulty jeboa wavemaker, three wires go into it from controller, there's a constant 24v and the yellow wire varies it's voltage from about 2 to 5v depending on setting
 

wykat

Active Member
View Badges
Joined
May 23, 2018
Messages
182
Reaction score
421
Rating - 0%
0   0   0
ATO sensors are all digital I/O based, mcp23017 should work just fine, we just have to do some additional work on the software side.
I think its ok to recommend using jumper/ribbons to connect multiple boards horizontally, or just dont model the boards as HAT, and instead go for bigger PCBs with 20x4 headers to plugin in a Raspberry Pi.
I have no clue what others would prefer etc.. Its better to do a poll to get such data. If you plan to sell any of these, you should also consult r2r guidelines on whats the right way to go about it

This looks great, nice and tidy. However, you might want to brainstorm a fan into it. The pi processor is right in the center of that stack and with everything going on I think it would quickly effect performance. Unless you want it to double as a water heater as well. :)

I'm not planning to sell this, all data will be on Github. Still have to test and document the Reef-PI_PWM module before I can upload the latest module.

The present Reef-PI_HAT module already uses all I/O ports of the Raspberry PI, making a larger board therefore wouldn't help. Therefore my proposal to stack vertically multiple I2C boards in order to increase number of I/O ports and become more flexible in terms of functionality (similar to a backplane). Height and Depth will remain the same, it will just get Broader.

With respect to cooling, this is one of the reasons I propose to have the modules 'standing vertical', then air can flow independently from the number of boards. (will make a picture of this tomorrow, think then it's easier to explain). Don't know yet how to physically mount the PCBAs (3D printed parts?).

As stated I would prefer a fan, not so much for cooling but for keeping water out (over-pressure in the housing) and preferably take 'cold/dry' air from outside the technical Reef area.

But as said, at this moment this is just brainstorming and feedback is welcome :) I hope together we can find a suitable solution for everybody.
 
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 did a little testing on a faulty jeboa wavemaker, three wires go into it from controller, there's a constant 24v and the yellow wire varies it's voltage from about 2 to 5v depending on setting
I think you have posted this earlier in the thread. So, if I understand correctly, I can just get a DIN 3 pin connector (i think thats what jebao uses) and wire up the existing 24v power supply along with pca9685 output, and that should do. ..
 
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'm not planning to sell this, all data will be on Github. Still have to test and document the Reef-PI_PWM module before I can upload the latest module.

The present Reef-PI_HAT module already uses all I/O ports of the Raspberry PI, making a larger board therefore wouldn't help. Therefore my proposal to stack vertically multiple I2C boards in order to increase number of I/O ports and become more flexible in terms of functionality (similar to a backplane). Height and Depth will remain the same, it will just get Broader.

With respect to cooling, this is one of the reasons I propose to have the modules 'standing vertical', then air can flow independently from the number of boards. (will make a picture of this tomorrow, think then it's easier to explain). Don't know yet how to physically mount the PCBAs (3D printed parts?).

As stated I would prefer a fan, not so much for cooling but for keeping water out (over-pressure in the housing) and preferably take 'cold/dry' air from outside the technical Reef area.

But as said, at this moment this is just brainstorming and feedback is welcome :) I hope together we can find a suitable solution for everybody.
Got it.
I was thinking that the larger board might be helpful in these ways:
- You won't be restricted by the hat side/spacing while soldering in capacitors or heat sinks
- The connectors won't be so closely spaced, which can be a pain. In your current design you have connectors in right angles, think of that setup in action. It can be cumbersome to deal with 8 connectors connected to a small housing in both direction in 90 degrees. With your vertical stacking, it will be even more complicates, as the connectors are not aligned to any side of the vertical bar.
- With bigger pcb size, i think we can accomodate the PSU (24V -> 5/12/10V) .
- We might be able to use the larger pcb area /GND itself as heatsink

brainstorming :-) , not complaining, you are doing an awesome work. I am just curious about how the end product (build with housing and all things attached ) will look if we follow your designs,
 

wykat

Active Member
View Badges
Joined
May 23, 2018
Messages
182
Reaction score
421
Rating - 0%
0   0   0
Got it.
I was thinking that the larger board might be helpful in these ways:
- You won't be restricted by the hat side/spacing while soldering in capacitors or heat sinks
- The connectors won't be so closely spaced, which can be a pain. In your current design you have connectors in right angles, think of that setup in action. It can be cumbersome to deal with 8 connectors connected to a small housing in both direction in 90 degrees. With your vertical stacking, it will be even more complicates, as the connectors are not aligned to any side of the vertical bar.
- With bigger pcb size, i think we can accomodate the PSU (24V -> 5/12/10V) .
- We might be able to use the larger pcb area /GND itself as heatsink

brainstorming :) , not complaining, you are doing an awesome work. I am just curious about how the end product (build with housing and all things attached ) will look if we follow your designs,

Don't expect a problem with heat sinks or capacitors, but I do understand the issue of having a 'horizontal/flat' version for debugging purposes, will need to make one myself as well. Electronic debugging would be almost impossible in the stacked version. But I think the initial goal should be the final product as you wrote (build with housing and all things attached), that was the reason for starting the brainstorming discussion combining software, electronics and housing. All derivatives in helping us to get there are just tools :D. Reef-PI users also don't need to understand the Raspberry electronics but they will need to build some Reef-PI electronics ;) Separating the HAT from the PWM are just 5 wires like in a break-out board. Need to look if there is some standard 2*20 adapter cable between the PI and HAT, then it can all be placed horizontally for debugging.

I'm not expecting to connect external devices directly to these boards but through connectors in the housing. Of course you could 'hard solder' the housing connectors to the PCBAs but then maintenance will become very difficult. This is a trade off between less connectors (less quality issues) and maintenance.

The PSU issue is exactly as I mentioned a goal for a different Reef-PI_HAT, already ordered some components for that. But yes we're on the same line of thinking here.
 

brycebba

New Member
View Badges
Joined
Sep 20, 2018
Messages
3
Reaction score
3
Rating - 0%
0   0   0
Welcome to reef2reef.
Unfortunately the camera module for reef-pi is not documented at all(since its probably the least used one), couple . Here is a quick rundown of the things you need to do:
- install & configure the "drive" command line client in raspberry pi (reef-pi uses this to upload to google drive): You can find details here: https://github.com/odeke-em/drive
- install and configure "motion" on raspberry pi for the video streaming: You can find details here: https://motion-project.github.io/

As it is obvious, reef-pi does not really do a lot on this front by itself, its pretty much offloaded to these highly efficient systems. But reef-pi does let you access/configure these from a single interface. I also hope to integrate some advance object detection/machine learning feature of motion to reef-pi, once we are done with all the basic features.
Lastly, I want to call out that streaming and image processing is pretty computation heavy task on Raspberry Pi, and expect things to slow down. If possible, run a dedicated Pi/reef-pi system for this instead of using a single build for both essential reef keeping chores and video streaming. I have couple of builds that does this, and I use them as baby monitor at night (since theres Infra red/NOIR camera for pi) normally, and set it up in front of my tank using a camera stand when I am on vacation
2. About the camera it directly depends on the API provided by the camera. Not really sure about this part but i used to work with cameras providing last picture API which needs to be refreshed, other provides iframe support for players and others provides streams. We may have to investigate about this feature too. Any opinion @Ranjib ?
Hey I was wondering if you knew the proper way to configure motion to not override the reef-pi web server?
 
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
Hey I was wondering if you knew the proper way to configure motion to not override the reef-pi web server?
Motion should not override any of the reef-pi stuff, motion video stream uses port 8080 and the web control uses port 8081. reef-pi uses standard port 80.
Are you hitting any issue? I can cross check things in my end if required
 

wykat

Active Member
View Badges
Joined
May 23, 2018
Messages
182
Reaction score
421
Rating - 0%
0   0   0
As earlier, some pictures showing solutions using the Reef-PI PCBA's

upload_2018-9-21_13-53-38.png

An impression how multiple boards could be stacked and positioned vertically. Air can flow from bottom to top (natural flow) or from top to bottom, forced with fan. I think this is also better for the Raspberry PI then laying flat.


upload_2018-9-21_13-57-15.png

The PCBAs disassembled and wired separately. I think the best way for debugging is to use a carton shoe box with some holes. Here I have wired the boards as if they were stacked (from top to bottom)


upload_2018-9-21_14-8-37.png

Of course you don't need to stack the boards together, simply place a 2*20 connector on top of the Reef-PI_HAT (shown in purple) and connect with ribbon cable. Then you can place the board wherever you want.
Use a 6 pin connector with short pins (shown in red) and connect the Reef-PI_PWM directly the Reef-PI_HAT
Do note that you will need some space between the boards for the connectors to the sensors/actuators. I definitely believe that separating the boards requires much more space but for testing/debugging it will definitely be required.
 

sector9

Active Member
View Badges
Joined
Jun 26, 2017
Messages
129
Reaction score
189
Rating - 0%
0   0   0
Thanks to posts from @Ryan115 , I am finally getting close to using my reef-pi build to control my SB reef lights. I have one channel of whites working on one of my lights and plan to finish blues and do the other light this weekend. I am using the 12V power from the light itself and I am using JST connectors on my mod so I don’t have to cut any wires on the light, making it easy to go back to stock if needed
 

MaccaPopEye

Well-Known Member
View Badges
Joined
Jan 5, 2016
Messages
697
Reaction score
1,224
Rating - 0%
0   0   0
As earlier, some pictures showing solutions using the Reef-PI PCBA's

upload_2018-9-21_13-53-38.png

An impression how multiple boards could be stacked and positioned vertically. Air can flow from bottom to top (natural flow) or from top to bottom, forced with fan. I think this is also better for the Raspberry PI then laying flat.


upload_2018-9-21_13-57-15.png

The PCBAs disassembled and wired separately. I think the best way for debugging is to use a carton shoe box with some holes. Here I have wired the boards as if they were stacked (from top to bottom)


upload_2018-9-21_14-8-37.png

Of course you don't need to stack the boards together, simply place a 2*20 connector on top of the Reef-PI_HAT (shown in purple) and connect with ribbon cable. Then you can place the board wherever you want.
Use a 6 pin connector with short pins (shown in red) and connect the Reef-PI_PWM directly the Reef-PI_HAT
Do note that you will need some space between the boards for the connectors to the sensors/actuators. I definitely believe that separating the boards requires much more space but for testing/debugging it will definitely be required.
They are looking awesome mate! Great job!

Personally while making it relatively small, having the smallest enclosure possible isn't the most important thing for me.

I would like to keep all of the I/O plugs on the bottom of the main brain (similar to how an Apex has its plugs on the bottom). So I think the real limiting factor for housing size is going to be how many I/O ports there are. If you are going to max out Reef-Pi's capabilities then your I/O panel is likely going to be quite long (as long as you don't do a break out box style build like the apex).

As space isn't an issue I probably won't be stacking more than 2 boards together anyway. I'd rather wide and thin than short and high (if that makes sense :p).

I'll likely stack the Pi & HAT together, then I will have one PWM board separate up in my hood with the lights, and if I ever add a Reef-Pi doser I'll put that board either on its own or with any future boards next to the Pi rather than stacked ontop.

But, keeping the boards stackable as you have them also allows for the user to choose which I really like. People can either try to make small and fat housings or long and thin housings :)
 

MaccaPopEye

Well-Known Member
View Badges
Joined
Jan 5, 2016
Messages
697
Reaction score
1,224
Rating - 0%
0   0   0
Thanks to posts from @Ryan115 , I am finally getting close to using my reef-pi build to control my SB reef lights. I have one channel of whites working on one of my lights and plan to finish blues and do the other light this weekend. I am using the 12V power from the light itself and I am using JST connectors on my mod so I don’t have to cut any wires on the light, making it easy to go back to stock if needed
Nice! Post some pics when you can :)
 

wykat

Active Member
View Badges
Joined
May 23, 2018
Messages
182
Reaction score
421
Rating - 0%
0   0   0
They are looking awesome mate! Great job!
I would like to keep all of the I/O plugs on the bottom of the main brain (similar to how an Apex has its plugs on the bottom). So I think the real limiting factor for housing size is going to be how many I/O ports there are. If you are going to max out Reef-Pi's capabilities then your I/O panel is likely going to be quite long (as long as you don't do a break out box style build like the apex).

yes having all plugs at the bottom is also in my head from the beginning onward, see (a2) below. That's one of the reasons I'm thinking of having a fixed, 2-3 mm broader distance between the boards for these reasons:
1) It could also fit BNC plugs, presently the BNC plugs would generate a short cut with the present distance (have samples at hand), they exactly fit in the present dimension, but don't allow soldered components at the other end and they are of metal.
2) It would simplify the mounting of the stacked PCBAs in a housing (still open)
3) Would simplify wiring (move direction from the side connectors inward, then 90 degree curve and it will come out at the bottom
4) Would improve airflow, even with more wiring going around
5) Create more space for connectors at the bottom of the housing
6) Reduce depth of the potential housing
Will need to analyse the exact connection method of these contacts, but they slide in very deep today, I think around 5mm.

For the Reef-PI_HAT, presently no changes would be required (not taking into account the power supply source idea, it would increase the available space for power management on the Reef-PI_HAT)

With respect to the Reef-PI_PWM module I think there are 2 options:
a) don't use the 8 PWM outputs on the side, just the ones on the bottom, this will loose some addresses of the total (I believe >100 max PWM outputs) if more PWM's are required.
Solutions are:
a1) Add a 2nd Reef-PI_PWM module if more then 8 PWM outputs are required (will loose an additional 8 addresses)
a2) Modify the Reef-PI_PWM module to accept a daughter board with 8 outputs at the bottom and forward the I2C bus (Requires a different, simple PCBA, but saves the PCA9685 chip). This was my original design with different dimensions. Don't use that design!, the output connectors are physically wrong!

as usual, feedback is always welcome:)
 
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
As earlier, some pictures showing solutions using the Reef-PI PCBA's

upload_2018-9-21_13-53-38.png

An impression how multiple boards could be stacked and positioned vertically. Air can flow from bottom to top (natural flow) or from top to bottom, forced with fan. I think this is also better for the Raspberry PI then laying flat.


upload_2018-9-21_13-57-15.png

The PCBAs disassembled and wired separately. I think the best way for debugging is to use a carton shoe box with some holes. Here I have wired the boards as if they were stacked (from top to bottom)


upload_2018-9-21_14-8-37.png

Of course you don't need to stack the boards together, simply place a 2*20 connector on top of the Reef-PI_HAT (shown in purple) and connect with ribbon cable. Then you can place the board wherever you want.
Use a 6 pin connector with short pins (shown in red) and connect the Reef-PI_PWM directly the Reef-PI_HAT
Do note that you will need some space between the boards for the connectors to the sensors/actuators. I definitely believe that separating the boards requires much more space but for testing/debugging it will definitely be required.
Love it :-)
 
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
Thanks to posts from @Ryan115 , I am finally getting close to using my reef-pi build to control my SB reef lights. I have one channel of whites working on one of my lights and plan to finish blues and do the other light this weekend. I am using the 12V power from the light itself and I am using JST connectors on my mod so I don’t have to cut any wires on the light, making it easy to go back to stock if needed
Let us know the circuit details. I have a bunch of folks who have reached out to me on how to control sb reef lights using reef-pi. I gave some details, but since i dont have one, nothing was concrete.
 

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