LED Grow Lights Flicker

I am running Mycodo Version 8.16.12 with a RPi 4B.

I have 20W, 240V dimmable LED grow light(s) connected to PWM PGIO18 via a solid-state relay with a high-level trigger.

I am using a separate 5V 10A power supply to power the solid-state relay. I have measured and verified the voltage from the power supply.

I have a Mycodo output PWM (pigpio) installed and set to GPIO 18.

When I set the duty cycle to any value less than 100, the LED grow lights flicker.

I googled a solution that suggested setting the PWM frequency to at least 1000 Hz (1kHz) to ensure it is silent and visually flicker-free.

However, the LED lights continue to flicker. I played around with different frequency values without success.

I also read this topic and this topic.

Can I have my LED grow lights flicker-free at a PWM duty cycle below 100?

There is absolutely NO real need whatsoever to dim LED grow lights.

There are no LED lights available today that are anywhere near the actual PAR/PPFD of natural sunlight.
So, the only thing you are accomplishing by dimming your grow lights is robbing your plants of light which is ALREADY dimmer than sunlight.

If you think your lights are too bright, then simply move the lights higher up away from the plants.

If you don’t believe me, I can give you links to a few white papers published by agricultural colleges proving that dimming LEDs or attempting to simulate sunrise and sunset only reduces yields.

That being said…
You say you have “20w 240v ‘dimable’ LED grow lights”? 20 watts is barely enough to grow micro-greens, let alone anything larger. Why would you need to dim a 20w light? If the light is “dimable” then doesn’t it ALREADY have a dimmer knob? What do you need the SSR and PWM channel for?

You say you are using a “solid state relay” to somehow impose PWM dimming on these lights.

Well, without any kind of wiring diagram, or pictures of your setup, or even posting what model of actual lights you are using or any more detailed description, how do you expect anyone to even begin to help you troubleshoot this without totally guessing at your actual setup?

My guess based on your very vague description… you are using the solid state relay to attempt to use PWM on the ALTERNATING CURRENT coming from the house mains to the LEDs?
If this is the case, PWM does NOT work on A/C current. PWM ONLY works on DC current. This is why you are seeing “flickering” when you dim the LEDs. Because there is no way for the Pi to synchronize it’s 1000Hz square-wave PWM frequency with the 60Hz sine-wave frequency of the A/C current. Even if you set the Pi’s PWM to 60Hz it STILL would have no way to synchronize with the A/C current, it simply will not work.

Do your LED lights have an A/C to DC power supply?

If yes, then the power supply on your “dimmable” LEDs should already have a knob OR an input on the DC power supply where you would input the PWM signal to remotely dim the light. Thus you shouldn’t need any solid state relay, but you might need a 10v booster board because most “dimmable” LED lights require a 10v PWM input signal for dimming… the Pi only outputs 3v PWM signal. (You were already told this in a previous post where you asked about using a triac dimmer)

If your LED lights do not have any A/C to DC power supply and run directly off AC power, you should throw those lights away and invest in some DC-powered LED lights.

The reason… direct A/C powered LEDs are ALREADY flickering at 60Hz, as the A/C sine wave crosses the zero point, your LEDs are pretty much OFF, that means that the LEDs are only ON when the A/C wave is at it’s absolute peak or trough, this happens 120 times a second… so YOUR eyes only see a little flicker, but the plants see this as the LED’s only being on half the time.

In a DC powered LED, the LED is on 100% of the time, unless you are using PWM to dim the LED. In which case you end up with the same problem as direct A/C powered LED.

The lesson…. only use LED lights with A/C to DC power supplies, and don’t waste your money on gimmicky “dimmable” grow lights.