Why does not the relay switch off?
When I pull IN plug on the breadboard, the relay goes off. But why does not it work with Digital Write LOW? The relay is powered by 5V
So I wired it: https://i.stack.imgur.com/1tA37.jpg
Arduino Code:
int relayInput = 2; // the input to the relay pin
void setup() {
pinMode(relayInput, OUTPUT); // initialize pin as OUTPUT
}
void loop() {
digitalWrite(relayInput, HIGH); // turn relay on
delay(1000);
digitalWrite(relayInput, LOW); // turn relay off
delay(1000);
}
Thanks for help
~Marlon
system
January 31, 2019, 3:19pm
2
So I wired it
Can YOU tell anything by that picture? I sure can't.
I only want to control the relay
system
January 31, 2019, 3:49pm
4
mar_robHD:
I only want to control the relay
Then wire it properly. If you think you did, post a photo that CLEARLY shows what wire goes where, not a rats nest of wires all over the top of each other. And, turn a damned light on.
But why does not it work with Digital Write LOW?
It is very common for relay modules to be active LOW, ie the relay is turned on when its input is taken LOW. Is that your problem ?
The relay is powered by 5V
It is impossible to determine from your picture exactly how anything is wired. Please post a picture of a simple hand drawn circuit diagram.
It looks like you are using an ESP8266 which, I believe, has a 3.3V output. Can you please confirm that