ESP32-S3 N16R8 pilotage LED RGB

Bonjour,

Avec mes ESP32 j’ai l’habitude de toujours pouvoir piloter la led de la carte pour valider son fonctionnement:
Exemple :

switch:
  - platform: gpio
    name: "LedBleu2"
    pin: 2

Pour faire un nouvel assistant vocal (un troisième :slight_smile: ) avec une carte mieux founi en RAM / PSRAM j’ai commandé cet ESP, la LED RGB peut être soit verte, bleu ou rouge :

Sur la doc Aliexpress la LED est indiquée en GPIO 47 mais je n’arrive pas à la piloter, il doit y avoir une petite astuce pour choisir sa couleur j’imagine mais je n’ai rien trouvé !

switch:

  - platform: gpio
    name: "LedRGB"
    id: ledrgb
    pin: 47

Une idée la communauté ?

Bob

bonjour @Bob,
ta essayer en mettant GPIO ?

switch:
  - platform: gpio
    name: "LedRGB"
    id: ledrgb
    pin: GPIO47

Sinon voir ce composant

Edit:
image
quand on regarde le plan, il marque GPIO 48 pour le RGB control (WS2821-B)

peu être passer par FastLED Light — ESPHome ou NeoPixelBus Light — ESPHome

Bonsoir @WarC0zes

Pas mieux en précisant :

pin: GPIO47

J’ai testé 47,48 et 38 car suivant les doc c’est différent…

Je regarde tes autres pistes, merci @WarC0zes

Bob

Merci, suite à tes pistes @WarC0zes j’ai trouvé ça :

La led s’allume en « blanc », je voulais surtout être certain de pouvoir utiliser le S3 avec ESPHome, ça marche, je vais maintenant ajouter micro et ampli pour voir si la vocale est plus efficace avec un ESP plus « puissant », j’ai déjà un système super cool mais parfois il fait l’action mais sans confirmer à la voix.

light:
  - platform: esp32_rmt_led_strip
    rgb_order: RBG
    pin: GPIO48
    num_leds: 3
    rmt_channel: 2
    chipset: ws2812
    name: "My Light"

pin: GPIO48 fonctionne !
Belle soirée
Bob

Le ESP32-S3 est supporter avec esphome, aucune inquiétude. J’ai un LILYGO T-Display-S3 ESP32-S3 sous ESPHome :wink:

Avec un ATOM echo, j’ai pareil des fois et justement je veus me monter un nouveau esp. Tu me diras ce que ca vaut avec un ESP32-S3 ?

Ok @WarC0zes, je pense câbler mercredi soir, je te tiens informé.
Pour la LED trois couleurs je vais faire d’autres tests car ça peut être sympa de pouvoir choisir sa couleur :wink:

Bob

Bonsoir,
Pour la LED c’est OK :

  on_boot:
    - light.turn_on:
        id: my_light
        red: 100%
        blue: 0%
        green: 0%
        brightness: 60%
        effect: pulse
    - delay: 6s
    - light.turn_on:
        id: my_light
        red: 0%
        blue: 100%
        green: 0%
        brightness: 60%
        effect: pulse
    - delay: 6s
    - light.turn_on:
        id: my_light
        red: 0%
        blue: 0%
        green: 100%
        brightness: 60%
        effect: pulse
    - delay: 6s
    - light.turn_off:
        id: my_light
light:
  - platform: esp32_rmt_led_strip
    id: my_light  
    rgb_order: GRB
    pin: GPIO48
    num_leds: 1
    rmt_channel: 0
    chipset: ws2812
    name: "My Light"
    effects:
      - pulse:
          transition_length: 550ms
          update_interval: 550ms

Maintenant activer la PSRAM, ça affiche « 0 » !

Puis trouver la correspondance entre les GPIO27, 26, 25 et 33 de mon ESP actuel avec le S3 N16R8 qui n’a pas dans le pinout ces GPIO ni d’info DAC1 et DAC2!
C’est toujours la recherche mais ça avance.

Bob

Salut,
mon esp-s3 16mb flash 8psram est configurer comme ca:

esphome:
  name: s3-display
  friendly_name: ESP32-S3 T-Display
  platformio_options:
    board_build.f_flash: 80000000L
    board_build.partitions: default_16MB.csv
    board_build.arduino.memory_type: qio_opi

external_components:
  - source: github://landonr/lilygo-tdisplays3-esphome
    components: [tdisplays3]

esp32:
  board: esp32-s3-devkitc-1
  variant: esp32s3
  framework:
    type: arduino
  flash_size: 16MB
[19:27:29][C][psram:020]: PSRAM:
[19:27:29][C][psram:021]:   Available: YES
[19:27:29][C][psram:024]:   Size: 8191 KB

Trop fort @WarC0zes, merci

esphome:
  name: esp32-psram16-r8-voice-3
  friendly_name: Esp32 Psram16-r8 Voice 3
  platformio_options:
    board_build.f_flash: 80000000L
    board_build.partitions: default_16MB.csv
    board_build.arduino.memory_type: qio_opi

#external_components:
#  - source: github://landonr/lilygo-tdisplays3-esphome
#    components: [tdisplays3]
esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino
  flash_size: 16MB

Et :

[19:49:38][C][psram:020]: PSRAM:
[19:49:38][C][psram:021]:   Available: YES
[19:49:38][C][psram:024]:   Size: 8191 KB

Je passe aux GPIO / câblage et je donne les résultats:

Merci
Bob

Oups, j’aurais du l’enlever, c’est pas utile pour toi :wink:

Bonjour,
Led et PSRAM ok comme indiqué dans les messages précédents mais pour l’instant pas de reconnaissance de mot de réveil, j’ai testé plusieurs branchements mais aucun ne fonctionne.

Le dernier :

# voice assistant
i2s_audio:
  - id: i2s_in 
    i2s_lrclk_pin: GPIO10   #WS / LRC 26 pin ESP32 classique 30pin
    i2s_bclk_pin: GPIO9    #SCK /BCLK 25 pin ESP32 classique 30pin

microphone:
  - platform: i2s_audio
    adc_type: external
    pdm: false
    id: mic_i2s
    channel: left
    bits_per_sample: 32bit
    i2s_audio_id: i2s_in
    i2s_din_pin: GPIO6    #SD 33 pin ESP32 classique 30pin

media_player:
  - platform: i2s_audio
    id: media_sat3
    name: "media_sat3"
    i2s_dout_pin: GPIO8 #27 pin ESP32 classique 30pin
    dac_type: external
    mode: mono

Logs de l’ESP :

INFO ESPHome 2024.2.1
INFO Reading configuration /config/esphome/esp32-psram16-r8-voice-3.yaml...
INFO Starting log output from 192.168.1.15 using esphome API
INFO Successfully connected to esp32-psram16-r8-voice-3 @ 192.168.1.15 in 0.007s
INFO Successful handshake with esp32-psram16-r8-voice-3 @ 192.168.1.15 in 0.066s
[16:51:01][I][app:102]: ESPHome version 2024.2.1 compiled on Mar  4 2024, 16:14:33
[16:51:01][C][wifi:577]: WiFi:
[16:51:01][C][wifi:409]:   Local MAC: DC:DA:0C:29:D3:94
[16:51:01][C][wifi:414]:   SSID: [redacted]
[16:51:01][C][wifi:415]:   IP Address: 192.168.1.15
[16:51:01][C][wifi:417]:   BSSID: [redacted]
[16:51:01][C][wifi:418]:   Hostname: 'esp32-psram16-r8-voice-3'
[16:51:01][C][wifi:420]:   Signal strength: -44 dB ▂▄▆█
[16:51:01][C][wifi:424]:   Channel: 6
[16:51:01][C][wifi:425]:   Subnet: 255.255.255.0
[16:51:01][C][wifi:426]:   Gateway: 192.168.1.254
[16:51:01][C][wifi:427]:   DNS1: 0.0.0.0
[16:51:01][C][wifi:428]:   DNS2: 0.0.0.0
[16:51:01][C][logger:447]: Logger:
[16:51:01][C][logger:448]:   Level: DEBUG
[16:51:01][C][logger:449]:   Log Baud Rate: 115200
[16:51:01][C][logger:451]:   Hardware UART: USB_CDC
[16:51:01][C][switch.gpio:068]: GPIO Switch 'LedIO13'
[16:51:01][C][switch.gpio:091]:   Restore Mode: always OFF
[16:51:01][C][switch.gpio:031]:   Pin: GPIO13
[16:51:01][C][esp32_rmt_led_strip:175]: ESP32 RMT LED Strip:
[16:51:01][C][esp32_rmt_led_strip:176]:   Pin: 48
[16:51:01][C][esp32_rmt_led_strip:177]:   Channel: 0
[16:51:01][C][esp32_rmt_led_strip:202]:   RGB Order: GRB
[16:51:01][C][esp32_rmt_led_strip:203]:   Max refresh rate: 0
[16:51:01][C][esp32_rmt_led_strip:204]:   Number of LEDs: 1
[16:51:01][C][light:103]: Light 'My Light'
[16:51:01][C][light:105]:   Default Transition Length: 1.0s
[16:51:01][C][light:106]:   Gamma Correct: 2.80
[16:51:01][C][template.switch:068]: Template Switch 'Use wake word'
[16:51:01][C][template.switch:091]:   Restore Mode: restore defaults to ON
[16:51:01][C][template.switch:057]:   Optimistic: YES
[16:51:01][C][psram:020]: PSRAM:
[16:51:01][C][psram:021]:   Available: YES
[16:51:01][C][psram:024]:   Size: 8191 KB
[16:51:01][C][status:034]: Status Binary Sensor 'API Connection'
[16:51:01][C][status:034]:   Device Class: 'connectivity'
[16:51:01][C][captive_portal:088]: Captive Portal:
[16:51:01][C][web_server:168]: Web Server:
[16:51:01][C][web_server:169]:   Address: 192.168.1.15:80
[16:51:01][C][mdns:115]: mDNS:
[16:51:01][C][mdns:116]:   Hostname: esp32-psram16-r8-voice-3
[16:51:01][C][ota:096]: Over-The-Air Updates:
[16:51:01][C][ota:097]:   Address: 192.168.1.15:3232
[16:51:01][C][ota:100]:   Using Password.
[16:51:01][C][ota:103]:   OTA version: 2.
[16:51:01][C][api:139]: API Server:
[16:51:01][C][api:140]:   Address: 192.168.1.15:6053
[16:51:01][C][api:142]:   Using noise encryption: YES
[16:51:01][C][audio:203]: Audio:
[16:51:01][C][audio:225]:   External DAC channels: 1
[16:51:01][C][audio:226]:   I2S DOUT Pin: 8
[16:51:03][D][voice_assistant:521]: Event Type: 0
[16:51:03][D][voice_assistant:521]: Event Type: 2
[16:51:03][D][voice_assistant:611]: Assist Pipeline ended
[16:51:03][D][voice_assistant:414]: State changed from STREAMING_MICROPHONE to IDLE
[16:51:03][D][voice_assistant:420]: Desired state set to IDLE
[16:51:03][D][voice_assistant:414]: State changed from IDLE to START_PIPELINE
[16:51:03][D][voice_assistant:420]: Desired state set to START_MICROPHONE
[16:51:03][D][switch:016]: 'LedIO13' Turning OFF.
[16:51:03][D][voice_assistant:202]: Requesting start...
[16:51:03][D][voice_assistant:414]: State changed from START_PIPELINE to STARTING_PIPELINE
[16:51:03][D][voice_assistant:435]: Client started, streaming microphone
[16:51:03][D][voice_assistant:414]: State changed from STARTING_PIPELINE to STREAMING_MICROPHONE
[16:51:03][D][voice_assistant:420]: Desired state set to STREAMING_MICROPHONE
[16:51:03][D][voice_assistant:521]: Event Type: 1
[16:51:03][D][voice_assistant:524]: Assist Pipeline running
[16:51:03][D][voice_assistant:521]: Event Type: 9
[16:51:08][D][voice_assistant:521]: Event Type: 0
[16:51:08][D][voice_assistant:521]: Event Type: 2
[16:51:08][D][voice_assistant:611]: Assist Pipeline ended
[16:51:08][D][voice_assistant:414]: State changed from STREAMING_MICROPHONE to IDLE
[16:51:08][D][voice_assistant:420]: Desired state set to IDLE
[16:51:08][D][voice_assistant:414]: State changed from IDLE to START_PIPELINE
[16:51:08][D][voice_assistant:420]: Desired state set to START_MICROPHONE
[16:51:08][D][switch:016]: 'LedIO13' Turning OFF.
[16:51:08][D][voice_assistant:202]: Requesting start...
[16:51:08][D][voice_assistant:414]: State changed from START_PIPELINE to STARTING_PIPELINE
[16:51:08][D][voice_assistant:435]: Client started, streaming microphone
[16:51:08][D][voice_assistant:414]: State changed from STARTING_PIPELINE to STREAMING_MICROPHONE
[16:51:08][D][voice_assistant:420]: Desired state set to STREAMING_MICROPHONE
[16:51:08][D][voice_assistant:521]: Event Type: 1
[16:51:08][D][voice_assistant:524]: Assist Pipeline running
[16:51:08][D][voice_assistant:521]: Event Type: 9
[16:51:13][D][voice_assistant:521]: Event Type: 0
[16:51:13][D][voice_assistant:521]: Event Type: 2
[16:51:13][D][voice_assistant:611]: Assist Pipeline ended
[16:51:13][D][voice_assistant:414]: State changed from STREAMING_MICROPHONE to IDLE
[16:51:13][D][voice_assistant:420]: Desired state set to IDLE
[16:51:13][D][voice_assistant:414]: State changed from IDLE to START_PIPELINE
[16:51:13][D][voice_assistant:420]: Desired state set to START_MICROPHONE
[16:51:13][D][switch:016]: 'LedIO13' Turning OFF.
[16:51:13][D][voice_assistant:202]: Requesting start...
[16:51:13][D][voice_assistant:414]: State changed from START_PIPELINE to STARTING_PIPELINE
[16:51:13][D][voice_assistant:435]: Client started, streaming microphone
[16:51:13][D][voice_assistant:414]: State changed from STARTING_PIPELINE to STREAMING_MICROPHONE
[16:51:13][D][voice_assistant:420]: Desired state set to STREAMING_MICROPHONE
[16:51:13][D][voice_assistant:521]: Event Type: 1
[16:51:13][D][voice_assistant:524]: Assist Pipeline running
[16:51:13][D][voice_assistant:521]: Event Type: 9

Le but était d’utiliser un ESP avec plus de RAM mais aucun de mes tests ne sont concluants.
Je ne vois plus ce que je peux tester, le micro est OK, je l’ai testé sur mon autre assistant.

Pin out de l’ESP, j’ai un doute car la led RGB est indiquée en 47 mais c’est en fait 48, j’espère que le reste du pin out est OK !

Bob

Je te l’avais dit la led sur pin 48.
Je me suis basé sur le plan de la page du esp.

je revérifirais les pins par rapport a ce plan.

Merci @WarC0zes,
J’ai vérifié l’ensemble du pinout, c’est OK sauf l’inversion GPIO47 / 48 pour la LED RGB sur ws2812.
Je vais tenter de trouver un « bon » branchement pour le micro / ampli.

Bonne journée
Bob

Bonsoir,
vu dans la doc espressif ici:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html

Hardware Revision Details
Initial release
Note:
Both the initial and v1.1 versions of ESP32-S3-DevKitC-1 are available on the market. The main difference lies in the GPIO assignment for the RGB LED: the initial version uses GPIO48, whereas v1.1 uses GPIO38.

1 « J'aime »