How to test Reef-Pi PWM signal

pseudorand

Well-Known Member
View Badges
Joined
Oct 29, 2019
Messages
641
Reaction score
439
What state or country do you live in
Colorado
Rating - 0%
0   0   0
Does anyone know how to test a PWM dimming signal from a controller such as Reef-Pi? Can a put my multimeter between the PWM pin and ground? What should I expect to see as I change the dimming?

The longer story is that I'm setting up some Lumina 5.2 lights controlled by reef-pi. I've got a Mean Well LDD-700H driver in a RapidLED board. It all works fine until plug in the PWM dimming signal from my reef-pi -- then it goes dark. The reef-pi and RapidLED board do share a ground (I understand failure to do that is a common problem). I've tried with a PCA9685 LDD PWM board as well with no luck.

I bought one of everything, tested it out and I swear it worked exactly like I thought it should, dimming and all. But now I have my full compliment of lights and I can't get it to dim for anything. I'm going back to test the reef-pi basics too, and I can't even get an LED to light up when configured with a GPIO pin as equipment or dim using GPIO 18/19 for PWM. Possibly I wired something wrong an fried part of my raspberry pi, but `i2cdetect` does detect the PCA9685, and that doesn't work either. It seems strange that they would both be fried.
 
As an Amazon Associate we earn from qualifying purchases.
Which version of reef-pi you are running? Did you upgrade or change anything? There were bugs related to frequency in a couple of older versions.
You should be able to test PWM dimming on most multimeter using the voltage reading (which is approximating the duty cyle or %) . It should show 0-5v for the pwm output at pca9685.
Its very common to simple configuration or wiring issue, causing the entire circuit to not work. You can systematically diagnose the build step by step, starting with reef-pi UI -> voltage reading at PCA9685 pin and then your final circuit.
 
Originally it was 2.5, but I've also tried 3.1. I've blown away /var/lib/reefpi and tried clean installs of each of those versions as part of troubleshooting.

I can make one LED turn on and another blink using this code on both my reef pi (pi zero W) and an old Pi 1 I had, so I don't think I've fried any circuits. I just can't get reef-pi to control anything, PWM or just a simple outlet.

I did have a few Reef PI 3 driver questions though:
1) How do I know what address to use when configuring a driver?
2) Can I really use any pwm frequency < 1k. This LDD-700H seems to imply I can.
 
Alot of the test depends on your meter.

Most home owner meters will have a slower circuit that will tend to "average" out a pwm signal. What does this mean?

Ill use 0 to 10v pwm to make the math easy.

On a 0 % on time meter reads 0v
On a 25% on time pwm meter reads 2.5v
On a 50% on time pwm meter reads 5v
On a 75% on time pwm meter reads 7.5v
On 100% on time pwm meter resds 10v.

So between the pwm and ground you should see a different reading and differing on time percentages and you will be looking at an average reading.

Take your full pwm voltage multiplied by the percentage of ON time and the result is what most simple volt meters will read.
 
So I set up this code, and it works great (at least after setting the frequency to 800 on line 165), so I know things are wired properly and not damaged.

Does anyone have hints on reef-pi 3.1? It seems simple enough. I create a driver of type pca9685 with frequency 800. I add two jcks using that driver for pins 0 and 1. I create two lights using those two pins. I set them to manual. I adjust the slider to 50. reef-pi prints "lighting-subsystem: Setting PWM value: 50 at channel: 0" in /var/log/daemon.log. But the light does nothing.
 
If the python code works, then I wouldn't expect any problem running in reef-pi. The only difference I could think of might be the address. reef-pi expects the address to be 64 instead of 0x40.
 

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