USB connector shield

273 views
Skip to first unread message

newxito

unread,
Feb 7, 2021, 7:53:57 PM2/7/21
to neonixie-l
I'm trying to make a CPU load indicator with 3 IN-12. This is my first project using USB power and data from a PC
I'm not sure about the shield of the USB connector, Google is a little bit confusing about this point...
Basically I found 3 different opinions:

1. Do not ground the shield
2. Ground the shield
3. Connect the shield to ground trough a 33k resistor

Can somebody give me advise?
CPULoad.jpg

Michail Wilson

unread,
Feb 7, 2021, 8:26:57 PM2/7/21
to neoni...@googlegroups.com

I don’t know, but thought I might point out that it appears you have the USB connector running in line along the circuit board.  Maybe you meant to do that though.

 

Michail Wilson

206-920-6312

--
You received this message because you are subscribed to the Google Groups "neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neonixie-l+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/neonixie-l/8acdfa93-38c3-4ae6-b218-b5b1073fbed8n%40googlegroups.com.

Bill Stanley

unread,
Feb 7, 2021, 9:07:08 PM2/7/21
to neonixie-l
Not a lot of help but from the USB spec:
6.8 USB Grounding
The shield must be terminated to the connector plug for completed assemblies. The shield and chassis are
bonded together. The user selected grounding scheme for USB devices, and cables must be consistent with
accepted industry practices and regulatory agency standards for safety and EMI/ESD/RFI.

So in other words, the shield will pass thru both connectors to the "chassis"  but the connection to any ground is left to the reader.
I usually put a 0402 footprint from chassis to system ground. I then install a 600 ohm ferrite bead. If needed, it can be deleted or changes for a resistor or cap.

gregebert

unread,
Feb 7, 2021, 10:05:50 PM2/7/21
to neonixie-l
If the USB device is powered thru the USB connector, you probably could get away with tying the shield to the circuit ground. But if the USB device has it's own supply, you definitely want resistance between the shield and circuit ground to prevent ground-loop currents, which cause noise problems. That's probably where the 33K resistance came up.

The shield facilitates ESD protection because it is always connected first when doing a hotplug. BUT !!! Just because you have a shield does not guarantee you wont have ESD problems; there are many other things you need to do.

David Forbes

unread,
Feb 7, 2021, 10:10:23 PM2/7/21
to NeoNixie
The shield has a function of handling a static discharge when the plug is attached or the board is touched. A conductive ring around the edge of the PCB connected to the shield will prevent blowing out the electronics when that spark occurs.
A resistor from shield to signal ground is reasonable. 


--

newxito

unread,
Feb 8, 2021, 4:20:16 AM2/8/21
to neonixie-l

Thank you all for the input. I measured two commercial USB to serial converters I use to upload the firmware to the clocks. One has a connection from the shield to ground, the other has no connection to ground :-)

I added a 0805 component, so I have all options. I will start with the 33k resistor. The rest is just the datasheet schematic of the FT230XS including the 600 ohm ferrite bead. The USB connector (TH) will be mounted on the back side of the PCB.


newxito

unread,
Feb 8, 2021, 5:12:28 AM2/8/21
to neonixie-l
That's a good point, but it I think it is ok because the connector I'm using is a 614105150721. According to the datasheet it should be a vertical micro-B USB connector

Paul Andrews

unread,
Feb 8, 2021, 7:55:07 AM2/8/21
to neonixie-l
Some datasheet I read a long time ago had a 1M resistor in series with a 100pF capacitor between shield and signal ground. That is what I have used ever since as it was the first unequivocal statement on it that I had ever seen, before or since. See this schematic as an an example https://cdn.hackaday.io/files/282201207364480/USB-UART-USB-UART.pdf

Paul Andrews

unread,
Feb 8, 2021, 8:03:41 AM2/8/21
to neonixie-l
Here is a discussion. Looks like the cypress datasheet is probably the origin https://electronics.stackexchange.com/questions/4515/how-to-connect-usb-connector-shield

Paul Andrews

unread,
Feb 8, 2021, 8:09:14 AM2/8/21
to neonixie-l

The link in that stack exchange article is ok. Here is a current one. So my 100pF cap doesn’t agree with their 4700pF... https://www.cypress.com/file/88486/download

newxito

unread,
Feb 8, 2021, 3:18:17 PM2/8/21
to neonixie-l
Thanks Paul, I added another 0805 for the cap and the PCB is now in production. Time to start writing the software for the pc side, that shouldn't be too hard. 

Kevin A.

unread,
Feb 8, 2021, 3:21:00 PM2/8/21
to neonixie-l
Never underestimate firmware ;)

