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

aquaalgae

Community Member
View Badges
Joined
Mar 22, 2017
Messages
48
Reaction score
30
Rating - 0%
0   0   0
Hi,
Thank your for your interest in reef-pi.
  1. You can control all 16 channels via reef-pi
  2. The two our increments are not enforced at once , but linearly in a minute by minute interval. I’ts smooth and does not cause any sudden change.
  3. The ui only allows 1-100% level, which the mapped to 0-4095 range. So , we do take advantage of the entire range, but in discrete 100 intervals. We can certainly revisit this if need be.
  4. We don’t have support for acclimation yet, it planned for 2.0 release , something I am working towards now
  5. The three lights 15 minute interval thing can be done either via setting a thresholds Or using a time to control the on /off of individual channels (assuming they can be wired up via a relay)
  6. No support for storm /cloud simulation yet. You can use the api to do pretty much anything custom you want, but you have to write some code. This won’t be supported via ui at least by 2.0 release
Let me know if you have any questions
Ranjib,

Thank you for all of your work on this, this is a fantastic project as it stands and has great potential for future features.

I am just beginning with all of this. My end goal is to replace my current setup - Reef Angel Plus. The Reef Angel has a lot of features that I like that I am trying to replace with this. Advanced PWM is one of those features.
As far as "advanced PWM" what would be great to have is: being able to dim to all 4096 levels (vs 4096/100), control of when lighting starts to ramp up from 0 and down to 0 by a set time (ex starting at 8:05AM, ending at 7:34PM) for each channel individually. Down the road it would also be great to have automatic seasonal time adjustments, weather simulation, moon cycles, etc.

I know there is a lot to Reef Pi that you are trying to incorporate/improve. Like I said, I'm used to the Reef Angel (Arduino), so I'm struggling a little to understand the code. Are these a possibility for Reef Pi 2.0? Could you point me in the right direction to understand the code better? I would like to understand the logic behind the PWM calculations and how that is sent to the PCA9685 board.

Thanks!!
 
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,

Thank you for all of your work on this, this is a fantastic project as it stands and has great potential for future features.

I am just beginning with all of this. My end goal is to replace my current setup - Reef Angel Plus. The Reef Angel has a lot of features that I like that I am trying to replace with this. Advanced PWM is one of those features.
As far as "advanced PWM" what would be great to have is: being able to dim to all 4096 levels (vs 4096/100), control of when lighting starts to ramp up from 0 and down to 0 by a set time (ex starting at 8:05AM, ending at 7:34PM) for each channel individually. Down the road it would also be great to have automatic seasonal time adjustments, weather simulation, moon cycles, etc.

I know there is a lot to Reef Pi that you are trying to incorporate/improve. Like I said, I'm used to the Reef Angel (Arduino), so I'm struggling a little to understand the code. Are these a possibility for Reef Pi 2.0? Could you point me in the right direction to understand the code better? I would like to understand the logic behind the PWM calculations and how that is sent to the PCA9685 board.

Thanks!!
Absolutely,
This is the exact code that takes a 0-99 value and translates to 0-4095: https://github.com/reef-pi/reef-pi/blob/master/controller/utils/pwm.go#L50

Note, reef-pi supports both pca9685 as well as Pi's native hardware timer based pwm (2 channel only). https://github.com/reef-pi/reef-pi/blob/master/controller/utils/pwm_rpi.go


The lighting code is present here: https://github.com/reef-pi/reef-pi/blob/master/controller/utils/pwm_rpi.go

All the 2.0 milestones are based on what I can do. Anything that comes from the community is automatically going to be part of it, as long as they are of sound quality (code, logic, usability). Or, there's nothing stopping us to offer more :-)
 

aquaalgae

Community Member
View Badges
Joined
Mar 22, 2017
Messages
48
Reaction score
30
Rating - 0%
0   0   0
I have Reef Pi up and running with the 16 channel dimmer attached. I don't have anything plugged into the dimmer yet. I am having trouble viewing the dimming data in adafruit.io. It automatically set up 10 feeds (for 10 of my dimming channels), but there is no data going to them...
 

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
Im afraid it wont. The circuit you linked requires and analog input pin, pi does not have any. You are right, the current reef-pi ph code is tied to AtlasScientific circuit (their i2c protocol to be specific), but we can revisit that, change it to support something else if theres a compelling reason. I did a fair amount of research before going with atlas scientific probes/circuit. My finding was getting a marine aquarium compatible probe that will be used for continuous monitoring is not cheap. Atlas was the only supplier with some reputation. I do agree its expensive :-( .

I am learning electronics, and once my chops are good enough, I'll certainly attempt to address this. From my discussion with @theatrus , it looks like we should be able to use a dedicated micro controller and to roll our own ph circuit (that does the analog voltage to ph conversion along with voltage isolation. But thats a distant future

Thanks Ranjib. Going to find an Atlas kit to buy then.
 

Kampo

Active Member
View Badges
Joined
Dec 19, 2017
Messages
349
Reaction score
329
Location
South West Michigan
Rating - 0%
0   0   0
looking to give this another shot. I noticed that there is support now for pwm straight off the pi now for 2 channels. also I plan on using this for a office nano tank, is it possible to just have it broadcast its own adhoc network, I don't want it on the office wifi so IT doesn't get annoyed.

also any new wiring diagrams to point me at? might do a simple full blown controller, optical ATO, heater control, and wave maker cycle (have a sicce nano wave maker, should be able to be cycled with a relay)
 
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 Reef Pi up and running with the 16 channel dimmer attached. I don't have anything plugged into the dimmer yet. I am having trouble viewing the dimming data in adafruit.io. It automatically set up 10 feeds (for 10 of my dimming channels), but there is no data going to them...
the adafruit integration has to be revisited for 2.0 release.
Also you dont really need light data logging in adafruit, since it will not change over time, and you can see the graph in reef-pi directly.
 

aquaalgae

Community Member
View Badges
Joined
Mar 22, 2017
Messages
48
Reaction score
30
Rating - 0%
0   0   0
the adafruit integration has to be revisited for 2.0 release.
Also you dont really need light data logging in adafruit, since it will not change over time, and you can see the graph in reef-pi directly.
I'm using version 1.5. I just wanted to see it plot my dimming % until I add temp, pH, etc.
 
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
looking to give this another shot. I noticed that there is support now for pwm straight off the pi now for 2 channels. also I plan on using this for a office nano tank, is it possible to just have it broadcast its own adhoc network, I don't want it on the office wifi so IT doesn't get annoyed.

also any new wiring diagrams to point me at? might do a simple full blown controller, optical ATO, heater control, and wave maker cycle (have a sicce nano wave maker, should be able to be cycled with a relay)
this is something i have to explore, using pi's wifi straight as hub and then connecting mobile or laptop to interact with reef-pi. I think its doable, but I dont know how yet.
Some update on the pi based pwm, recently after doing some oscilloscope based analysis i found the pi pwm is jitterry if i power it via GPIO/lm2596, and stable if i power it via dedicated power supply + micorusb. I am talking to folks in raspberry pi forum, also ordered a microusb breakout board from adafruit to check if i power it via microusb+lm2596 anything changes or not. I am trying to nail down if its the microUSB/GPIO issue or power source issue (lm2596 vs 2.5A micro usb wallwart). I'll keep you posted. what light you are planning to use?
 
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 using version 1.5. I just wanted to see it plot my dimming % until I add temp, pH, etc.
then it should work. Can you check the log for any errors ?
 

Kampo

Active Member
View Badges
Joined
Dec 19, 2017
Messages
349
Reaction score
329
Location
South West Michigan
Rating - 0%
0   0   0
this is something i have to explore, using pi's wifi straight as hub and then connecting mobile or laptop to interact with reef-pi. I think its doable, but I dont know how yet.
Some update on the pi based pwm, recently after doing some oscilloscope based analysis i found the pi pwm is jitterry if i power it via GPIO/lm2596, and stable if i power it via dedicated power supply + micorusb. I am talking to folks in raspberry pi forum, also ordered a microusb breakout board from adafruit to check if i power it via microusb+lm2596 anything changes or not. I am trying to nail down if its the microUSB/GPIO issue or power source issue (lm2596 vs 2.5A micro usb wallwart). I'll keep you posted. what light you are planning to use?

Diy. Plan on putting the pi couple ldd drivers and a blueacro acrostar inside a 5in makersled slim heatsink enclosure. Kinda a poormans ai prime lol. But thinking I could make a break out box for more functionality if I wanted too. Can the pi be setup to login to the strongest public no password wifi automatically upon booting up?
 
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
Diy. Plan on putting the pi couple ldd drivers and a blueacro acrostar inside a 5in makersled slim heatsink enclosure. Kinda a poormans ai prime lol. But thinking I could make a break out box for more functionality if I wanted too. Can the pi be setup to login to the strongest public no password wifi automatically upon booting up?
Probably, it’s a computer , so you should be able to code whatever you want :-)
 
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

