multiple PWM frequency , channels and ESP32-S2-Saola-1

selfmade01
Posts: 4
Joined: Wed May 31, 2023 12:04 pm

multiple PWM frequency , channels and ESP32-S2-Saola-1

Postby selfmade01 » Sun Jun 11, 2023 11:59 am

Hello
I can't understand the PWM channels from the ESP32-S2-Saola-1 and I get different frequencies (and also different voltages) on the channels. With the result that the LEDs on certain channels start to flicker.

In the code below you can see my channel settings.

I think I either chose the channels, the frequencies or the GPIO's wrong or all together wrong.

If I e.g.
led_panel1_GPIO1 = ON
and
led_panel2_GPIO2 = switch ON everything is ok.
He seems to get along with the 1000Hz

I'll switch now too
led_4000k_p1_gpio3 On
and
led_4000k_p2_gpio4 = ON
then the 4000K_P2 flickers extremely.
And with PWM full to 255 I get very strange voltages e.g. 1.86V to 1.42V... it jumps back and forth all the time.
Everything is ok with the led_panel1_GPIO1 volts. The voltage is stable at 3.28 volts with a PWM value of 255.
if i add the led_660nm_p1_gpio5 i get then same problems like with the led_4000k_p2_gpio4... only flicker's.

Normally I would like to give each pair of LEDs equal frequencies but for example the 3000K at 1220 Hz and the 4000K at 1000Hz.

then I have another fan PANEL_12V_FAN_GPIO11 which I want to give 4096 Hz or 33600 Hz.




Can someone please help me and explain that with the PWM frequencies, the channels?

Code: Select all

output:
  - platform: ledc
    pin: GPIO1
    channel: 0 # looks ok
    inverted: True # 0 = volllast 255= aus
    frequency: 1000 Hz # default 490Hz
    id: led_panel1_GPIO1
  - platform: ledc
    pin: GPIO2
    channel: 1 # looks ok
    inverted: True  # 0 = volllast 255= aus
    frequency: 1000 Hz
    id: led_panel2_GPIO2
  - platform: ledc
    pin: GPIO3
    channel: 2 # ist ok
    frequency: 1000 Hz
    id:  led_4000k_p1_gpio3
  - platform: ledc
    pin: GPIO4
    channel: 3 # looks NOT ok, because 
    frequency: 1000 Hz
    id: led_4000k_p2_gpio4
  - platform: ledc
    pin: GPIO5
    channel: 4 # ist nicht ok, flackert wenn on und lässt sogar noch die LED's an led_4000k_p1_gpio3 leicht mit flackern
    frequency: 1000 Hz 
    id:  led_660nm_p1_gpio5
  - platform: ledc
    pin: GPIO6
    channel: 4 # ist ok 
    frequency: 1000 Hz
    id: farred_730nm_gpio6
  - platform: ledc
    pin: GPIO7
    channel: 6
    frequency: 1000 Hz
    id: led_660nm_p2_gpio7 # ist ok flackert nicht und stört keine anderen Kanäle

Who is online

Users browsing this forum: Google [Bot] and 158 guests