I have a simple switch system based on an NPN transistor (it is supposed to be part of a larger project) which unfortunately does not work and I don't know why. Could someone take a look at what's wrong?
-
5\$\begingroup\$ What do you mean by "does not work"? What actions do you take, what behavior do you expect to see and what behavior do you actually see? And what is the purpose of J1? \$\endgroup\$– InBedded16Commented Jun 4 at 17:53
-
2\$\begingroup\$ What are the voltages for SIGNAL and V+? \$\endgroup\$– Chris KnudsenCommented Jun 4 at 17:54
-
\$\begingroup\$ The schematic shows the LED the right way round. Is it the right way round on the board? \$\endgroup\$– Neil_UKCommented Jun 4 at 18:07
-
1\$\begingroup\$ Technically what you have there should work. Why it does not work is unknown, because it's also unknown from where the signal comes from and what are its properties, same for what is the load and its properties, and what is the supply and its properties. \$\endgroup\$– JustmeCommented Jun 4 at 20:32
-
\$\begingroup\$ Is the load huge starving the transistor ? \$\endgroup\$– AutisticCommented Jun 5 at 1:46
3 Answers
Nothing is wrong with the schematic. The circuit works as long as:
- V+ is below 6V or so, and
- SIGNAL is digital (two-state) with a high level of 1.5V or so at room temp, or about 2V in the dead of winter in Antarctica :), and low level below 0.5V.
- SIGNAL switches slower than say 100kHz - due to the time needed for the saturating switch to turn off when the logic high level is much above 2V.
When V+ is 6V or more, the Zener will conduct and cause the power supply to go into current limit or shutdown - depending on the type of the supply.
As long as the pcb matches the schematic, the pcb should work in conditions enumerated above as well.
If you want the circuit to do something else, please edit the question and tell us the specifications you tried to deign for: V+ range, SIGNAL type and voltage range, operating temperature range, and desired LED operating current range.
There are no glaring errors on your schematic and the layout appears to match.
Possible issues:
If your load is inductive like a relay coil you need an additional diode across the load.
It's possible to assemble the LED (or the other diodes) backwards.
Your base drive signal is divided and weak. If you are expecting to switch, say, 50mA you should have more than 24V input. The base should get about 1/10 to 1/20 of the maximum collector current as a rule of thumb (depending on how good the transistor is, and other considerations such as operating temperature range). The solution is to simply reduce R1 so that you get sufficient base current. For example for Ic(max) = 50mA and Vin = 4.5V you'd want R1 to be between about 610Ω and 1.2kΩ. You might choose 1kΩ.
Not sure why you used 1N4148 vs. 1N4007. I would swap the two. It's possible that if you connect the power to a very low impedance source the 1N4148 could be damaged charging the capacitor. Also, the 1N4148 is a low-current diode and will have a relatively large voltage drop at higher currents. This can be significant since your maximum Vcc is only about 6V before the Zener diode starts to conduct (I expect you're using 5V). In fact, you might want to replace the 1N4148 with a Schottky diode to minimize the voltage drop.
Since your question (at time of me writing) is missing specifications for its inputs and outputs, the question is impossible to answer properly.
Some observations that may well improve the circuit behaviour, deduced from its current implementation, are:
Move base pull-down resistor R2 (10K) connection from T1 base to D1/R1 junction. This still pulls down the base to disable T1 (BC817). But it avoids creating a potential divider at the T1 base.
Swap D1 (1N4148) and D2 (1N4007), so its D1 (1N4007) and D2 (1N4148). D1 carries power current. D2 carries signal current.
If D2 is to protect T1 (BC817) from damage by negative voltages on SIGNAL, it won't do so at higher SIGNAL negative voltages. The diode has a reverse leakage current that can be enough to damage T1 if it gets negative enough. Instead, remove D2 the reconnect it as: ANODE to GND, CATHODE to T1 base. T1 base now can't go much below -1 V. Note that R1 will now conduct the current from the negative voltage but that's pretty small.