Closed kb1lqc closed 8 years ago
I placed all my oscilloscope captures and a description PDF file into the Production branch Engineering Documents folder:
When connecting a Faraday to USB a rising edge inrush event occurs which will cause ringing with the capacitance and inductance on Faraday. The image below shows this inrush event measured with a low inductance ground lead for maximum signal accuracy.
Looking past ferrite bead Z2 we can see what signal the 5V rail of Faraday experiences
U12 limits inrush current by linearly turning on over the course of just about 1ms. This limits the charging current of bulk capacitance such as C17. All tests here performed with standard oscilloscope 6" ground clips to ground.
For record, I plugged a 9V battery into Faraday via the VCC connector and then plugged in USB. As expected almost no current is drawn from USB so both +5V rail and Q3 pin 3 rise quickly as little voltage is dropped across U12 as it turns on.
I also performed a test where I left the 5V USB cable plugged in but then attached the 9V battery causing the ideal diode U2 (LTC3312) to reverse bias allowing the 9V to take over powering Faraday seamlessly. Same oscilloscope channel connections.
A full end-to-end test showing the turn-on of power to U3 TPS562201 regulator input.
It's clear that the inrush current is in-fact limited and soft-start works well. Not totally sure it's USB compliant but it's a good effort for sure.
The FTDI FT230X allows you to use FT PROG to program the CBUS pin functions. Therefore I populated U11 and C15 while DNP R7 to allow CBUS3 to control the inrush limiter U12.
The scope capture below shows the USB negotiation occurring which after about 200ms the FT230X commands CBUS3 to enable U12 on. It's working!
Zooming out a bit it's apparent the computer is generating some noise on Channel 1 (yellow) and after roughly four seconds it settles down. It does not appear that the noise makes it passed the ideal diode into C17, or it's at least filtered out a bit.
Finally moving into a zoomed in position to take a look at the turn-on even when the FTDI FT230X enables the USB high power to occur. It's apparent that the output of U12, Q3 pin 3 and C17 float up to about 2V given U12 has some leakage current through it even when it's off.
:exclamation: I realized that if Faraday uses USB negotiation then when it is plugged into a USB battery pack there is no computer to negotiate with. @kb1lqd
Testing this with my Goal Zero Lighthouse Mini (lantern with USB output) I definitely see about 2V across C17 even well after turn-on. This configuration prevents Faraday from working with USB battery packs, however, 9V batteries on VCC would work fine.
I tested the leakage of the MIC94072YC6 when commanded to be off. To do this I plugged it into my Goal Zero USB battery pack which does not perform USB negotiation.
U12 Pin 3: 5.1V U12 Pin 4 5.1V U12 Pin 1: 1.395V
Clearly the MIC94072YC6 is being commanded off but it is not fully off. When I short Q3 pin 3 to ground through a multimeter I measure about 11mA which is not what the datasheet says it should be doing. Interesting.
OK after much thought I'm going to keep the MIC94072YC6 and LTC4412 but use the USB configuration method. U12 seems capable of leaking 11mA when commanded off which could be a measurement error by me (poor solder?) but regardless this isn't an issue as we do not plan to support USB battery packs when 9V batteries are easily supported.
USB Inrush Current is nicely worded at the provided link. Faraday by design will initially place 1.3uF of capacitance on the VUSB pin to GND when attached. This is well below the 10uF limit and while I don't have the equipment to test inrush this is a good indicator that Faraday would pass.
Roughly 250ms after connection to power as shown below, Faraday negotiates into PWREN mode from the FT230X which turns on U12 allowing the >10uF present downstream from U12 to be connected to USB power with a ~800uS turn on soft-start. The USB specification requires no device to sink more than 100mA after inrush for at least 100ms which means by design Faraday is compliant with this USB 2.0 power specification.
It's worth noting that the USB specification actually requires at least 1uF capacitance on VBUS in Section 7.2.4.2 so that a minimum inrush event is guaranteed. This allows devices to be detected if they are connected so they can turn on the circuitry that is powering the peripheral such as Faraday.
Completed my USB and power multiplexing tests I intended on this issue. I performed others off the record prior to starting this GitHub to ensure proper design as well.
Testing performed to validate the design of the 5V USB power supply inrush limiting and USB compliance. Essentially, it's in our best interest to prevent Faraday from causing an inrush event when plugged in and ringing to over-voltage and destroy itself :white_check_mark: