Studying the Arduino Leonardo USB: questions - Page 1
Forum section: electronics / projects

author: fax8
author_rank: Contributor
timestamp: June 22, 2012, 11:05:16 am
content: Hello, I'm studying the Arduino Leonardo design in order to use it as base to create a derivative design.. I have a couple of doubts about some components relative to the USB connection. This is the schematics of the Leonardo micro USB connector:What's the use of the L2 inductor and the Z1 and Z2 varistors? They looks like some kind of safety protection but I'd like to know more details on their behaviour.Thanks for your help..Fabio

author: T4P
author_rank: Super Contributor
timestamp: June 22, 2012, 11:18:15 am
content: The varistors are there to protect the outputs from high voltageThe inductor is there to (i think) allow UGND to GND but with the noise filtered?Am i thinking of a digital and analog ground here?

author: jonoxer
author_rank: Newbie
timestamp: June 22, 2012, 11:23:14 am
content: Z1 and Z2 are these:http://elcodis.com/parts/144643/CG0603MLU-05E.html#datasheetSo they're included as over-voltage clamps. That same thing is also commonly done with Zener diodes, which is what I did on the LeoStick design:www.freetronics.com/leostickL1 is to link signal GND and USB GND while providing noise suppression. In many designs they're just tied together, but it's good practice to include it.--Jon

author: fax8
author_rank: Contributor
timestamp: June 22, 2012, 12:37:31 pm
content: Thanks for your help guys.. everything is clear now. :-)

author: free_electron
author_rank: Super Contributor
timestamp: June 22, 2012, 01:41:31 pm
content: Since nobody has explained the 'why' yet ...Here we go :This has to do with esd and protecting the system from zaps.The varistors protect the usb lines if the cable would hold an electrostatic charge when being plugged in. The energy will be dispersed through the varistors.The ferrite f1 serves the same purpose. It blocks the energy from zapping into the power rail. This ferrite also blocks noise coming from the system of reflecting back into the cable and radiating emi.L2 is also a classic esd protection. You need a good electrical contact between the shield and the system ground. But, if a zap enters the shield you want to stop it. Since an esd zap os a very short pulse , and 1/pulse = frequency you deal with a large frequency. Inductors block fast transients. So the zap will not go into the system ground... It stays at the shield ground.I have not seen the pcb layout of this thing , but any screw hole that is used to hold the board down should be connected to ugnd. There should be a clear gap between ugnd and gnd. The board contour should have a ugnd connected ring of blank copper ( no soldermask on it ) with a clearance to gnd.Any esd zap jumping to this board will strike the ignd ring and be diverted to chassis ground.Of none of this is in place then the designers of this schematic just mindlessly copied an appschematic without knowing what they are doing...

author: dfnr2
author_rank: Regular Contributor
timestamp: June 22, 2012, 04:22:38 pm
content: As free_electron noted, this is all for ESD protection, and the usefulness will be entirely dependent on the layout. It looks like the ESD is being shunted right to ground. Unless this is physically arranged near a chassis tie point, then the ground IS the chassis, in which case it better be a beefy ground pour, or something with a large free capacitance in air, regardless if it's effective as an actual ground plane or not. In that case, also better to shunt to the Vcc rail as well, a more classic arrangement, so you're actually reducing potentials across the circuit, not just rearranging them.Also, there is a good chance that, in the final setting, the ESD suppressors would be more helpful on the other side of the resistors. If the resistors are a higher impedance to the ESD spike than other nearby conductors, then those suppressors will never get a chance to do their job.My suggestion to you is to not just copy their ESD baggage, since I'm guessing in this case it's more vestigial--like a human appendix--than useful. If you are creating a product, then you will have to come up with an ESD plan based on that product, which is really not too hard if you follow some simple rules, as free_electron alludes to.Consider visiting a testing lab when they are checking ESD compliance. If you don't know what's coming, then you will get to look on in horror as a nice gentleman zaps your device with a range from voltages from 2kV up to 16 kV, depending on your product. On every design after that, your first thought, after what the device is supposed to do, will be how to enclose and protect it from such insults.In this case, I'm not sure that L2 is there to isolate ESD spikes from the system ground; otherwise each input would also need to be protected. I suspect GND is intended the system GND, and UGND is supposed to be the uP chip GND, which is floated by L2 from the system GND in case of uP current surges. If so, that's a bad design for obvious reasons (if it's not so obvious: You don't want your chip ground--and therefore I/O levels--shifting up and down relative to the rest of the board). The more classic design would be to tie the uP to GND normally, and put the inductor between the Vcc pin and system Vcc, combined with a proper decoupling cap, to impede surges from making their way back to the system Vcc. However, a look at the full circuit and layout will give some idea what was actually intended.

