- Isolated Digital Input/Output
- Four Inputs, 0-16V (2.5V HIGH), dry contact
- Four Outputs, 50mA, open collector
- Keyed 2.54mm connector
- IO Isolation to 3750 Volts (*Rated, not tested)
- Simple-to-program USB-serial interface
- Onboard ARM Cortex-M0 processor
- Latches and 32-bit counters for inputs
Connections & Wiring
DIO Header (externally facing)
USB J1 (Left) MISC J2 (Right)
Sample Input Circuit
Digital inputs are triggered by the flow of a small amount (1-2mA) of current through DI. Current is limited, and correct polarity is ensured by the ADP102’s built-in protection circuit. A request for DI state will report active when the voltage at DI exceeds 2.5 V.
Sample Output Circuit
Digital outputs switch a circuit in series after the device they control (represented by LOAD). Each output is rated for 50mA. If more than 50mA are required, DO may be used to trigger a relay driving LOAD instead.
The ADP102 provides a standard USB-CDC (USB-serial) interface. To determine the COM port number, check device manager or equivalent for the COM device. A developer may employ any serial-compatible software library in order to communicate with the ADP102. Available commands are outlined below. After the execution of any command, a response is returned by the ADP102 containing any requested data. For commands that do not return a value, a success/failure code is returned instead.
Each command is comprised of a start character, length (not including the start character), 1-byte pin address, 2-byte command ID, and (optional) data. For example, to set the state of digital output 3 to ‘ON’, the command packet is:
|Start||Length||Address||Command High||Command Low||Data|
Digital Output Commands
|Get State||0x0101||Address||Get the IO pin input state. Returns the status of output pins as well.|
|Get Latch State||0x0102||Address||Get the input pin latch bit state.|
|Get Count||0x0103||Address||Get the input pin counter value. This counter is incremented at every low-to-high or high-to-low state change, depending on configuration.|
|Clear Count||0x0104||Address||Return the input counter value, then reset it to zero.|
|Set State||0x0108||Address, State||Set an output pin to the specified state. 0x00 species LOW, all others evaluate to HIGH.|
|Toggle State||0x0109||Address||Toggle an output pin to the opposite state.|
|Get Model Number||0x0001||None||Return the device model number.|
|Get Firmware Version||0x0002||None||Get device firmware revision.|
|Get Configuration||0x0004||Address||Return the configuration of the specified pin.|
|Set Configuration||0x0005||Address, Configuration||Set the configuration of the specified pin. Available configuration settings are described in the section below. Unless this is followed by “Save Configuration” this is not preserved across reboots.|
|Save Configuration||0x0006||0x00||Save all pin configurations as “boot” settings. 0x00 must be provided in the data field.|
After executing each command, the ADP102 issues a response containing data the command generated (if any) and a success code. The first two bytes of a response packet are the incoming command code that generated the response OR’d with 0x8000, followed by the pin number requested and any relevant data. The packet is completed by the same carriage return delimiter as the command packet.
For example, a response to the ‘Get input status’ command looks like this:
|Start Byte||Length||Address||Command High||Command Low||Data||End|
State Change Reports
The ADP102 may also be configured to send a report to the host system whenever an input changes state, or a counter overflows (reaches the maximum value of 2^32 and resets). These reports are formatted as responses to the input “Get State” command (0x8101 [Address] [State] 0x13). They may be enabled or disabled via their respective configuration bits in each pin’s configuration.