Author Topic: RS232 signal not getting past isolator? [WAS SOLVED]  (Read 745 times)

0 Members and 1 Guest are viewing this topic.

Offline jfharperTopic starter

  • Newbie
  • Posts: 8
  • Country: us
RS232 signal not getting past isolator? [WAS SOLVED]
« on: June 08, 2024, 01:32:49 pm »
So I'm trying to get a signal thru an M5 Atom Lite with an RS232 base in order to monitor some solar inverters and it was recommended to run an RS232 isolator between the sending and receiving ends of the cable to protect the inverter at the rj45 port.  So it goes, M5 Atom with RS232 base to a male DB9, RS232 isolator, then RS232 to RJ45 cable.  Signal is sent over Wifi to the Atom Lite, which is supposed to query the inverter and the inverter is suppose to respond back with data like temp, pv power, load, etc.

My problem is, when I send the signal without the isolator I see it on the scope, when I add in the isolator, no signal.  Here is how I tested:

Using a RS232 breakout male connector wired just like the attached image where Gnd to breakout 5, Tx to breakout 2, Rx to breakout 3.

According to the RS232 pinout for a male connector, Pin 2 is Rx and Pin 3 is Tx. So Tx on the RS232 base becomes Rx at the male connector, and Rx on the RS232 base becomes Tx.  This picture is from someone helping me who wrote the code, but I have mine setup the same way...he said the Rx should become the Tx at the DB9 and Tx become the Rx...I've tried just for testing to reverse the wires (Rx to Rx) (Tx to Tx) and it still doesn't work at the inverter with the isolator...I haven't tried it without the isolator as I don't want to risk damaging the inverter which I'm not sure actually is a risk.

The scope is connected as follows (we included RTS and DTR to see if these needed voltage for some reason to make it work):
CH1 = Male connector Pin 3 (Tx), CH2 = Pin 2 (Rx), CH3 = Pin 7 (RTS), CH4 = Pin 4 (DTR).

