M5Stack K141

Contents

M5Stack M5stamp PLC ESP32-S3FN8 Controller User Manual

Model: K141

1. Product Overview

The M5Stack M5stamp PLC is an IoT Programmable Logic Controller (PLC) designed for industrial automation and remote monitoring applications. It integrates the powerful Stamp-S3A control module, offering robust processing capabilities and efficient wireless connectivity. This device features 8-channel optocoupler isolated digital inputs and 4-channel relay outputs, supporting both AC and DC loads. It also includes GPIO.EXT and 2 HY2.0-4P ports for easy connection of various sensors and actuators.

For human-machine interaction, the StamPLC is equipped with a 1.14-inch color display, RESET/BOOT keys, 3 user buttons, and a buzzer. These features allow users to configure parameters, monitor status in real-time, and receive alerts for anomalies. Designed for harsh industrial environments, it supports a wide voltage power supply (DC 6-36V) and is suitable for DIN rail installation. A built-in microSD slot is available for data storage and firmware upgrades.

The device also incorporates an LM75 temperature sensor and INA226 voltage/current sensor for real-time feedback on operating status, and an RX8130CE RTC module for accurate time synchronization and log recording. The factory firmware is pre-configured to upload data to M5's EZData cloud platform, enabling convenient remote cloud access and control.

1.1. Package Contents

  • StamPLC x 1
  • Mounting Accessories x 4
  • Screw Clip Fasteners x 4
StamPLC package contents showing the main unit, mounting accessories, and screw clip fasteners.
Figure 1: What's in the Package?
Detailed diagram of the M5Stack StamPLC with labels for all ports and components including IPS 1.14 inch display, user buttons, relays, PWR485, PWRCAN, isolation inputs, GPIO.EXT, Micro SD, DIN-rail holder, M3 holes, and power input.
Figure 2: StamPLC Component Overview
Video 1: M5Stack StamPLC Development Kit Overview. This video demonstrates the physical features, ports, and mounting options of the StamPLC, along with a brief demonstration of its remote control capabilities via Ezdata.

2. Setup Instructions

2.1. Power Connection

The StamPLC supports a DC 6-36V wide-voltage power supply at 1A. Connect the power supply to the 5.5x2.1mm DC5521 female port (inner positive, outer negative).

Important Power Note:

The PWR-CAN and PWR-485 output power pins of StamPLC are directly connected to the main input power. Ensure the input voltage matches the power requirements of any external expansion device to prevent damage. For example, when controlling Unit Roller485 or Unit RollerCAN, it is recommended to keep the input voltage between DC 6 ~ 16V.

2.2. DIN Rail Installation

The StamPLC is designed for DIN rail installation. Use the provided mounting accessories and screw clip fasteners to securely attach the device to a DIN rail.

Bottom view of the StamPLC showing the DIN-rail holder, M3 holes, and bridge holes for mounting.
Figure 3: DIN-Rail Mounting Features

2.3. Signal Input Sensor Wiring

The input channel features optocoupler isolation, allowing for high-level/low-level signal input acquisition (DC 5-36V) compatible with various sensor types.

Low-level Signal Input Wiring:

  • Connect the positive terminal of the sensor power supply to COM.
  • Connect the sensor input signal to INPUT.

High-level Signal Input Wiring:

  • Connect the negative terminal of the sensor power supply to COM.
  • Connect the sensor input signal to INPUT.
Wiring diagrams for high-level and low-level signal inputs for sensors. The high-level diagram shows connecting the negative pole of the sensor power supply to COM and the sensor input signal to INPUT. The low-level diagram shows connecting the positive pole of the sensor power supply to COM and the sensor input signal to INPUT.
Figure 4: Sensor Wiring Methods

3. Operating Instructions

3.1. EZData Remote Control Setup

The StamPLC's factory firmware is designed to upload data to M5's EZData cloud platform, enabling remote monitoring and control. Follow these steps to set up remote control:

  1. Enter the Wi-Fi configuration mode on the StamPLC device.
  2. Connect your mobile device to the AP "M5StampPLC-WiFi-Config".
  3. Access 192.168.4.1 in your browser.
  4. Configure the Wi-Fi information (SSID and password) and save it.
  5. After the device restarts, enter the "Monitor Link" page on the StamPLC.
  6. Scan the QR code displayed on the StamPLC with your mobile device to access the remote control page and log in to your M5Stack account.

Once configured, you can remotely monitor input status and control relays online.

Video 2: EZData Remote Control Demonstration. This video illustrates the process of connecting the StamPLC to Wi-Fi, accessing the remote control interface, monitoring inputs, and controlling relays via a mobile application.

3.2. RGB LED Control

The integrated NH-B2020RGBA-HF RGB LED can achieve various color combinations by separately controlling the On/Off state of its Red, Green, and Blue LEDs. Note that it does not support PWM dimming for brightness control or gradient effects.

3.3. Modbus Protocol

By default, the StamPLC firmware initializes the Modbus slave after startup. External devices can control the StamPLC via the PWR-485 interface using the Modbus RTU protocol. The register mapping is as follows:

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)

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

4. Maintenance

The StamPLC includes a built-in microSD slot which can be used for firmware upgrading and data storage. Regularly check for firmware updates from the M5Stack official website to ensure optimal performance and access to new features.

4.1. Firmware Update (Download Mode)

To enter download mode for firmware updates:

  1. Connect the data cable to the StamPLC.
  2. Hold down the Boot button.
  3. Continue holding the Boot button until the red indicator light turns on.
  4. Release the Boot button to enter download mode.

Refer to the official M5Stack documentation for specific firmware update procedures.

5. Troubleshooting

  • Device not powering on: Ensure the power supply is within the DC 6-36V range and correctly connected (inner positive, outer negative).
  • Wi-Fi connection issues: Double-check the Wi-Fi SSID and password during configuration. Ensure the device is within range of the Wi-Fi access point.
  • Sensor/Actuator not responding: Verify wiring according to the signal input wiring methods. Ensure the input voltage to PWR-CAN and PWR-485 matches the external device requirements (recommended DC 6-16V).
  • Remote control not accessible: Confirm the device is connected to the internet via Wi-Fi and you are logged into your M5Stack account on the EZData platform.

For more detailed troubleshooting or specific issues, please refer to the M5Stack official tutorials and documentation.

6. Specifications

SpecificationParameter
Module ModelStamp-S3A Control Module
SoCESP32-S3FN8@Xtensa LX7 dual-core, main frequency up to 240MHz
Flash8MB
Wi-Fi2.4 GHz Wi-Fi
Digital Input8-channel optocoupler isolated digital input, input voltage range: DC 5 ~ 36V
Digital Output4-channel relay output
RelayAC 5A@250V, DC 5A@28V
DC Power SupplySupports DC 6~36V @ 1A wide-voltage supply; DC power interface: DC5521 female 5.5 x 2.1mm (inner positive outer negative)
Expansion PortGPIO.EXT port, 2 HY2.0-4P ports
Communication PortOnboard PWR-CAN and PWR-485 interfaces
PWR-CAN PortXT30 (2+2) PW-M
PWR-485 PortHT3.96-4P
Display1.14-inch color display (135×240 resolution), driver chip ST7789v2
Interaction1 RESET/BOOT button, 3 user buttons, buzzer
Data StorageBuilt-in microSD slot
SensorLM75 temperature sensor, INA226 voltage/current sensor, RTC (RX8130CE)
IO Capacity2x8 expansion port max output: DC 4.76V@700mA; HY2.0-4P port load capacity test: DC 4.81V@700mA
Power ConsumptionStandby current: (5V supply) DC 5V@21.60mA, (12V supply) DC 12V@15.22mA; Working current: (5V supply) DC 5V@93.89mA, (12V supply) DC 12V@47.84mA
InstallationDIN rail installation
Operating Temp0 ~ 40°C
Product Size72.0 x 80.0 x 33.4mm
Product Weight140.0g
Gross Weight163.7g
Package Size102.0 x 94.0 x 37.0mm
Dimensions of the StamPLC device: 80mm/3.14in length, 72mm/2.83in width, 33.4mm/1.31in height.
Figure 5: StamPLC Dimensions
StamPLC device on a digital scale showing a weight of 140.0g.
Figure 6: StamPLC Weight

7. User Tips

  • The StamPLC is a well-designed and high-quality device for home automation and industrial control.
  • While the hardware is robust, users may need to develop custom code or adapt existing examples as ready-made sketches might be limited for specific applications. Refer to the M5Stack tutorials for guidance.

8. Additional Resources & Support

For further learning, detailed schematics, datasheets, and software resources, please visit the M5Stack official website. A comprehensive user manual in PDF format is also available for download.

  • Official Tutorials: M5Stack provides tutorials for various development platforms including Quick Start, Arduino IDE, UiFlow2, and Home Assistant integration.
  • Schematics:
    • Stamp-S3A Main Board Schematics (PDF)
    • StamPLC_IO Schematics (PDF)
  • Datasheets: Available for INA226AIDGSR, LM75BDP, ST7789V2, PWR-485, PRW-CAN, AW9523B, PI4IOE5V6408, EL3H4, RX8130CE.
  • Software: Resources for ESP-IDF and PlatformIO development.
  • Easyloader: A tool for easy firmware loading.
  • User Manual (PDF): A detailed user manual is available at M5Stack StamPLC User Manual PDF.

For technical support or warranty inquiries, please contact M5Stack Official Store directly.

Ask a question about this manual

Ask about setup, troubleshooting, compatibility, parts, safety, or missing instructions. Manuals+ will review the question and use this page’s manual context to help answer it.

After a successful submission, we securely hash the supplied account or form email before sending it to Microsoft Advertising for conversion attribution. Privacy details.