First of all I'd like to thank this community as a whole for being here, being so vigilant and being so supportive and helpful. I have never asked a question before and that is because I found solutions to almost every problem I faced already discussed in great detail on this forum.
Unfortunately I have to break my silence now...
So, I bought 2 large size seven segment displays and got cheated, I ordered 5 volt displays but they sent me 12 volt ones. Now I can't drive them directly from Arduino or 595, So I studied the forum and found an easy solution Using 2222 Transistors as switches to use external 12 volt supply to power the displays. I bought 20 of STN2222 Transistors and began my experiment, I used 1K resistor on Base and the power adapter for 12 volts is outputting 12 volts and 500 mA. The problem is, I tried three different transistors and triple checked the pinouts to be correct, and still, my display remains ON no matter what the Arduino is putting on the Base pin. Even removing the Base pin completely does not make any difference. The Display is Common Anode so the Vcc is common to all the segments, and I connected the Cathodes of the segments to Collector of 2222 and Emitter goes to Ground of the Supply and all grounds are tied together, but still, LEDs remain ON no matter what I do... What am I doing wrong??? What should I do to make it work???
Thanks in advance to all you good people...
Waiting anxiously for your responses...
Are there current limiting resistors in your circuit ? If not, you will certainly damage the transistor maybe causing it to short circuit.
Yes there are, for both Transistors and LEDs...
So, I bought 2 large size seven segment displays and got cheated, I ordered 5 volt displays but they sent me 12 volt ones.
Now I can't drive them directly from Arduino or 595,
Large displays always have more than one LED per segment.
e.g. four LEDs in series for a 3" 7-segment display.
Vf of four LEDs could be ~9-13volt, depending on colour.
There are high voltage and high current 595 chips.
The TPIC6*595 family is perfect for driving large to very large displays.
Keep the 2N2222 transistors for something else.
Get some TPIC6B595 chips (ebay).
This page explains howto, with code.
And yes, current limiting resistors are needed.
Post a link to the displays if you want help calculating values.
While I do not disagree with Wawa's suggestion to use a modern IC driver, based upon your explanation, the 2N2222's should have worked for a non-multiplexed, common anode display with a transistor for each segment (for a total of 16 2N2222's).
The red 3 inch LED's I've used have four diodes in each segment and two in the decimal point with 1.8 vfwd for each diode. Assuming your displays are red, for a 10ma segment current and a 12 volt supply, you should have about 470 ohms in series with each A-G segment and 820 ohms in series with the decimal points. Other colors will require a different resistance due to the difference in led fwd voltage drop.
Since the segments remain on with no base current, my only conclusion is that the transistors are wired incorrectly. There are several possibilities since the 2N2222 pinout does not appear to be the standard EBC order on the TO92 package, this has been discussed on this board and here:
I did a quick test with a known good 2N2222. With a 12 volt supply and the emitter connected to supply positive through a 300 ohm resistor, the collector going to supply negative and the base floating, I get about 20-25ma of leakage current. So, it seems plausible that the segments would remain on with no base drive if the C/E connections are swapped.
BTW, just for those that say "yeah but the base is floating". Connecting the base to neg supply results in reducing the current to about 15 ma. Connecting the base to +12 through 500ohm results in the device turning on and sinking an unexpected total of ~60ma. Don't believe me? Try it out yourself before responding with what you think will happen...
Something doesn't sound right. Unless all the transistors are shorted (or short immediately on power up), there is another problem. This problem should be understood before trying different drivers.
I have a couple of simple suggestions. This may sound basic but..
- Remove the 2N2222. Does the LED go off?
- Put the LED aside, find a resistor somewhere between 1K and 10K, connect it from the collector to +12 Keep your base resistor.
Can you control the 2N2222 now?
Without seeing what kind of display you have, with specs/datasheet, there's not much to help you with. Either your understanding of your display is wrong, or your understanding of transistors is wrong, or any other number of thing that can go on and on playing the guessing game.
Yes, we absolutely can't go on without proper schematics.
The problem is, I tried three different transistors and triple checked the pinouts to be correct, and still, my display remains ON no matter what the Arduino is putting on the Base pin.
What does 'remains ON' mean?
So, you're trying to power the display ...and it is ON, and remains on. And then?......
Are you saying that the issue is that all the LED segments light up, so that it looks like it is stuck in some kind of initial startup mode?
Maybe you have the pin connections of the transistors mixed up - most likely case.
He got sent the wrong display supposedly, yet he knows details like them being common anode? If an order got mixed up somehow, I'd question everything and only believe what I confirmed myself. It only takes a continuity/diode test to figure out the pins.
Cathodes of the segments to Collector of 2222 and Emitter goes to Ground of the Supply and all grounds are tied together, but still, LEDs remain ON no matter what I do... What am I doing wrong??? What should I do to make it work???
Do you have a separate transistor for each segment?
"Cathodes of the segments to Collector of 2222 and Emitter goes to Ground "
Sounds to me like you have connected ALL the cathodes one 2222 Collector.