pdf-icon

AC Socket
Get one now !

SKU:K031

Description

AC Socket is an enhanced AC socket. It supports custom RS485 communication, allowing multiple AC sockets to be connected in series on the same RS485 bus. Through serial communication, multiple AC sockets can be controlled simultaneously, making it suitable for general industrial applications.

Features

  • RS485 interface
  • Serial communication protocol: ModBUS-RTU
  • Supports multiple devices connected in series
  • Built-in STM32F030F4
  • Uses BASE26 base
  • Embedded 4x M3 nuts
  • Input: 100-240V
  • Output: 10A
  • Power status indicator

Includes

  • 1x AC Socket

Applications

  • Smart AC socket

Specifications

Specification Parameter
Net weight 120.0g
Gross weight 158.0g
Product size 52 x 52 x 60mm
Package size 72 x 102 x 72mm

Learn

The AC Socket is constructed by combining the socket panel with the BASE26 base. The base has a 3-pin interface embedded on the side, which serves as the power input for the AC socket.

  • The top is the AC plug interface, where the internal relay controls the power on and off.
  • To allow more AC sockets to be connected in series, the other side of the socket provides an HT3.96 terminal connector (orange terminal in the image).
  • The bottom circuit board is responsible for converting AC power 220V to DC 5V, supplying power to the microcontroller STM32F030F4 and the RS485 circuit. As shown in the image, these two parts are connected via an M-Bus socket and a pair of power lines. A red LED indicator is provided at the top of the socket.

Softwares

Arduino

EasyLoader

Easyloader Download Note
AC Socket Test Easyloader download /

Protocol

ACSocket Modbus RTU Protocol

Description:
    1. Communication uses RS485, with 1 start bit + 8 data bits + 1 stop bit
    1. Baud rate: 9600
    1. Device ID defaults to AAH
    1. Address 00H is the broadcast address, with no response from the slave
Commands: (Hexadecimal) (Modbus RTU format)
1. Write Coil

Host sends:

AA 05 00 00 FF 00 95 E1 (Close coil)

AA 05 00 00 00 00 D4 11 (Open coil)

Sent Content Bytes Sent Message Remarks
Module Address 1 AAH 00H is the broadcast address
Function Code 1 05H Write single coil
Start Register Address 2 0000H Coil 0 address
Write Data 2 FF00H FF00H: Close coil | 0000H: Open coil
CRC Check 2 XXXXH CRC code (CRC16) of all previous data

Slave response:

Operation successful returns original data:

AA 05 00 00 FF 00 95 E1

Operation failed returns:

AA 85 Error Code CRC_L CRC_H

2. Read Coil

Host sends:

AA 01 00 00 00 01 E4 11

Sent Content Bytes Sent Message Remarks
Module Address 1 AAH 00H is the broadcast address
Function Code 1 01H Read coil
Start Register Address 2 0000H Coil 0 address
Read Quantity 2 0001H Can only be 0001H
CRC Check 2 XXXXH CRC code (CRC16) of all previous data

Slave response:

Operation successful returns:

Address Function Code Return Data Length Coil Status CRC_L CRC_H
AA 01 01 01 B0 6C

Coil status: 01H -> Coil closed / 00H -> Coil open

Operation failed returns: AA 81 Error Code CRC_L CRC_H

3. Write Device Address

Host sends:

AA 41 00 00 00 12 A4 13

Sent Content Bytes Sent Message Remarks
Module Address 1 AAH 00H is the broadcast address
Function Code 1 41H Set module address
Start Register Address 2 0000H Address
New Module Address 1 12H 1 byte
CRC Check 2 XXXXH CRC code (CRC16) of all previous data

Slave response:

Operation successful returns original data:

AA 41 00 00 00 12 A4 13

Operation failed returns:

AA C1 Error Code CRC_L CRC_H

4. Broadcast Restore Device Address

Host sends:

00 42 00 00 A0 30

Sent Content Bytes Sent Message Remarks
Broadcast Address 1 00H 00H is the broadcast address
Function Code 1 42H Restore address to AAH
Start Register Address 2 0000H Address
CRC Check 2 XXXXH CRC code (CRC16) of all previous data

Slave response: None

Video

Q&A
Submit a question
Select question category*
Arduino
MicroPython
UIFlow1
UIFlow2
EzData
M5Burner
Software
Hardware
Other
Product name
Product version
Question description*
(Supports pasting screenshots.)
Attachments
Add Files
Email*
Submit
OK