On Mon, Feb 8, 2021 at 3:18 PM newxito <axt...@gmail.com> wrote:
Thanks Paul, I added another 0805 for the cap and the PCB is now in production. Time to start writing the software for the pc side, that shouldn't be too hard. 

--
You received this message because you are subscribed to the Google Groups "neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neonixie-l+...@googlegroups.com.

newxito

unread,
Feb 8, 2021, 3:58:02 PM2/8/21
to neonixie-l
The PC should see the board as a COMx connected over USB, so the software (C#/.NET) just has to send some WMI data (CPU load %, Disk usage %, …) to the serial interface… sounds easy :-)
The software should be a service, so the data can be sent even when nobody is logged in.
And I would like to shutdown the high voltage if the pc goes to sleep or turns off.
Probably I will end up killing my pc mainboard :-)

Kevin A. schrieb am Montag, 8. Februar 2021 um 21:21:00 UTC+1:
Never underestimate firmware ;)

SWISSNIXIE - Jonathan F.

unread,
Feb 16, 2021, 5:30:28 PM2/16/21
to neonixie-l
First of all, grounding - or - how to connect the shield, is not really specified, and usually you should consider the chip's datasheet / application notes on how to do it.

For example, see the TUSB4020BI  Datasheet, page 27/28. But surely this is for series production and professional product, if used as hobbyist project, i would just connect the shield to ground.

A few more notes on USB:

I would move away the usb connector as far as possible from the HV supply. I guess U3 is the MCU, so place near there. Also make sure you put TVS diodes on the Data lines, to protect them from ESD damage, and differential routing maybe should be used here too. If you don't have a pcb tool that can do this, try at leas to have the usb datalines in the same distance and trackwith and route them as parallel as possible.
Maybe also try and measure power first, i've had some issues with running a nixie circuit off a Standart USB Computer Port since those are usually limited to 500mA. Newer computers have electronic fuses / controllers, and i've had the issue that at the start, the psu spiked to over 500mA, and the Computer turned the USB off.  USB3 ports usually have 1000mA

newxito

unread,
Feb 16, 2021, 6:31:06 PM2/16/21
to neonixie-l
Thanks a lot for the information! There seems to be a lot of room for improvement for rev 2…
The PCB should arrive this week, I will make some tests before connecting this thing to the pc.

Jon

unread,
Feb 16, 2021, 8:39:18 PM2/16/21
to neonixie-l
A couple of additional thoughts on USB...

All of my clocks use USB with an app running on the PC to configure time, select cool visual effects etc, so I've played with it quite a bit. It's pretty forgiving actually - I've never had to go as far as differential routing, just being sensible as Jonathan suggests seems to work fine. I do make an effort to keep the D+ and D- short by putting the socket close to the PIC and keep them well away from the HV: for safety as much as for managing noise! I do always work through a hub when developing - figure if I'm going to stick HV up something that isn't expecting it, then it might as well be something easier to replace than the USB on my computer's motherboard... Must say I've never bothered with external ESD protection on the data lines - maybe that's my bad, it's been a long time since I read the spec. 

The one piece you will have to pay attention to is the current you pull. You should not assume you can get anything more than 100mA out of a USB port until your firmware has negotiated more. Very probably you'll get away with assuming the availability of 500mA in most cases, but if the host is interpreting the standard strictly you might get bitten. The most likely scenario that can throw it is if your device gets plugged into an unpowered hub that has other devices already on it. Then the hub's allocation of 500mA from its connection to the host is being shared across everything, so bad behaviour by your device could result in the whole lot being shut down, which is pretty uncouth.

I actually had to work through this power thing for real in developing the fun clock below some years ago. It's a dinky little 4 digit numitron clock which is designed to plug into a USB port - PCB the size of a business card. Numitrons are rather current-hungry things, so the clock negotiates 500mA. But the worst case display current requirement is actually above this, so the clock has to use a 2x2 multiplex to get under the limit. If you plug it into a USB charger rather than a proper port, it can sense that and switch to direct drive to make use of the extra power on offer. Probably I should revisit the firmware sometime to have it try negotiating 1000mA from a USB3 port and then it could do direct drive while attached to the computer. USB3 wasn't around much when it was designed, so I didn't think of that previously.

Jon.

Numimini cover big file.JPG

newxito

unread,
Feb 17, 2021, 4:00:59 AM2/17/21
to neonixie-l
Nice clock!
In my circuit, the USB data lines are not connected to the MCU. Actually, I expect that the negotiation will be done by the FT230X (USB to basic UART IC), maybe I’m wrong. 
When plugged in, the device should only consume a few mA, I will delay powering on the nixies. For the HV, I use a flyback design with a LT3757 that has a soft-start function, so I don’t expect spikes over 500mA. With the nixies and neons powered on, the device should not consume more than 400 mA. That’s the theory…
I will follow your suggestion and use a hub for testing, thanks Jon.

