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

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Global Moderator
  • *****
  • Posts: 12251
  • 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, 08:14:42 pm »
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 ?
https://www.simonselectronics.co.uk/shop New stock now in of EEVblog Brymen 235 and uCurrent Gold, Now selling a selection of Probe Master probes
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 6942
  • Country: us
    • SiliconValleyGarage
Re: Problems level shifting with NPN & PNP transistors
« Reply #1 on: July 01, 2013, 08:18:06 pm »
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).
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 12251
  • 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, 08:24:55 pm »
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)
https://www.simonselectronics.co.uk/shop New stock now in of EEVblog Brymen 235 and uCurrent Gold, Now selling a selection of Probe Master probes
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 12251
  • 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, 08:32:25 pm »
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 ?
https://www.simonselectronics.co.uk/shop New stock now in of EEVblog Brymen 235 and uCurrent Gold, Now selling a selection of Probe Master probes
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 12251
  • 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, 08:47:27 pm »
I had the NPN back to front ! duh stupid me. so colector and emitter were swapped
https://www.simonselectronics.co.uk/shop New stock now in of EEVblog Brymen 235 and uCurrent Gold, Now selling a selection of Probe Master probes
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 1611
Re: Problems level shifting with NPN & PNP transistors
« Reply #5 on: July 01, 2013, 08:50:44 pm »
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.
 

Offline Andy Watson

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

Offline Simon

  • Global Moderator
  • *****
  • Posts: 12251
  • 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, 08:52:59 pm »
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
https://www.simonselectronics.co.uk/shop New stock now in of EEVblog Brymen 235 and uCurrent Gold, Now selling a selection of Probe Master probes
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 12251
  • 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, 08:53:29 pm »
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:
https://www.simonselectronics.co.uk/shop New stock now in of EEVblog Brymen 235 and uCurrent Gold, Now selling a selection of Probe Master probes
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf