ESP32-S3-WROOM-1 board type for ESPHOME

I will check if I can get my debug environment up and running again. I will keep you posted on any progress. Do not expect a direct answer since I 'am quit busy lately

Hi all,

I purchased a few of the kits below and ive been trying to set it up for days upon days. I keep getting boot loops and firmware crashes endlessly.

https://www.aliexpress.com/item/1005008702612175.html?spm=a2g0o.order_list.order_list_main.5.354b180282VhwZ

Heres a copy of my current YAML if anyone has a second to look over it for me and give your thoughts, it would be much appreciated.

substitutions:
  name: "n16r8-voice-satellite"
  friendly_name: "N16R8 Voice Satellite"

esphome:
  name: ${name}
  friendly_name: ${friendly_name}
  min_version: 2024.6.0

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: esp-idf
    version: recommended
    sdkconfig_options:
      CONFIG_ESP32_S3_DEFAULT_CPU_FREQ_240: "y"
      CONFIG_SPIRAM_USE: "y"
      CONFIG_SPIRAM_USE_MALLOC: "y"

# PSRAM configuration for 8MB Octal SPI PSRAM (N16R8 module)
psram:
  mode: octal
  speed: 80MHz

# Enable logging
logger:
  level: INFO

# Enable Home Assistant API
api:
  encryption:
    key: !secret api_encryption_key

ota:
  - platform: esphome
    password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "${friendly_name} Hotspot"
    password: !secret ap_password

captive_portal:

# Web server for debugging
web_server:
  port: 80

# I2C bus for ES8388 codec (required for audio DAC control)
i2c:
  - id: i2c_bus
    sda: GPIO18   # Pin 11: Safe for I2C
    scl: GPIO17   # Pin 10: Safe for I2C  
    scan: true
    frequency: 100kHz

# ES8388 Audio DAC (official ESPHome component)
audio_dac:
  - platform: es8388
    id: es8388_dac
    i2c_id: i2c_bus
    address: 0x10

# I2S Audio configuration (safe GPIO pins)
i2s_audio:
  - id: i2s_bus
    i2s_lrclk_pin: GPIO5   # Pin 5: WS/LRC
    i2s_bclk_pin: GPIO6    # Pin 6: BCK/SCK
    i2s_mclk_pin: GPIO7    # Pin 7: MCLK

# Microphone input (using ES8388 ADC)
microphone:
  - platform: i2s_audio
    id: mic
    i2s_audio_id: i2s_bus
    i2s_din_pin: GPIO4     # Pin 4: Audio input
    adc_type: external     # Use ES8388 ADC
    pdm: false
    channel: left
    bits_per_sample: 16bit  # ES8388 typical for ADC
    sample_rate: 16000

# Speaker output (connected to ES8388 DAC)
speaker:
  - platform: i2s_audio
    id: external_speaker
    i2s_audio_id: i2s_bus
    i2s_dout_pin: GPIO8    # Pin 12: Audio output
    dac_type: external
    i2s_mode: primary         # Changed from 'mode: mono'
    sample_rate: 16000
    bits_per_sample: 32bit
    audio_dac: es8388_dac  # Reference to ES8388 DAC

# ES8388 Controls (DAC output and ADC input selection)
select:
  - platform: es8388
    es8388_id: es8388_dac
    dac_output:
      name: "ES8388 DAC Output"
      id: es8388_dac_output
    adc_input_mic:
      name: "ES8388 ADC Input"  
      id: es8388_adc_input

# Voice Assistant
voice_assistant:
  id: va
  microphone: mic
  speaker: external_speaker
  noise_suppression_level: 2
  auto_gain: 31dBFS
  volume_multiplier: 2.0
  
  on_listening:
    - logger.log: "Voice assistant listening"
    - light.turn_on:
        id: status_rgb_led
        brightness: 50%
        red: 0%
        green: 0%
        blue: 100%
        
  on_stt_vad_end:
    - logger.log: "Voice assistant stopped listening"
    - light.turn_off: status_rgb_led
        
  on_tts_start:
    - logger.log: "Voice assistant started speaking"
    - light.turn_on:
        id: status_rgb_led
        brightness: 50%
        red: 0%
        green: 100%
        blue: 0%
        
  on_tts_end:
    - logger.log: "Voice assistant finished speaking"
    - light.turn_off: status_rgb_led
    
  on_end:
    - logger.log: "Voice assistant ended"
    - light.turn_off: status_rgb_led
    
  on_error:
    - logger.log: "Voice assistant error"
    - light.turn_on:
        id: status_rgb_led
        brightness: 50%
        red: 100%
        green: 0%
        blue: 0%
    - delay: 1s
    - light.turn_off: status_rgb_led

