Browsed by
Tag: isolated

Isolated Inputs Ardbox/M-Duino

Isolated Inputs Ardbox/M-Duino

In this post it is described how to use the galvanically isolated inputs in Idustrial Shields PLCs (Ardbox and M-Duino).

As shown in the Figure below, isolated inputs always have two available connections and both of these connections need to be wired for a proper performance of the inputs. The configuration if the inputs is PNP. All isolated inputs are DIGITAL,  not ANALOG.

Isolated inputs

Ix.x    –> Signal. Voltage up to 24V

(-) Ix.x –> reference or COM of the input signal.  

IMPORTANT: BOTH connections are required for the Inputs to work properly.

Ioslated_inputs_v1

The next peice of code shows how to read one isolated input. The example is based on M-Duino Relay, for other PLCs  the pin 2 should be replaced according to the PLC pinout.

int I00 = 2 // modify pin 2 accordingly to PLC pinout;

void setup() {

  pinMode(I00, INPUT);
  
  Serial.begin(9600); 	// Set up serial communication. It will allow to monitor the analog input value.
}

void loop() {

  Serial.println(digitalRead(I00));
  delay(2000); //wait 2 seconds
}