Difference between revisions of "ICStation USBRelay"

From sigrok
Jump to navigation Jump to search
(→‎Protocol: Update)
(→‎Protocol: Update)
Line 28: Line 28:
== 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.
The relay boards have a very simple and limited protocol.  
 
'''Note:''' Once the device has entered the command mode (0x51), every following byte will be interpreted as a mask for switching relays. When reconnecting to the device (e.g. with sigrok-cli or SmuView) the connect will fail unless you have repowered the device!


{| border="0" width="95%" style="font-size: smaller;" class="alternategrey sigroktable"
{| border="0" width="95%" style="font-size: smaller;" class="alternategrey sigroktable"
Line 59: Line 61:
| '''Start command mode.'''
| '''Start command mode.'''


Every following byte will be interpreted as a mask for switching the relays:
Every following byte will be interpreted as a bit mask for switching the relays. '''0''' will turn a relay on, '''1''' will turn a relay off.
 
'''Note:''' You cannot leave the command mode!
 
Examples for ICSE014A (8 relays):
{| border="0" width="100%" style="margin: 0;" class="alternategrey"
|-
| style="width: 5em;" | '''0b00000001'''
| Turn off relay #1 and turn on relays #2 - #8
|-
| '''0b00000000'''
| Turn on all relays (#1 - #8)
|-
| '''0b10101010'''
| Turn off relay #1, #3, #5, #7 and turn on relays #2, #4, #6, #8
|}


|}
|}

Revision as of 14:06, 7 August 2021

ICStation USBRelay
ICStation ICSE012A-mugshot.png
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

Protocol

The relay boards have a very simple and limited protocol.

Note: Once the device has entered the command mode (0x51), every following byte will be interpreted as a mask for switching relays. When reconnecting to the device (e.g. with sigrok-cli or SmuView) the connect will fail unless you have repowered the device!

Byte Command
0x50 Query the device model.

Response:

0xAB ICSE012A 4 relay version
0xAD ICSE013A 2 relay version
0xAC ICSE014A 8 relay version
0x51 Start command mode.

Every following byte will be interpreted as a bit mask for switching the relays. 0 will turn a relay on, 1 will turn a relay off.

Note: You cannot leave the command mode!

Examples for ICSE014A (8 relays):

0b00000001 Turn off relay #1 and turn on relays #2 - #8
0b00000000 Turn on all relays (#1 - #8)
0b10101010 Turn off relay #1, #3, #5, #7 and turn on relays #2, #4, #6, #8

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

Resources