功能:利用SDR-05VDC-SL繼電器模組信號輸入腳位,適當給予HIGH或LOW,Relay模組輸出端RO接點與共用端點會有短路或開路動作,作為控制負載(LED&風扇)之電源開關用途。
材料:Arduino UNO V3 x1、SDR-05VDC-SL繼電器模組 x1、LED x1、Ω x1
技術規格:SRD-05VDC-SL-C
1 Channel Relay Module with Optocoupler H/L Level Triger
Build with high current relay SRD-05VDC-SL-C
Max AC - 10A 250V
Max DC - 10A 30V
IN Singal Input Voltage can be 0-5V
Input contacts: VCC GND IN
佈線圖:Ralay模組S腳位連接Arduino D2 Pin,LED與馬達正極連接於Ralay輸出端之NO腳位(+)及共用接點(-)。
線路圖:
DEMO:
程式碼:
int Relay = 2; //Digital pin D2
void setup() {
Serial.begin(9600);
pinMode(Relay, OUTPUT);
}
void loop() {
digitalWrite(Relay, HIGH);
delay(700);
digitalWrite(Relay, LOW);
delay(2000);
}
材料:Arduino UNO V3 x1、SDR-05VDC-SL繼電器模組 x1、LED x1、Ω x1
技術規格:SRD-05VDC-SL-C
1 Channel Relay Module with Optocoupler H/L Level Triger
Build with high current relay SRD-05VDC-SL-C
Max AC - 10A 250V
Max DC - 10A 30V
IN Singal Input Voltage can be 0-5V
Input contacts: VCC GND IN
佈線圖:Ralay模組S腳位連接Arduino D2 Pin,LED與馬達正極連接於Ralay輸出端之NO腳位(+)及共用接點(-)。
線路圖:
DEMO:
程式碼:
int Relay = 2; //Digital pin D2
void setup() {
Serial.begin(9600);
pinMode(Relay, OUTPUT);
}
void loop() {
digitalWrite(Relay, HIGH);
delay(700);
digitalWrite(Relay, LOW);
delay(2000);
}
沒有留言:
張貼留言