logo elektroda
logo elektroda
X
logo elektroda

Industrial ESP32-S3 module with 16 MB Flash, 8 MB RAM, RS485 and CAN buses

p.kaczmarek2 360 4

TL;DR

  • ESP32-S3-RS485-CAN is an industrial ESP32-S3 module with Wi‑Fi, Bluetooth, isolated RS485 and CAN, DIN-rail mounting, and a PCF85063 RTC with battery backup.
  • PlatformIO setup starts from an esp32-s3-devkitc-1 configuration, then adjusts flash size, framework settings, and CDC mode so Serial.printf works over native USB.
  • The board ships with 16 MB Flash, 8 MB RAM, operates up to 36 V DC, and costs around £80.
  • Demo code shows LED blinking, RS485 transmission using HardwareSerial, CAN communication with TWAI, and RTC access over I2C via the Wire library.
  • A battery keeps the RTC running without mains power, but the DIN-rail housing leaves no external reset button, and RS485/CAN need 120 Ω termination resistors.
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • Industrial ESP32-S3 module with 16 MB Flash, 8 MB RAM, RS485 and CAN buses
    ESP32-S3-RS485-CAN is an industrial module equipped with Wi-Fi, BT (thanks to ESP-S3) and isolated RS485 and CAN communications. It is designed for DIN rail mounting. It operates on voltages up to 36 V DC. Also on board is a PCF85063 RTC to keep time along with a connector for a battery, an antenna connector and a 20-pin connector. You can buy this module for around £80.
    Industrial ESP32-S3 module with 16 MB Flash, 8 MB RAM, RS485 and CAN buses
    In the kit, we get cables with a connector compatible with the SH1.0 connector, on which 3.3 V, ground, GPIO1 and GPIO2 from the ESP are output. In addition, we also get a small screwdriver.
    Industrial ESP32-S3 module with 16 MB Flash, 8 MB RAM, RS485 and CAN buses
    Photos from the inside:
    Industrial ESP32-S3 module with 16 MB Flash, 8 MB RAM, RS485 and CAN buses Industrial ESP32-S3 module with 16 MB Flash, 8 MB RAM, RS485 and CAN buses Industrial ESP32-S3 module with 16 MB Flash, 8 MB RAM, RS485 and CAN buses
    Industrial ESP32-S3 module with 16 MB Flash, 8 MB RAM, RS485 and CAN buses Industrial ESP32-S3 module with 16 MB Flash, 8 MB RAM, RS485 and CAN buses Industrial ESP32-S3 module with 16 MB Flash, 8 MB RAM, RS485 and CAN buses
    Scheme:
    Electrical schematic of Waveshare ESP32-S3-RS485-CAN with power, RTC, CAN, and RS485 sections
    Now we can move on to the actual part of the presentation, which is to show how a beginner can get started with this board in the free PlatformIO environment (Visual Code extension).


    Hello World (LED flashing)
    You need to start with the configuration for the platformio. You can base it on the esp32-s3-devkitc-1 board, but you need to set a few things, including the Flash size and framework.
    Code: Ini
    Log in, to see the code

    It is important to enable CDC mode in build_flags. Otherwise we will not get Serial.printf messages. The board shown does not have a USB to UART converter, but connects directly to USB. The ESP32-S3 supports this in hardware.

    Now the actual code of the demo. The whole thing is very simple, it just manually switches the TX/RX pins on and off from both buses. This gets the LEDs to blink.
    Code: C / C++
    Log in, to see the code




    Start RS485 communication
    Three pins are required - RX, TX and Enable. Their indexes are marked on the diagram. RS485 is the physical layer of the UART, so a HardwareSerial is sufficient on the ESP. Set the baud, parity bits and pins.
    Code: C / C++
    Log in, to see the code

    The above demo sends a sample write over RS485 and then sends over USB the data received there. In practical RS485 installations, be sure to have termination resistors (typically 120 Ω) at both ends of the bus. Without this, communication errors can occur.



    Starting CAN communication
    You can use the TWAI library. Here there is no EN pin for CAN, so the matter is further simplified. The rest according to the CAN material:
    How to establish a CAN connection between two ESP32s using the LilyGO T-CAN485 example?
    As with RS485, the CAN bus should be terminated with 120 Ω terminating resistors at both ends of the CANH/CANL line.


    RTC activation
    The board uses a PCF85063AT real-time clock connected to pins IO38 (SCL), IO39 (SDA), IO40 (INT). It is a simple RTC communicating over the I2C bus, so you only need the standard Wire library to operate it. The package structure is simple enough that a separate library for PCF is not needed. Only auxiliary functions for the BCD encoding standard are needed.
    Code: C / C++
    Log in, to see the code

    Result:
    RealTerm screenshot showing RTC log: time 2026-03-08 19:14:00 and subsequent seconds
    In a practical situation, the current time is set once and the RTC maintains it thanks to the battery even when the main power supply is disconnected.

    Summary
    This industrial module is not only distinguished by its combination of wireless (Wi-Fi and Bluetooth) and wired (RS485, CAN and UART) communications, but also by its affordable housing. Many DIY designs suffer from a lack of good mounting options and implementation is problematic. Here, this problem does not exist, we immediately get a compact DIN rail mountable housing.
    An additional plus of this module is the RTC clock - this means that preloaded schedules and automations can work even when Wi-Fi and Bluetooth fail and there is no way to download time from the internet via NTP. This also makes it possible to use the module in places without a permanent Internet connection by programming the time once at installation (e.g. via Bluetooth), as afterwards the time will be kept by the RTC with the battery.
    On the other hand, I see one big disadvantage, however, from the mere addition of the housing, namely that the buttons are not extended outwards and there is no way to simply reset the board once it is mounted on the DIN rail.

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 14510 posts with rating 12509, helped 651 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 21910898
    gulson
    System Administrator
    Posts: 29311
    Help: 148
    Rate: 6015
    Interesting, I'm curious if anyone would dare to implement ESP32 in factories/production lines. It's known, it would be a cheap solution, just how security, maintenance, reliability.
    I'm curious if anyone could speak up who works/worked in maintenance.
  • ADVERTISEMENT
  • #3 21910995
    krzbor
    Level 29  
    Posts: 1742
    Help: 40
    Rate: 1050
    When I started reading about the features I immediately thought of a price well over 100PLN. And here's a surprise: 80PLN and in Polish shops. The circuit seems ideal as an RS/CAN to MQTT converter. Such MQTTs with HA Discovery commands enable devices with RS/CAN to be connected to HA. With the right software, connecting e.g. a recuperator will not be a problem. If we are talking about industry, the basic problem is WiFi. Here a version with Ethernet would be better. Of course, this can be used when the system itself is to manage the control and does not need to connect to the network during normal operation. For example, you walk up to a device working as an AP, enter it, set the parameters, read any logs and off you go. Here WiFi is sufficient, because even if the cabinet is metal, we can open it for this operation.
  • ADVERTISEMENT
  • #4 21911002
    gulson
    System Administrator
    Posts: 29311
    Help: 148
    Rate: 6015
    Surely no one in the industry can afford Wi-Fi :)
    And beyond that? I'd be a bit afraid on a production line, even over Ethernet.
  • #5 21911087
    altar3
    Level 13  
    Posts: 172
    Rate: 21
    Ethernet is now becoming an industry standard. Manufacturers such as B&R rely on ethernet between the CPU and the legs, there are valve islands with ethernet communication. Even many companies are producing their own ethernet switches. If anyone is willing I can take some pictures of such devices.
📢 Listen (AI):
ADVERTISEMENT