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,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
If you want dimming ability on LEDs it sometimes makes sense to use a PWM signal.
yes, and thats why en1, en2 is the pwm input. Rest does not need to be, IN1/2/3/4 all can be simple 3.3v/GND
 

Urtoo

Well-Known Member
View Badges
Joined
Jul 1, 2019
Messages
688
Reaction score
925
Rating - 0%
0   0   0
HS300 is in hand. After maleficent movie night, I will solder a header to the pi zero and start getting running.
Pictures will be in my build thread, maybe tomorrow after RAP.
Speaking of which, anyone in here going tomorrow?
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
HS300 is in hand. After maleficent movie night, I will solder a header to the pi zero and start getting running.
Pictures will be in my build thread, maybe tomorrow after RAP.
Speaking of which, anyone in here going tomorrow?
Nope. Was in orlando.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
As far as I understand, the PCA9685 is specifically for things that require a PWM signal (different from frequency), so basically leds and servos only.
with 3.0 , we will be able to use pwm outputs as notmal digital output. In that case its basically 100% duty cyle or 0% duty cycle. So L293D could be entirely driven by pca9685 IC, or even relay contol. I have not tested this, theres a pca9685 driver bug that also i need to fix before i start field testing
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
reef-pi 3.0 new pwm profiles:
Fixed: Constant intensity for given time period
Screen Shot 2019-10-20 at 11.40.01 PM.png


Interval: Linear interpolation of a set of intensities at used defined fixed time interval. (Like auto in reef-pi 2.0, but can be used with arbitrary time intervals, like 15 min).
Screen Shot 2019-10-20 at 11.51.56 PM.png



Diurnal:
Screen Shot 2019-10-21 at 12.03.44 AM.png

Sine:
Screen Shot 2019-10-21 at 12.48.58 AM.png


Random:
Screen Shot 2019-10-21 at 12.40.50 AM.png


Lunar: Like sine in daily intensity cycle, but max intensity changes with 27 days cycle. Graph is for three months. Each peak representing a daily sine cycle
Screen Shot 2019-10-21 at 12.50.04 AM.png


Composite: A set of sub-profiles each with a specific duration and min/max intensity. The example graph combines aiurnal, sine, random and fixed profiles.
Screen Shot 2019-10-21 at 1.08.09 AM.png


These things are now present in the backend/controller. We are working on building the UI.
 
Last edited:

Urtoo

Well-Known Member
View Badges
Joined
Jul 1, 2019
Messages
688
Reaction score
925
Rating - 0%
0   0   0
After too long of a delay... I am starting

first to solder some pins to my pi zero. I will overload my build thread with photos
045A2C5C-C341-4804-8AD8-CFBB413F4D8B.jpeg
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
reef-pi 3.0 new pwm profiles:
Fixed: Constant intensity for given time period
Screen Shot 2019-10-20 at 11.40.01 PM.png


Interval: Linear interpolation of a set of intensities at used defined fixed time interval. (Like auto in reef-pi 2.0, but can be used with arbitrary time intervals, like 15 min).
Screen Shot 2019-10-20 at 11.51.56 PM.png



Diurnal:
Screen Shot 2019-10-21 at 12.03.44 AM.png

Sine:
Screen Shot 2019-10-21 at 12.48.58 AM.png


Random:
Screen Shot 2019-10-21 at 12.40.50 AM.png


Lunar: Like sine in daily intensity cycle, but max intensity changes with 27 days cycle. Graph is for three months. Each peak representing a daily sine cycle
Screen Shot 2019-10-21 at 12.50.04 AM.png


Composite: A set of sub-profiles each with a specific duration and min/max intensity. The example graph combines aiurnal, sine, random and fixed profiles.
Screen Shot 2019-10-21 at 1.08.09 AM.png


These things are now present in the backend/controller. We are working on building the UI.
This is something im really waiting for!

In other news, no problems whatsoever to report. My reef-pi just keeps humming happily along!
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
So I'm working with a PCA9685pw & it's driving me up the wall. I can get Adafruit's PCA9685 board to work, but when I try mine, it crashes.

Main PID: 981 (code=exited, status 1/FAILURE)

The weird thing to me is that using i2cdetect, I find the PCA9685 on 0X41 (I have address pin A0 jumpered, so this is expected). So the pi is seeing the chip, but reef pi still doesn't like it.

