Módulo de aislamiento de 4 canales con optoacopladores, placa convertidora de nivel para Arduino y PLC
| Pin | Señal | Descripción |
|---|---|---|
IN1 |
digital | Channel 1 input control signal on the driving side of the optocoupler. |
GND |
ground | Input-side ground reference for channel 1 control signal. |
IN2 |
digital | Channel 2 input control signal on the driving side of the optocoupler. |
GND.1 |
ground | Input-side ground reference for channel 2 control signal. |
IN3 |
digital | Channel 3 input control signal on the driving side of the optocoupler. |
GND.2 |
ground | Input-side ground reference for channel 3 control signal. |
IN4 |
digital | Channel 4 input control signal on the driving side of the optocoupler. |
GND.3 |
ground | Input-side ground reference for channel 4 control signal. |
U1 |
digital | Isolated channel 1 output terminal for the load or receiving logic input. |
GND.4 |
ground | Output-side ground reference for isolated channel 1. |
U2 |
digital | Isolated channel 2 output terminal for the load or receiving logic input. |
GND.5 |
ground | Output-side ground reference for isolated channel 2. |
U3 |
digital | Isolated channel 3 output terminal for the load or receiving logic input. |
GND.6 |
ground | Output-side ground reference for isolated channel 3. |
U4 |
digital | Isolated channel 4 output terminal for the load or receiving logic input. |
GND.7 |
ground | Output-side ground reference for isolated channel 4. |
| Desde | Hasta | Cable |
|---|---|---|
board:D2 |
x1:IN1 |
green |
board:GND |
x1:GND |
black |
board:D3 |
x1:IN2 |
blue |
board:GND.1 |
x1:GND.1 |
black |
board:D4 |
x1:IN3 |
yellow |
board:GND.2 |
x1:GND.2 |
black |
board:D5 |
x1:IN4 |
purple |
board:GND |
x1:GND.3 |
black |
Este ejemplo se escribió y verificó por compilación para arduino-uno. Codey Online lo adapta a cualquier otra placa compatible.
// 4-Channel Optoisolator Board example
// This sketch drives all four input channels on the optoisolator board.
const int ch1Pin = 2;
const int ch2Pin = 3;
const int ch3Pin = 4;
const int ch4Pin = 5;
void setup() {
pinMode(ch1Pin, OUTPUT);
pinMode(ch2Pin, OUTPUT);
pinMode(ch3Pin, OUTPUT);
pinMode(ch4Pin, OUTPUT);
Serial.begin(9600);
Serial.println("4-Channel Optoisolator Board demo started");
}
void loop() {
digitalWrite(ch1Pin, HIGH);
Serial.println("Channel 1 ON");
delay(500);
digitalWrite(ch2Pin, HIGH);
Serial.println("Channel 2 ON");
delay(500);
digitalWrite(ch3Pin, HIGH);
Serial.println("Channel 3 ON");
delay(500);
digitalWrite(ch4Pin, HIGH);
Serial.println("Channel 4 ON");
delay(500);
digitalWrite(ch1Pin, LOW);
Serial.println("Channel 1 OFF");
delay(500);
digitalWrite(ch2Pin, LOW);
Serial.println("Channel 2 OFF");
delay(500);
digitalWrite(ch3Pin, LOW);
Serial.println("Channel 3 OFF");
delay(500);
digitalWrite(ch4Pin, LOW);
Serial.println("Channel 4 OFF");
delay(1000);
}
Describe lo que quieres construir. Codey Online escribe el codigo, dibuja el esquema de conexiones, lo compila y graba tu placa directamente desde el navegador.
Empieza gratis