Use NPN NO Proximity Sensor to activate relay

Thread Starter


Joined Nov 23, 2021
Hi All,

It's been a long time since the high school electronics classes doing circuit design.

I have a CNC router and need to connect up 2 Proximity Sensors to the one GPIO input. I have tried connecting them in series, but I am only getting a 12V trigger signal with 24V supply. So I thought I'd connect each of them up to a small 24V relay and wire them in series.

All well and good, except when I connect the sensor signal output to the relay I'm only getting 1.6v, instead of the 24V I see when it's not connected.

I have two types of NPN NO sensors
LJ8A3-2-Z/BX (this is the preferred sensor I'd like to use)

I have two types of Relay. I'd prefer to go with the solid state
KG3RD50D2-12 (I tested this on using a 12V regulator on the 24V power for the proximity sensors, but I couldn't get these to work, so I reverted back to the mechanical relays)

Attached is a rough hand drawn sketch of what I have hooked up.

Any ideas what I am missing, or whether what I am trying to achieve is possible?



Joined Dec 2, 2017

Ok I see the problem...your relays must connect to positive not ground, as the NPN sensors are switching low side.

Last edited:


Joined Jan 8, 2017
As your sensors are NPN output the relay coils should be connected between +24 volts (Brown wire.) and the the sensor output. (Black wire.). Either of the two sensor types and either the solid state or mecahnical relays should work. Depending on the GPIO input specification it may be possible to just use opto isolators or a few transistors.