We run anywhere from 4-10 sensors from Banner Engineering (Photoelectric and RFID). They use 12V power and have a PNP output. Each sensor is 4 wires (12V, GND, NO, NC). Our goal is that we can run the M12-A Euro Style QD directly from the sensors, into some sort of PCB that sits on top of a RoboRIO. We want to use the M12 connectors because they are so reliable and a solid connection.

My thinking for the PCB is that we supply it with 12V power and ground, then that gets distributed to the 10x M12 connectors on the board. Here is the female PCB board connector I am looking at and here is the cable I am using with it.

In terms of signals, I need some way to reading the 12V signals and transmitting that the RoboRIO - I can use SPI, RS232, or I2C. I would like if I could read in the NO and NC for all the sensors, and then pick which value to use in code (I want to choose NC or NO depending on the situation and what should happen if the sensor gets disconnected).

What would be the best way to read in and transmit these signals? I was thinking about using a Teensy, but then I would need voltage dividers for all 20 inputs (which might end up being the solution).

I don't have any experience designing PCBs, but I think this will be a good way to get into it.

  • 1
    \$\begingroup\$ This is a Q and A site - ask a question. \$\endgroup\$
    – Andy aka
    Feb 6, 2021 at 11:08
  • \$\begingroup\$ Ok, I phrased it more as a question \$\endgroup\$
    – LiamSnow
    Feb 6, 2021 at 18:18
  • \$\begingroup\$ If you're regularly using so many sensors, you may want to look at communications bus methods(I2C is the one I hear most about) or even serialization(since your inputs are 1 or 0. One simple method to detect NC/NO would be to use a connector with an extra pin and place a high or mid value resistor between it and one of the other pins(G preferably). You can use it to detect connection and differentiate between NC and NO \$\endgroup\$
    – K H
    Feb 7, 2021 at 6:41

1 Answer 1


Like KH talked about I ended up going with I2C (MCP23017-E/SP to be specific). It works great and allows me to have 8 sensors (with 2 signals per sensor) running off the the board. Here is the final PCB (J1-J3 have 2 pins per wire btw):

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.