Problems driving a relay

I have some problems driving a 5V relay from the Arduino.

If I connect the relay to GND and 5V on Arduino, it works just fine. But, if I connect the relay to GND and Pin 2 on Arduino, and set pin 2 high, nothing happens. The current between GND and Pin 2 is 5V when the relay is not connected. As soon as I connect the relay, this drops to almost 0V, even though the pin is set to HIGH.

This is the relay I'm using: http://www.engphys.ubc.ca/phys253/datasheets/OMRONG5LE.pdf. I'm pretty sure I used the exact same setup in an earlier project and that it worked just fine then.

Any suggestions to what might be wrong? I'm a little concerned that the Arduino is not able to cope with the current the relay draw, is that correct?

Hi sta, Yes, that relay needs about twice as much current as an Arduino pin can provide. Try using something like 2N2222 transistor to drive the relay, google will bring up more information on how to do this if necessary.

Thank you for the answer.

I found a BC546 in the junk box, which I tried to use, but I can't get it to work.

I connected the emitter to GND on the external 5V power supply. The collector goes to the relay and the other pin on the relay to +5V on the external power source. At last I connect the base, through a 2K2 resistor to pin 2 on the Arduino + I add a 22K pull-up resistor between base and emitter.

When I connect the base to +5V the relay clicks as expected, but when I connect the base to the Arduino I just get a buzzing noise from the relay. This noise come all the time, no matter if the output pin is set to HIGH or LOW.

Any help on how I get closer to a solution is highly appreciated.

I add a 22K pull-up resistor between base and emitter

That would be pulling down not up. You don't need it, so please remove. It sounds like you haven't connected the GND on the external power supply to the GND on the Arduino.

Once again thank you for taking your time to help me with this.

Removal of the resistor and connection of GND on the external power source to GND on Arduino did the trick. It now works perfect.