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,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
That would be a negative, I did not know I had to do anything like that. Is it obvious once I get there?
Nah :-) , you know you are using a feature that was not released till recently (not reef-pi, the actual pi and Linux kernel)
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Ummm, that's a lot more than editing /boot/config.txt. Not sure I'm up to that.
I think you mis-understood. you dont have to do anything other than editing /boot/config.txt and reboot pi. I shared that article because it has the example of what needs to be changed in /boot/config.txt. You dont need anything else from that article.

Just to summarize, you need the following line in /boot/config.txt
Code:
dtoverlay=pwm-2chan
and reboot pi. Thats all you need to use reef-pi with Pi based pwm (2 channels only)
 

philshel

Active Member
View Badges
Joined
Jul 24, 2010
Messages
365
Reaction score
375
Rating - 0%
0   0   0
I think you mis-understood. you dont have to do anything other than editing /boot/config.txt and reboot pi. I shared that article because it has the example of what needs to be changed in /boot/config.txt. You dont need anything else from that article.

Just to summarize, you need the following line in /boot/config.txt
Code:
dtoverlay=pwm-2chan
and reboot pi. Thats all you need to use reef-pi with Pi based pwm (2 channels only)

Ok, I'll give that a try. Thank you as always.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hi all, sorry to ask a really simple question but can this be done using the original raspberry pi?
I have not used pi A (original one) but the package we build for pi zero works flawlessly with pi b+. I think it will work fine on pi a as well , but I have not personally tested it . Pi 3/2/zero/b+ all should be kosher
 

philshel

Active Member
View Badges
Joined
Jul 24, 2010
Messages
365
Reaction score
375
Rating - 0%
0   0   0
I think you mis-understood. you dont have to do anything other than editing /boot/config.txt and reboot pi. I shared that article because it has the example of what needs to be changed in /boot/config.txt. You dont need anything else from that article.

Just to summarize, you need the following line in /boot/config.txt
Code:
dtoverlay=pwm-2chan
and reboot pi. Thats all you need to use reef-pi with Pi based pwm (2 channels only)


Ok, I'm about to give up on this and just use the breakout board. I have added the line, purged the DB and all I get now is "ERROR: lighting-subsystem: Failed to set pwm value. Error: write /sys/class/pwm/pwmchip0/pwm0/duty_cycle: invalid argument" It trips for both pwm0 and pwm1.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Brilliant stuff, I’m going to give it a go and see how it works out, will try and save a bit more cash.
If you are using pi zero , I’ll recommend no t using GUI mode and install only raspbian lite, aka text only mode
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Ok, I'm about to give up on this and just use the breakout board. I have added the line, purged the DB and all I get now is "ERROR: lighting-subsystem: Failed to set pwm value. Error: write /sys/class/pwm/pwmchip0/pwm0/duty_cycle: invalid argument" It trips for both pwm0 and pwm1.
Ok, it means pwm is now loaded but probably a reef-pi bug is causing trouble . Can you share the earlier line in the log? Where it says setting pwm values ..?
I am assuming you are using 2.0.0-beta-5 , can you share your pwm frequency (available on configuration-> settings ) and light setting, so that I can reproduce it
 

philshel

Active Member
View Badges
Joined
Jul 24, 2010
Messages
365
Reaction score
375
Rating - 0%
0   0   0
Ok, it means pwm is now loaded but probably a reef-pi bug is causing trouble . Can you share the earlier line in the log? Where it says setting pwm values ..?
I am assuming you are using 2.0.0-beta-5 , can you share your pwm frequency (available on configuration-> settings ) and light setting, so that I can reproduce it

Yes using beta-5.
Jul 08 12:33:54 Reef-Pi reef-pi[319]: 2018/07/08 12:33:54 lighting-subsystem: Setting PWM value: 89 at channel: 0
Jul 08 12:33:54 Reef-Pi reef-pi[319]: 2018/07/08 12:33:54 ERROR: lighting-subsystem: Failed to set pwm value. Error: write /sys/class/pwm/pwmchip0/pwm0/duty_cycle: invalid argumen
Jul 08 12:33:54 Reef-Pi reef-pi[319]: 2018/07/08 12:33:54 lighting-subsystem: Setting PWM value: 0 at channel: 1
Jul 08 12:33:54 Reef-Pi reef-pi[319]: 2018/07/08 12:33:54 ERROR: lighting-subsystem: Failed to set pwm value. Error: write /sys/class/pwm/pwmchip0/pwm1/duty_cycle: invalid argumen
Jul 08 12:34:24 Reef-Pi reef-pi[319]: 2018/07/08 12:34:24 lighting-subsystem: Setting PWM value: 89 at channel: 0

