I have setup a google email address just for reef pi and have this pinging to my microsoft account. On the telemetry tab i have it set to email alerts.Can you detail a bit on where you are stuck ?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I have setup a google email address just for reef pi and have this pinging to my microsoft account. On the telemetry tab i have it set to email alerts.Can you detail a bit on where you are stuck ?
Do you know if the original controller uses pwm signals in the first place? Or maybe true 0-10V (analog voltage, not pwm). The PCA9685 does something around 3.3V pwm or 5V pwm, what circuit did you create to convert it to whatever signal the lamp/ldriver expects, that circuit could mess with the signal as well.Hi All! I'm working again on my Reef-Pi build. I'm testing a custom led driver to power my GNC Bluray M PRO using Reef-pi instead of the AirLink.
The original control allow me to use the blue channel at 1% as moon light and it produces a very dim blue light.
Using Reef-Pi if I set the dim to 1% it is much more brighter, it seems that it isn't using the 12bit capabilities of the PCA9685. How can I solve that?
Thank you very much!
Simone
There are "hints" here:Hi All! I'm working again on my Reef-Pi build. I'm testing a custom led driver to power my GNC Bluray M PRO using Reef-pi instead of the AirLink.
The original control allow me to use the blue channel at 1% as moon light and it produces a very dim blue light.
Using Reef-Pi if I set the dim to 1% it is much more brighter, it seems that it isn't using the 12bit capabilities of the PCA9685. How can I solve that?
Thank you very much!
Simone
Well still beyond my pay grade but try changing the pwm frequency in reef-pi.Thank both for the comments.
The original driver uses the same driver (LM3409HV)
On the original I've meauser with the oscilloscope a 5V 20KHz PWM signal on the control pin.
On my driver I've setup the frequency output of the PCA9685 at 1KHz and I'm feeding the signal directly into the dim pin.
I'm using the latest version (6.0) of Reef-Pi
First image is the PWM signal on the original AirLink set to "moon light":
![]()
Second is the signal coming out of the PCA9685 with Reef-Pi set to 1%:
![]()
Though that is err "backwards" from what I was thinking..It turns out that Broadcom implemented "balanced" PWM in order to make the on and off PWM pulses as evenly distributed as possible. They give a description of the algorithm and some more discussion on page 139 of their datasheet:http://www.element14.com/community/servlet/JiveServlet/
For PWM, the Pi's PWM output is by default not a typical mark:space waveform, but a balanced waveform, so it may not be what you're after - certianly the "frequency" becomes somewhat interesting to calculate, however you can put it into mark:space ratio mode then its more predictable, but it's still driven off the same 19.2MHz clock as above.
In the KHz and lower range, then you can generate reasonably accurate frequencies in software - look at the softTone module in wiringPi - it can generate a frequency from 0 to 5KHz - there is some jitter, but it's "good enough for jazz" ...
Shouldn't be too hard to find the driver ic on the light.PWM frequency PRE_SCALE
The hardware forces a minimum value that can be loaded into the PRE_SCALE register
at ‘3’. The PRE_SCALE register defines the frequency at which the outputs modulate. The
prescale value is determined with the formula shown in Equation 1:
(1)
where the update rate is the output modulation frequency required. For example, for an
output default frequency of 200 Hz with an oscillator clock frequency of 25 MHz:
(2)
The maximum PWM frequency is 1526 Hz if the PRE_SCALE register is set "0x03h".
The minimum PWM frequency is 24 Hz if the PRE_SCALE register is set "0xFFh".
The PRE_SCALE register can only be set when the SLEEP bit of MODE1 register is set to
logic 1.
I already try it.. max freq with the PCA9685 is 1.5KHz. I've tryed frequenzies from 100Hz to 1KHz with no luck..Well still beyond my pay grade but try changing the pwm frequency in reef-pi.
Just for fun.
Way back in my mind I "remember" something about a "relationship" between frequency and pwm stepping.
Its not "normal" so to speak.
Above is a bout a 1% chance I actually know what I'm talking about.. :)
As to frequency change:
![]()
PCA9685 PWM Frequency wont change. · Issue #721 · reef-pi/reef-pi
The pwm frequency of the PCA9685 will not change from 1500hz, no matter what frequency is entered in the setting box.github.com
Oh this maybe..
![]()
Control Hardware PWM frequency
I'm using the hardware PWM output with wiringpi. It provides the function pwmSetClock that should make it possible to change the frequency. (https://projects.drogon.net/raspberry-pi/wiringpi/functi...raspberrypi.stackexchange.com
Though that is err "backwards" from what I was thinking..
Anyways seems easy enough to change the frequency and see what happens.
Oh a "random" quote..
OR the onboard led drivers can't deal w/ such a low frequency as the 9685 is capable of..
And "if" I read the data sheet right max is :
Shouldn't be too hard to find the driver ic on the light.
Ok.. sort of gets to a driver (on light) signal (pca) mismatch.I already try it.. max freq with the PCA9685 is 1.5KHz. I've tried frequencies from 100Hz to 1KHz with no luck..
How are you judging the "moonlight" pwm level?Right now I'm checking the differences between the 2 driver circuit...
I only have some minor diferrences in the under voltage lockout protection resistor divider.
I can try to feed my driver with a 20KHz signal and see what happen..
I don't know why I have such a big "jump" in intensity from 0% to 1%...
I found that value in the manual somewhere if I remember...How are you judging the "moonlight" pwm level?
Like its 1%?
Also the gnc could be 16bit
Can you dim to 0.5%I found that value in the manual somewhere if I remember...
And also from the scope measurements it says that is 1% duty cycle..
Maybe it could be a 16bit PWM.. it is powered by an STM32 and it could be 16bit..
I don't think I can... I can only set the % with 1 increment..Can you dim to 0.5%
Maybe switch output boards.if one canI don't think I can... I can only set the % with 1 increment..
16-Channel 16-Bit PWM Servo Motor Driver Module Shield Expander Extension Expansion Board HAT for RPI Raspberry Pi PICO W H WH RP2040 Accessories
- Note: Raspberry Pi PICO board is NOT included.
- The standard RaspberryPi Pico interface is only applicable to Raspberry Pi Pico W/H/WH.
- Up to 16 channels of servo/PWM output, 16-bit resolution for each channel. Onboard 5V voltage regulator chip, output current can reach 3A, can be connected to battery power supply through VIN terminal.
- The test code is in the WIKI English manual. waveshare.com/wiki/Pico-Servo-Driver
Online datasheet says that driver can handle analog voltage, so maybe try that. Smooth down the output of the pwm with a low pass filter, possibly an op amp for stabilityThank both for the comments.
The original driver uses the same driver (LM3409HV)
On the original I've meauser with the oscilloscope a 5V 20KHz PWM signal on the control pin.
On my driver I've setup the frequency output of the PCA9685 at 1KHz and I'm feeding the signal directly into the dim pin.
I'm using the latest version (6.0) of Reef-Pi
First image is the PWM signal on the original AirLink set to "moon light":
![]()
Second is the signal coming out of the PCA9685 with Reef-Pi set to 1%:
![]()
See the 4 types of possible "dim"..
I've never thought "analog" dimming works well on the low side..
Apply a voltage between 0 - 1.24V