2023-11-29 01:51 AM
Hi!
I have STM32F469 and I am analysing how to connect an USB port to it.
My MCU will act as a device. PC will be the host.
My MCU has power supply equal to 3.3V which is created via LDO which is independently powered (not from VBUS, from host’s USB).
MCU sits on a PCB with rest of the components which are hungry for power. I presume the whole circuit will sink minimum 1A at 3.3VDC, or even more.
Problem is how to protect 5V-tolerant GPIOs (used for D+ and D- USB lines) from injected current in case my MCU is unpowered and somebody connects it via USB port to a alive host.
AN4899 has a solution for this in form of Zenner diodes. This are the extracts:
..now there are 2 questions:
Zenner diode can have voltage drop of 3.3V, but Zenner diode also requires this external resistor. This resistor should limit the current so Zenner does not burn up. Resistor will also have some kind of voltage drop, so final voltage difference between MCU’s GPIO and MCU’s VDD will be 3.3V + voltage drop on resistor, so MCU’s input will be on a higher voltage than specified 3,6V. As I see it, voltage drop on resistor should be exactly 5V – 3,3V = 1,7V, and have resistance equal to 1,7V / (Zenner diode’s rated reverse current). Now the Zenner diode will be protected but my MCU’s input will be fried because of 5V difference between Vdd and GPIO.
Any thoughts?
Solved! Go to Solution.
2023-11-29 03:33 AM
I'm not 100% sure, but I think that the differential USB data line is working with 3.3V, so there's no need to use more than the typical ESD protection.
2023-11-29 02:36 AM
The reference in AN4899, section 5.3.5 is only an example, which is why no component parameters are specified there. The meaning of the example could now be discussed, but perhaps it is more helpful to concentrate on practical solutions such as those in figure 12 of the same section?
Otherwise, a similar discussion has already been held here in the community, which also refers to this thread.
Hope that helps?
Regards
/Peter
2023-11-29 03:33 AM
I'm not 100% sure, but I think that the differential USB data line is working with 3.3V, so there's no need to use more than the typical ESD protection.
2023-11-29 05:57 AM
LCE is right. USB signals are max 3.6V, so no protection is needed.
Could also consider putting a schottky from VDD to your supply rail, but of course 1A is too much to pull from USB. Perhaps two different supply rails, one that powers the CPU and can be powered from USB or externally and one that powers everything else, not powered from USB.
2023-12-15 03:23 AM
Thanks, I now understand that I only need to figure out how to sense connection of USB socket, and that can be done via voltage divider circuit.
DP and DN are no problem because they are lower than 3.6V.