Arduino Controlled Relay with a Button Tutorial

preview_player
Показать описание
A quick demo of how you can use Arduino to drive a relay by pressing a button.
Рекомендации по теме
Комментарии
Автор

Awesome Example at the website, Thanks!

skylerbullington
Автор

why do you need to use the Arduino board and use code if you have a battery and are simply turning the fan on/off? Can you not do it with just the battery and no programming? Thank you

SpiritMolecule
Автор

if (stateRelay == HIGH) -> When is the relay state high if you set it to low at the beginning? I can't see any line that reads the relay state O.o

przemyslawrajzer
Автор

When I attempt to to test this circuit (by the way I am using a diode and resistor instead of a fan for the NO terminal as well as NC) it does not switch when I push the button. I have tested all my nodes and I see that even when I push the button, pin 2 remains low instead of going high. I think the problem maybe with my switch connection but I tested that separately with an LED and it was fine. Any help as to what could be the problem? I'm very new to the Arduino and relay circuitry. Any help would be appreciated, thanks

BidDunker
Автор

sir can you pls upload Arduino programme related to relay.

akschematics
Автор

Can you explain why are the diode and transistor used? Can't you just hook up the relay with the load resistor?

BogdanSerban
join shbcf.ru