Appendix O RS 232 Greater Than 100 Feet - jgyates/genmon GitHub Wiki
Using Genmon with RS-232 with Distances greater than 100 feet.
Various factors can play a role in the placement of your raspberry pi. In many cases it is best to pair the pi with an enclosure and mount the enclosure in the generator enclosure. I some instances this is not the ideal configuration. In these cases it is beneficial to house the raspberry pi at a distance from the generator that is greater than the RS-232 standard will support. There are a few options to support this configuration.
Serial over TCP via Wifi
Using a serial to TCP converter with a wifi connection is a viable solution. This method is described in detail on this page.
RS-422
This approach uses RS-232 to RS-422 converters. Below is a diagram.
The equipment used follows.
TTL to RS-232 Converter
Anmbest 2PCS MAX3232 3.3V to 5V DB9 Male RS232 Serial Prot to TTL Converter Module Root Connector for Arduino Raspberry Pi and Micro-controllers *** NOTE *** As of January, 2022 these came with the Dupont connectors needed for connecting it to the Raspberry Pi GPIO pins.
RS-232 to RS-442 Converter
DTECH RS232 to RS485 / RS422 Serial Communication Data Converter Adapter Mini-Size
DB-9 to RS-232 Adapter (use one of the following)
- Fielect D-sub DB9 Breakout Board Connector 9 Pin 2 Row Male RS232 Serial Port Solderless Terminal Block Adapter with Positioning Nuts 1PCS
- Futheda 2PCS D-sub DB9 Interface Breakout Board Connector 9 Pin 2 Row Male RS-232 Serial Port Solderless Terminal Block Adapter
Notes
- RS-422 communication protocol is full duplex so the conversion to RS232 is straightforward
- The length of cable used was approximately 120 feet. The cable runs in a separate conduit from the main electrical drop to the house circuit breaker box. The cable does run in a conduit with the coaxial cable supplying internet/phone/TV and, once in the basement, next to normal electrical wiring. Did a successful loopback test at the generator end, showing that a 240 foot wire run worked (in this instance) without supplemental power.
- If there is a signal problem due to the length of the cable, power (+9 VDC?) can be supplied to one end of the Cat 5e cable between VCC and GND. An extra wire will need to be connected between the VCC terminals on the RS-232 to RS-422 converters.