ADP120 / ADP102 Isolated DIO Module
Guide to using the OnLogic ADP120/ADP102 Isolated DIO module, covering features, wiring, application interface, and sample Python code

The OnLogic ADP120/ADP102 provides isolated digital inputs and outputs for safe external signal control. The adapter USB interface and wide input voltage range offer enhanced versatility. The onboard ARM processor allows for fast, reliable operation independent of host system.
Systems from 2021 or older may use the ADP102, instead of the ADP120. These are functionally identical except for the hardware ID of the device. If you’re not sure which device you have, you can check for the following hardware IDs to confirm:
1FC9:0094 = ADP120
15A2:0300 = ADP102
Connector Type
Due to the wide variety of potential applications, OnLogic does not supply a mating connector. Below is an example list of connectors compatible with this module.
Features
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)

The header is 2×8 pins, 2.54mm pitch, with shroud and key
For mating connector, use Wurth Electronics 61201623021 or similar.
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 ADP/120/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.

Application Interface
The ADP120/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 ADP120/ADP102. Available commands are outlined below. After the execution of any command, a response is returned by the ADP120/ADP102 containing any requested data. For commands that do not return a value, a success/failure code is returned instead.
Command Structure
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:

Digital Output Commands


Response Structure
After executing each command, the ADP120/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:

State Change Reports
The ADP120/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.
Sample Code (Python)
Last updated