# Physical buttons (3 tactile switches on board)
binary_sensor:
  - platform: gpio
    name: "Button 1"
    id: button_1
    pin:
      number: GPIO0    # Boot button 
      mode:
        input: true
        pullup: true
      inverted: true
    on_press:
      - voice_assistant.start:
    on_release:
      - voice_assistant.stop:
      
  - platform: gpio
    name: "Button 2" 
    id: button_2
    pin:
      number: GPIO1    
      mode:
        input: true
        pullup: true
      inverted: true
    on_click:
      - switch.toggle: va_switch
      
  - platform: gpio
    name: "Button 3"
    id: button_3  
    pin:
      number: GPIO2    
      mode:
        input: true
        pullup: true
      inverted: true
    on_click:
      - switch.toggle: mute_mic

# Status RGB LED (WS2812 addressable LED)
light:
  - platform: esp32_rmt_led_strip
    id: status_rgb_led
    name: "Status RGB LED"
    pin: GPIO21
    num_leds: 1
    rgb_order: GRB
    chipset: WS2812
    restore_mode: ALWAYS_OFF
    internal: true

# Sensors for monitoring
sensor:
  - platform: wifi_signal
    name: "WiFi Signal"
    update_interval: 60s
    
  - platform: uptime
    name: "Uptime"
    
  - platform: template
    name: "Audio Level"
    id: audio_level
    unit_of_measurement: "dB"
    accuracy_decimals: 1

# Text sensors
text_sensor:
  - platform: wifi_info
    ip_address:
      name: "IP Address"
    ssid:
      name: "Connected SSID"
      
  - platform: template
    name: "Voice Assistant Status"
    id: va_status
    update_interval: 1s
    lambda: |-
      if (id(va).is_running()) {
        if (id(va).is_listening()) {
          return {"Listening"};
        } else {
          return {"Processing"};
        }
      } else {
        return {"Idle"};
      }

# Switches for control
switch:
  - platform: template
    name: "Voice Assistant"
    id: va_switch
    optimistic: true
    restore_mode: RESTORE_DEFAULT_OFF
    turn_on_action:
      - voice_assistant.start_continuous:
    turn_off_action:
      - voice_assistant.stop:
      
  - platform: template
    name: "Mute Microphone" 
    id: mute_mic
    optimistic: true
    restore_mode: RESTORE_DEFAULT_OFF
    turn_on_action:
      - voice_assistant.stop:
      - logger.log: "Microphone muted - Voice Assistant stopped"
    turn_off_action:
      - voice_assistant.start_continuous:
      - logger.log: "Microphone unmuted - Voice Assistant started"

# Volume control
number:
  - platform: template
    name: "Speaker Volume"
    id: speaker_volume
    min_value: 0.0
    max_value: 10.0
    step: 0.1
    initial_value: 2.0
    optimistic: true
    set_action:
      - lambda: |-
          id(external_speaker).set_volume(x / 10.0);
1 Like

I removed everything from my code up to and including “captive_portal” and experimented with different “sdkconfig_options:” and “platformio_options: board_build.flash_mode:” settings. The result was that as soon as anything was entered under “psram:” (regardless of whether it was 80MHz or 40MHz, or mode: quad, octal, hex (as far as possible)), the ESP went into a continuous crash loop. I couldn’t use the PSRAM in either ESPHome or PlatformIO. My last hope is to achieve something with the Espressif tools, but I need to familiarize myself with all of that first. Maybe I’ll just return the UICPAL ESP32-S3-N16R8.

If you also remove the code up to “captive_portal” and your ESP32 is still crashing, then I’m afraid you also don’t have any PSRAM usable by ESPHome…

Ive managed to get it up and running… on Esphome 2025.12.4 using IDF 5.1.2 version 6.5.0.

The only way to flash it was via powershell.

Everything seems to be working fine, except of the I2s… apparently i2s is only supported under IDF 5.4 and onwards.

I was only able to get this to boot by removing the PSRAM specification from the YAML, forcing it to work it out itself.

Now i need to work out how to get is2 running and its sweet. The reason i am unable to use anything newer than IDF 5.2 is because the ESP32-S3 is Rev2, too old and not supported causing crashes and boot loops.

