Author Topic: PNP base resistor  (Read 9705 times)

0 Members and 1 Guest are viewing this topic.

Offline dandeTopic starter

  • Contributor
  • Posts: 21
  • Country: hu
PNP base resistor
« on: December 17, 2014, 09:24:46 am »
Hi All!
I've tried to drive RGB leds with 4 PNP BJTs, one BJT is connected to each one of C1..C8, and the other three should drive the cathodes of the leds. RR1..8, GR1..8, BR1..8 are connected to three 74HC595s respectively.
Naturally this doesn't work. When I'm driving the bjts' base with 0 volts, everything is as expected, but when I drive it with 5V to turn the transistor off, it is still on, the leds are almost imperceptibly dimmer. My theory is that I miscalculated the 1K base resistors, and the voltage drop is too large on them to turn the bjts completely off.
The BC807-16 PNPs in question are these: http://www.tme.eu/hu/Document/443bea0044bb250f58448ece9d8ed297/bc807.pdf
Can you help me please with the issue? Should I use a smaller base resistor? If yes, what value? :(
Thanks in advance!!
« Last Edit: December 17, 2014, 09:32:07 am by dande »
I am programmer with a soldering iron. Run!!
 

Offline mij59

  • Frequent Contributor
  • **
  • Posts: 693
  • Country: nl
Re: PNP base resistor
« Reply #1 on: December 17, 2014, 09:47:21 am »
Hi,

The voltage at the emitter of the transistor is greater than 5,7V , so it won't turn off.
Lower the voltage of C1...

A better way is to use a npn transistor, connect the resistor and led to the collector, emitter to ground.
You could also use a n-channel mosfet.
 

Offline dandeTopic starter

  • Contributor
  • Posts: 21
  • Country: hu
Re: PNP base resistor
« Reply #2 on: December 17, 2014, 10:00:16 am »
Thanks!
How can the voltage be greater than the supply voltage?
Supply voltage is 5V. I already have the board made and assembled, I knew I shouldn't have experimented
with transistors :)
Anyhow, I've attached the full schematics, the driving circuit is on the second page, can you please give me an idea on how
to lower the C1..C8 voltage?
Thank you so much!!
I am programmer with a soldering iron. Run!!
 

Offline mij59

  • Frequent Contributor
  • **
  • Posts: 693
  • Country: nl
Re: PNP base resistor
« Reply #3 on: December 17, 2014, 11:17:33 am »
If you using only one power supply there's no need to lower the voltage of C1.. , circuit should work.

Please post some photo's of the board.
 

Offline KJDS

  • Super Contributor
  • ***
  • Posts: 2442
  • Country: gb
    • my website holding page
Re: PNP base resistor
« Reply #4 on: December 17, 2014, 11:21:50 am »
Measure the voltage at the transistor base when it's in the on and off state

Offline dandeTopic starter

  • Contributor
  • Posts: 21
  • Country: hu
Re: PNP base resistor
« Reply #5 on: December 17, 2014, 11:26:25 am »
You can find the images I took while assembling the board in this album: http://imgur.com/a/wO5nL
I have to tell you that this is my first "complex" board, and I (as the example shows) lack some fundamental
knowledge here and there regarding electronics :)))
I am programmer with a soldering iron. Run!!
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: PNP base resistor
« Reply #6 on: December 17, 2014, 11:36:12 am »
Your schematic is almost impossible to follow.

The transistors are configured as emitter followers so don't need any base resistors.

It think the problem is you've got some of the LEDs sharing the series resistor so an LED is getting its power from another transistor which is on.

Redraw part of the circuit with everything connected together and it should become more clear.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3237
  • Country: gb
Re: PNP base resistor
« Reply #7 on: December 17, 2014, 11:51:07 am »
Just to clarify, are you having problems turning off Q1 to Q24?  Do Q25 to Q32 work as expected?
 

