Electronic – switch on delay not working (capacitor, transistor)

capacitorswitchestransistors

I built a switch on delay with a 2n2222 npn transistor and a capacitor.

Circuit

(I left out the base resistor (2k ohms) and the resistor for the led (330 ohms) in this simulation, but in real I added them for sure. The resistor before the capacitor is 1M ohm)

In theory, my 5V power supply should charge the capacitor slowly (because of the big 1M ohm resistor before the capacitor) and if the voltages reachs around 0.8V the transistor should switch on the led. Why is my circuit not working? I guess I forgot something since I have never seen such a small switch on delay on the Internet before. Or is the 1M ohm resistor in front of the capacitor too small to see a delay between plugging in my power supply and seeing the led going on? What is my mistake?

Best Answer

What you are doing is at left and what you must do is at right:

schematic

simulate this circuit – Schematic created using CircuitLab