Alarm sensor shorting to GND when active

Hello,

I have a pressure governor sensor which is shorting to ground when active. So from programming view when the digital input goes to 0 the alarm is active.

Thought to do this with and resistive divider where the second resistor gets shorted to ground while the sensor is active. The first resistor is limiting the current.

Teensy 3.5 and the sensor is just switching, so no specific voltage needed for the sensor.

Is this the right way and what shall I take as resistor values?

Is this an NPN open collector output? If so you just enable internal pullups and connect directly.

If the output can generate a voltage itself, add a diode to prevent backfeeding the Arduino pin.

MarkT: Is this an NPN open collector output? If so you just enable internal pullups and connect directly.

If the output can generate a voltage itself, add a diode to prevent backfeeding the Arduino pin.

I do not think it is an NPN. I guess it is just a switch which gets triggert. The switch is shorted on one side to ground.

If you post a data sheet for the sensor we may be able to better help.

If it's just a switch to GND, why not connect it like you would with a switch? |405x500 And simply enable the internal pull up to make it read HIGH when not active.

In case it is connected to anything else, put a diode between the switch and the input pin, anode to the input pin.

Hello,

yes that is complete right! just to switch to ground. How could i forget this simple thing.. :-)

thx Case closed!