esphome:
  name: s3-n16r8
  friendly_name: S3 N16R8 Voice Assistant
  platformio_options:
    board_build.flash_mode: dio
  on_boot:
    priority: -10
    then:
      - lambda: |-
          auto dev = id(my_i2c_dev);

          // === Register initialisation sequence ===
          dev->write_byte(0x00, 0x80);
          dev->write_byte(0x01, 0x00);
          dev->write_byte(0x02, 0xF0);
          dev->write_byte(0x03, 0x0C);
          dev->write_byte(0x04, 0x00);
          dev->write_byte(0x05, 0x00);
          dev->write_byte(0x06, 0x00);
          dev->write_byte(0x07, 0x00);
          dev->write_byte(0x08, 0x00);
          dev->write_byte(0x09, 0x00);
          dev->write_byte(0x0A, 0x00);
          dev->write_byte(0x0B, 0x00);
          dev->write_byte(0x0C, 0x00);
          dev->write_byte(0x0D, 0x00);
          dev->write_byte(0x0E, 0x00);
          dev->write_byte(0x0F, 0x00);

          dev->write_byte(0x10, 0x00);
          dev->write_byte(0x11, 0x00);
          dev->write_byte(0x12, 0x00);
          dev->write_byte(0x13, 0x00);
          dev->write_byte(0x14, 0x00);
          dev->write_byte(0x15, 0x00);
          dev->write_byte(0x16, 0x00);
          dev->write_byte(0x17, 0x00);
          dev->write_byte(0x18, 0x00);
          dev->write_byte(0x19, 0x00);
          dev->write_byte(0x1A, 0x00);
          dev->write_byte(0x1B, 0x00);
          dev->write_byte(0x1C, 0x00);
          dev->write_byte(0x1D, 0x00);
          dev->write_byte(0x1E, 0x00);
          dev->write_byte(0x1F, 0x00);

          ESP_LOGI("boot_config", "I2C init complete");

esp32:
  board: esp32-s3-devkitc-1
  variant: esp32s3
  flash_size: 16MB
  framework:
    type: esp-idf
    version: "5.1.2"
    platform_version: "6.4.0"

logger:
  level: DEBUG
  hardware_uart: UART0

api:

ota:
  - platform: esphome

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  fast_connect: true

i2c:
  id: i2c_bus
  sda: GPIO14
  scl: GPIO47
  frequency: 100kHz
  scan: true

i2c_device:
  id: my_i2c_dev
  address: 0x10

# ==================== I2S AUDIO ====================

i2s_audio:
  id: i2s_bus
  i2s_lrclk_pin: GPIO9
  i2s_bclk_pin: GPIO3
  i2s_mclk_pin: GPIO8

microphone:
  - platform: i2s_audio
    id: mic_main
    i2s_audio_id: i2s_bus
    i2s_din_pin: GPIO10   # I2S_SDOUT / ASDOUT → ESP32 RX
    adc_type: external
    pdm: false
    sample_rate: 16000
    bits_per_sample: 16bit

speaker:
  - platform: i2s_audio
    id: speaker_main
    i2s_audio_id: i2s_bus
    i2s_dout_pin: GPIO46  # I2S_SDIN / DSDIN ← ESP32 TX
    dac_type: external
    sample_rate: 16000
    bits_per_sample: 16bit

# ==================== AMP ENABLE ====================

switch:
  - platform: gpio
    pin: GPIO16       # AMP_EN
    id: amp_enable
    name: "Amp Enable"
    restore_mode: ALWAYS_ON

# ==================== WS2812 STATUS LED (GPIO21) ====================

light:
  - platform: esp32_rmt_led_strip
    id: voice_led
    name: "Status LED"
    pin: GPIO21
    num_leds: 1
    chipset: ws2812
    rgb_order: GRB
    rmt_channel: 0

# ==================== BUTTONS ====================

binary_sensor:
  - platform: gpio
    id: wake_button
    name: "Wake Button"
    pin:
      number: GPIO11
      mode: INPUT_PULLUP
    filters:
      - delayed_on: 50ms
      - delayed_off: 50ms
    on_press:
      - if:
          condition:
            api.connected:
          then:
            - logger.log: "Starting voice assistant – API connected"
            - voice_assistant.start:
          else:
            - logger.log:
                level: WARN
                format: "Cannot start voice assistant – no API client connected"

# ==================== MICRO WAKE WORD ====================

micro_wake_word:
  models:
    - model: alexa
  on_wake_word_detected:
    - logger.log:
        level: INFO
        format: "Wake word detected!"
    - light.turn_on: voice_led
    - delay: 500ms
    - light.turn_off: voice_led

# ==================== VOICE ASSISTANT ====================

