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

OP
Ranjib

Ranjib

Valuable Member
View Badges
Joined
Apr 16, 2016
Messages
7,050
Reaction score
12,560
Location
Palo Alto, Bay Area
Would you recommend running two float switches? A higher failsafe switch that cuts off the circuit from the 1st float to reef-pi to add a safety net? My ATO pump is a bit... Oversized and will fill the tank within seconds so I'm trying to figure out the best way to prevent a catastrophe :)

Also I noticed that the check frequency on the ATO by default is 60 seconds. This means reef-pi checks the input pin every 60 seconds and the pump will run (for a minimum) for 60 seconds. Would it be possible to have reef-pi check the input status almost real-time once the ATO is signaled ON to prevent overages from oversized ATO pumps like mine? Lol.

I set it to 1 second for the reason above, don't know if that negatively affects anything. I didn't notice any increased CPU usage on the pi.
I think you can get away by running it at 3-5 second interval. I have never ran it at 1 second interval, but i dont think anything will break. Real time is not possible currently, we have to implement a different type of driver and I dont think the effort is worth the benefit right now.
I'll work on fixing the bug though... that needs to be fixed asap.
 
Top Shelf Aquatics

Ernie E

Member
View Badges
Joined
Aug 15, 2019
Messages
19
Reaction score
17
I think you can get away by running it at 3-5 second interval. I have never ran it at 1 second interval, but i dont think anything will break. Real time is not possible currently, we have to implement a different type of driver and I dont think the effort is worth the benefit right now.
I'll work on fixing the bug though... that needs to be fixed asap.
Thank you! I'm testing at 2 and 3 seconds today with the pump connected to see how she does.

One more question on the functionality of "disable on alert". Would this disable the ATO/equipment until the user resets it or would it disable it only for the check period set (60 seconds for example).

Maybe I should learn GO! Wonder how difficult it would be coming from a Python background.
 

Spathodus

Member
View Badges
Joined
Oct 16, 2019
Messages
6
Reaction score
2
Hello Ranjib.

First, thank you for creating such a useful application for all of us. I've been following this project for a while and just completed my lighting build. I DIY'd this as well, with 4 Meanwell LDD-1000L, running 4 channels to twenty-two 3w LEDS. the 4 channels are connected to a PCA 9685. I'm using a Raspberry pi zeroW.

My issue at the moment is that the LED's will flash brightly when they are shut off through the web UI. I believe this is a similar issue to losing the PWM signal from the raspberry pi/PCA 9685 resulting in the LED's just running at 100%, but I'm not sure. Do you think adding an adequately sized capacitor in parallel with each channel would abate this flashing issue?

Thank you very much!
 
OP
Ranjib

Ranjib

Valuable Member
View Badges
Joined
Apr 16, 2016
Messages
7,050
Reaction score
12,560
Location
Palo Alto, Bay Area
Hello Ranjib.

First, thank you for creating such a useful application for all of us. I've been following this project for a while and just completed my lighting build. I DIY'd this as well, with 4 Meanwell LDD-1000L, running 4 channels to twenty-two 3w LEDS. the 4 channels are connected to a PCA 9685. I'm using a Raspberry pi zeroW.

My issue at the moment is that the LED's will flash brightly when they are shut off through the web UI. I believe this is a similar issue to losing the PWM signal from the raspberry pi/PCA 9685 resulting in the LED's just running at 100%, but I'm not sure. Do you think adding an adequately sized capacitor in parallel with each channel would abate this flashing issue?

Thank you very much!
Thank you so much for the kind words. It means everything to me and rest of the folks who makes this project possible.

I think this is a bug in the pca9695 driver where we are not sending special instruction for 0 duty_cycle. https://github.com/reef-pi/reef-pi/issues/794
I plan to fix it as part of 3.0 release. If possible use a timer to cut off the power during off cycle.
 

Schreiber

Active Member
View Badges
Joined
Jun 28, 2016
Messages
199
Reaction score
248
On the topic of PCA9685... I can use the PWM output from the PCA for the L293d Enable, correct? That would free up a couple of GPIO pins for me if that's the case.

How do I set these jacks up in my configuration? I'm wanting to use outputs 12 & 13 from the PCA9685 as my PWM outputs for EN 1,2 & EN 3,4 on the L293D. In the Adafruit guide, pins 0 & 1 are being used with the RPi as the driver. I know I have to switch my driver to PCA9685, but are the pins I need to use 12 & 13? Or is the numbering scheme different here as well (like on the Pi, GPIO 18 is "pin 0"? I remember having a lot of trouble with the jacks when I was using the wrong pin in my previous build & I'm wanting to avoid that headache again!
 
