convert npn input devices to pnp using resistors

Discussion in 'General Electronics Chat' started by timk, Oct 15, 2012.

  1. timk

    Thread Starter New Member

    Oct 15, 2012
    3
    0
    I read on this forum that pullup and pulldown resistors can be used to convert from NPN to PNP on PNP to NPN. Just wondering if someone could explain this in further detail. Like how its done and how to determine the value of the resistor(s) to use.

    Thanks
     
  2. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    Where did you find it, please link the address?
     
  3. crutschow

    Expert

    Mar 14, 2008
    13,000
    3,229
    What exactly are you trying to do?

    You can use NPNs and PNPs together in a circuit but you can't necessarily "convert" an NPN to a PNP.
     
  4. timk

    Thread Starter New Member

    Oct 15, 2012
    3
    0
  5. colinb

    Active Member

    Jun 15, 2011
    351
    35
    As crutschow said, you don't convert an NPN transistor to PNP. But I understand you must mean that you want to use inverting or non-inverting logic to control a signal with through a transistor.

    Can you describe your actual problem in more detail? Do you have a microcontroller or other digital device as the source of the signal? What voltage does it use? What is being controlled by the transistor on the output? What voltage is the output, and how much current does it draw?
     
  6. timk

    Thread Starter New Member

    Oct 15, 2012
    3
    0
    actually i am working with plcs and proximity switches. the inputs on the plc all share the same commonwire. what i would like to be able to do is use both pnp and npn prox'sat the same time
     
  7. colinb

    Active Member

    Jun 15, 2011
    351
    35
    Perhaps your proximity switches contain an internal NPN or PNP transistor used for signal output. Then your NPN probably acts as a pull-down, and you need a pull-up resistor to the PIC's supply voltage (VCC). The PNP would act as a pull-up in the sensor, and you'd need an external pull-down resistor to ground. But with the PNP, your sensor would need to be using a compatible supply voltage to the PIC. The NPN would pull the signal down to digital LOW when activated, while PNP would pull up to digital HIGH when activated -- just handle this in the PIC firmware.
     
  8. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    The situation as above that I assumed and shows as following:

    PLC original NPN type:
    Program set to Hi, Output Low (current sink)
    Program set to Lo, Output High impedance(I guess).

    Adding pull up Resistor on the output:
    Program set to Hi, Output Low (current sink)
    Program set to Lo, Output High. (Resistor pull up)

    So, in the original that you can't get a Hi output, but when you adding a pull up resistor on the output, and then you can get a Hi output.

    PLC original PNP type:
    Program set to Hi, Output HI (Current output)
    Program set to Lo, Output High impedance(I guess).

    Adding pull down Resistor on the output:
    Program set to Hi, Output HI (Current output)
    Program set to Lo, Output Low (Resistor Pull Down)

    So, in the original that you can't get a Low output, but when you adding a pull down resistor on the output, and then you can get a Low output.

    The situation as above, it's only using in the control signal is better, and there is no problem.

    Your situation probably like this, or oppsite:

    NPN Type :
    Metal close to → proximity switch → Output Low (Current Sink)
    Metal away from → proximity switch → Output High impedance(I guess).

    Add a pull up Resistor on Output:
    Metal close to → proximity switch → Output Low (Current Sink)
    Metal away from → proximity switch → Output High (Resistor pull up)

    So, in the original that you can't get a Hi output, but when you adding a pull up resistor on the output, and then you can get a Hi output.

    PNP Type :
    Metal close to → proximity switch → Output High (Current output)
    Metal away from → proximity switch → Output High impedance(I guess).

    Adding a pull down Resistor on Output:
    Metal close to → proximity switch → Output High (Current output)
    Metal away from → proximity switch → Output Low (resistor pull down)

    So, in the original that you can't get a Low output, but when you adding a pull down resistor on the output, and then you can get a Low output.

    There is a big difference between the linked page and your proximity switch, that is the linked page used program to change the input 1/0 value, and the Output will changed follow the input value, it's changeable, but you use the proximity switch, when the metal close to proximity switch and away from proximity switch, the output situation is fixed, you can't change it, unless you want to use it like that.

    So, when you use a NPN type, if you want to change the output state, then you better add a stage of PNP transistor, and when you use a PNP type, if you want to change the output state, then you better add a stage of NPN transistor.
     
Loading...