1

I'm designing an industrial solution for monitoring and controlling some large raw-material processing machines. What I want to have is an RPi Pico at each piece of equipment that can standalone monitor temperatures and current draw of some motors, and then adjust feed rates and cooling accordingly. This part is simple enough for a microcontroller, which will also have a little LCD screen and some buttons for configuring it on the fly.

The hard part I am facing is trying to figure out how to communicate status to a central RPi 3. The environment is going to be very noisy with electrical interference from 20+ 2-phase and 3-phase electric motors, so WiFi connections are spotty at best, and there is a LOT of heavy steel everywhere. So I want to use protected and shielded Cat5e cable to directly wire up all of the nodes to the central Pi, but the distance is expected to be up to 30 meters for the farthest device.

Unfortunately the Pico doesn't have Ethernet built in, but I was thinking of trying to perform a serial bus connection between them with the Picos as slaves and the Pi3 as the master. I've seen some ethernet "shields" but they use too many pins as I need several for my sensors, screens, and controls. From what I see online is that most of the serial types the Pi support won't work over long distance (SPI, I2C, UART, etc.).

I'm just wondering if anyone knows how to send a reliable serial connection down a long Cat5e cable. Some people online talk about RS485 or CAN, but the Pi doesn't support those, and I have no experience with them.

  • Distance: Up to 30 meters (farthest Pico device, most are between 10m-20m)
  • Picos: Up to 10
  • Power: 12VDC and Ground (I plan to have a 5V regulator at each pico)

My current thought is to use RJ45 pins 1-2 and 7-8 as 12VDC/GND pairs, then the central 4-5 pins for serial. Originally was looking at trying to send I2C down it but feeling discouraged about its capabilities even though Cat5e has low capacitance and impedance with the twisted pairs.

Note: I need to isolate the ground because if a motor blows, it can cause huge localised voltage spikes that can fry electronics. So I want to send power and ground over the cable. Using 12V to reduce the amperage needed to power everything.

3
  • You are asking for a lesson in electrical engineering in a noisy environment. This is not Pi specific. A few hints; Cat5e cables work because the electronics is galvanically isolated. ANY direct connection will have problems. I often use 20mA current loop.
    – Milliways
    Oct 27, 2022 at 23:36
  • So I'm not exactly looking for a lesson, I'm just asking to see if there is some known way for specifically RPi Pico's to communicate serially over long distance. I know the capacitance and impedance of a wire is a factor, and that noise can corrupt the data. The shielded Cat5e should prevent the noise well enough, so I just need a way to send serial data through that length of twisted-pair wire. I think I might have found a good solution with an inline Adafruit I2C extender though. Oct 29, 2022 at 0:10
  • As you never actually specified WHAT you wanted to transfer or what speed no one can give a specific answer. I²C is designed to transfer data between IC on a board - it is a poor choice for anything else. You were given 2 suggestions but any protocol would work. The challenge is layout which in my experience is the most important factor. Capacitance and "impedance" are not an issue for a properly engineered transmission line.
    – Milliways
    Oct 29, 2022 at 0:26

1 Answer 1

2

Reliable serial comms via UART in harsh industrial environments are implemented on a fairly regular basis. The technology is not new; in fact, it has been around for a while, and there are numerous App Notes, tutorials, how-tos available online for the price of an Internet search.

The key to making this work is in selecting a robust line driver to support the UART. RS-485 uses "differential signaling", is readily available as chip and module-level solutions. RS-485 supports "multi-drop" topologies, and may be operated in full-duplex mode with 4 wires, or half-duplex mode with only two wires.

You have some homework to do, but you may rest assured that you're not "pushing the envelope of modern technology" building an RS-485-based system. Microcontroller-based implementations are quite common. Here are two references that may be a reasonable starting point: 1, 2

In summary then, use the Pico's built-in UART with RS-485 modules; CAT 5e will work fine with RS-485. Once your project is underway, you may wish to direct specific RS-485 questions to the EE SE.

1
  • Yeah I'm not surprised by the suggestion of RS-485, it seems to be the goto that I see online. It's just unfortunate that I would have to also purchase additional hardware for each node on the network. I did find an active I2C extender that boasts reliable full-speed connections up to 20m. Since it only needs one device on the network, I think if I slow the data rate and place it at a relative halfway point, it might work well enough communicating at ~10 meters. adafruit.com/product/4756 Oct 29, 2022 at 0:07

Your Answer

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

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