USB reference designs?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB reference designs?

430 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mark03 on Mon Sep 10 10:13:07 MST 2012
I intend to set up the LPC43xx USB OTG port so that

--My board can be powered by a USB charging cord or USB host, or by an on-board battery (using a Li-ion charge controller).
--The LPC43xx can function as a USB device when connected to a PC, etc.

So the cases it has to handle are

1) powered by USB, with no host at the other end (dumb charger only)
2) powered by USB, with real USB host at the other end
3) powered by battery, with USB host at the other end (host not capable of supplying power)
4) powered by battery (nothing connected to USB)

Could anyone point me toward a reference design or circuit examples for accomplishing this?  The official LPC43xx user guide is pretty thin on the necessary external components for getting USB power right (no circuit examples at all), and I couldn't find any app notes covering USB interface design.

Thanks,

Mark
Labels (1)
0 Kudos
1 Reply

217 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pacman on Sun Oct 14 20:16:05 MST 2012
Since noone replied yet, I'll give you what I have.

I hope that NXP's support group will comment on my answer; I'm no expert in this field!

If you look at the block-diagram for the 43xx, and find VBAT, you'll see how it connects to VDD _AND_ VBAT using two diodes.

So try investigating how you could connect diodes from the USB-port or an external battery.
-If there's +5V on the USB, you don't have to worry whether or not it comes from a battery, a computer or a dumb charger; you can find out whether or not there is a connection to a computer using software.

This could be a possible solution. I haven't tested it and I cannot guarantee that it doesn't blow up your desk...

+5V from USB-connector -> U1: LD1117-33; gives 3.3V -> D1: 4148 -> VDDREG+VDDIO.
+5V from USB-connector -> VBUS.
+5V..9V from battery -> U2: LD1117-33 -> D2: 4148 -> VDDREG+VDDIO.

Remember: There's a voltage drop over a diode; approximately 0.6V - 0.7V.
...So if you want a 3.3V regulator on a 5V supply, the 5V will drop to 4.3V over a diode, then the regulator will take the 1.5V, which means you got 2.8V left for your microcontroller.

Why didn't I just share a single LD1117 and connect two diodes to this single LD1117 ?
The LD1117 needs an input voltage that is 1.5V higher than the desired output voltage. I'm not sure that it'll adjust correctly, if the input voltage is below 5.0V.
After the voltage is adjusted to 3.3V, I've put a diode in, because then you'll be able to connect power from more sources.
BUT BEWARE: Do not add an external power supply plus USB power at the same time; eg. Do not use two power supplies that are both connected to the mains in some way, or you could fry your microcontroller (plus your PC).
In other words: One mains power supply (which includes USB), and one battery (you could use more batteries, but that doesn't really make sense).
When you're experimenting, it might be a good idea to have a USB-hub between your computer and your electronics. Also remember to measure your voltages before connecting your device to your PC; even though you're gong via a USB-hub.

And... Don't take my word for how to do this. Make sure you understand how it should be done, before you do it. ;)


Love
Jens
0 Kudos