I'm a newbie trying to control something through a relay. I've tried two relays with two different setups.
Setup 1
External 12V dc input to the relay (SRD-12VDC-SL-C) and signal pin from arduino to the IN pin, GND of ext. power supply to the GND of the Arduino, NO and COM to the load object (i.e. an LED).
Setup 2
Similar to setup 1, but using SRD-05VDC-SL-C, 5V from Arduino (Vin from Arduino also tested).
Test program
Modified version of the 'blink' example.
Symptom
- The load object has been verified to be working before the testing.
- Both setup can be verify the input is working, the power led and switch led of the two relay module are lighted as expected, and I can hear the click sound while switching.
- No output can be obtained, both from the load object and using a multimeter.
Update
Sorry, I'm supposed to upload a Fritzing schematic, but I can't find a proper relay as I'm using.
- The DC+ (red) of the relay is connected to the external ATX 12V.
- The DC- (black) of the relay is connected to the external ATX ground.
- The IN (blue) of the relay is connected to the Arduino pin 8.
- The external ATX ground (white) is connected to the Arduino ground.
- The NO (red) of the relay is connected to the load object Vcc.
- The COM (black) of the relay is connected to the load object ground.
Sketch
A simple modified version of Blink example is used for testing.
const int relaySignalPin = 8;
void setup() {
// put your setup code here, to run once:
pinMode(relaySignalPin, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(relaySignalPin, HIGH);
delay(1000);
digitalWrite(relaySignalPin, LOW);
delay(1000);
}
Question
I have no idea on why there's no voltage can be obtain between NO and COM while the switch is on, what's wrong with my setup?