Many times users have trouble with interfacing sensor outputs most commonly known as:

  • NPN / PNP logic
  • Open Collector, Open Drain
  • Low side / High side

Explained

Actually all of the above can be generalized to the last pair: Low side / High side switch.


NPN / PNP logic



Transistor types.


NPN type is most commonly used as Low side switch, PNP type is used as High side switch.


Open Collector, open drain

as seen above NPN transistor type used as low side switch is used as Digital Output (D_Out) and corresponding transistor terminal is called C - Collector hence the name Open Collector. 

"Open" in term indicates that additional pull up or load resistor is required for the operation.

Open Drain output is in general common to the FET transistor logic outputs. 


NMOS / PMOS


Transistor types. NMOS on the left side, PMOS type on the right side.


NMOS type is most commonly used as low side switch. Digital Output (D_Out) and corresponding terminal is called D - Drain hence the name Open Drain. 

"Open" in term indicates that additional pull up or load resistor is required for the operation.

PMOS type is commonly used as High side switch.





NOTE: both types NPN/PNP or NMOS/PMOS have Collector / Drain acting as Digital outputs but can be used as Low or High side switches. This is somehow confusing, most commonly Open Collector, Open Drain indicates low side switch.


Typical connection to Counter inputs


Simplified schematic of digital inputs

This input simplified schematics commonly used in SIRIUS, DEWE43 and other designs.


Simple low side switch connection 

No additional components required!


Digital inputs & NPN (Low side) Discrete output connection



NOTE

NPN Discrete output can be connected directly to Digital input of the SIRIUS Counter input. 

No additional Load resistor is required.


Operation:

  • When switch is open, internal resistor (100k) will pull up input voltage to 3.3Vdd and buffer output will generate logic HIGH.

  • When switch is closed, buffer input is pulled to GND, buffer output will generate logic LOW. Internal resistor (100k) will limit the current through the switch and prevent short on 3.3Vdd power supply to GND.


Digital inputs & PNP (High side) Discrete output connection



NOTE

PNP Discrete output can be connected to Digital input of the SIRIUS Counter input with additional diode and resistor elements.

Proposed diode type is 1N4148 and 10k 0.25W resistor for 24V example. 


Operation:

  • When switch is open, a small current will flow through 100k + diode + 10k resistor, input voltage of the buffer will be approx. Uin=0.76V, well below logic low limit  and buffer output will generate logic LOW.

  • When switch is closed, current will flow from 24V PS through 10k Load resistor only. Diode will block 24V from Buffer input. Internal resistor (100k) will pull up buffer input voltage to 3.3Vdd and buffer output will generate logic HIGH.



Jernej Kovačič, 03.11.2020