Codey OnlineBibliothèque de composants Arduino & ESP32 › 4-Channel Optoisolator Board
4-Channel Optoisolator Board
Autres

4-Channel Optoisolator Board

Module d’isolation à 4 canaux avec optocoupleurs, carte convertisseur de niveau pour Arduino et PLC

Largeur: 30.3 mm

Brochage — 4-Channel Optoisolator Board

Broche Signal Description
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.

Exemple de schéma de câblage — 4-Channel Optoisolator Board

De Vers Fil
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

Exemple de code Arduino — 4-Channel Optoisolator Board

Cet exemple a été écrit et vérifié à la compilation pour le arduino-uno. Codey Online l'adapte pour vous à toute autre carte prise en charge.

// 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);
}

Composants similaires

AD9850 DDS Signal Generator Module

AD9850 DDS Signal Generator Module

Adjustable Step-down Module 3-40VDC  1.5-35VDC LM2596

Adjustable Step-down Module 3-40VDC 1.5-35VDC LM2596

Breadboard 400 pin

Breadboard 400 pin

DC 12V adjustable timer delay, time delay relay turn off switch module time relay time switch 0~25sec for smart home, automatic control

DC 12V adjustable timer delay, time delay relay turn off switch module time relay time switch 0~25sec for smart home, automatic control

Construisez votre projet Arduino ou ESP32 avec l'IA

Décrivez ce que vous voulez créer. Codey Online écrit le code, dessine le schéma de câblage, le compile et flashe votre carte directement depuis le navigateur.

Commencez gratuitement