Offline mij59

  • Frequent Contributor
  • **
  • Posts: 693
  • Country: nl
Re: PNP base resistor
« Reply #8 on: December 17, 2014, 11:59:07 am »
Just thinking the impossible, a software error ?
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: PNP base resistor
« Reply #9 on: December 17, 2014, 12:03:29 pm »
Quote
the leds are almost imperceptibly dimmer.

Without seeing how both the anodes / cathodes are driving, it is hard to tell.

Generally, you want to drive the load on the collectors. So in your case, the cathodes should be switched via npn and the anaode via pnp. In the case of small led indicators, they can be easily driven by the 595s.
================================
https://dannyelectronics.wordpress.com/
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: PNP base resistor
« Reply #10 on: December 17, 2014, 12:04:53 pm »
The transistors are configured as emitter followers so don't need any base resistors.
Some of them are also configured as common emitter so do need base resistors.

Are you planning to multiplex the LEDs?

 

Offline dandeTopic starter

  • Contributor
  • Posts: 21
  • Country: hu
Re: PNP base resistor
« Reply #11 on: December 17, 2014, 12:05:04 pm »
mij59: everything is possible! :)
The only reason I am suspecting that I did something wrong on hw side, because when I write a code to turn on all BJTs delay for 1s then turn off them, I see the flicker, only very dimly.
I've created a simplified schematic, just to show the main idea behind the whole stuff. The only difference is that
mine have 8 rows and 8 columns. At one moment only 1 column should be on.
mikerj: Neither of the bjts are turned off

EDIT: Sorry, I forgot to change the default value on the column base resistors, those are 1k too!
« Last Edit: December 17, 2014, 12:11:05 pm by dande »
I am programmer with a soldering iron. Run!!
 

Offline dandeTopic starter

  • Contributor
  • Posts: 21
  • Country: hu
Re: PNP base resistor
« Reply #12 on: December 17, 2014, 12:09:26 pm »
The transistors are configured as emitter followers so don't need any base resistors.
Some of them are also configured as common emitter so do need base resistors.

Are you planning to multiplex the LEDs?

yes! only one column is ON at a time, and then I drive (at least try to) the RGB cathodes for every row. Then I jump to the next column, and so on...
I am programmer with a soldering iron. Run!!
 

Offline KJDS

  • Super Contributor
  • ***
  • Posts: 2442
  • Country: gb
    • my website holding page
Re: PNP base resistor
« Reply #13 on: December 17, 2014, 12:11:26 pm »
mij59: everything is possible! :)
The only reason I am suspecting that I did something wrong on hw side, because when I write a code to turn on all BJTs delay for 1s then turn off them, I see the flicker, only very dimly.
I've created a simplified schematic, just to show the main idea behind the whole stuff. The only difference is that
mine have 8 rows and 8 columns. At one moment only 1 column should be on.
mikerj: Neither of the bjts are turned off

EDIT: Sorry, I forgot to change the default value on the column base resistors, those are 1k too!

So what do the voltages read?

Offline dandeTopic starter

  • Contributor
  • Posts: 21
  • Country: hu
Re: PNP base resistor
« Reply #14 on: December 17, 2014, 12:13:27 pm »
So what do the voltages read?

I am at work at the moment, I have to go home to measure everything, it was in the middle of night when I measured everything, and don't remember it at all. :(

So, the attached schematic is theoretically not wrong? :/
I am programmer with a soldering iron. Run!!
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: PNP base resistor
« Reply #15 on: December 17, 2014, 12:14:09 pm »
Quote
Then I jump to the next column, and so on...

You could have the wrong sequence here.
================================
https://dannyelectronics.wordpress.com/
 

Offline dandeTopic starter

  • Contributor
  • Posts: 21
  • Country: hu
Re: PNP base resistor
« Reply #16 on: December 17, 2014, 12:16:02 pm »
Quote
Then I jump to the next column, and so on...

