Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: AustinT on October 18, 2017, 12:27:15 AM

Title: Brx serial out problem
Post by: AustinT on October 18, 2017, 12:27:15 AM
Hi
I am using the brx to talk to a serial device . The transmission is only a few characters and is the same every time . It is about a minute between transmitting .  Every once and a while , perhaps 30-40 times , their seems to be an issue that the recieving device gets the wrong transmission.  Any known issues ?
Thanks
Title: Re: Brx serial out problem
Post by: BobO on October 18, 2017, 07:32:07 AM
Hi
I am using the brx to talk to a serial device . The transmission is only a few characters and is the same every time . It is about a minute between transmitting .  Every once and a while , perhaps 30-40 times , their seems to be an issue that the recieving device gets the wrong transmission.  Any known issues ?
Thanks


None.

Is it RS485? If so, is it terminated? What about grounding?
Title: Re: Brx serial out problem
Post by: AustinT on October 18, 2017, 11:53:05 PM
Hi
Thanks for your reply.   I am using 232 over a distance of about 18". Using rx/ tx and signal ground.  Are you thinking a noise issue ?
Title: Re: Brx serial out problem
Post by: BobO on October 19, 2017, 12:01:21 AM
Hi
Thanks for your reply.   I am using 232 over a distance of about 18". Using rx/ tx and signal ground.  Are you thinking a noise issue ?

AC or DC power supply?
Title: Re: Brx serial out problem
Post by: AustinT on October 19, 2017, 12:43:07 AM
The brx is Ac , also tied to that ac is a 120-24v Dc power supply that powers the daq that the brx is talking to . In same cabinet on ac there are 4 computers
Title: Re: Brx serial out problem
Post by: BobO on October 19, 2017, 07:41:59 AM
It's a long standing issue that when one side of the connection is DC, you have problems. The answer is always some form of interconnecting the grounds. Perhaps someone else with a better knowledge of this will chime in, but my money is on getting the DC grounds bridged to the AC ground.
Title: Re: Brx serial out problem
Post by: ADC Product Engineer on October 19, 2017, 08:37:33 AM
RS-232 is a ground referenced signal and as such it is quite susceptible to noise from poor grounding.   

1. Be sure that both devices are grounded to the same ground point. 
2. Do not daisy chain grounds.
3. Check your AC and DC neutral and negative power to ground.  The voltage on both settings should be less than 0.1V.
4. Do not run your communications wire anywhere near AC voltage if possible.
Title: Re: Brx serial out problem
Post by: AustinT on October 19, 2017, 08:44:24 AM
Perhaps I thought about it backwards.  I thought it would be better to let the Dc negative float for fear that bonding to ground would give noise issues .  I will try bonding at the common ac ground . 
Thank you
Title: Re: Brx serial out problem
Post by: BobO on October 19, 2017, 08:50:11 AM
I would also be curious to know what version of FPGA your unit is at. That's located on the System Information page, right side. We added a digital noise filter to the UART with version 1.7 of the FPGA. If your unit has 1.6, upgrading the FPGA could also be of help. It worked fine at 1.6, but was a little more susceptible to noise than we would like.
Title: Re: Brx serial out problem
Post by: BobO on October 19, 2017, 08:52:02 AM
Perhaps I thought about it backwards.  I thought it would be better to let the Dc negative float for fear that bonding to ground would give noise issues .  I will try bonding at the common ac ground . 
Thank you


Not with RS232. I've had many times sitting at my desk when my DC powered PLC can't talk to my PC over serial. Tying the grounds cures it every time.
Title: Re: Brx serial out problem
Post by: Garyhlucas on October 19, 2017, 07:16:31 PM
I'll chime in here a bit. A big part of the problem with grounding is that there are two distinct types.  Safety grounding as defined by the National Electric Code REQUIRES grounds to tied to everything, every which way.  Ground loops up the wazoo are the order of the day.  That is because the goal is simply to keep any two pieces of conductive material at a small enough potential difference even when the thousands of amperes that flow when a short circuit to ground occurs to prevent injury.  I have to laugh at the hundreds of times I have heard an electronics engineer suggest you need the mythical "Clean Ground" to make a circuit work!  It doesn't exist in the world of power grounding because even in the absence of a short circuit ALL electrical equipment leaks a little current to ground, even insulated wires.

