0

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 Oct 30 '18 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 Nov 2 '18 at 10:26
1

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.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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