Now, first of all let me tell you that I'm new at using relays and a newbie at Arduino so forgive me if what I'm doing is totally wrong.
What I was trying to do was connecting a 12V DC irrigation pump to an Arduino Uno through a 2 Relay Module, using a direct power supply (yes, no battery,)
It ended up pretty bad and I'm trying to figure it out if the reason is the power supply or the Arduino PIN.
I used the PIN 8 and for some weird reason, it was the only PIN that would turn on the red led on the Relay ( I guess that led means Undervoltage !?)
I'm sending you guys some pics also.
I've used this schematic for it
gwareloth:
Are you actually trying to run a 12V DC motor, direct off the 220V AC mains? Or am I missing something?
That's what I was trying to say. Looks like in this country (I'm not at home) the sockets do offer only 220-230v (we do have 12v sockets also).
I made a HUGE mistake, right?
Connect the blue wire from the power supply directly to a motor terminal, connect the brown wire to the NO relay terminal, connect a wire from the COM relay terminal to the other motor terminal, if the motor runs backward, reverse the wires on it's terminals. There should not be a wire on the relay NC terminal.
EDIT: If you put 230VAC on the pump, never mind.
Post a link or picture of that power supply!
But that doesn't really relate to your problem of only pin 8 activating the relay and not eg pin 10. so to solve that problem, disconnect the motor side of the relay* and your sensor from the arduino, and just see if the relay activates by itself running blink, but on various pins.
I'm kinda hoping you did that already before you fry yourself....