• sales

    +86-0755-88291180

ESP32-S3-RS485-WLED User Guide

Onboard Resources​


  1. ESP32-S3-WROOM-1-N16R8 Integrates 2.4GHz Wi-Fi and Bluetooth 5, dual-core with a maximum clock speed of 240MHz, built-in 16MB Flash and 8MB PSRAM
  2. ES8389 Audio codec
  3. ES7210 Multi-channel audio ADC
  4. RS485 Transceiver Supports hardware automatic transmit/receive direction control
  5. NS4150B Audio power amplifier
  6. Blade Fuse Used for LED strip output loop protection
  7. 5 - 24V Power Input Terminal Powers the controller and external LED strip
  8. Isolated RS485 Terminal Block Used to connect external devices such as sensors, PLCs, and Modbus devices
  9. GPIO Terminal Exposes the LED strip control signals and expansion GPIOs
  10. LED Strip Power Output Terminal The output voltage follows the external input power supply
  11. Dual-Microphone Array Used for audio capture and voice recognition
  12. PWR, TXD, RXD Indicators Display power and RS485 transmit/receive status
  13. PH2.0 4PIN Speaker Connector For connecting an external speaker
  14. 3.5mm Audio Jack For audio output
  15. USB Type-C Port For program download, communication, and 5V power supply
  16. 120R Matching Resistor Jumper Can be enabled as required by the RS485 bus
  17. BOOT Button Used to enter download mode
  18. RESET button for resetting the development board
  19. Digital Isolation Circuit Isolates the main controller from the RS485 bus signals
  20. Isolated Power Module Powers the RS485 isolated side

Peripheral Quick Reference​

ModuleDevice / FunctionInterfaceAddress / ParametersGPIO / Signals
Main ControllerESP32-S3-WROOM-1-N16R8Wi-Fi / BluetoothDual-core LX7, up to 240MHz, 16MB Flash, 8MB PSRAM-
LED Strip OutputDual-channel 5V level data outputGPIOMaximum load current 8A; ensure adequate heat dissipationGPIO2, GPIO16
RS485Isolated RS485 transceiverUARTHardware automatic direction control; reserved 120R termination resistorTX=GPIO17, RX=GPIO18
Audio CaptureES7210 + dual array microphonesI2S / I2CMulti-channel audio ADCRefer to the schematic and example programs
Audio CodecES8389I2S / I2CAudio codecRefer to the schematic and example programs
Audio AmplifierNS4150BAnalog audioPH2.0 4PIN speaker connector-
USB Type-CESP32-S3 native USBUSBDownload, communication, 5V power supplyUSB_N=GPIO19, USB_P=GPIO20
Expansion TerminalGPIO3, GPIO4, 3V3, GNDGPIO / Power3.3V logic levelGPIO3, GPIO4
Power Input5 - 24V terminal blockPowerVOUT follows the input voltageVIN+, GND
ButtonsBOOT / RESETGPIO / ResetBOOT is low when pressedBOOT=GPIO0, RESET=CHIP_PU

WLED and LED Strip Output​

  • The two LED strip data signals are controlled by GPIO2 and GPIO16 respectively. After onboard level shifting, they output 5V logic levels from GPIO2' and GPIO16'.
  • Supports common LED strips such as WS2812B, WS2811, SK6812, TM1814, SM16704, APA102, SK9822, and single-color LED strips.
  • WLED firmware can be configured via the web page for LED strip type, GPIO, LED count, color, brightness, dynamic effects, segments, and scenes.
  • For DATA + CLK two-wire LED strips, the two LED strip outputs can be configured as data and clock signals respectively; the actual configuration is subject to the LED strip used and the support of the WLED firmware.
LED STRIP POWER NOTES

The VOUT voltage follows the external input power supply. 5V, 12V, or 24V LED strips must use a power supply with a voltage matching their rated voltage. Select a power supply and wires with sufficient current based on the LED strip power; when approaching an 8A load, ensure reliable terminal connections and take adequate heat dissipation measures.

Pin Definitions​

Before using the terminal blocks and expansion interfaces, verify the onboard silkscreen, schematic, and peripheral rated voltages. GPIO2' and GPIO16' are level-shifted 5V LED strip signals and should not be confused with the original 3.3V GPIOs.

Interface Quick Reference​

