NPN to PNP and vice versa

Discussion in 'General Electronics Chat' started by viju, Jun 18, 2009.

  1. viju

    Thread Starter Senior Member

    Sep 28, 2008
    120
    0
    Could the members help me to convert NPN signal to PNP abd vice versa.

    In some PLC configuration I use Positive logic and in some I use negative logic.I find it difficult when replacing proximity sensors of different configuration.Is there some methods to convert the signal from NPN to PNP vice versa.Operating Voltage is 24Volts.
     
  2. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    It doesn't really work that way. NPN and PNP are BJT transistor types, but both will handle signals pretty much the same. Stick with positive logic, then define what you need. You will find you can probably use either type for your project, they have lots of configurations.

    The main place where positive logic and negitive logic are used are for plus and minus power supplies.
     
  3. viju

    Thread Starter Senior Member

    Sep 28, 2008
    120
    0
    I was not clear on explaining my question. Let me explain clearly( I hope).

    If I get "0" as output I need to convert it as "1" and reverse as "1" to "0".

    These type of signals I get from proximity sensors. Power supply would be 24V DC. For NPN type sensor "0" would be the output is sensor is activated and 24 Volts is the output if PNP type proximity sensor is activated.

    My requirement is to convert "0" Volts to "24" Volts and Vice versa.

    Guide me in building the conversion circuit.
     
  4. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    How much load current do you expect to have on each type?
     
  5. viju

    Thread Starter Senior Member

    Sep 28, 2008
    120
    0
    It's going to be only for PLC input.Less than 50mA.
     
  6. gryskop

    Member

    Mar 1, 2008
    26
    0
    In my PLC experience, Proximaty switches are INPUT devices, not Output devices.

    Why don't you simply use an inverter on the I/O port signal?

    i.e. For input Signal from transmitter(switch) -> in PLC signal conditioning module -> SCADA display module -> Inverter -> Logic

    For output, PLC Logic -> Inverter -> SCADA display module -> I/O module -> Field I/O
     
  7. viju

    Thread Starter Senior Member

    Sep 28, 2008
    120
    0
    Let me explain in detail.

    PLC input section will have a common which will be either 24 votls (+ve) or 0(-ve) Volts.If the common is connected to 24 Volts positive then my all inputs would be "0"(-ve) volts only. ( i.e. inputs will be activated only if it gets "0" volts through switches,sensor,or any other input means.

    If I have a sensor which gives me 24 Volts(+ve) output my PLC won't respond to that input as it has same potential as the common. Here I need it convert to "0" volts.

    Hope I have explained.
     
  8. bertus

    Administrator

    Apr 5, 2008
    15,649
    2,348
    Hello,

    Do you want to make an inverter with transistors?
    You could try this schematic.

    [​IMG]

    Greetings,
    Bertus
     
    Last edited: Jun 21, 2009
  9. dontium

    New Member

    Feb 12, 2008
    6
    0
    bertus said that very reason. But in some places is not very accurate.

    the MOSFET BS170 datasheet is here,http://www.fairchildsemi.com/ds/BS/BS170.pdf
    if bs170 Vgs=3V, it ON. <3V is OFF, Therefore, one should consider the device voltage of level "1"

    The second point is too small to drain resistance at 24V source
     
  10. bertus

    Administrator

    Apr 5, 2008
    15,649
    2,348
    Hello Dontuim,

    The 1K should be smaller to have enough drain (470 Ohms ?).
    The resistor between gate and ground should be smaller to correct the gate voltage( 1K ?).

    Greetings,
    Bertus
     
  11. dontium

    New Member

    Feb 12, 2008
    6
    0
    1 , if source is 5V, the gate should not be use the divider resister, Or the second resistance value with a larger(>5 times)
    2, about drain resistor. If uses is signal trans. level , Should be >10K

    (1、不用分压电阻,因为要让管子可靠导通,驱动部分需要大于5V
    2、漏极负载电阻应该取值较大为好,这样可以减小不必要的功率消耗)
     
  12. viju

    Thread Starter Senior Member

    Sep 28, 2008
    120
    0
    Thankyou very much Bertus.

    This circuit works for positive ( 24 Volts) input.I'll try this.Thanks a lot.

    How can I convert if my sensor output is "0" Volts? Pls guide me.

    Hello Dontium:

    My signal level is 24 Volts.
     
  13. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    What is the supply voltage of your PLC?
     
  14. viju

    Thread Starter Senior Member

    Sep 28, 2008
    120
    0
    Supply Voltage for PLC is 24V DC. All my inputs and outputs are also 24V DC.
     
  15. viju

    Thread Starter Senior Member

    Sep 28, 2008
    120
    0
    Can somebody help me in building the circuit?
     
  16. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I'm not sure what you want, but here is my best guess.
     
  17. viju

    Thread Starter Senior Member

    Sep 28, 2008
    120
    0
    Yes. Your guess is right Ron. Will I get 24 Volts at sourcing output and 0 Volts a sinking output?

    If so, I got it.

    Anyways thankyou very much.
     
  18. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Yes you will.
     
  19. viju

    Thread Starter Senior Member

    Sep 28, 2008
    120
    0
    I thankyou very much RON. It worked very well even at high frequency.
     
  20. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Excellent!
     
Loading...