# Suggestions for how to shield connections to USB breakout?



## btipton (Feb 23, 2021)

I got my TouchDRO DIY adapter (the 2020 version, not the latest), and I've had a blast getting it hooked up to my Shahe Scales using some USB breakout boards.  It's stretching my very limited electronics skills.  To connect the USB boards to the Adapter, I soldered pin headers to each board, and used jumper wires to make the connection. That looks like it may have been a mistake - the scales read correctly 90% of the time, but they'll sometimes jump back and forth on readings, or slowly (over 3-4 seconds) "climb" to another reading.  After reviewing the avoiding common problems page, I've used an isolated power adapter, and tried connecting a ground from the adapter to the frame of the scale, but I'm still having the issue.  My scales aren't mounted on the machine yet - they're on a wooden table, so I don't think I can have a ground loop, so my suspicion is that noise is affecting my jumper wires.  Would replacing the jumper wires with a shielded ethernet cable be a possible solution?  I would need to solder the shield to ground on the adapter board, I believe.

The issue happens on all axes, even when only a single axis is connected.


----------



## Bi11Hudson (Feb 23, 2021)

Two cents worth for several comments:

Shielding is single ended. Think of it as a drain wire. Only one end is grounded, and yes, it does matter which end is grounded. I just can't remember which end.

Your jumpers are having an effect. They need to be shielded as well.

A digital display will often (and usually does) shift one or more counts on the "least significant digit". This is usually a characteristic of the A/D converter that drives the display.

Now I've made my comments, let's see what someone that has one of these things has to say. My input is only from industrial measurement and analog control loops.

.


----------



## markba633csi (Feb 23, 2021)

Are there noise sources nearby like florescent lights?  Or is something else going on?  Post a picture of your setup.
Are the jumpers 1 inch long or 12 inches long?  You may need some filter capacitors rather than shields
-Mark


----------



## Tio Loco (Feb 23, 2021)

For me on my (circa 2014) Arduino setup it involved several things. For power I ended up with a Cisco 30W (not sure what it came off of)... like an older laptop power supply, not a wall wart that's so common these days.

I also purchased shielded USB cables to connect the scales which involved creative Dremel work as the rubber shield on the connectors was much bigger than a standard USB cable, and made sure each scale was not grounded.

Then, just last year I had a problem with the Y axis reading randomly jumping in 5.12mm increments, which turned out to be just a scale gone bad.  Hope that helps...


----------



## ycroosh (Feb 23, 2021)

btipton said:


> I got my TouchDRO DIY adapter (the 2020 version, not the latest), and I've had a blast getting it hooked up to my Shahe Scales using some USB breakout boards.  It's stretching my very limited electronics skills.  To connect the USB boards to the Adapter, I soldered pin headers to each board, and used jumper wires to make the connection. That looks like it may have been a mistake - the scales read correctly 90% of the time, but they'll sometimes jump back and forth on readings, or slowly (over 3-4 seconds) "climb" to another reading.  After reviewing the avoiding common problems page, I've used an isolated power adapter, and tried connecting a ground from the adapter to the frame of the scale, but I'm still having the issue.  My scales aren't mounted on the machine yet - they're on a wooden table, so I don't think I can have a ground loop, so my suspicion is that noise is affecting my jumper wires.  Would replacing the jumper wires with a shielded ethernet cable be a possible solution?  I would need to solder the shield to ground on the adapter board, I believe.
> 
> The issue happens on all axes, even when only a single axis is connected.


This particular behavior is pretty uncommon with iGaging scales (although I've heard about it happening). I haven't seen this with the Shahe sales (assuming you are talking about the new Shahe-branded scales, not the old unbranded iGaging DigiMag sacles). 
Would you be willing to let me borrow them for a few days so I can hook the setup to a scope and see what is happening? I will cover shipping both ways, of course.
Yuriy


----------



## btipton (Feb 23, 2021)

Thanks for everyone's suggestions so far - to answer one of the earlier questions, there is a fluorescent light about 15 feet away.  The jumpers are about 6 inches long.  I've included a photo - my suspicion is that my relatively long, unshielded jumpers with header pin connections are picking up / generating some sort of noise.  In the photo you can see the ground wire I've attached to one of the mounting points - I don't think a ground loop is the issue, since the scales aren't currently connected to anything with a ground (they're resting on the tabletop for now).


----------



## Reddinr (Feb 23, 2021)

An easy experiment for your jumper wires is just to shield them.  I would unplug all but one scale, both the USB and the jumper cables you made.  Be sure the problem is still there with the one connector plugged in.  

Take some aluminum foil strips, maybe 3/4" wide and spiral wrap the remaining jumper bundle.  Overlap 50% and keep it tight with scotch tape or something.  On the USB cable end, wrap some small bare wire around your new shield and then around the metal barrel of the associated USB connector.  Keep that wire as short as you can.  make sure the shield doesn't short out on anything.

