Programming 5 digit 7 segment display

I guess when you touch that resistor, enough current flows through your body to ground to begin to switch on the PNP.

I think you may have one of the resistors connected incorrectly:

I may have the solution to the my problem. I read some articles you need a pull-up resistor from the base to the Vcc in order to not have this kind of false switching of the transistor. I will also change my wiring tomorrow. Noted on you comment.

I might try this one tomorrow. and maybe change some resistor values if it does not work.

Also May I ask if BR N5401 is the same as 2N5401? maybe this is the problem? I am just thinking maybe they have different pinout?

A Google search for BR N5401 only brings up 1N5401, which is a diode, and 2N5401. Nothing else similar or relevant that I could find.

R11 pulls the base of Q9 high to assure that it will turn off when Q8 is switched off.

Oops, I should have checked. Question already answered.

Yes but why is anything required to ensure that? When Q8 is switched off, no current will flow from the base of Q9, so it too should be off. These are BJT, not MOSFETs, so they have no charge on their gates to be drained in order to switch them off. BJT are current controlled. No current == off, is my understanding.

But then again, even a tiny leak of current can switch the PNP on, it seems, as demonstrated by @raffy0991's fingers in post #60. Maybe that's what R11 prevents somehow.

I found this:

Looking at the definition under the “Pro-Electron or EECA Numbering Coding System” heading it looks like the “B” is a silicon device and “R” indicates a switching device.

Reading the JEDAC definition would seem to indicate that the 2N5401 might be an equivalent to the BR device. I have seen one reference to “B” type devices used in Britain correlating to 1N Nd 2N devices used in the US.

Although after reading this Wikipedia article I wonder if your device is even a BJT:

It seems likely it may be an SCR or something similar as listed under the meaning of a second letter “R”. If you know how you should be able to test if it is a PNP transistor or an SCR or similar. The fact that you say it will not turn off after it is turned on would seem to indicate it may be an SCR or TRIAC.

1 Like

I found this explanation of the purpose of R11

Sounds like it has a small effect in certain edge cases. But omitting it would not cause the problems @raffy0991 is experiencing.

@raffy0991 I suggest you try replacing the transistor (assuming that's what it is). If the other similar ones you have behave the same way, do you have any other models of PNP transistor you can try? If not, maybe time to buy some. I have used BC327 for high-side switching for LEDs in the past, for example.

1 Like

I have solved my problem. The pinout of 2N2222 is wrong. I was based it on the datasheet on the internet. In the internet, it was CBE but in actual the 2n2222 i bought is EBC. I have also test my transistor circuit using the 5 digit 7 segment display and it works. Now, I just need to replicate the circuit 7 times more for the segment and 5 times for the digit. Then I need to test it with my arduino and the program. Hopefully it will work.

1 Like

thank you for this

Don't leave base open!

what do you mean sir?

Without a pull down, a transistor can't go in full interdiction.

do you mean here sir? What is interdiction?

If you only use a swtch like in the picture, when the switch is open the base is not connected to anything.
If you drive the base from a pin of Arduino, the base is ever connected to a high or a low level.

I am assuming it would be the same as cutoff. We have already learned that the PNP transistor will not cutoff without the pull-up resistor. A pull-down resistor would normally be required but @Datman has already pointed out that the Arduino pin can sink enough current to effectively pull the base of the NPN into full cutoff. In other circuits a resistor from the base to ground would be needed.

A post was merged into an existing topic: Extracting serial data and display to 5digit 7segment

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.