Difference between revisions of "ICStation USBRelay"
Jump to navigation
Jump to search
(Update ratings) |
(→Protocol: Add protocol description) |
||
| Line 27: | Line 27: | ||
== Protocol == | == Protocol == | ||
The relay board have a very simple and limited protocol. Once entered the command mode, every following byte will be interpreted as a mask for switching the relays. | |||
{| border="0" width="95%" style="font-size: smaller;" class="alternategrey sigroktable" | |||
|- | |||
! style="width: 10em;" | Byte | |||
!Command | |||
|- | |||
| valign="top" style="white-space=nowrap;" | '''0x50''' | |||
| '''Query the device type.''' | |||
Response: | |||
{| border="0" width="100%" style="margin: 0;" class="alternategrey" | |||
|- | |||
| style="width: 3em;" | 0xAB | |||
| ICSE012A | |||
| 4 relays | |||
|- | |||
| 0xAD | |||
| ICSE012A | |||
| 2 relays | |||
|- | |||
| 0xAC | |||
| ICSE012A | |||
| 8 relays | |||
|} | |||
|- | |||
| valign="top" style="white-space=nowrap;" | '''0x51''' | |||
| '''Start command mode.''' | |||
Every following byte will be interpreted as a mask for switching the relays. | |||
|} | |||
== Example use == | == Example use == | ||
Revision as of 12:46, 7 August 2021
|
| |
| Status | in progress |
|---|---|
| Source code | icstation-usbrelay |
| Channels | 2, 4 or 8 |
| Ratings | 10A @ 250VAC/30VDC, 12A @ 125VAC/28VDC |
| Connectivity | USB/Serial |
The ICStation USBRelay is a USB relay card with up to 8 relays. Models with 2 (ICSE013A), 4 (ICSE012A) and 8 (ICSE014A) relays exist.
See Info for USB details.
Photos
Hardware
- STM 8S003F3P6 microcontroller: datasheet
- Prolific PL-2303HX USB to UART Bridge: datasheet
- ULN2803AG relay driver: datasheet
Protocol
The relay board have a very simple and limited protocol. Once entered the command mode, every following byte will be interpreted as a mask for switching the relays.
| Byte | Command | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 0x50 | Query the device type.
Response:
| |||||||||
| 0x51 | Start command mode.
Every following byte will be interpreted as a mask for switching the relays. |
Example use
Detect the device and display its properties.
$ sigrok-cli -d icstation-usbrelay:conn=/dev/ttyUSB0 --show
Driver functions:
Multiplexer
Scan options:
conn
serialcomm
icstation-usbrelay - ICStation ICSE012A
Channel groups:
R1: channel
R2: channel
R3: channel
R4: channel
Supported configuration options across all channel groups:
enabled: on, off
Manipulate the state of relays.
$ sigrok-cli -d icstation-usbrelay:conn=/dev/ttyUSB0 --config channel_group=R1:enabled=off --config channel_group=R2:enabled=on --set