## Description
**Atom Hub Switch D** is a dual relay expansion kit. The D in the name stands for "Direct" since the power supply is directly connected to the relays. The AC power supply flows to the NO(Normally Open) contacts of the two relays and can be controlled via the M5Atom. When in use, the user only needs to connect the electrical load to the relay, and there is no need to connect the power line separately. Compared with the previous relay control scheme, this module will be more concise and efficient in controlling the electric load. In addition to the power supply for the relay, the input power supply will also provide 5V/1A DC power supply for the ATOM through the built-in step-down module. In order to ensure the safety of use, the power input circuit has overheating and short-circuit protection, when the current is too high or a short circuit occurs It can effectively disconnect the circuit to prevent damage to the components. A built-in SP485EE level conversion chip, provides an RS485 communication interface to support multi-device communication. It also integrates a 9-24V step-down 5V circuit to adapt to the power demand in industrial scenarios, and expand power supply capabilities.
A pair of HY2.0-4P ports are included to connect to I2C peripherals or general I/O devices. Combined with ATOM's built-in Bluetooth and WIFI functions, ATOM HUB SWITCH D can quickly build remote device switch applications.
## Product Features
- Compatible ATOM Matrix/ATOM Lite
- Built-in AC-DC circuit
- 2-way relay
- Built-in RS485 level-conversion, supporting Modbus
- HY2.0-4P port extend
- Short circuit protection
- Remote control via Bluetooth, WiFi and RS485
## Include
- 1x ATOM SWITCH D
- 1x ATOM Lite
- 4x Magnet
- 1x double-side tape
- 1x DIN Rail
- 1x 3.96*4P plug
- 3x 3.96*3P plug
- 1x M4 Hex Key
- 1x M2 Hex Key
- 2x M4*10mm Hexagon countersunk screw
- 1x M2*20mm Hexagon socket cup head machine screw
## Applications
- Intelligent switch
## Switch & Switch-D Compared
/
Switch
Switch-D
Relay Current
AC 250V/10A
AC 250V/5A
Power Input
HT3.96R 2P
HT3.96R 3P
Relay Interface
(NO,NC,COM) x2
(NO(connect to the AC power L line), COM(connect to the AC power N line)) x2
?>Please refer to the figure below for details
## Specification
## EasyLoader
>EasyLoader is a concise and fast program writer, which has a built-in case program related to the product. It can be burned to the main control by simple steps to perform a series of function verification. Please install the corresponding driver according to the device type. M5Core host [Please click here to view the CP210X driver installation tutorial](en/arduino/arduino_development), M5StickC/V/T/ATOM series can be used without driver)
- **Windows**
- [FactoryTest](https://m5stack.oss-cn-shenzhen.aliyuncs.com/EasyLoader/Windows/CORE/EasyLoader_M5Paper_FactoryTest.exe)
## Related Link
- **Datasheet**
- [SP485EE](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/hat/SP485EEN_en.pdf)
### Pin Map
ATOM
22
19
33
23
25
21
ATOM HUB SWITCH D
Relay1
Relay2
RX
TX
SDA
SCL
## Schematic
## Example
### 1. Arduino
- [Click here to download the Arduino example](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/AtomBase/AtomHubSwitch/AtomHubSwitch)
### 2. UIFlow
- [Click here to download the UIFlow example](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/AtomBase/AtomHubSwitch/UIFlow)
## Video