Top Shelf Aquatics

sfgabe

Member
View Badges
Joined
Sep 7, 2018
Messages
83
Reaction score
167
How do I set these jacks up in my configuration? I'm wanting to use outputs 12 & 13 from the PCA9685 as my PWM outputs for EN 1,2 & EN 3,4 on the L293D. In the Adafruit guide, pins 0 & 1 are being used with the RPi as the driver. I know I have to switch my driver to PCA9685, but are the pins I need to use 12 & 13? Or is the numbering scheme different here as well (like on the Pi, GPIO 18 is "pin 0"? I remember having a lot of trouble with the jacks when I was using the wrong pin in my previous build & I'm wanting to avoid that headache again!
I use an L293D (H-bridge board) for exactly this to power my doser pump motors. The pins are entered into reef-pi as 0,1,2,3,4, etc just like the rpi driver, but there's more of them. You'll need 6 pins, ENA, 1, & 2, and ENB, 3, & 4 - which for me are 0,1,2,3,4,& 5 on the PCA9685. If you're powering something like a motor, EN will be the "power" switch and then you'll either end up with 1 dummy pin that's always set to "off" or be able to switch between forward and reverse by turning one high and one low and vice versa.
 

Schreiber

Active Member
View Badges
Joined
Jun 28, 2016
Messages
199
Reaction score
248
I use an L293D (H-bridge board) for exactly this to power my doser pump motors. The pins are entered into reef-pi as 0,1,2,3,4, etc just like the rpi driver, but there's more of them. You'll need 6 pins, ENA, 1, & 2, and ENB, 3, & 4 - which for me are 0,1,2,3,4,& 5 on the PCA9685. If you're powering something like a motor, EN will be the "power" switch and then you'll either end up with 1 dummy pin that's always set to "off" or be able to switch between forward and reverse by turning one high and one low and vice versa.
Interesting. I had been under the impression you had to use the GPIO pins for the Inputs on the L293D, because the PCA9685 was set to a much higher frequency.

So, if the PCA9685 outputs can be used in this way, what's keeping us from using them to control relay outputs as well?
 

Spathodus

Member
View Badges
Joined
Oct 16, 2019
Messages
6
Reaction score
2
Thank you so much for the kind words. It means everything to me and rest of the folks who makes this project possible.

I think this is a bug in the pca9695 driver where we are not sending special instruction for 0 duty_cycle. https://github.com/reef-pi/reef-pi/issues/794
I plan to fix it as part of 3.0 release. If possible use a timer to cut off the power during off cycle.
Thank you for your quick response. I might route the incoming driver power through a timed relay then.
 

sfgabe

Member
View Badges
Joined
Sep 7, 2018
Messages
83
Reaction score
167
Interesting. I had been under the impression you had to use the GPIO pins for the Inputs on the L293D, because the PCA9685 was set to a much higher frequency.

So, if the PCA9685 outputs can be used in this way, what's keeping us from using them to control relay outputs as well?
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.
 
OP
Ranjib

Ranjib

Valuable Member
View Badges
Joined
Apr 16, 2016
Messages
7,050
Reaction score
12,560
Location
Palo Alto, Bay Area
How do I set these jacks up in my configuration? I'm wanting to use outputs 12 & 13 from the PCA9685 as my PWM outputs for EN 1,2 & EN 3,4 on the L293D. In the Adafruit guide, pins 0 & 1 are being used with the RPi as the driver. I know I have to switch my driver to PCA9685, but are the pins I need to use 12 & 13? Or is the numbering scheme different here as well (like on the Pi, GPIO 18 is "pin 0"? I remember having a lot of trouble with the jacks when I was using the wrong pin in my previous build & I'm wanting to avoid that headache again!
You need only two pwm pins, en1 and en2. IN1/2/3/4 all can be connected to pi GPIO if you want to contol the moto diection. For LEDs it does not make sense. You can just hook them up to 3.3V rail and GND,
 
Corals.com

Rate your current reefing satisfaction level! (CLICK HERE)

  • Very satisfied

    Votes: 36 55.4%
  • Just satisfied

    Votes: 14 21.5%
  • Somewhat satsified

    Votes: 11 16.9%
  • Not satisfied

    Votes: 4 6.2%

Online statistics

Members online
1,773
Guests online
4,051
Total visitors
5,824
Aqua SD
Top