Reef-pi build help

KevinDodge

New Member
View Badges
Joined
Jan 31, 2019
Messages
22
Reaction score
27
Rating - 0%
0   0   0
I am really excited I found this reef-pi program and thankful for those who have spent the time writing it. I have been playing with Raspberry-pi stuff for a while and have attempted to write my own controller a couple of different times. Usually I would burn out after a few weeks of development without any working product. The last time I attempted I was able to do a simple dosing pump but it was very manual. You had to ssh into the pi to change a json file. Then find the process, kill it, and restart it.

Anyway now that I have found the Reef-Pi I have been going full tilt on it. I have setup an initial pi to monitor temperature and dose calcium and alkalinity. I then setup a second pi on a different tank and this was going to be bigger and better. I want auto top-off, calcium/alkalinity/magnesium dosing, Auto water changes, outlet control, and more. I have this version mostly built and testing, but I ran into some real issues with PWM.

On the first controller I used the two raspberry pi pins for pump control. On this controller since I needed to use more than 2 dosing pumps I bought a few PCA9685 chips off of ebay. Unfortunately when I wired everything up, none of the pumps worked. I checked everything again and again and still I get nothing.

So finally today I had time to setup a 3rd pi zero to test specifically the PCA9685 chip to see what is going on. I wired up the chip to a bread board with LEDs so I could view the output.
IMG_20190301_001250.jpg


With this wiring I fired up the pi, turned on reef-pi, enabled the PCA9685 in the configuration, added a jax with pin 0,1,2,3. Then I created a dosing pump for each one. Then I calibrated it.

Initially I saw the 1st 4 LEDS stay dark and all the other LEDs would light up. Nothing seemed to change this. I then found some sample python and used this code. (Note after a pi restart none of the LEDS would turn on when I did a reef-pi calibrate).

Code:
import board
import busio
import adafruit_pca9685
import time

i2c = busio.I2C(board.SCL, board.SDA)
hat = adafruit_pca9685.PCA9685(i2c)

hat.frequency = 60
led_channel = hat.channels[1]

led_channel.duty_cycle = 0xffff

Running this code I could see the 2nd LED light up full power. I also tweaked it to turn it off or dim it. All worked just fine. If I left the LED on and then go into reef-pi and calibrate the same pin at 100% it turns the LED turned off.

My final test was to 1. Run the python code which would leave the LED on. 2. Go into reef-pi and calibrate pin 1 at 100% for 15 seconds (This turns off the LED). 3. before the 15 seconds is up run the python code (This turns the LED back on). 4. Wait for the calibrate to finish (LED Turns off).

So It seems that I have wired up the pi correctly to the PCA9685 but reef-pi is doing something wrong. I am running version reef-pi-2.2-pi0.deb . Any help someone could give would be appreciated.
 
OP
OP
K

KevinDodge

New Member
View Badges
Joined
Jan 31, 2019
Messages
22
Reaction score
27
Rating - 0%
0   0   0
Sorry, I have been super busy with other things. I am trying to make a new sump and have been designing a reef-pi box that I can 3d print. I will let you know when I finally get my controller going again. Hopefully in the next couple weeks.
 
OP
OP
K

KevinDodge

New Member
View Badges
Joined
Jan 31, 2019
Messages
22
Reaction score
27
Rating - 0%
0   0   0
Sorry I have been super busy with designing and building a new sump, and also designing a reef-pi box that I can 3d print that I haven't been able to circle back around. I hope to have my controller going again in the next couple weeks so I will let you know.
 

When to mix up fish meal: When was the last time you tried a different brand of food for your reef?

  • I regularly change the food that I feed to the tank.

    Votes: 45 21.3%
  • I occasionally change the food that I feed to the tank.

    Votes: 73 34.6%
  • I rarely change the food that I feed to the tank.

    Votes: 70 33.2%
  • I never change the food that I feed to the tank.

    Votes: 19 9.0%
  • Other.

    Votes: 4 1.9%
Back
Top