pdf-icon

StamPLC

SKU:K141

Description

StamPLC is an IoT programmable logic controller designed for industrial automation and remote monitoring. The product is based on the StampS3A control module, which not only delivers powerful processing capabilities but also provides efficient wireless connectivity. In terms of control, StamPLC offers 8 opto-isolated digital inputs and 4 relay outputs (supporting both AC and DC loads), along with a GPIO.EXT port and 2 Grove interfaces, making the integration of various sensors and actuators both simple and reliable. Meanwhile, through the onboard PWR-CAN and PWR-485 interfaces, the device can be seamlessly integrated into industrial fieldbus networks, enabling remote data transmission and centralized control. For human-machine interaction, the product features a 1.14-inch color display, a RESET/BOOT button, 3 user buttons, and a buzzer, which facilitate real-time parameter configuration and status monitoring, and can alert users in the event of anomalies. To withstand harsh industrial environments, StamPLC supports a wide voltage input (DC 6–36V) and is designed for DIN rail mounting to ensure secure installation; the built-in Micro SD card slot further facilitates data storage and firmware updates. Additionally, its environmental monitoring system integrates an LM75 temperature sensor and an INA226 voltage/current sensor for real-time feedback on device operation, while the RTC (RX8130CE) module ensures accurate time synchronization and log recording. The factory firmware automatically uploads data to M5’s EZDATA cloud platform, generating monitoring pages and offering users convenient remote cloud access and control. This product is suitable for industrial automation, remote monitoring, smart manufacturing, and other applications.

Tutorial

This tutorial will show you how to control the StamPLC device using the Arduino IDE

Note

Power supply precautions
Precautions: The power supply output pins for StamPLC’s PWR-CAN and PWR-485 are directly connected to the main input power. Therefore, during operation, please ensure that the input voltage matches the power requirements of any connected external devices. For example, when using StamPLC to control Unit Roller485 or Unit RollerCAN, it is recommended to maintain the input voltage within the DC 6–16V range to prevent damage caused by voltage mismatches.

Features

  • StampS3A Control Module (ESP32-S3FN8)
  • EZData Cloud Monitoring
  • 8 Opto-isolated Digital Inputs
  • 4 Relay Outputs (AC/DC)
  • 1.14-inch Color Display (ST7789v2)
  • PWR-CAN & PWR-485 Interfaces
  • Wide Voltage Input (DC 6–36V)
  • Voltage/Current Sensor
  • Internal Temperature Sensor
  • User Buttons
  • Micro SD Card Slot
  • DIN Rail Mounting
  • Buzzer
  • Grove Interface
  • RTC Module
  • Development Platform
    • UIFlow 2.0
    • Arduino IDE
    • ESP-IDF

Includes

  • 1 x StamPLC
  • 4 x Mounting Accessories
  • 4 x Screw Clip Fasteners

Applications

  • Industrial Automation and Remote Control
  • Distributed Control Systems
  • Smart Energy Management
  • Smart Manufacturing

Specifications

Specification Parameter
Control Module StampS3A Control Module, based on ESP32-S3FN8, with 8MB Flash, 2.4GHz Wi-Fi
FLASH 8MB
Digital Inputs 8 opto-isolated digital inputs, Input voltage range: DC 5~36V
Digital Outputs 4 relay outputs
Relays AC – 5A @ 250V
DC – 5A @ 28V
DC Power Supply Supports wide voltage input of DC 6–36V @ 1A
DC Power Connector: DC5521 (female, 5.5 x 2.1mm, center positive, outer negative)
Expansion Interfaces GPIO.EXT interface, 2 Grove interfaces
Communication Interfaces Onboard PWR-CAN and PWR-485 interfaces
PWR-CAN Interface XT30(2+2)PW-M
PWR-485 Interface HT3.96-4P
Display 1.14-inch color display (135×240 resolution), driven by ST7789v2 chip
Interactive Controls 1 RESET/BOOT button, 3 user buttons, buzzer
Data Storage Built-in Micro SD card slot
Sensors LM75 temperature sensor, INA226 voltage/current sensor, RTC (RX8130CE)
IO Port Load Capacity 2×8 connector maximum load: DC-4.76V @ 700mA
Grove port load test: DC-4.81V @ 700mA
Power Consumption Standby current: (5V supply) DC-5V @ 21.60mA, (12V supply) DC-12V @ 15.22mA
Operating current: (5V supply) DC-5V @ 93.89mA, (12V supply) DC-12V @ 47.84mA
Installation Method DIN rail mounting
Operating Temperature 0–40°C
Product Size 72.0 × 80.0 × 33.4mm
Product Weight 139.4g
Packaging Size 102.0 x 94.0 x 37.0mm
Gross Weight 163.7g

Learn

Download Mode

