Mateya oyo ezali eteni ya: Ko contrôler Relais Na kosalelaka Arduino
Oyo eza ba vidéos ya ba groupes nionso etali relais. Ba liens ya ba vidéos misusu ezali na se ya article oyo.
Kokamba ya 5V Relay na Arduino mpo na kokamba AC to DC lokola ampoule to moteur
Lithuto lino le bontsha mokgwa wa ho sebedisa relay module ya 5V le Arduino ho laola didirisiwa tsa motlakase o phahameng jwalo ka mabone, difene, kapa didirisiwa tse ding. Relay e sebediswang thutong ena ke high-trigger, e bolelang hore e qala ho sebetsa ha pin ya letshwao e fumana motlakase o phahameng (5V).

Relay modules di bohlokwa haholo ho automation ya lapeng le ditsamaisong tsa taolo ya diindasteri, di o dumella ho kopanya microcontrollers le didirisiwa tse sebetsang ka AC ka tsela e bolokehileng.
Khoutu ya Arduino le setshwantsho sa wiring di fumaneha ka tlase ho sengolwa sena.
Relay ya High-Trigger ke eng?
Relay ke sesebediswa sa motlakase se laolvwang ka motlakase. Mofuta wa high-trigger o qala ho sebetsa ha pin ya letshwao e iswa ho HIGH (hangata 5V). E na le:
-
Coil ya motlakase bakeng sa ho fetola
-
Khokahano ya normally open (NO) le normally closed (NC)


-
Dintho tsa letshwao, VCC, le GND
Module ena e dumella Arduino ho laola didirisiwa tse sebetsang ka motlakase o phahameng ho feta oo board e ka o sebedisang ka kotloloho.
Ho Hokela Relay Module

Ho sebedisa relay le Arduino ka tsela e bolokehileng, e hokele jwalo ka ha ho latela:
-
VCC (pin e bohareng) -5V ho Arduino
-
GND -GND ho Arduino
-
IN (Pin ya letshwao) -Digital Pin 2 ho Arduino
-
Dintho tsa ho tswa tsa Relay -Hokela e nngwe ya dintho tseo ka tatellano le lebone, fene, kapa ntho e nngwe le e nngwe e sebetsang ka AC/DC.
Kakaretso ya Khoutu
Khoutu ya motheo ya Arduino e sebediswang thutong ena ke ena:
cppCopyEditvoid setup() {
pinMode(2, OUTPUT); // Set pin 2 as output
}
void loop() {
digitalWrite(2, HIGH); // Turn relay ON
delay(1000); // Wait 1 second
digitalWrite(2, LOW); // Turn relay OFF
delay(1000); // Wait 1 second
}
-
Relay e BULEHA ha digital pin 2 e bewa ho HIGH.
-
Relay e KOALWA ha pin 2 e bewa ho LOW.
-
Potoloho ena e pheta ka mora motsotswana o mong le o mong.
Setups ena e sebediswa haholo ho automatize mabone a lapeng kapa taolo ya motlakase ho latela di-sensor kapa dinako tse rerilweng.
Dikgaolo Tse Tswang Video
-
00:00 – Relay e Hlaloswa
-
03:33 – Wiring e Hlaloswa
-
04:42 – Khoutu e Hlaloswa
-
06:10 – Pontsho
Mateya oyo ezali eteni ya: Ko contrôler Relais Na kosalelaka Arduino
- Code Arduino mpe Vidéo ya Relay ya Ba-Chaine mibale ya 5V
- TTP224 4-Channel Touch Sensor ya Kopela Misala ya AC/DC na Relais
- Kosalela module ya relay ya 5V (Low-Trigger) na Arduino
- Kosakola na MAX6675 K-Type Thermocouple na Relay mpe Display
- Kosalela Switch ya Reed mpo kontrolé ya Relay mpe ba charges ya AC/DC na Arduino
- Kosalela na module ya touch TTP223B mpe relay mpo na kokamba ba charges ya AC/DC na Arduino.
- Kosalela ya Arduino ya kobenda bouton mpo na kobongola relais mpe ampoule ya AC
/*
* This is the Arduino code for Dual Channel 5V Relay
* to control turning ON or OFF AC or DC loads
* Watch the video https://youtu.be/58XWVDnB7Ss
*
* Written by Ahmad Nejrabi for Robojax Video
* Date: December 26, 2017, in Ajax, Ontario, Canada
* Permission granted to share this code given that this
* note is kept with the code.
* Disclaimer: this code is "AS IS" and for educational purposes only.
*
*/
void setup() {
pinMode(7, OUTPUT);// connected to S terminal of Relay
}
void loop() {
digitalWrite(7,HIGH);// turn relay ON
delay(3000);// keep it ON for 3 seconds
digitalWrite(7, LOW);// turn relay OFF
delay(5000);// keep it OFF for 5 seconds
}
Nko o na nki.
-
Amazon1-channel 5V relay moduleamzn.to
-
AliExpressBuy 5V/12V 1, 2, 4, 6, or 8-channel relay modules.click.aliexpress.com
Mokili na bisika
Pas encore de ressources.
Fichiers📁
Aucun fichier disponible.