TypeSignals
LED Strip OutputGPIO2' / GPIO16' / VOUT+ / VOUT-
RS485A+ / B-, with optional 120R termination resistor
GPIO ExpansionGPIO3 / GPIO4 / 3V3 / GND
AudioDual array microphones / 3.5mm audio jack / PH2.0 4PIN speaker connector
USBType-C, supports USB communication, firmware download, and 5V power supply
PowerVIN+ / GND, input range 5 - 24V

GPIO Allocation​

The following table lists the onboard GPIO allocations clearly defined in the product documentation. For the I2C and I2S signals of the audio interface, refer to the schematic and the corresponding example programs.

GPIOSignal NameConnected ToRemarks
GPIO0BOOTBOOT buttonStrapping pin; press and hold BOOT, then reset to enter download mode
GPIO2LED1LED strip output channel 1After level shifting, outputs 5V logic level from GPIO2'
GPIO3GPIO3GPIO expansion terminal3.3V logic level
GPIO4GPIO4GPIO expansion terminal3.3V logic level
GPIO16LED2LED strip output channel 2After level shifting, outputs 5V logic level from GPIO16'
GPIO17RS485_TXRS485 isolated transceiver circuitUART transmit; direction is automatically controlled by hardware
GPIO18RS485_RXRS485 isolated transceiver circuitUART receive
GPIO19USB_NUSB Type-C D-ESP32-S3 native USB
GPIO20USB_PUSB Type-C D+ESP32-S3 native USB
LED Strip and RS485 Interfaces
SignalGPIO / TerminalDescription
LED1GPIO2 / GPIO2'Channel 1; the board-side output is a 5V logic level
LED2GPIO16 / GPIO16'Channel 2; the board-side output is a 5V logic level
RS485_TXGPIO17UART transmit signal
RS485_RXGPIO18UART receive signal
A+RS485 terminalRS485 differential bus A
B-RS485 terminalRS485 differential bus B
120RJumperEnable the termination resistor when used at the end of the bus
Power and Buttons
Signal / ButtonGPIO / SignalDescription
VIN+5 - 24VExternal power supply positive
GNDPower supply negativeExternal power supply negative
VOUT+ / VOUT-LED strip power outputThe output voltage follows the terminal input voltage
BOOTGPIO0Pulled low when pressed, used to enter download mode
RESETCHIP_PUReset signal

Precautions​

  • The external power supply voltage must match the rated voltage of the LED strip. Confirm the polarity again before wiring.
  • The maximum total current of the LED strip output is 8A; the actual usable current is limited by the power supply, wires, terminal contact, and heat dissipation conditions.
  • GPIO2' and GPIO16' are 5V LED strip output signals; GPIO3 and GPIO4 are 3.3V GPIOs.
  • For long-distance RS485 communication or communication at the end of the bus, the onboard 120R termination resistor can be connected using the jumper; non-end nodes usually do not connect it.
  • GPIO19/GPIO20 are already connected to USB Type-C and are not recommended for use as general-purpose GPIO.
  • Before powering from USB and the terminal simultaneously or connecting a high-power LED strip, confirm that the power path and ground connection meet the project design requirements.

Dimensions​


Working with Arduino

This chapter includes the following sections. Please read as needed:

Arduino Getting Started​

New to Arduino ESP32 development and looking for a quick start? We have prepared a comprehensive Getting Started Tutorial for you.

Note: This tutorial uses the ESP32-S3-Zero as a reference example, and all hardware code is based on its pinout. Before you start, we recommend checking the pinout of your development board to ensure the pin configuration is correct.

Setting Up the Development Environment​

1. Install and Configure the Arduino IDE​

Please refer to the tutorial Install and Configure Arduino IDE to download and install the Arduino IDE and add ESP32 support.

ESP32-S3-RS485-WLED required development board installation description

Board NameBoard Installation RequirementVersion Requirement
esp32 by Espressif Systems"Offline installation" / "Online installation"3.2.0

2. Installing Libraries​

  • When installing Arduino libraries, there are typically two options: Online Installation and Offline Installation. ** If the library installation requires offline installation, you must use the provided library files.**
    For most libraries, users can easily search and install them via the Arduino software's built-in Library Manager. However, some open-source or custom libraries are not synchronized to the Arduino Library Manager, so they cannot be found through online search. In this case, you can only install these libraries manually offline.
  • For library installation instructions, refer to: Arduino Library Management Tutorial.
  • The ESP32-S3-RS485-WLED library files are stored in the example program. Click here to go to: ESP32-S3-RS485-WLED Example.

Library installation instructions for ESP32-S3-RS485-WLED