author: free_electron
author_rank: Super Contributor
timestamp: June 22, 2012, 06:42:02 pm
content: Quote from: dfnr2 on June 22, 2012, 04:22:38 pmthat's why i wrote "Of none of this is in place then the designers of this schematic just mindlessly copied an appschematic without knowing what they are doing..."the Ugnd means USB ground. normally the case (if metal case ) or case shield ( metallic sputtering on the indie of the case ) and the guard ring around the board are tied to GND, not the UGND. If the ring or the case get a jolt it flashes into the usb cable shield ( not the ground wire of the usb connector but the mantle shield which is electrically isolated ) into the device ont the other side's ground connection and is diverted to earth through the power plug... if it is all properly set up.in this case the inducotr L2 forms a high impedance path for that jolt of ESD ... so there is no energy dispersed in the system. this is important when the device is in operation... a flashover can potentially reset or upset a system. divert it , properly, to ground and no harm done.now, the fact that the hardwhino does not sit in a box , does not have a bare copper guard ring ... and blindly copied this usage of an inductor from no doubt the atmel app note, brings me back to my original statement : 'mindlessly copied an apps schematic without knowing what they are doing.'ESD protection of a circuit is fun. let's start with human body model .. zap.. oh there's now machine model 1 and 2 as wel . -krzzzzt- poof.. out comes smoke ...-edit-i got my terminology wrong... GND is the shield ground. Ugnd is the system ground in their schematic. i corrected this post.

author: dfnr2
author_rank: Regular Contributor
timestamp: June 22, 2012, 07:11:57 pm
content: Yes, free_electron is right. I obviously looked at that schematic before I had my coffee this AM. For some reason, the connector looked to me like a microprocessor to me (Perhaps because its a box, and I didn't read the pin designations, and I sometimes talk/type before I think and. . .umm. . .it looks like a chip?)Anyway, in that case, L2 would of course be intended--as stated by free_electron--to isolate the system GND from chassis GND, and also Z1 and Z2 are in the correct place.As discussed--again by free_electron--this entirely depends on a proper design; the protection is does come from the schematic, but the overall physical system design.I would just delete my post as unnecessary, but since free_electron already responded, I'll leave it in place.

author: westfw
author_rank: Super Contributor
timestamp: June 23, 2012, 07:44:35 am
content: QuotePerhaps. But it started showing up (on Arduino Uno) when Arduino started to hit it big, and wanted to get regulatory approvals (FCC, USB, etc) need to ship everywhere, sell through consumer retailers, and etc.And I don't ever recall seeing stories of people burning out their Arduinos via ESD-like events (nor of burning out their computers with ESD through/from the Arduino, which is probably more likely.) So I'd put good money on the added parts being needed more for regulatory approvals, rather than actual ESD. (not that that means they aren't a good idea...)(Prior to the polyfuse added in duemilanove, there WERE reports of fat-fingered shorting of power at the arduino causing the host computers (apparently with no USB power limit of their own) to shut down.)

author: T4P
author_rank: Super Contributor
timestamp: June 23, 2012, 08:53:48 am
content: Quote from: westfw on June 23, 2012, 07:44:35 amThat's the power limiting of some motherboards

author: SeanB
author_rank: Super Contributor
timestamp: June 23, 2012, 09:58:19 am
content: I had a motherboard where the power limiting was fusing a thin power trace to the USB connectors, unfortunately that trace fed the south bridge as well...............I had to do a little bit of work with a few bodge wires and superglue to replace the track section, but it worked well for years afterwards. I placed an external powered hub on the USB line afterwards.