USB CDC device works on laptop, but not on WinBook tablet

I have a USB device that I designed several years ago, using the Microchip PIC18F2550, and it has worked mostly OK on various laptops. It has four DC-DC converters driven by the USB 5V power and it is configured for the maximum 500 mA current draw. The actual current is 350 mA. The 5V USB supply connects to a 47 uF 16V aluminum electrolytic and a 1 uF 16V MLC capacitor. The 5V logic supply for the PIC and other components is fed through a Schottky diode and then multiple 1 uF bypass capacitors. There is a P-channel MOSFET which is turned on once the USB has been enumerated, and it provides power to the four DC-DC converters bypassed by a 47 uF capacitor.

The laptop, running Win 8.0, accepts the USB device with no complaints, and everything works OK. But when I plug into the Winbook, the status LEDs indicate that the device starts to initialize, but it seems to hang up when the MOSFET is turned on, and it then turns off with the LEDs showing an incomplete initialization. The odd thing is that the Device Manager reports the device to be working normally as a serial port. I tried changing the values of the large capacitors but the problem persists.

I would like to be able to operate this device from the WinBook (which is fully charged and plugged into the charger). The WinBook is running Win 8.1, which shouldn't make any difference to the USB subsystem. If I had encountered this when designing it, I could have incorporated some current limiting circuitry, but this is a mature design and not easy to modify. Any ideas on how to troubleshoot?

Thanks,

Paul

Reply to
P E Schoen
Loading thread data ...

I would be looking at that 500ma. The USB device has to ask for 500ma first, before it tries to draw it otherwise a fully compliant host will shut it down if it just tries to take more than 100ma

Reply to
David Eather

The USB descriptors for this device call for the maximum 500 mA, and it has worked on many other computers, mostly laptops and desktops. I have seen cases where excess current was being drawn, and that shows up as an error message pop-up as well as in the details of the device in the device manager.

An employee at the company that uses this device (BTS Analyzer) found that there were some USB ports that didn't work with the analyzer, and he came up with a fix where he replaced the capacitors with C36=330 uF and C56=470 uF. C56 is directly across the USB power, and C36 is on the other side of the MOSFET to the DC-DC converters. Here is the procedure:

formatting link

And here is the schematic (The BTSA-3T and ORTM-4H use the same board, but populated differently):

formatting link

I haven't tried such large capacitors, and they are much larger than the recommended value for the USB supply. But I'll give it a try to see if it works on the WinBook. I will also have a closer look at the PIC code. It seems like the PIC may be latching up, and perhaps the watchdog timer or power-up timers are not working.

Thanks for the ideas.

Paul

Reply to
P E Schoen

On Thu, 19 Nov 2015 17:55:45 -0500, "P E Schoen" Gave us:

Try buying a powered USB hub, and seeing if it powers the device enough to not shut down. The hub will certainly work on the winbook and not have a high current draw, and the fact that it is powered means that the hub itself is what powers the devices plugged into it.

I am not saying this is a solution. This will allow you to diagnose whether or not it is a power draw problem.

It would also be a solution were you to not care that you now have more than the mere device itself plugged in (rats nest syndrome).

Reply to
DecadentLinuxUserNumeroUno

Some of those systems had power output settings for the USB ports.. A lot of times you don't get the full 500mA but you can if you go in there and config it. That as been my experience..

Jamie

Reply to
M Philbrook

On Thu, 19 Nov 2015 20:33:06 -0500, M Philbrook Gave us:

Bullshit, liar. There are no laptops or PCs, much less tablets where the OS allowed one to configure the current drive capacity of the port.

The only thing you could configure was the timeout and whether the power stayed up after a shutdown.

Reply to
DecadentLinuxUserNumeroUno

The USB spec says that a device switching from low power to a higher power must not cause a Vbus (the 5V line) drop of more than 330mV, and indicates that this can be achieved by limiting the additional capacitance to 10uF.

Clearly, you device doesn't comply with that, so the USB system is within its rights not to work properly.

Does the PIC have control over the DC-DC converters? Could it disable the converters, and switch the MOSFET on and offer repeatedly, so as to charge the capacitor in steps, leaving time in between for the Vbus to recover?

Sylvia.

Reply to
Sylvia Else

I tried adding a 470 uF capacitor across C56 (47 uF) but it still did not fix the problem. At one point, the device manager reported that the USB device could not start, but then after re-inserting the connector it reported no problems, but the device was still not working properly. I jumpered across the MOSFET so the USB power was applied immediately to the DC-DC converters, and it works OK, drawing 0.32A from the Winbook.

So it appears that there is a problem with the PIC firmware, but it seems odd that it fails only on the Winbook and not the laptop. Apparently the host firmware assumes the device is working if it goes to the enumeration and configuration state, and then does no more checking. Perhaps the easiest "fix" is to install the jumper, which conveniently goes between two test points 1/4" apart.

I recall having some similar problems when first designing this unit, and I may have tried using simple PWM to "soft-start" the power to the DC-DC converters, but I think I changed the capacitor values and it seemed to work on the computers I had at the time.

Thanks,

Paul

Reply to
P E Schoen

Now that is where you are full of shit, again....

Please do your home work before you add to that "Make myself an Ass" again pile.

Jamie

Reply to
M Philbrook

On Fri, 20 Nov 2015 12:36:00 -0500, M Philbrook Gave us:

Pop me a screen shot of the "current control" dialog box then, you lying piece of shit.

Reply to
DecadentLinuxUserNumeroUno

On Fri, 20 Nov 2015 14:49:15 -0500, M Philbrook Gave us:

But it DOES NOT allow you to change the current output setting, because there is none as the USB spec is set in stone, idiot. And you claimed it was adjustable, so YOU LIED!

Reply to
DecadentLinuxUserNumeroUno

I doubt that there are any host devices that do not have at least one full spec USB port allowing 500 mA. I have proven that my Winbook, with only one USB port, easily drives 350 mA.

My Dell laptop has two full speed USB 2.0 root hubs capable of 500 mA and an xHCI extensible USB hub probably 3.0 high speed, which does not show the power (current) available. There are also two generic USB hubs capable of

500 mA per port.

Here is an article that claims a way to adjust the power available, but my power management properties do not have that option, but only allowing the PC to turn off the device to save power.

formatting link

Here is more information:

formatting link

I was under the impression that the USB port defaulted to low power (100mA) until the enumeration and configuration process completed, which negotiates for the higher power 500mA. That's why I added the MOSFET to delay the additional current draw until the port was ready. But apparently the port allows the full 500 mA, and may even allow it without client USB hardware, as may be the case for USB powered lamps and fans. I have confirmed this by plugging in two LED lamps that draw a total of 330 mA, and the device manager does not report their presence.

Paul

Reply to
P E Schoen

After playing with mine, It seems that windows dose a rescan, enumerate of devices and calculates power usage. I have my devices listed as how much current each device on the bus is using.

Is it possible your device is coming on soft and then ramping up the current, there by causing the system to kind of fold back?

Maybe it needs to be at full 500mA at plug in to get the hold deal on yours?

It also is telling me I have a 100mA drain from a USB mass storage device, one that I wasn't aware of because I don't have any flash drives plugged in. Unless its the back up storage that is hidden from the shell? I wasn't shy when I got this machine, although its aging now :) Jamie

Reply to
M Philbrook

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.