Library NameDescriptionVersionLibrary Installation Requirement
FastLEDRGB LED driver libraryv3.10.1Via Library Manager or manual install

Installation Steps:

  1. Extract the downloaded example package.

  2. Copy all folders from its Arduino/libraries directory (FastLED, etc.) to the Arduino libraries folder.

    INFO

    The path to the Arduino libraries folder is typically: c:/Users/<username>/Documents/Arduino/libraries.

    You can also locate it in the Arduino IDE by going to File > Preferences and checking the "Sketchbook location". The libraries folder is the libraries subfolder within this path.

  3. For other installation methods, please refer to: Arduino Library Management Tutorial.

3. Additional Tips​

You need to select and configure the development board for ESP32-S3-RS485-WLED.


  1. Select the ESP32S3 Dev Module for ESP32-S3-RS485-WLED.
  2. Select the USB port.
  3. The ESP32-S3-RS485-WLED uses the ESP32-S3 native USB interface, not a UART-to-USB bridge. For serial communication:
    • The printf() function can be used directly;

    • To use the Serial.println() function, additional configuration is required: Enable the "USB CDC On Boot" option in the IDE's Tools menu, or declare an HWCDC object in your code to handle USB serial communication.

  4. Select 16MB Flash
  5. Select a Partition Table of the appropriate size

Example​

01_led_example​

Notes

  • The external power supply voltage must match the rated voltage of the LED strip.

Hardware Connection​

  • Connect the LED strip data line to GPIO2' or GPIO16'.
  • Connect the LED strip power to VOUT+ and VOUT-.

Expected Behavior​

  • The LED strip displays colors according to the program settings.

02_MAIN_WIFI_AP​

  • This example implements control of RS485, the LED strip, and audio capture and playback via Wi-Fi. This example enables the Wi-Fi AP mode.

Notes

  • The Web page can only be used when connected to the device's Wi-Fi.

Web Page Control

  • Connect to the Wi-Fi of the ESP32-S3-RS485-WLED device. The Wi-Fi name is ESP32-S3-RS485-WLED, and the password is 12345678.

  • After a successful connection, open the web page 192.168.4.1.
  • Open the Web page to control RS485. (After the device is powered on, it takes a short time to configure. The first time the Web page is opened after each power-on may be slow.)

Expected Behavior

  • Web page control

ESP-IDF

This chapter includes the following sections. Please read as needed:

ESP-IDF Getting Started​

New to ESP32 ESP-IDF development and looking to get started quickly? We have prepared a general Getting Started Tutorial for you.

Please Note: This tutorial uses the ESP32-S3-Zero as a teaching example, and all hardware code is based on its pinout. Before you start, it is recommended that you check the pinout of your development board to ensure the pin configuration is correct.

Setting Up the ESP-IDF Development Environment​

INFO

For the ESP32-S3-RS485-WLED development board, ESP-IDF version V6.0.2 or above is required.

NOTE

The following guide uses Windows as an example, demonstrating development using VS Code + the ESP-IDF extension. macOS and Linux users should refer to the official documentation.

VERSION SELECTION

The screenshots in this section use ESP-IDF V5.5.2 as an example. When installing, please select the ESP-IDF version that matches your board's example.

Install the ESP-IDF Development Environment​

  1. Download the installation manager from the ESP-IDF Installation Manager page. This is Espressif's latest cross-platform installer. The following steps demonstrate how to use its offline installation feature.

    Click the Offline Installer tab on the page, then select Windows as the operating system and the ESP-IDF version you need (the version shown in the screenshot is for reference only — choose the version that fits your actual needs).


    After confirming your selection, click the download button. The browser will automatically download two files: the ESP-IDF Offline Package (.zst) and the ESP-IDF Installer (.exe).


    Please wait for both files to finish downloading.

  2. Once the download is complete, double-click to run the ESP-IDF Installer (eim-gui-windows-x64.exe).

    The installer will automatically detect if the offline package exists in the same directory. Click Install from archive.


    Next, select the installation path. We recommend using the default path. If you need to customize it, ensure the path does not contain Chinese characters or spaces. Click Start installation to proceed.


  3. When you see the following screen, the ESP-IDF installation is successful.


  4. We recommend installing the drivers as well. Click Finish installation, then select Install driver.