Using journalctl:
sudo journalctl -fu reef-pi.service
-- Logs begin at Thu 2019-02-14 05:12:02 EST. --
Oct 25 23:25:59 control1 systemd[1]: reef-pi.service: Failed with result 'exit-code'.
Oct 25 23:27:29 control1 systemd[1]: reef-pi.service: Service RestartSec=1min 30s expired, scheduling restart.
Oct 25 23:27:29 control1 systemd[1]: reef-pi.service: Scheduled restart job, restart counter is at 2.
Oct 25 23:27:29 control1 systemd[1]: Stopped raspberry pi based reef tank controller.
Oct 25 23:27:29 control1 systemd[1]: Started raspberry pi based reef tank controller.
Oct 25 23:27:29 control1 reef-pi[995]: 2019/10/25 23:27:29 Setting pca9685 frquency: 1500
Oct 25 23:27:29 control1 reef-pi[995]: 2019/10/25 23:27:29 ERROR: Failed to initialize pca9685 driver with mock i2c bus. Error: remote I/O error
Oct 25 23:27:29 control1 reef-pi[995]: 2019/10/25 23:27:29 ERROR: Failed to initialize controller. Error:remote I/O error
Oct 25 23:27:29 control1 systemd[1]: reef-pi.service: Main process exited, code=exited, status=1/FAILURE
Oct 25 23:27:29 control1 systemd[1]: reef-pi.service: Failed with result 'exit-code'.
Oct 25 23:28:59 control1 systemd[1]: reef-pi.service: Service RestartSec=1min 30s expired, scheduling restart.
Oct 25 23:28:59 control1 systemd[1]: reef-pi.service: Scheduled restart job, restart counter is at 3.
Oct 25 23:28:59 control1 systemd[1]: Stopped raspberry pi based reef tank controller.
Oct 25 23:28:59 control1 systemd[1]: Started raspberry pi based reef tank controller.
Oct 25 23:28:59 control1 reef-pi[1027]: 2019/10/25 23:28:59 Setting pca9685 frquency: 1500
Oct 25 23:28:59 control1 reef-pi[1027]: 2019/10/25 23:28:59 ERROR: Failed to initialize pca9685 driver with mock i2c bus. Error: remote I/O error
Oct 25 23:28:59 control1 reef-pi[1027]: 2019/10/25 23:28:59 ERROR: Failed to initialize controller. Error:remote I/O error
Oct 25 23:28:59 control1 systemd[1]: reef-pi.service: Main process exited, code=exited, status=1/FAILURE
Oct 25 23:28:59 control1 systemd[1]: reef-pi.service: Failed with result 'exit-code'.

1572061445184.png
 
Last edited:

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
112
Reaction score
155
Rating - 0%
0   0   0
Some pca9685 boards only work with Max frequency of 1000
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
@Schreiber The error message seems a bit suspicious.

Oct 25 23:27:29 control1 reef-pi[995]: 2019/10/25 23:27:29 ERROR: Failed to initialize pca9685 driver with mock i2c bus. Error: remote I/O error

Is this on the same reef-pi as the adafruit board? Which version of reef-pi are you running? Can you make sure DevMode is not enabled?
 

Schreiber

Leviathan
View Badges
Joined
Jun 28, 2016
Messages
468
Reaction score
593
Location
Knoxville
Rating - 0%
0   0   0
@Schreiber The error message seems a bit suspicious.



Is this on the same reef-pi as the adafruit board? Which version of reef-pi are you running? Can you make sure DevMode is not enabled?

I tested with the adafruit board, but this is an entirely separate PCA9685 chip. I don't have the adafruit board connected anymore, just this one. DevMode is not enabled & I'm running 2.5.

EDIT: @Michael Lane , I just downloaded the schematic for the adafruit board & the only real differences I see between my setup & their is for the address jumpers...

For my address pins A0-A5, they have 10k ohm resistors between them & ground... Are these actually necessary? I simply have mine connected straight to ground. I have A1-A5 connected directly to ground & A0 connected directly to VCC.
 
Last edited:

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,244
Location
Columbia MD
Rating - 0%
0   0   0
@Ranjib I recently moved. At my old house I had my reefpi hardwired via Ethernet and had no issues. At the new place WiFi is my only option. On very random occasions I am unable to access reefpi via the web browser. I can pull the plug on the reefpi box to reset it and it always works fine after that. I suspect it’s the WiFi connection needing a rest everyonce in awhile. Have you experienced this at all? Is there some way to have the raspberry reset the WiFi adapter Avery couple days or something along those lines?
 

sfgabe

Active Member
View Badges
Joined
Sep 7, 2018
Messages
172
Reaction score
264
Rating - 0%
0   0   0
@Ranjib I recently moved. At my old house I had my reefpi hardwired via Ethernet and had no issues. At the new place WiFi is my only option. On very random occasions I am unable to access reefpi via the web browser. I can pull the plug on the reefpi box to reset it and it always works fine after that. I suspect it’s the WiFi connection needing a rest everyonce in awhile. Have you experienced this at all? Is there some way to have the raspberry reset the WiFi adapter Avery couple days or something along those lines?
I had a similar issue if an intermittent wifi connection. I had to move the pi away from any of the magnets holding pumps etc to the back of the tank. Have you tested a different placement?
 

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,673
Reaction score
2,244
Location
Columbia MD
Rating - 0%
0   0   0
I had a similar issue if an intermittent wifi connection. I had to move the pi away from any of the magnets holding pumps etc to the back of the tank. Have you tested a different placement?

I honestly think it’s hardware related. It only happens once every 2-3 weeks and my box is pretty far from any pumps. I can try moving it further.
 

dmolavi

Well-Known Member
View Badges
Joined
Jan 3, 2015
Messages
509
Reaction score
646
Location
United States
Rating - 0%
0   0   0
@Ranjib I recently moved. At my old house I had my reefpi hardwired via Ethernet and had no issues. At the new place WiFi is my only option. On very random occasions I am unable to access reefpi via the web browser. I can pull the plug on the reefpi box to reset it and it always works fine after that. I suspect it’s the WiFi connection needing a rest everyonce in awhile. Have you experienced this at all? Is there some way to have the raspberry reset the WiFi adapter Avery couple days or something along those lines?

I've not had any wifi issues on my build. It's been rock solid since January. One thing to watch for- microwave ovens can cause 2.4GHz Wifi problems, since most ovens operate in that approximate frequency range too.
 

HAVE YOU EVER KEPT A RARE/UNCOMMON FISH, CORAL, OR INVERT? SHOW IT OFF IN THE THREAD!

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top