0
\$\begingroup\$

I want to drive 2 inch 7segment display(common anode) using pic microcontroller. The forward voltage of segment is around 7v.

The emitter of the pnp transistor is connected to the12v power supply. And collector to the common anode pin of 7segment. Base is connected to the pic output pin via base resistor. The common cathode pins are connected to the serial in parallel out shift register via resistors. I don't have a diagram with me right now, that's why this much explanation.

My question is, can I switch on/off the transistors using 5v out from pic or I need 12v input to make the transistor switch since the emitter is connected to 12v. Because the transistors never goes to cutoff state, always on.

Kindly please give a solution for this... Thanks

Nikhil.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • 2
    \$\begingroup\$ Did you know we have an online schematic editor? If you edit your question and hit the button above the text window which looks like a little diode/capacitor/resistor circuit you can then draw what you have in mind. Your question will be much easier to understand and answer if you do ... \$\endgroup\$ – brhans Jul 21 '15 at 12:32
2
\$\begingroup\$

That won't work, in fact it's likely to kill your PIC and maybe other stuff, especially if you don't have a base resistor (as you've shown it). The E-B junction of the transistor will cause the 5V supply to rise to about 11.3V. An older midrange PIC might survive, but I think the newer ones will die for sure.

You need a level-shifting NPN transistor (or MOSFET) as so:

schematic

simulate this circuit – Schematic created using CircuitLab

You could replace Q1 and R1 with a small-signal MOSFET such as a 2N7000 if you like.

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

Assuming the diagram I've added to your question is what you have in mind, then that cannot work.

You need to let the base of the transistor get up to 12V to shut off the LED. With a 5V signal, you can't do that.

The diagram below will do what you need. You will have to change the driving logic (5V means LED on, 0v is LED off.)

The parts and values are representative only. You'll need to modify them based on the transistors and current that you actually need/use.

schematic

simulate this circuit – Schematic created using CircuitLab

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Problem with your circuit is that the top PNP transistor will never be off. Have a look at this information and see how to drive a load powered at a different level than that of the the MCU : Driving P-Channel MOSFETs with a Microcontroller

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thanks all for the comments. Now its clear. First I have to convert the signal to 12v and then fed in to pnp transistor. Then it will work. But my actual design consist of 9rows and 8columns of segments, total of 57segments. So i need 8 driver circuits to drive 8 columns. It will be bulky if I use transistors. Is there any ic to do this job. \$\endgroup\$ – Nikhil Jul 22 '15 at 3:17
  • \$\begingroup\$ Can i use ULN2803 for this.Because its input is 5v tolerant . And output similar to pnp transistor. Usually(i think) uln2803 is used for current sinking purpose. Can i use it for current sourcing purpose. \$\endgroup\$ – Nikhil Jul 22 '15 at 7:31
  • \$\begingroup\$ ULN2803 is a low side driver. \$\endgroup\$ – basileu Jul 22 '15 at 9:35
  • \$\begingroup\$ ULN2803 is a low side driver. You can use it to control the state on the LEDs from the shift registers, while the common anodes of the segments are tied to VCC \$\endgroup\$ – basileu Jul 22 '15 at 9:42
  • \$\begingroup\$ Common anodes cannot be connected to vcc since I am displaying one column at a time. There should be something in between vcc and common anodes, a transistor or an ic. \$\endgroup\$ – Nikhil Jul 22 '15 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.