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

trackerit

Member
View Badges
Joined
Apr 11, 2019
Messages
61
Reaction score
122
Your issue is not related to raspbian or linux. This is something related to reef-pi or the way we are setting the frequency (hard to say , I am not able to reproduce this). can you manually set the frequency. Run this as root.
Code:
echo 10000000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
and reload reef-pi.
Im really sorry for the trouble, I understand this can be frustrating :-/
Hi again, i have tried to modify the file duty_cycle and when saving says: error writing duty_cycle: invalif argument
1555333965497.jpeg
 

trackerit

Member
View Badges
Joined
Apr 11, 2019
Messages
61
Reaction score
122
and in the console with root
root@raspberrypi:/sys/class/pwm/pwmchip0/pwm0# echo 10000000 > duty_cycle
bash: echo: write error: Invalid argument
 

ChrisNH

Member
View Badges
Joined
Mar 21, 2019
Messages
46
Reaction score
69
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.

Im really sorry for the trouble, I understand this can be frustrating :-/
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!
 

trackerit

Member
View Badges
Joined
Apr 11, 2019
Messages
61
Reaction score
122
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!
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
 

trackerit

Member
View Badges
Joined
Apr 11, 2019
Messages
61
Reaction score
122
ok, i try the version 2.2 of reef-pi and work fine, but with
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!
I installed version 2.2 and it works perfect, but ne 2.3 continues the problem
 

theatrus

Well-Known Member
View Badges
Joined
Mar 26, 2016
Messages
989
Reaction score
1,985
Location
Sacramento, CA area
@theatrus ^^ I suspect reef-pi/rpi pwm changes
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).
 

Tom Bishop

Active Member
View Badges
Joined
Jan 1, 2019
Messages
300
Reaction score
657
Location
Missouri
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).
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.

:)
 

trackerit

Member
View Badges
Joined
Apr 11, 2019
Messages
61
Reaction score
122
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.

:)
So, if I use a pca9685 board would I have 16 channels? and if I use the native I will only have 2?
 

b4tn

Valuable Member
View Badges
Joined
Jun 17, 2015
Messages
1,240
Reaction score
1,719
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.
 
OP
Ranjib

Ranjib

Valuable Member
View Badges
Joined
Apr 16, 2016
Messages
6,667
Reaction score
11,443
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.
 

ludnix

Well-Known Member
View Badges
Joined
Sep 27, 2015
Messages
757
Reaction score
860
Location
Fortuna, California
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.
Oooh, maybe Reef-Pi will be listed in future journals under methodology! Thanks for making an effort to help the university!
 

Online statistics

Members online
574
Guests online
2,096
Total visitors
2,670
Top