8

Fixed: The capacitor was defective. It works well with a different one.

I’m new to electronics and need your help.

I built a circuit similar to this one (see comment for the exact components):

Enter image description here

I expect the LED to remain on for a short time when I release the button, my capacitor discharging and providing current to the base, keeping the transistor open.

It does not. What am I doing wrong?

Adding some pictures of my actual circuit:

Enter image description here

Enter image description here

Enter image description here

JRE
  • 67,678
  • 8
  • 104
  • 179
Dominique
  • 349
  • 1
  • 10
  • How long are you holding the switch closed? In other words, what voltage does the capacitor charge up to before you open the switch? – relayman357 Jan 07 '21 at 16:12
  • 1
    I am expecting it to be on for a long time too. With the information you give, something is wrong, but without further info, impossible to say where the problem is. Maybe you built the circuit wrong? – Justme Jan 07 '21 at 16:17
  • 2
    Consider uploading a photo of your circuit letting us clearly see the connections and components - we might see something obvious:) – Jakob Halskov Jan 07 '21 at 16:32
  • 2
    yep. Nr. 1 reason for beginner transistor circuits not working: mixing up the leads on the transistor, or thinking that all transistors have the same pinout and using a different one without adjusting the connections. – Marcus Müller Jan 07 '21 at 16:34
  • Well my circuit is not exactly the same. I have the same layout but using different values for the component. I’m running it on 5v. The resistor to the LED is a 220 ohms. The other resistor (the one connecter to the base) is a 100K. The transistor is a 2N-2222A-1726 and I checked the pinout on google. The capacitor is a 100 uF. I’m holding qui the button for a long time without any difference (the cap is connected directly to 5v so it should charge up quite quickly right – Dominique Jan 07 '21 at 16:42
  • 3
    Also note that it's not a good idea to short a capacitor directly to a voltage source. The resulting current could for example brown out your supply or damage your switch contacts. Use a small resistor in series to limit the current to something reasonable. Remember I=C*dv/dt. – John D Jan 07 '21 at 16:45
  • 2
    Your expectation seems to be correct. 100uF * 100k = 10,000 ms or 10 seconds time constant. That should be long enough to see something. So there must be something wrong with the circuit. Double-check the wiring and the component values. – user57037 Jan 07 '21 at 16:54
  • 1
    Your transistor is backwards if it's really a BC547. – Spehro Pefhany Jan 07 '21 at 17:14
  • Use 2 transistors in a Darlington and raise Rb by 100 to get a long time – Tony Stewart EE75 Jan 07 '21 at 22:52
  • When doing things on a breadboard, then always suspect the breadboard. In case the breadboard seems to be ok, then always suspect the breadboard. If you are absolutely sure that the breadboard is flawless, then always suspect the breadboard and buy a solder iron instead. So I would strongly suspect that the problem was not a defective cap, but - surprise! - the breadboard connection. Please note that through-hole components come with glue residue on the legs and possibly also oxidation, which isn't a problem if you solder them but _will_ be a problem if you are using a breadboard. – Lundin Jan 08 '21 at 12:39

4 Answers4

8

My guess is that your capacitor has the wrong (too small) value, or you connected a polarized capacitor with reversed polarity.

It is also possible that the base resistor (33k) actually has a much smaller value. You need to verify that both of those components have the correct value and are connected properly.

Elliot Alderson
  • 31,192
  • 5
  • 29
  • 67
8

I replaced the capacitor with another one (smaller cause that’s all I had) and it’s working so I guess my previous cap was defect..

Thanks a lot to all of you who took some time to help me

Dominique
  • 349
  • 1
  • 10
3

There are many troubleshooting techniques. Here I would recommend simplifying the circuit until the LED illuminates.

Try the left circuit, if it doesn't work, short the E-C of the transistor (right circuit).

schematic

simulate this circuit – Schematic created using CircuitLab

Mattman944
  • 13,638
  • 1
  • 19
  • 43
  • Thank you Mattman, the LED was turning on but as soon as the button was released, it was turning off while I was expecting it to remain on for a short time – Dominique Jan 07 '21 at 17:09
1

This image shows two NPN transistors. Which one do you have connected correctly?

transistor pinouts

Audioguru
  • 3,894
  • 5
  • 8