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

Discussion in 'Do It Yourself (DIY)' started by Ranjib, Feb 10, 2017.

  1. Cary

    Cary Well-Known Member

    Joined:
    Feb 19, 2016
    Messages:
    622
    Likes Received:
    744
    Location:
    Allen, Tx
    There is nothing better than spending time with your children...or grandchildren (in my case).
     
    Ranjib and crusso1993 like this.

  2. trackerit

    trackerit Member

    Joined:
    Apr 11, 2019
    Messages:
    21
    Likes Received:
    44
    Hi again, i have tried to modify the file duty_cycle and when saving says: error writing duty_cycle: invalif argument 1555333965497.jpeg
     
    Ranjib and Cary like this.
  3. trackerit

    trackerit Member

    Joined:
    Apr 11, 2019
    Messages:
    21
    Likes Received:
    44
    and in the console with root
    root@raspberrypi:/sys/class/pwm/pwmchip0/pwm0# echo 10000000 > duty_cycle
    bash: echo: write error: Invalid argument
     
    Ranjib and Cary like this.
  4. ChrisNH

    ChrisNH Member

    Joined:
    Mar 21, 2019
    Messages:
    20
    Likes Received:
    27
    So the plot thickens..

    When I try run the line provided above I got a permissions issue which really shouldn't happen with pi and sudo.

    I opened it with pico using sudo and when I try to save I get:

    [ Error writing /sys/class/pwm/pwmchip0/pwm0/duty_cycle: Invalid argument ]

    I also tried stopping the reef-pi service and that did not help.

    So something is preventing us from updating the file.

    No worries at all, we appreciate the work that went into this and the ongoing support. It is the nature of Pi projects to have occasional problems!
     
    Ranjib, Cary and crusso1993 like this.
  5. trackerit

    trackerit Member

    Joined:
    Apr 11, 2019
    Messages:
    21
    Likes Received:
    44
    if change permissions same problem:
    pi@raspberrypi:/sys/class/pwm/pwmchip0/pwm0 $ sudo chmod 777 duty_cycle
    pi@raspberrypi:/sys/class/pwm/pwmchip0/pwm0 $ ls
    capture duty_cycle enable period polarity power uevent
    pi@raspberrypi:/sys/class/pwm/pwmchip0/pwm0 $ sudo echo 10000000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
    echo: write error: Invalid argument
     
    Cary, crusso1993 and Ranjib like this.
  6. trackerit

    trackerit Member

    Joined:
    Apr 11, 2019
    Messages:
    21
    Likes Received:
    44
    ok, i try the version 2.2 of reef-pi and work fine, but with
    I installed version 2.2 and it works perfect, but ne 2.3 continues the problem
     
  7. ChrisNH

    ChrisNH Member

    Joined:
    Mar 21, 2019
    Messages:
    20
    Likes Received:
    27
    Can confirm, same for me. Will move forward with 2.2 pending a fix for 2.3.
     
    crusso1993, Cary and Ranjib like this.
  8. Ranjib

    Ranjib Valuable Member R2R Supporter R2R Excellence Award Reef Squad Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    6,057
    Likes Received:
    10,168
    Location:
    Palo Alto, Bay Area
    @theatrus ^^ I suspect reef-pi/rpi pwm changes
     
    Cary likes this.
  9. trackerit

    trackerit Member

    Joined:
    Apr 11, 2019
    Messages:
    21
    Likes Received:
    44
    how can i buy a
    Reef-Pi Pico Controller Board (Revision D) ?????
     
    Ranjib and Cary like this.
  10. theatrus

    theatrus Well-Known Member R2R Supporter Build Thread Contributor

    Joined:
    Mar 26, 2016
    Messages:
    905
    Likes Received:
    1,800
    Location:
    Sacramento, CA area
    Quite likely. It’s possible the kernel driver gets in a weird state, hence the invalid argument error. The various knobs have to be knobbed in a specific order.

    If you get in the state, try rebooting the whole Pi (reboot, not reload).
     
    Ranjib, Tom Bishop and Cary like this.
  11. rushbattle

    rushbattle Jack of Some, Master of None R2R Supporter Partner Member 2019

    Joined:
    Oct 19, 2016
    Messages:
    911
    Likes Received:
    1,023
    Location:
    WNC
    Cary and Ranjib like this.
  12. trackerit

    trackerit Member

    Joined:
    Apr 11, 2019
    Messages:
    21
    Likes Received:
    44
    Cary and Ranjib like this.
  13. rushbattle

    rushbattle Jack of Some, Master of None R2R Supporter Partner Member 2019

    Joined:
    Oct 19, 2016
    Messages:
    911
    Likes Received:
    1,023
    Location:
    WNC
    Cary and Ranjib like this.
  14. Tom Bishop

    Tom Bishop Active Member

    Joined:
    Jan 1, 2019
    Messages:
    271
    Likes Received:
    589
    Location:
    Missouri
    If I remembered @Ranjib made some updates to correct the issues @Bigtrout was seeing with the
    PCA9685 pwm, which fixed those issues. I suspect something broke for the native rpi pwm, I'm running 2.2 and it works fine and never rolled to 2.3 since everything was working fine. I think the thing to call out is if using the pca9685 you probably want to use 2.3 and if using native rpi pwm use 2.2.

    I was almost going to suggest that this weekend but didn't really think it would make a difference.

    :)
     
    Cary, Ranjib and trackerit like this.
  15. trackerit

    trackerit Member

    Joined:
    Apr 11, 2019
    Messages:
    21
    Likes Received:
    44
    So, if I use a pca9685 board would I have 16 channels? and if I use the native I will only have 2?
     
    Cary, Ranjib and Bigtrout like this.
  16. Bigtrout

    Bigtrout Well-Known Member R2R Supporter R2R Excellence Award

    Joined:
    Dec 16, 2018
    Messages:
    513
    Likes Received:
    1,349
    That is correct
     
    Cary and Ranjib like this.
  17. trackerit

    trackerit Member

    Joined:
    Apr 11, 2019
    Messages:
    21
    Likes Received:
    44
    Cary and Ranjib like this.
  18. b4tn

    b4tn Valuable Member Build Thread Contributor

    Joined:
    Jun 17, 2015
    Messages:
    1,204
    Likes Received:
    1,642
    Location:
    Ellicott City MD
    Just a doser reminder. Especially if you are using cheap Chinese peristaltic pumps. Set a timer to check calibration every so often. I have been dosing with reef-pi flawlessly for several months now. I did a random Alk test today and my levels where 9.6 from 8.4. I checked calibration on the pump and had to adjust it 10% slower to get back on track.
     
    Cary, ludnix and Ranjib like this.
  19. Ranjib

    Ranjib Valuable Member R2R Supporter R2R Excellence Award Reef Squad Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    6,057
    Likes Received:
    10,168
    Location:
    Palo Alto, Bay Area
    EZO pH sensor is supported already. I felt the EC/Salinity sensor is not so important, given ATO is in place. Though it was not planned, I am actually working on getting the DO sensor support, because some folks in University of Alabamae is using reef-pi to monitor some experiments, they need it and I would love to support them.
     
  20. ludnix

    ludnix Well-Known Member R2R Supporter Reef Tank 365

    Joined:
    Sep 27, 2015
    Messages:
    561
    Likes Received:
    567
    Location:
    Fortuna, California
    Oooh, maybe Reef-Pi will be listed in future journals under methodology! Thanks for making an effort to help the university!
     
    Cary, Ranjib and trackerit like this.
Draft saved Draft deleted

Share This Page