If the shield improves things then you know what to do.  If not, this is where I'd break out my oscilloscope.


----------



## Reddinr (Feb 23, 2021)

I found this on the touch dro website.  "_Proper grounding is vital to relaible funciton of the capacitive DRO scales. Unreliable ground connection or a ground loop can lead to such issues as drifting positon or random resets. In order to avoid ground loops, there should be a single reliable connection to the machine chassis. Ideally, scale frames should be isolated from the machine. If the cables are shielded, the shields should be tied to the ground only on one side as close to the central grounding point as possible_."


----------



## markba633csi (Feb 23, 2021)

Putting the whole thing in a metal box would give much better shielding than what you have there
A "Faraday cage"
-Mark


----------



## Reddinr (Feb 23, 2021)

> Putting the whole thing in a metal box would give much better shielding



Yes, and the metal box will need to be grounded.   My guess is that the problem is on the scale end, having to do with grounding or unintentional loops in the grounding, but to rule out the question about the jumper shield being the issue or not, making a simple temporary shield can help.


----------



## macardoso (Feb 23, 2021)

btipton said:


> Thanks for everyone's suggestions so far - to answer one of the earlier questions, there is a fluorescent light about 15 feet away.  The jumpers are about 6 inches long.  I've included a photo - my suspicion is that my relatively long, unshielded jumpers with header pin connections are picking up / generating some sort of noise.  In the photo you can see the ground wire I've attached to one of the mounting points - I don't think a ground loop is the issue, since the scales aren't currently connected to anything with a ground (they're resting on the tabletop for now).
> 
> 
> 
> ...


Without reading the whole thread, I see one major deficiency in this image. In each of the breakout boards, the GND pin is not connected back to the micro controller power ground. So the metal case of the USB socket isn't grounded, nor are your USB cables themselves. So any shielding on the cable is doing nothing.

Ideally this GND would be tied to earth ground (third leg of your power adapter), but if that isn't possible, then it should be tied to the DC common as close to the source (DC barrel jack) as possible.


----------



## btipton (Feb 23, 2021)

macardoso said:


> Without reading the whole thread, I see one major deficiency in this image. In each of the breakout boards, the GND pin is not connected back to the micro controller power ground. So the metal case of the USB socket isn't grounded, nor are your USB cables themselves. So any shielding on the cable is doing nothing.
> 
> Ideally this GND would be tied to earth ground (third leg of your power adapter), but if that isn't possible, then it should be tied to the DC common as close to the source (DC barrel jack) as possible.


For the Shahe scales, the USB connectors aren't really USB - they're just using them for the convenience/cost of the connectors.  I can't post links yet on the forum, but on the touchdro site, there's a page about the Shahe scales that gives the pinout.  The USB GND pin isn't connected.  Unfortunately, that makes the USB breakout board a bit harder to work with, but that's half the fun.


----------



## btipton (Feb 24, 2021)

ycroosh said:


> This particular behavior is pretty uncommon with iGaging scales (although I've heard about it happening). I haven't seen this with the Shahe sales (assuming you are talking about the new Shahe-branded scales, not the old unbranded iGaging DigiMag sacles).
> Would you be willing to let me borrow them for a few days so I can hook the setup to a scope and see what is happening? I will cover shipping both ways, of course.
> Yuriy


Thanks for the generous offer, but I'm not confident enough that I haven't just done something silly to ask you to pay shipping and spend time on it.  Let me take a few days and double-check my work and I'll do some more testing.  If I'm still getting unexplained strange results, I may take you up on your offer.  Thanks for such a quick reply as well!


----------



## btipton (Feb 25, 2021)

One of the members at my local makerspace suggested that I make sure the USB shielding was grounded.  I tied the shielding pad for each of the usb breakouts together, and connected them to ground on the adapter board as below.  After that change, I didn't have any weird issues with the readings, other than a rare case where the display would flash a negative sign, then it would go away immediately.  It seems like the USB cable, being so long, would be the most likely wire to pick up any interference, but I couldn't find the shielding connected at either end of the Shahe scales, so I connected it to the adapter.


----------



## mksj (Feb 25, 2021)

Typical USB connectors use a 5 pin header cable with the shield grounded which was missing until you attached the grounds. Grounding is usually at the source or origin, but varies on application.  In addition when using other equipment such as a VFD electrical noise can be a significant issue, the type of cable, shield and using centralized grounding such as a star or buss can significantly effect the electrical noise. Alternative would be to use the ground pin on t each USB header and ground everything to the ground screw. When possible I also try a battery source as opposed to a wall wart to see if the problem goes away. I have electrical noise issues with tachometer installs and ended up needing a line filter and also have tried different grounding setups. Also can be seen with VFD low voltage input controls and remote speed pots.


----------

