I bought a small optical monitor sensor. It basically detects optical pulses from an electrical meter and then triggers an ISR on a datalogger, which is a concrete product for this purpose. Because of this dependency, it has its own communication system via an RJ-45.

However, I'm trying to use this optical sensor device alone connected to my own RPi3B. The idea is to connect the device's cable to the rpi ethernet port and somehow read every RJ-45 individual pin, one by one. I'm not an expert on this kind of things, but the idea seems to be applicable. However, I haven't found any way to do this.

I'd like to know if you can read RJ-45 individual pins similarly to when you read from RPI's GPIO pins.

Edit: As from what I guess, the sensor has basically some sort of switch that closes every time it detects an optical flash. In fact, there are only two visible little cables at the RJ-45 terminal. In the datalogger that they distribute, I guess that they simply grab two of the pins manually and bridge them into two arduino pins, one for outputting voltage and one for listening for an interruption. Easy. But in my case I want to take advantage of the existing RJ-45 terminal (I could simply cut the cable and take only the intern cables that I need).

  • I'm not sure anyone can answer your question without more detail than you've supplied. In general, as a comms protocol, "Ethernet" cannot be treated like you'd treat a GPIO pin. However, it's possible that your sensor simply uses an Ethernet cable to signal discrete I/O from the sensor; i.e. it doesn't use the Ethernet protocol, it simply uses an Ethernet cable to transfer signals from the sensor to the data logger. Please clarify this point.
    – Seamus
    Commented Oct 30, 2018 at 12:08
  • 1
    Please clarify your findings on the nature of that cable and the respective jack. If it is not ethernet, the question (and its title) should not suggest it does. This is confusing and misleading to any future readers. If possible provide make and model of the sensor and a datasheet. Thanks.
    – Ghanima
    Commented Nov 2, 2018 at 10:26

3 Answers 3


The Ethernet connector can only be used for networking. If your sensor/interface board does not support networking then it's not compatible.

Maybe your sensor/interface board uses some sort of communication over the cable that is compatible with the Pi (e.g. serial) using a direct connection to some GPIO pins. You will have to check the datasheet to see if that's possible.


As with pretty much any connector, search for "[connector name] breakout board", and you'll see tons of adapters from that connector to some sort of GPIO breakout. For example, here's an RJ-45 breakout board:

enter image description here


If the sensor only has two terminals of its rj45 port wired in, you can probably make a custom cable. Cut the end off of an ethernet cable and wire up the appropriate leads to gpio pins. Not as slick as you wanted, but worth a shot. IDK if the signaling voltage will be compatible, but there's tons of 3.3v and 5v logic out there, I reckon it's worth a try.

Your Answer

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