Author Topic: Problems level shifting with NPN & PNP transistors  (Read 6161 times)

0 Members and 1 Guest are viewing this topic.

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Problems level shifting with NPN & PNP transistors
« on: July 01, 2013, 10:14:42 am »
This is really wired, I have my arduino output PWM signal that I need to level shift to 24V PWM signal to drive a brushless motor. I have a PN2222A NPN transistor being driven by the output via a 1K resistor, then I have the emitter/base of the PNP transistor going into the collector of the NPN via a 10K resistor. Now on the collector of the NPN i have my PWM signal, at the other side of the resistor i have constant +24V, what the ? i thought this was a basic configuration what have i missed ?
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Problems level shifting with NPN & PNP transistors
« Reply #1 on: July 01, 2013, 10:18:06 am »
Looks normal to me. The emitter base of the pnp is a diode. If you measure there you will always see vsupply -0.7 volt.
If you were to measure the current you will see the pwm signal. If you measure voltage you will see vsupply -vbe
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Problems level shifting with NPN & PNP transistors
« Reply #2 on: July 01, 2013, 10:24:55 am »
Yea your right of course, so problem is my PNP is not switching off because i always get 24V from the collector, do i need a resistor from the emitter to base on the PNP ? (mosfet style)
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Problems level shifting with NPN & PNP transistors
« Reply #3 on: July 01, 2013, 10:32:25 am »
my PNP collector only goes up to 10V on the high state not 24V so suggests that current is always passing in the PNP base (via the NPN collector) which keeps it on.

Is there any way current can backflow though the base of the NPN and into the arduino pin that is connected to ground ?
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Problems level shifting with NPN & PNP transistors
« Reply #4 on: July 01, 2013, 10:47:27 am »
I had the NPN back to front ! duh stupid me. so colector and emitter were swapped
 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2082
Re: Problems level shifting with NPN & PNP transistors
« Reply #5 on: July 01, 2013, 10:50:44 am »
do i need a resistor from the emitter to base on the PNP ? (mosfet style)
I would, something like 1k between B-E. This will lower the impedance and speed-up the switching. You don't say what sort of load you're driving but if it's >100mA you might want to take the hfe of the PNP in to consideration and adjust the value of the 10k accordingly.
 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2082
Re: Problems level shifting with NPN & PNP transistors
« Reply #6 on: July 01, 2013, 10:52:27 am »
I had the NPN back to front ! duh stupid me. so colector and emitter were swapped
That wouldn't have been helping the situation ;)
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Problems level shifting with NPN & PNP transistors
« Reply #7 on: July 01, 2013, 10:52:59 am »
as per above - fixed, I have my fan running at a very steady 934 rpm. The PNP is just supplying a PWM signal to a brush-less fan motor with over 100K input impedence  so no load problems
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Problems level shifting with NPN & PNP transistors
« Reply #8 on: July 01, 2013, 10:53:29 am »
I had the NPN back to front ! duh stupid me. so colector and emitter were swapped
That wouldn't have been helping the situation ;)

Indeed  |O |O |O |O |O :bullshit:
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf