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

M1sterSm1th

New Member
View Badges
Joined
Feb 21, 2018
Messages
2
Reaction score
3
Rating - 0%
0   0   0
https://github.com/kidoman/embd/blob/master/controller/pca9685/pca9685.go#L24
490HZ. Currently,reef-pi does not allow changing the pwm frequency from UI/API. We can of course revisit that

Looking at the specifications of Steve's Leds driver. It says: "-PWM Input - YES. This accepts standard PWM for dimming and automation. Accurate linear dimming is compatible with PWM frequencies from 100 Hz to 5 kHz for PWM duty cycle down to 1%. PWM frequencies up to 50 kHz can be supported for duty cycles greater than 10%"

If Reef-Pi defaults to 490HZ, does that mean it can only dim down to about 10% before cutting out? How high can the PWM be set, if one was able to adjust it from the API?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Looking at the specifications of Steve's Leds driver. It says: "-PWM Input - YES. This accepts standard PWM for dimming and automation. Accurate linear dimming is compatible with PWM frequencies from 100 Hz to 5 kHz for PWM duty cycle down to 1%. PWM frequencies up to 50 kHz can be supported for duty cycles greater than 10%"

If Reef-Pi defaults to 490HZ, does that mean it can only dim down to about 10% before cutting out? How high can the PWM be set, if one was able to adjust it from the API?
Its not very clear to me if the drivers can give beter dimming capability at higher frequency or reverse, but the frequency we set in reef-pi can be made configurable. As of now we didn;t encounter anything that was blocked the current default frequency, hence I have not made it configurable (actually we dont have any code in the pca9685 driver for frequency settings, the default value comes from pca9685 chip's own default settings). We certainly dont have any limitation from reef-pi's standpoint to make it configurable across pca9685 as well as raspberry pi based pwm. I 'll make sure I create a issue to track this. This is a low hanging fruit from coding standpoint,
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
This might be a dumb question. About telemetry, instead of using adafruit would i be able to use sftp? I have a few web addresses and planning a rather long vaca. Even if it was just a a number like temp = x sent every y minutes saved to a webfile? Adafruits 10 limit is rather small and id rather not make a hole in my home network to allow remote log on to pi.
Have you looked at Remot3.it for this? It would allow you access to all of your systems directly with no port openings
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
Looking at the specifications of Steve's Leds driver. It says: "-PWM Input - YES. This accepts standard PWM for dimming and automation. Accurate linear dimming is compatible with PWM frequencies from 100 Hz to 5 kHz for PWM duty cycle down to 1%. PWM frequencies up to 50 kHz can be supported for duty cycles greater than 10%"

If Reef-Pi defaults to 490HZ, does that mean it can only dim down to about 10% before cutting out? How high can the PWM be set, if one was able to adjust it from the API?
The way I am reaing this is...
100Hz<PWM<5kHz = 1%
5kHz<PWM<50kHz = 10%
So reef-pi would get down to 1% @ 490 Hz
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
The way I am reaing this is...
100Hz<PWM<5kHz = 1%
5kHz<PWM<50kHz = 10%
So reef-pi would get down to 1% @ 490 Hz
yeah in this case. But I think its a good thing to have (the ability to tune the frequency of pca9685 or rpi based pwm). I have heard that at lower frequency some of the lights create humming noise
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
Directly integrating reef-pi with sftp might not be very feasible. As it is a very very specific use case, and reef-pi should not have code for those, though it should provide a way of achieving this.

One of the thing Ryan mentioned, is the ability to get summary information from reef-pi, which covers current temperature , ph , image etc. Once we have that API and a decent python SDK, we can write commonly used scripts in python that does the sftp upload, you can run it in you reef-pi, periodically everytime you go to vacation.

@Gareth, what i do with adafruit's limit, is i open a new browser in chrome incognito mode. That way you can be logged on as two different users at the same time and see more than 10 data feeds - up to 20 currently for me. I'm not sure if Ranjib can open up reef-pi to allow multiple adafruit users easily for the same user, but it's what i do with my own custom reef controller code utilizing raspberry pi. [I just come here to borrow Ranjib's good ideas, and sometimes, i hope leave good ones of my own for the community to share with - like hopefully this one.]
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
Yeah some long term data storage would be fantastic to watch trends and such, when you finalize on the parts I will go ahead and pick up the pH supplies as this is definitely something I’d like to implement

i use a mysql database with my custom code. It works out well. Perhaps Ranjib can get that going at some point. He is superman.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
i use a mysql database with my custom code. It works out well. Perhaps Ranjib can get that going at some point. He is superman.
We use boltdb, and we too can store the data locally on disk (actually we store 1 week's worth of telemetry data locally). The adafruit integration provides and outside store for the same data, and also can hold more data (longer period of time). Adafruit integration was rolled out before the in-app visualization. I had to build the in-app charts due to feed limits on adafruit side as well issues with triggers.

In future we'll have support for longer retention period. This is bit risky, from reliability standpoint, as SD cards are the most frequently failed parts of the reef-pi build, and disk i/o is very performance intensive operations. But I think if we build a solution with proper mitigation in place (i.e. provide metrics around how much retention & usage is safe and a way to backup/restore data in case of sd card failures) that it should be fine

I wont endorse any recommendation for gaming the adafruit.io API limits. I know its possible, but it feels unethical, and I have a viable workaround :) .

I might completely get rid of adafruit.io integration if theres not enough users for that feature. This is mostly because of the triggers not working, API limitation and growing features within the reef-pi.
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
In future we'll have support for longer retention period. This is bit risky, from reliability standpoint, as SD cards are the most frequently failed parts of the reef-pi build, and disk i/o is very performance intensive operations. But I think if we build a solution with proper mitigation in place (i.e. provide metrics around how much retention & usage is safe and a way to backup/restore data in case of sd card failures) that it should be fine

Perhaps we can endorse using free windisk32imager once every 3 or 4 months to users to do a complete backup in case of an SD card failure. I know I have been writing to mysql database once every 5 minutes for the last 6 months without issue. I should make a maintenance task to save that raspberry pi image every few months though. Thanks.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
What is the viable work around?
Viable workaround is that we have 1 week of data on disk, under boltdb (similar to what you have with mysql, except with fixed retention to limit the disk usage & io) and we are working on longer retention and import/export functionality (for backups).

Backup & restore is probably the single most important thing for me, from sd card failure perspective. In an ideal world, I would expect reef-pi to generate the entire backup in a single click and then user can save it wherever they prefer (their laptop, ftp site, drop box, google drive, icloud... whatever).. and restore a reef-pi state from backup via import features (that is users should be able to recreate their old setup by importing an existing backup on a new reef-pi setup
 

denierlexiese

Active Member
View Badges
Joined
Jul 7, 2017
Messages
106
Reaction score
68
Rating - 0%
0   0   0
Viable workaround is that we have 1 week of data on disk, under boltdb (similar to what you have with mysql, except with fixed retention to limit the disk usage & io) and we are working on longer retention and import/export functionality (for backups).

Backup & restore is probably the single most important thing for me, from sd card failure perspective. In an ideal world, I would expect reef-pi to generate the entire backup in a single click and then user can save it wherever they prefer (their laptop, ftp site, drop box, google drive, icloud... whatever).. and restore a reef-pi state from backup via import features (that is users should be able to recreate their old setup by importing an existing backup on a new reef-pi setup

That would be nice.
 

Twocorns

Well-Known Member
View Badges
Joined
Apr 13, 2016
Messages
559
Reaction score
216
Location
LV, NC
Rating - 0%
0   2   0
Shout out to Ranjib and anyone else working on the reef-pi coding/project. Here is my first attempt at a power source controlled by reef pi! It's ugly as hell, but works. Next up is adding ATO and temp functionality!
20180222_143904.jpg
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Shout out to Ranjib and anyone else working on the reef-pi coding/project. Here is my first attempt at a power source controlled by reef pi! It's ugly as hell, but works. Next up is adding ATO and temp functionality!
20180222_143904.jpg
Sweet :0)
 

jcmental

Active Member
View Badges
Joined
Jan 25, 2018
Messages
114
Reaction score
137
Rating - 0%
0   0   0
Ok, so i went through all the info i could in 2 days,
now that Reef-PI is up and running, i have no more fun lol

so i want to make the lights controllable from pwm.

i have a simple nano and i aim for 4 channels

is my list ok ?

4x Driver : https://www.rapidled.com/mean-well-ldd-700h-dimmable-driver/

Driver board : https://www.rapidled.com/ldd-h-4-driver-board/

i2c iterface board : https://www.adafruit.com/product/815

i already have the leds and power supply.

any input from you guys ?

Ok OK you've gone and done it now. I've decided that because I cant find a driver for my Viparspectra lights I'm going to make my own
Ive ordered :-
200 LED heat sink mounts
6 x 30mm pc fans
3 x 1.5 mtr lengths of 30x30 aluminium box section.

I'm going order 200 various LED's from UV to Indigo colours
and I'm looking into ordering (unless I can find some ready built driver/ power modules)
14x mean well LLD- 700H Dimmable drivers
4x LLD-700h Driver boards

I'm going to mount various banks of LED to the aluminium box and put a fan at each end one blowing and one sucking, I will literally have 3 x 5ft LED light bars over my tank fully controllable with 14 channels.
Once it's all up and running I will sell my 3 Viperspectra's and re coupe my money.

Wow I love this thread it's oppend up all sorts of projects for people's tanks
@Ranjib you don't know that you've started here bud. Well done
LED mounts.jpg box.jpg 3w LED.jpg led fan.jpg
 

ReeferMadness88

Community Member
View Badges
Joined
Jan 28, 2018
Messages
33
Reaction score
37
Rating - 0%
0   0   0
Ok OK you've gone and done it now. I've decided that because I cant find a driver for my Viparspectra lights I'm going to make my own
Ive ordered :-
200 LED heat sink mounts
6 x 30mm pc fans
3 x 1.5 mtr lengths of 30x30 aluminium box section.

I'm going order 200 various LED's from UV to Indigo colours
and I'm looking into ordering (unless I can find some ready built driver/ power modules)
14x mean well LLD- 700H Dimmable drivers
4x LLD-700h Driver boards

I'm going to mount various banks of LED to the aluminium box and put a fan at each end one blowing and one sucking, I will literally have 3 x 5ft LED light bars over my tank fully controllable with 14 channels.
Once it's all up and running I will sell my 3 Viperspectra's and re coupe my money.

Wow I love this thread it's oppend up all sorts of projects for people's tanks
@Ranjib you don't know that you've started here bud. Well done
LED mounts.jpg box.jpg 3w LED.jpg led fan.jpg
Truthfully, that sounds like a really fun project. And I need a new project.. lol
 

Gareth elliott

Read, Tinker, Fail, Learn
View Badges
Joined
May 7, 2017
Messages
5,468
Reaction score
6,935
Location
NJ
Rating - 0%
0   0   0
Truthfully, that sounds like a really fun project. And I need a new project.. lol

That was the same place i was with my black box. Why i now have ai’s on my tank lol. Im thinking of testing the black box as a fuge light, just set and put on a timer.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Working on ph probe integration in reef-pi right now. The ezo (ph circuit) driver part is done and being tested.
I realized I need a ph probe holder now, otherwise i dont have an easy way to keep the probe in backchamber. Probably I'll order something from amazon. I wish I had a 3d printer, stuff like that are perfect for 3d printing :)
 

Creating a strong bulwark: Did you consider floor support for your reef tank?

  • I put a major focus on floor support.

    Votes: 55 40.1%
  • I put minimal focus on floor support.

    Votes: 29 21.2%
  • I put no focus on floor support.

    Votes: 48 35.0%
  • Other.

    Votes: 5 3.6%
Back
Top