The pwm setting installed at "100" and I did not change it.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Yes using beta-5.
Jul 08 12:33:54 Reef-Pi reef-pi[319]: 2018/07/08 12:33:54 lighting-subsystem: Setting PWM value: 89 at channel: 0
Jul 08 12:33:54 Reef-Pi reef-pi[319]: 2018/07/08 12:33:54 ERROR: lighting-subsystem: Failed to set pwm value. Error: write /sys/class/pwm/pwmchip0/pwm0/duty_cycle: invalid argumen
Jul 08 12:33:54 Reef-Pi reef-pi[319]: 2018/07/08 12:33:54 lighting-subsystem: Setting PWM value: 0 at channel: 1
Jul 08 12:33:54 Reef-Pi reef-pi[319]: 2018/07/08 12:33:54 ERROR: lighting-subsystem: Failed to set pwm value. Error: write /sys/class/pwm/pwmchip0/pwm1/duty_cycle: invalid argumen
Jul 08 12:34:24 Reef-Pi reef-pi[319]: 2018/07/08 12:34:24 lighting-subsystem: Setting PWM value: 89 at channel: 0

The pwm setting installed at "100" and I did not change it.

Got it. I am able to reproduce it, let me check right now and get back to you
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,876
Reaction score
16,680
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Upgraded my doser build today, since it’s two channel ,decided to put the pi pwm in actual use.
Build: pi zero, perma proto board, l293d, one lm2596 (for 12v to 5v conversion), two 12v peristaltic pump, 12v 2amp power adapter

Housing : uxcell enclosure , nylon standoff’s
308AFC02-40AA-4DFE-A2FF-987EFF041B9E.jpeg



Circuit closeup : I can control the speed, duration and direction of both peristaltic pumps using a single l293d chip. Pi prvoided two pwm input and 4 gpio for direction control . Green wires are pi pwm in, blue are gpio , yellow are doser pwm our
B61FAAE7-919E-40FF-85EE-22A6410EFB6C.jpeg

Pi zero is hidden below the perma proto board

Dosers
7C861BD6-39D9-4567-8AF3-A50AA6B6A615.jpeg

Looks so much better than the old wooden enclosure. I’ll put it to use back again, and let you know how it went. Initial testing are all green. There was a bug in pi pwm, @philshel pointed our earlier, fixed that as well
 

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,025
Location
Durban - South Africa
Rating - 0%
0   0   0
I think you are passing the whole URL to the installation command, (dpkg -i), you have to just pass the filename instead, i.e.
try this
Code:
sudo dpkg -i [URL='https://github.com/reef-pi/reef-pi/releases/download/2.0.0-beta-5/reef-pi-2.0.0-beta-5-pi3.deb']reef-pi-2.0.0-beta-5-pi3.deb[/URL]

and not this
Code:
dpkg -i https://github.com/reef-pi/reef-pi/releases/download/2.0.0-beta-5/reef-pi-2.0.0-beta-5-pi3.deb

The second screenshot is the important one, the text in the screen are very small so I am having a hard time deciphering it, but this is what I suspect

Hey Ranjib

Tried your suggestion as above - this is what I got.... Hopefully the screenshot is better quality.

Des

2018-07-09.png
 

Harry Rayner

New Member
View Badges
Joined
Jul 8, 2018
Messages
10
Reaction score
17
Rating - 0%
0   0   0
I have not used pi A (original one) but the package we build for pi zero works flawlessly with pi b+. I think it will work fine on pi a as well , but I have not personally tested it . Pi 3/2/zero/b+ all should be kosher
I’ve tried installing onto my a however after following the instructions and attempting to install the latest beta for the 0 I keep getting the message: unit reef-pi.service could not be found.
Any help appreciated.
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 38 26.6%
  • 100% dry rock + 100% live sand

    Votes: 48 33.6%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 32 22.4%
  • 75% live rock, 25% live sand

    Votes: 15 10.5%
  • 25% live rock, 75% live sand

    Votes: 10 7.0%
Back
Top