USB Power to external devices

Status
Not open for further replies.

Andy_123

Member
I have PIC18F2450 USB device powered from computer USB.
I have few external devices that will be connected to this PIC.

Some of them have own power and will provide 5V input signal.
Some are not and will require me to provide 5V to them (10mA max)

I was going to put internal 5V (coming from USB) via diode(to prevent backfeeding).
The only problem I see - if user accidently shorts 5V to common, then whole PC will be going down.
So anything simple that I can do to limit current to 15-20mA MAX?
Can I use output from PIC to supply 20mA - does output have a protection?
Any other ideas? It needs to be very simple with less parts possible.
 
Last edited:
Here is what I am thinking:
Set RA3 as output
Set RA2 as analog - at normal conditions <5mA resistor voltage drop will be less than 0.1V, if current is greater than 20mA, voltage drop will be 0.44V and analog input will detect it and shut output down.

**broken link removed**
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…