philshel

Active Member
View Badges
Joined
Jul 24, 2010
Messages
365
Reaction score
375
Rating - 0%
0   0   0
Pi as WiFi access point :)
https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md

I’ll try it out this weekend . I think it will be fairly straight forward and once setup , we can connect to a reef-pi hotspot directly from mobile or laptop and configure things. So , no external network (internet or home WiFi ) is required .

Thank you for bringing this up @Kampo

@Ranjib, if you do this can it be an option? I for one like having reef-pi as part of my home network. I had a controller that was it's own access point and it was a bit of pain in the butt to log out of my home network and login to it every time I wanted to do something with 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
@Ranjib, if you do this can it be an option? I for one like having reef-pi as part of my home network. I had a controller that was it's own access point and it was a bit of pain in the *** to log out of my home network and login to it every time I wanted to do something with it.
Hi @philshel
This is definitely an optional thing. In fact it will be completely de-coupled thing from reef-pi. Put other way, reef-pi the software itself is not really aware of any of this. I will just add a documentation page on how to do this on raspberry pi, and how to access reef-pi in such setup. Its up to user how to setup the controller, but reef-pi the software is pretty much same, running a server bound to an IP (or localhost), its upto you to connect it to home wifi, or use it as an access point, or run it without any network, just by attaching a physical display.
Does that answer your question ?
 
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

philshel

Active Member
View Badges
Joined
Jul 24, 2010
Messages
365
Reaction score
375
Rating - 0%
0   0   0
Hi @philshel
This is definitely an optional thing. In fact it will be completely de-coupled thing from reef-pi. Put other way, reef-pi the software itself is not really aware of any of this. I will just add a documentation page on how to do this on raspberry pi, and how to access reef-pi in such setup. Its up to user how to setup the controller, but reef-pi the software is pretty much same, running a server bound to an IP (or localhost), its upto you to connect it to home wifi, or use it as an access point, or run it without any network, just by attaching a physical display.
Does that answer your question ?

Yep, thank you.
 
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 pushed a lot of fronend/UI updates in past two weeks: https://github.com/reef-pi/reef-pi/pulls?q=is:pr+is:closed

Details (heavy in tech): I am slowly updating all the react components to use redux. Last beta release had a major react version update (16.0) which allowed us to roll in newer , more efficient ajax /asynchronous calls using redux. Its significant amount of work, as current reef-pi has more code doing the UI (almost 5K lines of code) than backend/conroller logic (almost 4k). More over, the frontend code has really no unit tests whatsoever, other than a single end to end integration test. So, one of my goal was to update, improve and test the front end code before 2.0 release, so that we can provide a stable and robust platform for UI work going forward. Opensource code always needs to be in pristine state, otherwise newer contributors will have hard time to push additional code.
In past two weeks, i have updated almost 1K lines of front-end code, also started with unit testing front end code. I still have a long way to go, but I am new to this (front end testing), so the taking the first stab was time consuming, but an important milestone...
 

sector9

Active Member
View Badges
Joined
Jun 26, 2017
Messages
129
Reaction score
189
Rating - 0%
0   0   0
I have a question about the doser function. If the pi shuts down (either through power failure or planned maintenance) while the doser is running and the pi "misses" the time when the doser should have been turned off, will the doser keep running indefinitely?

I have realized that it works this way for other timers and outlets. However, I am worried about a doser being stuck in the "on" state for hours and inadvertently dumping a large volume of the dosing solution into the tank
 

Kampo

Active Member
View Badges
Joined
Dec 19, 2017
Messages
349
Reaction score
329
Location
South West Michigan
Rating - 0%
0   0   0
trying to layout a simple light controller and make sure i'm ordering the right parts, was there ever a diagram made up or doumentionation in this post on wiring a light using the PWM straight off the pi, I can't seem to locate it. also you mention more stable pwm when you use usb to power it over the pins. would I be able to get the same effect if I took the power I would be hooking to the pins to a microusb cable to plug into the pi?
 

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 26.6%
  • 100% dry rock + 100% live sand

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

    Votes: 32 22.4%
  • 75% live rock, 25% live sand

    Votes: 15 10.5%
  • 25% live rock, 75% live sand

    Votes: 10 7.0%
Back
Top