So when I run this command to create a docker container (I'm testing with root to avoid any permission issues)...IP below is of the Atom:
docker run --privileged=true --user root -t gonzalomono/wombatt monitor-inverters 192.168.1.166:8232,Q1 --device-type tcp

...the Terminal Window reads this (run from an OrangePi):
2024/06/08 11:35:22.221315 Opening 192.168.1.166:8232...

...I get this at the Atom Tasmota log (confirming the static IP address of the OrangePi):
12:35:21.326 TCP: Got connection from 192.168.1.17 (We'll disregard the inaccuracy of the timestamps for now)

...when that happens...the scope reads the attached image that shows a signal.
then after 5 seconds the Terminal Window reads this:
2024/06/08 11:35:27.271689 error running Q1 on 192.168.1.166:8232: timed out sending Q1

and it cycles...but I press ctl-c to quit.

Then when I try with the same setup but with an added in RS232 isolator, I get image attachment which shows no signal.  I've even tried a different isolator, same thing.  I'm a little stumped on where to look for the problem.  Can someone please help?  Thanks.
« Last Edit: July 09, 2024, 11:37:30 am by jfharper »
 

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: lt
Re: RS232 signal not getting past isolator?
« Reply #1 on: June 08, 2024, 01:46:25 pm »
Do you apply power to your isolator? What is the model of isolator?
 
The following users thanked this post: jfharper

Offline jfharperTopic starter

  • Newbie
  • Posts: 8
  • Country: us
Re: RS232 signal not getting past isolator?
« Reply #2 on: June 08, 2024, 01:55:21 pm »
Didn't think I needed to...I have mine setup the same as the guy helping me and his works...but here is the link to the isolator:
https://www.amazon.com/dp/B081566NP4?ref_=cm_sw_r_apan_dp_19RSMYV4R0Z25E0H9RWM&language=en-US
 

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: lt
Re: RS232 signal not getting past isolator?
« Reply #3 on: June 08, 2024, 02:02:04 pm »
I asked, because isolator is an active device, so it must be powered. Some are powered from rs232 port, some have external power or both. If isolator is supposed to get power from rs232 port, then it takes that power from RTS or DTR pin (or both) AFAIK. Are these connected in your setup?
 
The following users thanked this post: jfharper

Offline dietert1

  • Super Contributor
  • ***
  • Posts: 2262
  • Country: br
    • CADT Homepage
Re: RS232 signal not getting past isolator?
« Reply #4 on: June 08, 2024, 02:05:22 pm »
Some of those isolators take their supply from the handshake signals. If those aren't connected that type of isolator won't work.
By the way: Sometimes an isolator isn't necessary, as the RS232 signals are high enough to use antiparallel diodes for ground loop decoupling.

Regards, Dieter
« Last Edit: June 08, 2024, 02:37:26 pm by dietert1 »
 
The following users thanked this post: jfharper

Offline jfharperTopic starter

  • Newbie
  • Posts: 8
  • Country: us
Re: RS232 signal not getting past isolator?
« Reply #5 on: June 08, 2024, 02:12:37 pm »
We just figured it out...something I thought to ask about but forgot, the baudrate was wrong, once set correctly in Tasmota log and everything hooked to the inverter, it works:
2024/06/08 14:07:41.189768 Opening 192.168.1.166:8232...
2024/06/08 14:07:41.809058 [00001 22531 01 00 00 022 024 029 024 02 00 000 0030 0000 0000 60.00 11 0 060 030 120 030 55.20 000 120 0 0000]
192.168.1.166:8232 -> Q1
=======================
Time until the end of absorb charging: 1s
Time until the end of float charging: 22531s
SCC flags: Powered and communicating
SCC PWM temperature: 22°C
Inverter temperature: 24°C
Battery temperature: 29°C
Transformer temperature: 24°C
GPIO13: 2
Fan lock status: not locked
Fan PWM speed: 30%
SCC charge power: 0W
Parallel warning: 0
Sync frequency: 60Hz
Inverter charger status: bulk stage

so the isolator must get power from the handshake as mentioned...I'm just happy now I can move forward and monitor these inverters...plus this was a great example for me to learn more how to use my scope...thanks for the help.
 

Offline jfharperTopic starter

  • Newbie
  • Posts: 8
  • Country: us
Re: RS232 signal not getting past isolator?
« Reply #6 on: June 09, 2024, 05:37:16 pm »
Sometimes an isolator isn't necessary, as the RS232 signals are high enough to use antiparallel diodes for ground loop decoupling.
Is there a way to test this to see if the isolator is necessary?  Or would I have to open the solar inverter and locate the diodes you mentioned?
 

Offline dietert1

  • Super Contributor
  • ***
  • Posts: 2262
  • Country: br
    • CADT Homepage
Re: RS232 signal not getting past isolator? [SOLVED]
« Reply #7 on: June 09, 2024, 07:20:39 pm »
The RS232 ground potential should be either isolated inside the inverter or connected to protective Ground (99% likely). You can test that with a multimeter. No need to open the inverter!
The diodes i mentioned can be used in an environment where ground loops disturb low level analog signals. Your application should be very easy, as you just want to receive the RS232 data.
When we got our two inverters in 2008 i bought a RS232 to ethernet adapter box with two RS232 ports and connected that with cables in order to monitor the inverters from our office. An RS232 isolator wasn't necessary.

Regards, Dieter
« Last Edit: June 09, 2024, 07:36:16 pm by dietert1 »
 
The following users thanked this post: jfharper

Offline m k

  • Super Contributor
  • ***
  • Posts: 2267
  • Country: fi
Re: RS232 signal not getting past isolator? [SOLVED]
« Reply #8 on: June 10, 2024, 11:03:26 am »
One other possibility is that signal levels are too low.
That happens when one end doesn't have a level shifter and other end requires it.

That used to be a norm, more or less, with transparent color USB adapters with only one black block inside.
Advance-Aneng-Appa-AVO-Beckman-Danbridge-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-REO-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Topward-Triplett-Tritron-YFE
(plus lesser brands from the work shop of the world)
 

Offline jfharperTopic starter

  • Newbie
  • Posts: 8
  • Country: us
Re: RS232 signal not getting past isolator? [SOLVED]
« Reply #9 on: July 09, 2024, 11:36:56 am »
The RS232 ground potential should be either isolated inside the inverter or connected to protective Ground (99% likely). You can test that with a multimeter.
I've been getting signal drop for hours throughout the warmest hours of the day using these isolators, then when the day cools down, the signal resumes and is consistent throughout the night.  I'm assuming it is the isolator because I can still remotely log into the Atom lite and view the Tasmota console when the signal times out.  I've tried placing a fan to blow on the isolator, but it did not keep the signal from dropping out.  I cannot cool the room anymore right now without doing some major building which I cannot do at the moment.

I'd like to either use a different isolator like this DTECH one: https://a.co/d/00Ox2Ala or remove the isolator altogether, but I want to make sure I do not need the isolator first so it is safe for the inverter.  I have second DTECH isolator connected to a Pi running Solar Assistant in the same location as the other isolators giving me trouble and the DTECH does not drop the signal with temperature heights.

The first reviewer of the DTECH mentioned powering both sides of this port powered isolator.  Someone mentioned at diysolarforum that this inverter powers the DCE side of this isolator (Male 9-pin) at the DSR pin (pin 6).  I confirmed this continuity with the cable using my DMM.  The other side (DTE side (Female 9-pin connector)) is connected to an Atom lite with RS232 base and I have only GND, RX and TX wires connected as shown in the first picture I included in my first post.  The reviewer of the isolator stated I need to power the DTR pin (pin 4) with 3-9 volts.  Documentation on the Atom lite pinout states I should be able to come off the HY2.0 interface on pin labeled for 5v (the isolator review said power should be common to source equipment, I assume this 5v is common) and wire this to pin 4 of isolator.  Please let me know if I have any of this incorrect?  This may help me monitor inverter temperatures and other data I would like to dial in for my solar design.

OR I can test for ground loops as quoted and remove the isolator.  I believe I run a wire from my grounding rod to a lead on my DMM and the other lead goes to a ground point on the inverter, perhaps the gnd wire on the cable from the inverter that would plug into the isolator and check for less than 25 Ohms.  Is this correct?  Beyond that, I'm not sure how to confirm that I do not need an isolator.

Unless I'm supposed to check from continuity with the inverter gnd to see if it is isolated...which I would go dmm lead to cable gnd and then other lead to wall outlet gnd?  Thank you for any help you can lend.
 

Online guenthert

  • Frequent Contributor
  • **
  • Posts: 727
  • Country: de
Re: RS232 signal not getting past isolator? [SOLVED]
« Reply #10 on: July 09, 2024, 11:55:34 am »
[..]
When we got our two inverters in 2008 i bought a RS232 to ethernet adapter box with two RS232 ports and connected that with cables in order to monitor the inverters from our office. An RS232 isolator wasn't necessary.

Regards, Dieter

Ethernet provides galvanic separation using transformers ("magnetics"), so yeah, that separated the office's ground just fine.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf