Arduino Nano Pin Not Supplying 5V / Not Triggering Relay

I connected a relay to my Arduino Nano last night (IN1 -> D12), and when I set up pin 12 for output, and write HIGH to pin 12, the LED on the relay board (Sainsmart 2-channel relay board) turns on, but the relay doesn't "click."

I don't know how to use a voltmeter to detect the voltage coming out of the pin (working on educating myself). The Arduino was being powered via USB to my computer.

Is there any reason why the Arduino Nano pin wouldn't be providing the necessary 5V to trigger the relay?

Thanks!

Too much load on the pin?
With meter, set it in DCV.

Put Black, -, lead on a Gnd pin on the Nano.
Put Red, +, lead on the signal.

Thanks Robert. When you say signal, you mean put the lead on D12?

Also, this is the multimeter I have: Digital Multimeter - TOL-09141 - SparkFun Electronics

Is VDC the setting underneath 200ohms (on the left)?

So the Nano is supplying 4.67V on the digital pin, but my Arduino Uno is supplying 4.98.

Is 4.67 not enough for the 5V relay? Is 4.98V enough??

Sounds like you have the relay straight into the Arduino? When Crossroads said load, I think he was getting at current. A relay should be controlled by a transistor, along the lines of this tutorial.

If its this relay board, do you have the jumper installed and the GND and VCC lines connected?

That is the board, and the jumper is exactly as it is in the picture. So here's the complicated thing about this board, and maybe I've been doing something wrong here all along:

Originally, I connected the VCC pin on the Relay board to the 5V pin on the Arduino, I connected the GND pin on the Relay board to the Ground pin on the Arduino, and then I connected a digital pin to the IN1 pin on the Relay board.

Here's where it got confusing for me: so my goal was to be able to write a HIGH to the digital pin, which would trigger the contacts on the relay, and the door would open (the two wires for the "request to exit" would "touch together" for just a second. I couldn't use the NC contacts on the relay board, because I didn't want the door to be open if the Arduino wasn't powered, or if the digital pin was LOW.

So I thought it would work the way I wanted it to work, by putting those two wires (from the "request to exit") into the NO pins. Great. Arduino has no power, the wires aren't connected. But as soon as I plug in the Arduino to power, the wires were touching. Why? Well, the relay board works like this: when the IN1 (or IN2) receive LOW, the relay activates and the wires were touching. When I set to the pin to HIGH, the wires were no longer touching. Well, ok, so I guess my program needs to constantly keep the pin HIGH (to keep the door locked), unless I write the pin to be LOW for a second, opening up the door. Well, not so great, cuz what happens if the Arduino loses power, the relay deactivates, and the wires are touching, and the door becomes unlocked!

So I came up with an idea: use a digital pin to supply the power (VCC) to the relay board. This way, the wires in the NO pins aren't connected, and when I write the pin (connected to VCC on the board) was set to HIGH, the relay activated, and the wires were touching.

This worked great on the Uno, but it didn't work on the Nano.

So what's the difference between the two? The .31 difference in voltage? The LED on the relay board would come on, but the relay would never switch (never heard the clicking sound).

I think that you should try pulling your "relayPin" Low (with a 5K to Gnd.)
And then make that relayPin an OUTPUT and LOW at the top of your void setup ()

By "tying" it Low with the resistor then it won't float while the bootloader is doing its thing.

So the relay should be deactivated (the wires are isolated / door locked) when:

  1. The Normally Open and Common relay contacts are used and
  2. There is no power to the Arduino, or
  3. There is no power to the Relay board, or
  4. There is no pull-up or pull-down resistor connected to the digital pin, or
  5. The digital pin is floating, or
  6. The digital pin is driven HIGH.

Operational Details:
When the Arduino is powered up, the digital pin should remain floating - door stays locked
Power or no power to Arduino or Relay board - door stays locked
Your code configures pin as output - door stays locked
Your code sets pin HIGH - door stays locked

In the main loop, if the digital pin is driven LOW, the door unlocks.

Isn't this a solution ... just drive the pin LOW when you need to unlock the door?

EDIT:

So I came up with an idea: use a digital pin to supply the power (VCC) to the relay board.

Not a good idea - the digital pin cannot supply enough current and could fail.