klipper-led_effect
klipper-led_effect copied to clipboard
Leds flickering when printing
Hi, sorry to report this but I am have a problem with klipper-led-effect while printing, I have two channels One for a status led with 8 led and a toolhead led with 2
While printing I am finding that the blink is very random and flicker and the toolhead led are while and will just turn on and off random
I have the led on a decated controller running klipper firmware
When I run the gcode when not printing it will work fine
I am running the latest klipper and fluidd software
Try this: https://github.com/Drachenkaetzchen/Voron-Documentation/blob/neopixel/community/howto/drachenkatze/neopixel_guide.md#adding-a-100-ohm-resistor-to-combat-signal-integrity-issues
Other than that I suspect a broken wire somewhere. But also LED-Effect creates a lot of traffic. It could be, that it is too much. Try reducing the amount of LEDs and see if that helps.
I have that issue when 2 or more effects are fighting for the same pixels. You got to make sure to clear out effects before starting a new ones, also if your using fade out, or delayed gcodes, you got to wait for them to finish. Or you have something else trying to use that data pin. I would double check wiring and firmware.
I've the same issue.
I'll try to be very explicit (I'm using a 100ohm resistor, I've actually tried multiple resistor).
- So if I start by not using the effect and just ask the printer for RED (set_led led=toto red=1 green=0 blue=0 white=0). All the led will be RED.
- I start a print. I stop a print. (the led are still red)
- I ask for effect, the LED actually show to incorrect color on effect BUT manually reseting all the led to no color then a particular color works ! (set_led led=toto red=0 green=0 blue=0 white=0 then set_led led=toto red=1 green=0 blue=0 white=0)
- The only way to fix the plugin is to restart the MCU
This only occur if I start a print. If I don't start a print the effect are all good.
What I believe is going on : once the print is started, the table color of the plugin is getting corrupted and when we ask for a particular color this color is incorrectly rendered. And since we are doing effect, the sensation is flickering, but it's actually just the plugin not showing the correct colors. It could be related to having multiple kind of LED on a chain. But I can't tell if it's a klipper issue or this plugin.
To add more : I'm using a chain of color_order: GRBW,GRBW,GRB,GRB,GRB,GRB,GRB,GRB,GRB,GRB
@julianschill
My guess would be a problem with the signal integrity. What happens when you switch off the motors?
Hi Julian !
As explained even with all motor disactivated the signal sent to LED will stay or be corrupted (I tend to think it's a wrong data signal with miss calculated colors). All regular signal not using your plugin always goes through perfectly with no error. You plugin work perfectly until a print is started. After the print is started your plugin won't be able to actually send the correct data to the LED while a simple SET_LED will.
As per the testing I have done, I'm pretty confident it's not the signals that is corrupted but the actual color that are sent with incorrect data (for each said color).
The only way to reset the plugin (and solve the color problem) is to turn off / on the MCU. This miss calculation of color appear as a flicker, but it's not a flicker, it's the actual color not been correct.
Too bad I'm really bad at python I would have tried to solve it but ...
Could you do a log out (debug) of the actual color sent to the led (with the index of the led and each RGB channels) and write that in a log file with a mean to activate / deactivate the log out ? or just a special version that log out. This way I could compare a log from color sent to the LED when working and when not working.
You might have been right about the e-motor. What can I do to test and mitigate the issue ?
I've bought a 2 pair twisted foiled cable for the motor cable, I'll keep you inform if that solved the issue. As more ppl tend to use stealthburner and BARF led, they will get EM noise from motor most-likely. If my test are conclusive it might worth to write than somewhere in the readme.
I can confirm you that by changing my cable and using a 2 pair twisted foiled cable for the e-motor that solved my issue. You could, maybe, express the fact that it's possible to get strong EM noise from the e-motor wires (which corrupt the neopixel data signal) and that it might be needed to shield it for doing led effect while printing.
@burntcoinpurse try updating. In the newest version the effects should mix together.
@quicksilverstar Can this be closed?