Description

Milesight Routers supports 1 digital output. This article describes the principle of DO and how to control DO. The hardware design of DO on these models is the same. The PIN definition of digital input is as below. 

PINDIDescription
1INDigital Input
2GNDGround



1. Principle of DO

DO is Optocoupler output. When DO outputs low level, the circuit turns on. When DO outputs high level, the circuit turns off. So you need to add power in external circuit to control device. DO port can accept 30V DC (max) input. Output current is 0.3A and output power is 0.3W. Because of the low output power, it’s not used to drive external device. In real case when DO port is connected with high voltage input, you need to add a resistance in series to make sure the circuit works correctly.


 

2. Ways to control DO

Note: do not use more than one trigger ways at the same time.


Requirement

  • Milesight Router: UR75/UF51 with firmware version 78.x.x.x
  • Battery(12VDC) and buzzer LED


Configuration

Make connection according to the below drawing:

COM -- Battery(-) -- Battery (+) -- LED --DO

When DO outputs low level, the circuit turns on, and LED is on.

When DO outputs high level, the circuit turns off, and LED is off.


Simple Test

Here’s simple test to check if DO is working correctly:

  1. Enable DI setting on Service > I/O > DI and set Action as DO; 
  2. Enable DO setting on Service > I/O > DO, then change DO mode and click Save and Apply button. DO mode means when DI triggers, DO will change to this mode. When it’s set “High Level”, DO status is low level DI triggers, LED is on. When it’s set “Low Level”, DO status is high level without DI triggers, LED is off.


 Trouble Shooting:

  1. During test LED is always off.

A. Check if LED can be on when connecting with the battery.

B. Check if you click Save and Apply button to make settings take effect.

C. Check if you connect to the correct PINs of DO.

  1. During test LED is always on.

A. Check if there is short circuit in wiring.

B. Check if COM port and OUT port connected oppositely.

C. Check if Modbus Slave mode is already disabled.


 

Trigger by DI

  1. Go to Service > I/O > DI to configure DI Setting.2. Click Save. Then go to Service > I/O > DO to enable DO and configure mode.Click Save and Apply button.

In this example, when DI changes to low level (make PIN1-IN and PIN2-GND short connected), DO will be triggered as high level for 1 second.


 

Trigger by SMS

Note: ensure the firmware version is 78.0.0.3 and later.

  1. Go to Network > Interface > Cellular to configure SMS Center number. SMS center number is different based on different Telecom operators.
  1. Go to Service > Phone & SMS > Phone to add Phone Number List and Phone Group List. Click Save and Apply button.
  2. Enable SMS control feature and select the control phone group.
  1. Send SMS content to control DO is as below.

get dido_out config   // query the current DO settings

config;enable='1';mode='high';duration='100';initial='high';duration_high='100';duration_low='100';amount_pulse='100';   //Configure DO initial settings

digital_output    //Trigger DO



Trigger by Node-RED

Note: ensure the firmware version is 78.0.0.3 and later.

  1. Install the Node-RED program to the device and enable it.
  2. Launch the web GUI of Node-RED page.
  3. Drag the Digital Output node to the view, customize the name of this node.
  4. Click redirect to enable DO and configure the DO initial settings.
  5. Link an action or event node to trigger the DO according to your requirement. Click Deploy to save the settings.Trigger the action or event and check if the DO is triggered.




----END---