Drive 5v relay with 2N2222

@LarryD so sorry to confuse you and all,
12v circuit was a sample circuit which I found in here. Since you have mentioned on your first post.

My test circuit is this;


On my first post, circuit had 2 type errors. Which you and @ruilviana had pointed out.

  1. Showed 12v voltage. which is wrong. Should be 5v.
  2. Capacitor was wrongly placed.