voice_assistant:
  microphone: mic_main
  speaker: speaker_main
  use_wake_word: true
  noise_suppression_level: 2
  auto_gain: 31dBFS
  volume_multiplier: 2.0

  on_idle:
    - light.turn_on:
        id: voice_led
        brightness: 30%
        red: 0%
        green: 0%
        blue: 100%   # Blue when idle

  on_listening:
    - light.turn_on:
        id: voice_led
        brightness: 80%
        red: 100%
        green: 0%
        blue: 0%     # Red when listening

  on_stt_end:
    - light.turn_on:
        id: voice_led
        brightness: 80%
        red: 0%
        green: 100%
        blue: 0%     # Green when processing

  on_tts_start:
    - light.turn_on:
        id: voice_led
        brightness: 60%
        red: 0%
        green: 100%
        blue: 0%     # Keep green during TTS

  on_end:
    - light.turn_on:
        id: voice_led
        brightness: 30%
        red: 0%
        green: 0%
        blue: 100%   # Back to blue idle

# ==================== SENSORS ====================

sensor:
  - platform: internal_temperature
    name: "ESP Temperature"

  - platform: wifi_signal
    name: "WiFi Signal"
    update_interval: 60s

text_sensor:
  - platform: wifi_info
    ip_address:
      name: "IP Address"

  - platform: version
    name: "ESPHome Version"

Hi I have the same board, and had the same issue PSRAM octal. Getting bootloops and ‘Guru Mediation errors’


[15:21:36]Rebooting...
[15:21:36]���ESP-ROM:esp32s3-20210327
[15:21:36]Build:Mar 27 2021
[15:21:36]rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
[15:21:36]Saved PC:0x40381389
[15:21:36]SPIWP:0xee
[15:21:36]mode:DIO, clock div:1
[15:21:36]load:0x3fce2820,len:0x158c
[15:21:36]load:0x403c8700,len:0xd24
[15:21:36]load:0x403cb700,len:0x2f34
[15:21:36]entry 0x403c891c
[15:21:36]I (29) boot: ESP-IDF 5.5.1 2nd stage bootloader
[15:21:36]I (29) boot: compile time Jan  5 2026 14:14:50
[15:21:36]I (29) boot: Multicore bootloader
[15:21:36]I (29) boot: chip revision: v0.2
[15:21:36]I (32) boot: efuse block revision: v1.3
[15:21:36]I (36) boot.esp32s3: Boot SPI Speed : 80MHz
[15:21:36]I (39) boot.esp32s3: SPI Mode       : DIO
[15:21:36]I (43) boot.esp32s3: SPI Flash Size : 16MB
[15:21:36]I (47) boot: Enabling RNG early entropy source...
[15:21:36]I (52) boot: Partition Table:
[15:21:36]I (54) boot: ## Label            Usage          Type ST Offset   Length
[15:21:36]I (60) boot:  0 nvs              WiFi data        01 02 00009000 00005000
[15:21:36]I (67) boot:  1 otadata          OTA data         01 00 0000e000 00002000
[15:21:36]I (73) boot:  2 app0             OTA app          00 10 00010000 00640000
[15:21:36]I (80) boot:  3 app1             OTA app          00 11 00650000 00640000
[15:21:36]I (87) boot:  4 phy_init         RF data          01 01 00c90000 00001000
[15:21:36]I (93) boot:  5 lfs              Unknown data     01 82 00c91000 0036f000
[15:21:36]I (100) boot: End of partition table
[15:21:36]I (103) esp_image: segment 0: paddr=00010020 vaddr=3c0b0020 size=1e2a4h (123556) map
[15:21:36]I (132) esp_image: segment 1: paddr=0002e2cc vaddr=3fc9ca00 size=01d4ch (  7500) load
[15:21:36]I (134) esp_image: segment 2: paddr=00030020 vaddr=42000020 size=a3958h (670040) map
[15:21:36]I (254) esp_image: segment 3: paddr=000d3980 vaddr=3fc9e74c size=02f90h ( 12176) load
[15:21:36]I (257) esp_image: segment 4: paddr=000d6918 vaddr=40378000 size=14960h ( 84320) load
[15:21:36]I (276) esp_image: segment 5: paddr=000eb280 vaddr=50000000 size=00020h (    32) load
[15:21:36]I (285) boot: Loaded app from partition at offset 0x10000
[15:21:36]I (285) boot: Disabling RNG early entropy source...
[15:21:37]Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
[15:21:37]Memory dump at 0x42026c4c: ffffffff ffffffff ffffffff