Download Mode
To enter download mode, connect the data cable, then press and hold the Boot button until the red indicator light turns on. Release the Boot button to enter download mode.
Input channel integrates optocoupler isolation, supports DC5~36V high-level/low-level signal input acquisition, adaptable to different types of sensor inputs
1. Wiring method for low-level signal input sensor:
- COM connects to the sensor's positive power
- INPUT connects to the sensor's input signal

2. Wiring method for high-level signal input sensor:
- COM connects to the sensor's negative power
- INPUT connects to the sensor's input signal
RGB LED Control Instructions
NH-B2020RGBA-HF is an RGB LED device that can only achieve color combinations by controlling the on/off state of the three independent R, G, and B LEDs separately, and does not support PWM dimming to control brightness or achieve gradient effects

Schematics

Pinmap

PWR-485 & PWR-CAN

StampS3A G42 G43 G0 G39 G46
PWR-CAN CAN_TX CAN_RX
PWR-485 RS485_TX/BOOT RS485_RX RS485_DIR

RGB & User Buttons A/B/C

  • Controlled via PI4IOE5V6408 (0x43)
StampS3A G15 G13 G14 G3
PI4IOE5V6408 SCL SDA INT RST
PI4IOE5V6408 P6 P5 P4 P2 P1 P0
RGB R G B
Button KEYA KEYB KEYC

Micro SD Card Slot

StampS3A G9 G10 G7 G8
Micro SD MISO CS SCK MOSI

Sensor

StampS3A G15 G13 G14
INA226AIDGSR SCL SDA INT
LM75BDP SCL SDA INT
RX8130CE SCL SDA INT

LCD

StampS3A G8 G7 G6 G12 G3 PI4IOE5V6408_P7
LCD MOSI SCK RS CS RST LCD_BL

Buzzer

StampS3A G44
Buzzer BUZZER_PWM

Relays and Optocouplers

  • Controlled via AW9523B (0x59)
StampS3A G15 G13 G14 G3
AW9523B SCL SDA INT RST
  • Relay Control
AW9523B P0_0 P0_1 P0_2 P0_3
Relay RLY_DRV1 RLY_DRV2 RLY_DRV3 RLY_DRV4
  • Optocoupler Output
AW9523B P0_4 P0_5 P0_6 P0_7 P1_4 P1_5 P1_6 P1_7
EL3H4 SYS_IN1 SYS_IN2 SYS_IN3 SYS_IN4 SYS_IN5 SYS_IN6 SYS_IN7 SYS_IN8
  • Optocoupler Input
EL3H4 Description
EXCOM_IN1 External Input Signal 1
EXCOM_IN2 External Input Signal 2
EXCOM_IN3 External Input Signal 3
EXCOM_IN4 External Input Signal 4
EXCOM_IN5 External Input Signal 5
EXCOM_IN6 External Input Signal 6
EXCOM_IN7 External Input Signal 7
EXCOM_IN8 External Input Signal 8
EXCOM_COM Common Terminal

PORT.A & PORT.C

  • PORT.A
HY2.0-4P Black Red Yellow White
PORT.A GND 5V SDA SCL
StampS3A GND 5V G2 G1
  • PORT.C
HY2.0-4P Black Red Yellow White
PORT.C GND 5V UART_TX UART_RX
StampS3A GND 5V G5 G4

Model Size

Datasheets

Softwares

Quick Start

Arduino

UIFlow 2.0

  • Coming soon...

ESP-IDF

PlatformIO

[env:m5stack-stamp-s3]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
upload_speed = 1500000
build_flags =
    -DESP32S3
    -DCORE_DEBUG_LEVEL=5
    -DARDUINO_USB_CDC_ON_BOOT=1
    -DARDUINO_USB_MODE=1

lib_deps =
    M5StamPLC=https://github.com/m5stack/M5StamPLC
    M5Unified=https://github.com/m5stack/M5Unified

Protocol

  • Internal I2C device communication addresses
Component Address
PI4IOE5V6408 0x43
INA226AIDGSR 0x40
LM75BDP 0x48
RTC 0x32
AW9523B 0x59
  • Modbus

After the StamPLC firmware starts by default, it will automatically initialize as a Modbus slave. External devices can control the device via the PWR-485 interface using the Modbus RTU protocol. The specific register protocol is as follows.

**Register Map:**

1. **Coils (Read/Write)**
   - **Address 0:** Relay 1 output (true/false)
   - **Address 1:** Relay 2 output (true/false)
   - **Address 2:** Relay 3 output (true/false)
   - **Address 3:** Relay 4 output (true/false)

2. **Input Registers (Read-only)**
   - **Address 0-7:** Inputs (true/false) - 8 registers
   - **Address 8-9:** Temperature (FLOAT32) - 2 registers
   - **Address 10-11:** Bus Voltage (FLOAT32) - 2 registers
   - **Address 12-13:** Shunt Current (FLOAT32) - 2 registers

Easyloader

Easyloader Download Link Note
StamPLC User Demo Easyloader download /

Video

  • StamPLC Product Introduction and Case Demonstration

video