Jon

unread,
Feb 17, 2021, 3:01:03 PM2/17/21
to neonixie-l
You piqued my interest as to how the FT230X managed this point... From a quick read of the datasheet, it looks like that by default the chip tells the USB bus that it's in a bus-powered device that only needs 90mA. The datasheet is short of detail, but the implication is that you can change this value by writing to the internal EEPROM (see section 8). There's also discussion elsewhere in the datasheet about how to manage the requirements of being a bus powered device, including configuring one of the CBUSn pins to the PWREN# function so you can signal your MCU as to whether you got your power request or not.

Neat chip!

Jon.

newxito

unread,
Feb 18, 2021, 8:36:14 AM2/18/21
to neonixie-l
So far it looks promising. I soldered the connector and the IC  with the input protection components and then connected the board to the PC. The PC sees the device as COM port and I was able to reprogram the chip (FT_Prog utility) so that it negotiates 500mA.

newxito

unread,
Feb 20, 2021, 5:49:21 PM2/20/21
to neonixie-l
The little project is now working. It’s not the most exciting gadget of the world but at least I learned something about USB connectivity. 
When the PC goes to sleep or is turned off, the MCU gets a signal from the FT230X IC and turns off the high voltage. 
With the 3 nixies turned on, the consumption is about 300 mA, so no problem. 
I’ve programmed a little service for the PC side that sends the performance counter data even when nobody is logged on. 
To get 99% CPU usage, I let Blender render the classroom demo.
 
I will put the board into a 3D printed case and that’s it. Since, surprisingly, everything works as expected, there will be no revision 2... but maybe an IN-13 version...

service.jpg
CPULoad.jpg

Jon

unread,
Feb 20, 2021, 6:21:24 PM2/20/21
to neonixie-l
Very neat! Glad you got it all working.

Jon.

Paul Andrews

unread,
Feb 21, 2021, 9:24:09 AM2/21/21
to neonixie-l

It’s nice to see nixies being used for something other than clocks!

Mac Doktor

unread,
Feb 21, 2021, 11:32:18 PM2/21/21
to neonixie-l

On Feb 20, 2021, at 5:49 PM, newxito <axt...@gmail.com> wrote:

I will put the board into a 3D printed case and that’s it. Since, surprisingly, everything works as expected, there will be no revision 2... but maybe an IN-13 version...

I'd like to have a 4.5 digit version. My octal-core processor is hyperthreaded so full utilization by a single process is 1600.0%.


GPU temperature would be...cool.


Terry Bowman, KA4HJH
"The Mac Doctor"


“...the book said something astonishing, a very big thought. The stars, it said, were suns but very far away. The Sun was a star but close up.”—Carl Sagan, "The Backbone Of Night", Cosmos, 1980


newxito

unread,
Feb 22, 2021, 5:51:08 PM2/22/21
to neonixie-l
My pc also has a lot of cores and threads but only 100% CPU usage... I think I should switch to Mac :-) 
Joking aside, adding temperatures would be a useful feature... maybe together with an IN-15A, % for CPU, + for temp, m for memory,...


Terry Bowman schrieb am Montag, 22. Februar 2021 um 05:32:18 UTC+1:
I'd like to have a 4.5 digit version. My octal-core processor is hyperthreaded so full utilization by a single process is 1600.0%.

GPU temperature would be...cool.
 
100.jpg

Mac Doktor

unread,
Feb 22, 2021, 8:59:02 PM2/22/21
to neonixie-l
On Feb 22, 2021, at 5:51 PM, newxito <axt...@gmail.com> wrote:

My pc also has a lot of cores and threads but only 100% CPU usage... I think I should switch to Mac :-) 

Another reason: data rates are auto-ranging. They change magnitude so you don't have to figure out what 

The 2020 iMac goes up to 2000.0%. I would have bought one but it requires Catalina (NO 32 bit code allowed) and has that damn T2 security chip. 8/


Joking aside, adding temperatures would be a useful feature... maybe together with an IN-15A, % for CPU, + for temp, m for memory,...

Now you're talking. Let's bring back the old processor clock display prominently featured on '486 towers, Nixie style. My machine tops out at 4.5GHz.

Then there are USB power meters. I have several that I use when charging devices. The mA/H display is useful for keeping track of battery wear.


Terry Bowman, KA4HJH
"The Mac Doctor"

"If only you could see what I've seen with your eyes."—Roy Batty, Blade Runner

Reply all
Reply to author
Forward
0 new messages