Install Visual Studio Code and the ESP-IDF Extension​

  1. Download and install Visual Studio Code.

  2. During installation, it is recommended to check Add "Open with Code" action to Windows Explorer file context menu to facilitate opening project folders quickly.

  3. In VS Code, click the Extensions icon Extensions Icon in the Activity Bar on the side (or use the shortcut Ctrl + Shift + X) to open the Extensions view.

  4. Enter ESP-IDF in the search box, locate the ESP-IDF extension, and click Install.


  5. For ESP-IDF extension versions ≥ 2.0, the extension will automatically detect and recognize the ESP-IDF environment installed in the previous steps, requiring no manual configuration.

Example​

01_led_example​

Notes

  • The external power supply voltage must match the rated voltage of the LED strip.

Hardware Connection​

  • Connect the LED strip data line to GPIO2' or GPIO16'.
  • Connect the LED strip power to VOUT+ and VOUT-.

Expected Behavior​

  • The LED strip displays colors according to the program settings.

02_rs485_uart​

  • This example implements RS485 communication based on the ESP-IDF UART driver.

Expected Behavior​

  • Data transmission, reception, and echo. When data is sent out from the RS485 interface, the green LED lights up; when data is sent back from the RS485 interface, the blue LED lights up.

03_audio​

  • This example demonstrates using I2S to drive the ES8389 Codec chip to play built-in audio, with support for stereo playback.

Hardware Connection​

  • Connect the development board to the computer.
  • Connect a speaker or headphones.

Code Analysis​

  • Built-in audio file, which can be modified

    #define SPIFFS_BASE_PATH "/spiffs"
    #define MP3_FILE_PATH SPIFFS_BASE_PATH "/music/test.mp3"
    #define MP3_FILE_URI "file://spiffs/music/test.mp3"

Expected Behavior​

  • Audio playback


SP32-S3-RS485-WLED Firmware Flashing and Erasing

This product provides test firmware that can be flashed directly to verify whether the onboard devices are functioning properly.

  • Firmware download: ESP32-S3-RS485-WLED Example. The bin file is located in the ESP32-S3-RS485-WLED/Firmware directory of the example package.
  • Flash address: 0x00

The following steps apply to the firmware provided on this page.

  • Download and extract Espressif's official Flash Download Tool (Download)

  • Run Flash Download Tool and select the options that match the development board's MCU and download interface. The screenshot below uses ESP32-S3 and USB as an example; use the options required by the product's hardware design.


  • Parameter settings

    • Select the COM port for the development board
    • Set BAUD to the maximum value, 1152000
    • Click the "..." button in the row, select the bin file provided by Waveshare, manually enter the flash address given at the top of this page in the field to its right, and select the leftmost checkbox in the row
    • Click START to begin flashing


  • Wait for flashing to complete (this may take some time; please be patient)

  • Press the reset button and verify the result


Resources

1. Example​

2. Hardware Resources​

3. Technical Manuals​

4. Software Tools​

5. Other Resources​

Support

Monday-Friday (9:30-6:30) Saturday (9:30-5:30)

Email: services01@spotpear.com

TAG: Magnetic Encoder Servo Motor 85KG.CM 12V/24V 360° RS485 High Precision And Large Torque Raspberry Pi CM5 to Pi 5 Expansion Board With USB microphone & Audio Port Wireless AW CB375N 2.4G/5GHz Dual Band WiFi5 Wireless module RTL8822CE CG Bluetooth 5.0 UPS HAT D ESP32-S3 1.28inch LCD ESP32 Development Board C3 1.28 inch Round Rotary LCD Smart Screen 1.28inch Knob Display 240x240 LVGL for Arduino Python HTTP Request Communication Raspberry Pi USB Camera 8MP IMX415 Wide Angle Dual Microphones USB 2.0 For Jeston RDK ESP32 MLX90640 PC Monitor LCD Raspberry Pi RP2040 ESP32 Thermal imaging Raspberry Pi Pico 2 RP2350A PoE ETH Ethernet Module W6300 Raspberry Pi 5 PCIe to M.2 NVME SSD And Gigabit Ethernet RJ45 HAT RTL8111H M_KEY For 2230/2242/2260/2280 Raspberry Pi CM5 Compute Module 5 Dual Gigabit Ethernet RJ45 Expansion IO Base Board ESP32 C3 1.44inch LCD ESP32 S3 Development Board 2.8 inch LCD Capacitive Touch Screen 2.8inch Display 240×320 N16R8 SeeedStudio SenseCAP Watcher Clear Enclosure Camera AI ESP32-S3 Himax WiseEye2 HX6538 AI Agent Raspberry Pi 5 Serial