You could have the wrong sequence here.

To be honest, I've tried to turn off every bjts without any luck :(
The leds are on whatever I do :(
I am programmer with a soldering iron. Run!!
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: PNP base resistor
« Reply #17 on: December 17, 2014, 12:27:34 pm »
With so much information you have provided, there is very little others can do to help you.

You know you are in a tough spot if others ask you to help them help you.
================================
https://dannyelectronics.wordpress.com/
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: PNP base resistor
« Reply #18 on: December 17, 2014, 12:36:25 pm »
It does sound like you've got the programming wrong here.

Try setting all of the outputs to high and all the LEDs should all turn off. If they don't. Verify you have the correct pin out/footprints for all of the transistors.


 

Offline dandeTopic starter

  • Contributor
  • Posts: 21
  • Country: hu
Re: PNP base resistor
« Reply #19 on: December 17, 2014, 12:57:17 pm »
With so much information you have provided, there is very little others can do to help you.

You know you are in a tough spot if others ask you to help them help you.

I am sorry dannyf, I am in a tough spot, because I don't know what else can I provide at the moment, and I know
that this is my fault because of the lack of my understanding, can you please tell me some guidelines what kind of information
you need to help me further (besides measurements, which I can only do at home)?

To recap:

- I am using an ATmega168A MCU to control 4 74HC595s. The 74HC595s are controlled using SPI code
- 1 shift register is used to control the column PNPs, every output of this shift register is connected to Col1, Col2 ...
- The other 3 are controlling the rows for every color, for example 1 74HC595 is connected to RedRow1, RedRow2, RedRow3 ... and so on
- Whatever data I send to the shift registers, the LEDs stay on, if (in code) I switch all Columns and every rows' every color to 5V, the LEDs are still on. :(
I am programmer with a soldering iron. Run!!
 

Offline dandeTopic starter

  • Contributor
  • Posts: 21
  • Country: hu
Re: PNP base resistor
« Reply #20 on: December 17, 2014, 12:58:28 pm »
It does sound like you've got the programming wrong here.

Try setting all of the outputs to high and all the LEDs should all turn off. If they don't. Verify you have the correct pin out/footprints for all of the transistors.


Anyhow I set the outputs of the shift registers the LEDs stay on :(
I am programmer with a soldering iron. Run!!
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: PNP base resistor
« Reply #21 on: December 17, 2014, 01:01:22 pm »
Isolate the part of the circuit which is causing the problem. Disconnect all of the shift registers and connect Col1, Col2 and RedRow1, GreenRow1 and BlueRow1 to +5V and all the LEDs should turn off.
 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2082
Re: PNP base resistor
« Reply #22 on: December 17, 2014, 01:57:49 pm »
Anyhow I set the outputs of the shift registers the LEDs stay on :(
So the transistors are not behaving as transistors? I would double-check the pin-out - make sure that the PCB  corresponds to the schematic and the footprint.
 

Offline hamdi.tn

  • Frequent Contributor
  • **
  • Posts: 623
  • Country: tn
Re: PNP base resistor
« Reply #23 on: December 17, 2014, 02:23:21 pm »
as andy said check your transistor footprint, if you used the default PNP model from altium library , it have a different pin arrangement than the transistor you have.
 

Offline dandeTopic starter

  • Contributor
  • Posts: 21
  • Country: hu
Re: PNP base resistor
« Reply #24 on: December 17, 2014, 05:38:32 pm »
Came home, checked it out. Yup, wrong footprint. I am on the edge of crying like a little child.
What are my options now? In my footprint, I have collector on pin 1, base on 2 and emitter on 3, are there any PNP BJTs with
this footprint? Should I just remove the BJTs and hope that the 74HC595s can handle the current?
Or should I just frame the board, put it on my wall to remind me why I have triple check the footprints?
Thanks all! You've been an enormous help!
I am programmer with a soldering iron. Run!!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf