long distance programming issue
Jonathan
Posts: 1,023
Hi All,
I am programming a Prop from 100' away, via a usb-ethernet- ethernet-usb dongle pair. Usually works fine. On my latest project, a water system controller, the USB port gets stuffed when the pressure pump kicks on. I have to unplug everything and plug it back in. The Prop itself is not rebooting, just the programming port has problems. If I disconnect the power to the laptop it is fine when the pump starts. If I use my netbook it is fine even with the power plugged in. This points to some kind of grounding issue. I tried tying the Prop power supply ground to the earth ground, no help.
Any advice on how to solve this? I guess I can just use the netbook, but the tiny screen is a drag for programming.
Thanks!
Jonathan
I am programming a Prop from 100' away, via a usb-ethernet- ethernet-usb dongle pair. Usually works fine. On my latest project, a water system controller, the USB port gets stuffed when the pressure pump kicks on. I have to unplug everything and plug it back in. The Prop itself is not rebooting, just the programming port has problems. If I disconnect the power to the laptop it is fine when the pump starts. If I use my netbook it is fine even with the power plugged in. This points to some kind of grounding issue. I tried tying the Prop power supply ground to the earth ground, no help.
Any advice on how to solve this? I guess I can just use the netbook, but the tiny screen is a drag for programming.
Thanks!
Jonathan
Comments
Thanks!
Jonathan
Any way to tell if a power supply is isolated?
Jonathan
USB extenders may use CAT5 cable, but they are not Ethernet devices. As such, an isolation transformer will block any signaling, not to mention the DC power that the cable also carries for its remote head and anything connected to it.
-Phil
Seriously, no computers sold today use non-isolated power supplies.
-Phil
Also, if it makes any differnece, I live off the grid and am on a modified sine wave inverter.
Jonathan
My suspicion is that the pump starting is causing a surge that the inverter isn't handling very well which, in turn, causes an issue with your PC's power supply. A powerline filter/surge suppressor at the PC may help.
BTW, are you using an optically-isolated solid-state relay to turn on the pump? If not, you should be.
-Phil
Yes, the SSR's are optoisolated. I'm going to bust out the 'scope and snoop around and see what I can see with my power supply and on the programming line.
Jonathan
In that way you much tighther control of your environmental issues. The Ethernet has to chop all and everything into packets and reassemble it. And if the electrical problems of your Etherenet to USB are exotic it might be a merry chase.
There are RS485 with builtin isolation transformers if that is really what you need. But the differential transmission is very noise immune.
One USB to RS485, then the cable, and a RS485 to TTL will do all this more cleanly. And it should do distances 50x the 100 feet.
Jonathan
Unlikely, since RS485 is NRZ, which will not pass through a transformer. What you're referring to is probably what's known as a "short-haul modem." But that would be overkill for a 100-foot transmission link.
Jonathan, what you already have is probably good enough. The problem needs to be attacked from the power supply side, not the USB extension side.
-Phil
What you are doing at the Propeller end is converting RS-485 to USB and the then USB to TTL. The conversion to USB can be bypassed and would simplfy trouble-shooting.
http://cds.linear.com/docs/en/datasheet/1535fb.pdf
The above link appears to be one of many isolated RS485 drivers that are supposed to resolve ground loop problems. And there are more of them...
Just Google 'isolated RS485 drivers'
Jonathan,
Low-power inverters are pretty cheap these days. You might consider powering your PC from its own inverter.
-Phil
If it really was an Ethernet link, you could also consider a Wifi bridge. I recently used the low-cost Edimax devices.
Not absolutely sure but it might have been the: Edimax EW-7228APN
I had two standalone devices that normally had a CAT cable between them. Simply replaced the cable with this bridge.
Regards,
Mickster
@Phil
According to the OP...
Back to back USB ports with something inbetween... maybe RS232, maybe RS485.
I am just trying to eliminate as many unnecessary levels of converts as possible. I do understand that everyone is using CAT5 cable for other purposes these days. I love to do so too as it cheaper by the foot than most cable. And I have a lot of it abandoned by students that left the rooming house I live in.
Frankly, I don't see how anyone is going to solve this without extablishing from verifiable information that it is RS232, RS485, IP ,or something else.
http://www.wikihow.com/Extend-USB-Cable
Do these dongles have any documentation or brand name?
LIKE THIS ====> http://www.blackbox.com/resource/files/productdetails/26675.pdf
This looks like mine, and I've seen the exact same unit under many generic brands from China. Mine uses differential signaling over the CAT5's twisted pairs. (Using RS232 over 100' would make no sense, BTW, since 25' is about the limit.)
In any event, I do not believe the OP's problems are related to the USB extender, per se, and that it's more of a power system issue.
-Phil
Based on Jonathan's first post I have no doubt this is a power related problem and the best fix is to use optoisolators for communications. This removes all ground, power, and signal connections between the two systems, and the high current (10 – 20mA) signal used to drive the leds pretty much guarantees immunity from EMI.
The circuitry is also pretty simple as well. An optoisolator and drive transistor at each end for data transmission, a second optoisolator at the remote end, and a second drive transistor at the local end for resetting/programming the remote propeller.
I am surprised this idea is not used more often. I have used this method on several occasions and it has always solved any noise, intermittent data corruption/loss, and resetting problems.
He has not stated, however, how the Prop is being powered -- via a wall transformer at the Prop end, or via the USB extension from the laptop? If the latter, he's already opto-isolated, since the only connection to the outside world at the Prop end is the SSR.
The one issue that's not eliminated is common-mode impulse coupling to the unshielded CAT5 cable. If it lies near the inverter mains to the pump, there could be enough coupling to exceed the common-mode limits of the USB's (or its extension's) transceivers.
-Phil
If you are going to use your Propeller in industrial applications, use industrial worthy solutions. The cost is very reasonable.
RS422-485 is all about common-mode rejection of noise in electrically hostile environs.
From the computer's USB port - provide a USB to TTL converter and then provide RS-422/485 transceivers for Rx/Tx and the required _RST signal. (I guess that would be two transceivers at each end of the cable for a total of 4). The last 2 transceivers would go directly at TTL 3.3 to the Propeller.
The core problem is the the USB standard was never really intended for such long distances or to prevent transients from powerful devices starting. It was meant to convey data at high rates two and from short distances.
The concept of having the +5V 500ma reach the end of 100 feet of wire to power a second USB converter is overly ambitious. If one is going to insist on using such devices, use a brand that will back its claims of reaching over 100 feet, not a company that doesn't put their name on the product.
Opto Isolation is notoriously slow. RS-422485 is fast and rock solid. I am not even sure it is a ground problem. It just may be a power spike knock over an under-voltage powered CAT5 serial to USB device at the end of the line. But ground conditions can and will vary on a daily basis due to weather.
>>> I would love to know if Phil is right, if Kwinn is right, or I am.
That's why the voltage is boosted to a much higher level at the host end and converted back down to +5V at the client end. And it works quite well in my experience.
-Phil
Phil, you seem to have more information about Jonathan's setup than I gleaned from the posts so far so I may be at a disadvantage when making suggestions. I do agree with what you say about coupling being a possibility. It could be enough to make the USB port get stuffed. The fact that it does not happen when the laptop is running on batteries, or when the netbook is connected and powered by AC makes it seems more likely to be related to the AC ground connection. Having a potential difference between the grounds of the laptop and the propeller will also affect any signals that are connected by a cable.
I would be interested in knowing what the resistance is between the 2 output connections of the laptop and netbook power supplies and the 2 or 3 prongs of their respective AC plugs. I suspect the laptop supply has a connection between the AC ground and one of the supply outputs just like my Dell
@ Loopy
In the past optoisolators were slow, but with the high speed opto's available today that is not as much of a problem. They can easily run at 115Kbaud and higher, which should be more than enough in most cases. The circuitry is also quite straight forward, inexpensive, and eliminates any electrical connections between the two systems.
BTW, I don't have more specific info about Jonathan's setup that anyone else. In the absence of that info, I'm left to extrapolate from the USB extender that I have. In any event, the OP seems to have left the building.
-Phil
Just back after my 48 hour shift and there is a bunch to catch up on in this thread! Yes, the cat5 is just cat5, no actual ethernet, dumb of me to use that term. I just checked and my laptop power supply does indeed show continuity between earth ground and the negative side of the power supply. The netbook is two pronged, so no ground there. The Prop is powered from the mains (inverter) through an old cell phone charger. I do have a small inverter that I can try, I'll dig it out and see. I'm sure that will work, thing is it's not a good long term solution, running the extra inverter = more power overhead. It does make me wonder if an isolation xfrmr would work.
Thanks guys, I'm sure there is a way to get this to work.
JOnathan
-Phil
I tried that when I discovered the problem and found no difference either way. I mad a little adapter this morning with a switch that allows me to connect/disconnect the reset line on the Prop plug. This does prevent the reset but of course I have to walk out there to put it in program mode. Still, it allows me to view data with the PST without resetting, so it's better than nothing. I am still going to work on a better solution though.
Thanks!
Jonathan
-Phil
When the USB port gets stuffed. I have to remove the USB cable from the laptop and plug it back in, which cause the Prop to reset. The USB port getting stuffed doesn't cause a reboot in and of itself, just unplugging/plugging.
Jonathan
Jonathan