I fixed it today by, adding these sdkconfig_options

    sdkconfig_options:
      CONFIG_SPIRAM_MODE_OCT: "y"
      CONFIG_SPIRAM: "y"
      CONFIG_ESPTOOLPY_FLASHMODE_QIO: "y"
      CONFIG_ESPTOOLPY_FLASHFREQ_80M: "y"

Current config ESPHome 2025.12.4, ESP-IDF 5.5.1 , platform: 55.03-.31-2

# ESP32S3N16R8 config 20250106 serial, RGBW LEDs and working PSRAM

substitutions:
  friendly_name: "psram-test"
  device_internal_name: psram-test
  logger_lvl: "DEBUG"

esphome:
  name: $device_internal_name
  friendly_name: $friendly_name
  comment: EPS32-S3 N16R8
  # https://github.com/shpegun60/ESP32-S3-N16R8/blob/85d3ecc973858c9ff781ffd413dd6f892be4114c/ESP32-S3-DevKitC-1-N16R8.json
  platformio_options:
  #   board_build.arduino.memory_type: qio_opi
  #   board_build.flash_mode: qio
    build_flags: 
      -DARDUINO_USB_MODE=0
      -DARDUINO_USB_CDC_ON_BOOT=0
      -DCONFIG_IDF_TARGET_ESP32S3

esp32:
  board: esp32-s3-devkitc1-n16r8
  variant: esp32s3
  cpu_frequency: 240MHz
  flash_size: 16MB
  partitions: "partitions_custom.csv" # partition works
  framework:
    type: esp-idf
    version: recommended
# https://community.home-assistant.io/t/ i-cant-get-the-psram-of-an-esp32-s3-n16r8-to-work/948815/8
    sdkconfig_options:
      CONFIG_SPIRAM_MODE_OCT: "y"
      CONFIG_SPIRAM: "y"
      CONFIG_ESPTOOLPY_FLASHMODE_QIO: "y"
      CONFIG_ESPTOOLPY_FLASHFREQ_80M: "y"

      # voice assistant mww optimisations from https://github.com/KristopherMackowiak/ha_voice_assistant/blob/cab1a003c29eec6f5b817e2eb74e8f1a84109098/home-assistant-voice.yaml
      # CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
      # CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y"
      # CONFIG_ESP32S3_INSTRUCTION_CACHE_32KB: "y"

    #   # Moves instructions and read only data from flash into PSRAM on boot.
    #   # Both enabled allows instructions to execute while a flash operation is in progress without needing to be placed in IRAM.
    #   # Considerably speeds up mWW at the cost of using more PSRAM.
    #   CONFIG_SPIRAM_RODATA: "y"
    #   CONFIG_SPIRAM_FETCH_INSTRUCTIONS: "y"

      # CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST: "y"
      # CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY: "y"

      # # CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC: "y"
      # CONFIG_MBEDTLS_SSL_PROTO_TLS1_3: "y"  # TLS1.3 support isn't enabled by default in IDF 5.1.5

wifi:
  networks:
    - ssid: !secret wifi_ssid
      password: !secret wifi_password
    - ssid: !secret wifi_hotspot_ssid
      password: !secret wifi_hotspot_password

  output_power: 15
  fast_connect: ${hidden_ssid}
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: ${friendly_name}
    password: "12345678"

network:
  enable_ipv6: true

captive_portal:

# Enable loggings
logger:
  level: $logger_lvl
  baud_rate: 115200
  hardware_uart: UART0
  logs:
    component: ERROR
# Enable Home Assistant API
api:

ota:
  - platform: esphome

psram:
  mode: octal
  speed: 80MHz

light:
  - platform: esp32_rmt_led_strip
    name: None
    id: led_onboard
    pin: GPIO48
    chipset: WS2812
    num_leds: 1
    rgb_order: GRB
    entity_category: diagnostic
    icon: mdi:led-on
    default_transition_length: 0s
    gamma_correct: 2.8
    effects:
      - pulse:
          name: "Slow Pulse"
          transition_length: 250ms
          update_interval: 250ms
          min_brightness: 50%
          max_brightness: 100%
      - pulse:
          name: "Fast Pulse"
          transition_length: 100ms
          update_interval: 100ms
          min_brightness: 50%
          max_brightness: 100%

  - platform: binary
    name: "Light onboard"
    id: light_onboard
    output: led_onboard_green_output
    # icon: mdi:alarm-light-outline

output:
  - id: led_onboard_green_output
    platform: gpio
    pin:
      number: GPIO21 # LED1
      inverted: false

debug:
  update_interval: 5s

web_server:
  port: 80