Arduino Mega with 5VDC Ralay

I have followed the link in the website to make a relay circuit, parts are same as listed in pdf, relay is using Sun Hold RAS-0501, which is 5VDC 72mA.
Unfortunately the relay won't work, I tested and found out that the power supplied to relay is 4.8V 17mA, anyone can help me to solve it ? Should I change 2N2222 to TIP102 ? or should I change the relay to something which require less current to run ?
Thanks a lot in advance for any help.

I tested and found out that the power supplied to relay is 4.8V 17mA,

How is that power supplied to the relay and how are you measuring it? If it is a 5V relay coil then I am surprised if it only takes 17mA are you sure of this value. Where are you connecting the 'hot' end of the relay coil is it the 5V line with the other end connected to the collector? Is the ground connected to the emitter and have you got a base resistor in, if so what value?

I have followed the link in the website

What website?

  1. the website link is : Arduino Playground - HomePage, everything according to the pdf, except the transistor using KSP2222A, which according to the datasheet is compatible with 2N2222.

  2. I connect the components on breadboard, without connecting loads to the relay. The inputs to relay read 4.8V 17mA when my digital pin output HIGH, and 0.5V 0mA when output LOW.

  3. EBC pin out correct, tested with another KSP2222A same results too. Any possibilities that KSP2222A is malfunction or actually not compatible with 2N2222 ?

Thanks.
p/s : I can write codes, follow the diagram to plug in parts to breadboard, but novice in electronics things :frowning:

Sorry to all, I finally find out the reason, its not the problem of electronics side, its totally my fault at coding side, ironically the part that I am familiar with.
Solution : I forgot to add in pinMode(Pin, OUTPUT) in void setup()

Problem solved and thanks for the follow up.