Reef-Pi Kessil Controller PWM1 issue

  • Thread starter Thread starter honvl
  • Start date Start date
  • Tagged users None

honvl

New Member
View Badges
Joined
Mar 9, 2020
Messages
2
Reaction score
2
Rating - 0%
0   0   0
Hello,

I'm trying to build a small reef-pi circuit to control my Kessil A80. First the light was flickering like crazy, but I was able to fix that by increasing the Pi PWM frequency setting in reef-pi.

I can get both color and intensity to change, but only one at a time, by swapping wires around with Pin BCM 12 (PWM0). It seems like Pin BCM 13 (PWM1) does not do anything. I've assigned Pins 0,1 to the jack in reef-pi, and my /boot/config.txt has the following lines:

Code:
dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
#dtparam=audio=on

enable_uart=1
#[pi0]
dtoverlay=dwc2
#[all]
#start_x=1
#gpu_mem=128
#dtoverlay=googlevoicehat-soundcard
dtoverlay=w1-gpio
dtoverlay=pwm-2chan,pin=12,func=4,pin2=13,func2=4

Can anyone please help me troubleshoot why the second PWM channel doesn't work?

IMG_20200312_214957.jpg
 
Last edited:
From what I can tell, your config looks ok. This isn't one of my strengths, but maybe I can offers some starting points to troubleshooting.

Confirm that you have both pwm channels available.
Code:
ls /sys/class/pwm/pwmchip0
You should see something like this, with pwm0 and pwm1.

1584202825002.png


I tried to reproduce your setup by installing raspbian, modifying the config, and setting up reef-pi. Here's a snippet of my config.txt; I commented out the audio, and added pwm-2chan.

1584203331552.png


I set up a jack as follows.
1584202924722.png


I created a light with that jack and switched to manual mode. Then I dragged the sliders to make some pwm changes occur.
1584203006615.png


After that, I checked the logs to make sure reef-pi is doing the right stuff and not logging any errors.
Code:
sudo systemctl status reef-pi.service

1584203104075.png


Hopefully this can help.
 
Thank you very much. I am on reef-pi 3.3 and I think I may have hit some sort of instability during the bootup in which I load the lights page and start moving the sliders before everything is initialized, leading to the sliders not working.

To work around that, I turned off the loading of the GUI using raspi-config, and used the reef-pi reload button whenever I noticed the PWM1 slider failing to adjust the color.

Also, I transferred the components from a breadboard to a perma-proto board to fix some wiggly connections which may have also been a cause.
 
Keep us posted. I have tested the pi pwm bits only on default dtoverlay (which is GPIO 18 & 19). The software code only relies on the sysfs (/sys/class/pwm{0,1}) so if dtoverlay changes are being reflected there, then rest should be fine. I have hit frequency value related instability issues.. (often time the set duty cycle is more than the period, when reducing frequency without setting intensity to 0).. but most goes away with a reboot/reloead. we did some driver update to address this issue.. but there might be still bugs..happy to fix them if thats the case.
 

IF YOU HAD TO TAKE A REEFING EXAM, WOULD YOU PASS?

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top