Neuron 12V digital input
Martijn Hemeryck last edited by
I would like to connect some digital sensors that are powered on 12VDC to an e.g. M303 Neuron (PIR sensors, actually). What would be the proper way to connect these?
I know that for regular push buttons, I need to connect them to the internal power source connection that's available at the DI, but as this is 24VDC, this is probably not possible for my setup. The specs mention that logic level interpretation are ok though (e.g. min 5V for logical 1).
Similar question for digital out btw (although I believe these are open collector outputs, so I should be able to choose my own voltage levels here, right?)
it depends what type of output your sensor has. Basically there are PNP (sourcing) and NPN (sinking) outputs.
- PNP (sourcing) typically outputs supply voltage of the sensor when the sensor is in ON state otherwise it is unconnected (high impedance).
- NPN (sinking) shorts the output against GND when the sensor is ON, otherwise it is unconnected (high impedance).
For example digital outputs on our units are NPN.
If your sensor has PNP output and its supply voltage doesn't exceed 24V, you can typically connect it directly to the UniPi's digital input.
If your sensor has NPN output, that's where it gets a little bit tricky. Digital inputs can only distinguish the ON state (voltage 5-24V). Any other state - be that 0V, short to the ground or high impedance (nothing connected) will result in OFF state. In order to use NPN sensor, you need to define the OFF state by connecting the NPN output to supply voltage via pull-up resistor. And there are two ways how to do it, depending on the supply voltage of the sensor
The pull up resistor will bring the OUT to the level of the supply voltage. In the first example it is 24V, in the second example it is 12V. The GND of the UniPi and the GND of the second power supply may or may not be connected, depending on the level of isolation you need between UniPi and the sensor. But that's another story. But the DIGND has to be connected in both cases.