Signal grounding for control circuits and shielding are very different.  In this case you simply want one and only one path to a common ground point. That common ground point can be connected to the power ground, but you must do it at exactly one point in your control system.  Tie control grounds to two points and all the noise on the power ground will now be haunting you.  Remember for current to flow a conductor must be connected to a power source at both ends.  So you must be meticulous about connecting the ground terminal on each device with its own wire back to the common ground point.  Do not daisy chain from device to device!

A common source of problems is caused by the equipment manufacturers.  If the grounds or the commons on your PC port of any kind tie to ground and you connect it to your controls you now have a ground loop back through the electrical ground system in the building!  If the shield and the commons only connect at one point on one end that can't happen.  In my world instrumentation of all kinds connects to pipe of both plastic and metal. So before I connect the cable shield wires I have to check whether the device is mounted on plastic or metal.  If it is metal I must check if the manufacturer connected the shield to the device case.  If it is then I must insulate the shield connection from ground in the control panel.

Hope this helps.
Title: Re: Brx serial out problem
Post by: AustinT on October 21, 2017, 08:33:11 AM
Some great info here, I appreciate all the responses .  I can test next time working on the brx, but do you know BobO if the signal ground on the 232 is tied to earth ground?
Title: Re: Brx serial out problem
Post by: BobO on October 21, 2017, 10:05:23 AM
Some great info here, I appreciate all the responses .  I can test next time working on the brx, but do you know BobO if the signal ground on the 232 is tied to earth ground?

I'm a software guy and have never done applications work, so I would defer to the real automation guys, but I think it is just bridging earth and logic ground on both ends and tying the grounds at both ends to the same point.

Isolation in power supplies is a good thing until it results in unisolated comm interfaces being at different potentials. In my experience, it always seems to show up when once side is DC powered and the other AC. It's probably just that the DC supply provides even more isolation from earth, allowing the two ends to get more different.
Title: Re: Brx serial out problem
Post by: Evilbeard on October 21, 2017, 01:11:27 PM
Some great info here, I appreciate all the responses .  I can test next time working on the brx, but do you know BobO if the signal ground on the 232 is tied to earth ground?

I'm a software guy and have never done applications work, so I would defer to the real automation guys, but I think it is just bridging earth and logic ground on both ends and tying the grounds at both ends to the same point.

Isolation in power supplies is a good thing until it results in unisolated comm interfaces being at different potentials. In my experience, it always seems to show up when once side is DC powered and the other AC. It's probably just that the DC supply provides even more isolation from earth, allowing the two ends to get more different.

I think what he's asking is the ground point on the BRX tied to the earth ground (like the power input terminal), or are they separate points?
Title: Re: Brx serial out problem
Post by: BobO on October 21, 2017, 01:40:56 PM
I think what he's asking is the ground point on the BRX tied to the earth ground (like the power input terminal), or are they separate points?

I think the key point is that the logic grounds (which the RS232 is usually referenced) at both ends need to be the same potential. With BRX, I'm pretty sure there is not a separate logic and earth ground, so those are the same. Since the device he is talking to is DC, the 0VDC of that end is likely floating with respect to earth. The answer may be as simple as tying the 0VDC at that end to the same ground that BRX is tied to.

Disclaimer: While I have an electrical engineering degree, in my nearly 30 year career I have never worked as an electrical engineer. And while I write software/firmware/gate array/logic for automation, I have never built an actual machine. Feel free ignore what I've said as the ravings of a lunatic.
Title: Re: Brx serial out problem
Post by: Evilbeard on October 22, 2017, 08:50:53 AM
I think what he's asking is the ground point on the BRX tied to the earth ground (like the power input terminal), or are they separate points?

I think the key point is that the logic grounds (which the RS232 is usually referenced) at both ends need to be the same potential. With BRX, I'm pretty sure there is not a separate logic and earth ground, so those are the same. Since the device he is talking to is DC, the 0VDC of that end is likely floating with respect to earth. The answer may be as simple as tying the 0VDC at that end to the same ground that BRX is tied to.

Disclaimer: While I have an electrical engineering degree, in my nearly 30 year career I have never worked as an electrical engineer. And while I write software/firmware/gate array/logic for automation, I have never built an actual machine. Feel free ignore what I've said as the ravings of a lunatic.

No, that makes sense, but if the logic ground and the earth ground are the same point internally in the BRX, it could determine how it's grounded. I'd just go ahead and run wires to the GND terminals on the 232 to make sure they are the same.
Title: Re: Brx serial out problem
Post by: Garyhlucas on October 22, 2017, 10:53:48 PM
BobO,
Funny how that works. I don’t have a degree and all I’ve done for 30 years is build automation machines!