Another possibility is that when the Pi was powered down it did something to the ground reference that it shares with the generator that the generator didn't like. That could cause the generator's Transmit Data line driver to latch up (or down) requiring a power cycle to reset. I expect that the "port lockup" issue that I experienced was the result of the Uxcell RS23-to-TTL putting an out of bounds load on it's Receive Data line (the Transmit Data line from the generator's perspective) when the Uxcell lost power. Once that happened, Genmon would show 100% timeout errors until the generator's controller was restarted. The only problem occurred when the Pi was shut down. In my case, prior to installation of the isolator Genmon typically reported zero communication errors even after weeks of continuous operation. However, I doubt that cable length/capacitance is an issue here since excess capacitance would typically result in a high error rate. The manufacturer doesn't provide capacitance per foot information since that isn't pertinent to its intended purpose (led lighting). It has a 14 gauge ground wire plus two 18 gauge wires which I am using for the transmit and receive data lines. I chose it instead of Cat5/6 cable because it is outdoor rated and sunlight resistant (I live in Florida) and it is stranded which makes it better able to handle vibration from the generator. I am using a cable that is marketed for LED lights: Other brands/models may work similarly, but be aware that some "port powered" opto-isolators take their power from RS232 lines other than the Transmit/Receive wires and will require additional wiring or an external power supply in a typical Genmon installation. I purchased mine from Amazon for $17.98: The specific device that I installed is a Dtech DT9011 ( ). It should be helpful for problems associated with different ground potentials between Pi and the generator. If you have a similar installation or are experiencing other communications issues, this may work for you. The opto-isolator is powered from the data lines, so it needs only a 3-wire RS232 connection (transmit data, receive data and ground) and it does not require an external power supply. The opto-isolator that I installed has a female DB9 connector on one end and a male DB9 on the other, so installation was a simple matter of inserting the opto-isolater into the RS232 line at the Uxcell level converter. It isolates the transmit, receive and ground pins on the generator side from those on the Pi's side, using led's and photo-electric cells to transmit the data between the two sides. I solved the problem by adding an opto-isolator at the Pi end of the the RS232 line. To get communications working again, I had to power up the Pi and then restart the generator's controller. However, I found that anytime I needed to power down the Pi it caused the generator's controller to disable its RS232 port. This has worked great with virtually no CRC or timeout errors. I have a Uxcell a14041500ux12 RS232-to-TTL converter installed at the Pi. The Raspberry Pi for my Genmon installation is located in my garage and is connected to the generator with an RS232 cable about 75 feet long.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |