hello guys im new at arduino and wanted to create simple project using minifan, but i know nothing about relay. so i have a AC&DC Relay that i connect to 12V DC Minifan and to arduino. i also got a DC adaoter for the arduino but this one doesnt work, are there anything that i did wrong? if so please tell me. thankyou guys
Welcome to the forum
From your picture it looks like all the relay is doing when it turns on is to short the 2 fan cables together rather than providing power to it. The relay is merely a switch. Do you know how to turn the fan on and off using a switch ?
Please post the sketch that you are running, using code tags when you do
Can you hear the relay turning on and off when you run it
That's a relay module, more then just a relay. Good stuff.
Post the code.
Where is the 12's for the fan?
common on the relay goes to the fan positive
no or nc on the relay goes to the power supply positive
negative on the power supply goes to the fan negative
yes i can hear the relay turning on and off when i run it.
here's the code
const int relayPin = D5;
void setup() {
// put your setup code here, to run once:
pinMode(relayPin, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(relayPin, LOW);
delay(500);
digitalWrite(relayPin, HIGH);
delay(500);
}
here's the code sir
const int relayPin = D5;
void setup() {
// put your setup code here, to run once:
pinMode(relayPin, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(relayPin, LOW);
delay(500);
digitalWrite(relayPin, HIGH);
delay(500);
}
The black wire from the fan goes to ground.
The center pin of the relay goes to +12V.
The N.O. pin of the relay goes to the fan.
sorry sir, but i still got more question about your answer
where should i connect the black wire from the fan to the relay?
in my microcontroller there's only 5V
and do you mean the red wire from the fan that goes to the N.O?
thankyou sir
the black wire from the fan goes to the 12V ground.
If it is a 12V fan then You. Yes You need to provide a 12V power supply.
Sure N.O. give it a try. What happened when you used N.O. instead of the other one?
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.