Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

60%
+1 −0
Q&A How to use USB-B to power 5 V microcontroller and peripherals

The first thing to do is to check the valid supply voltage range of the chips you want to use. Compare those to the min/max USB voltage you are guaranteed at the end of the worst case cable. If I...

posted 9mo ago by Olin Lathrop‭

Answer
#1: Initial revision by user avatar Olin Lathrop‭ · 2025-12-22T13:22:52Z (9 months ago)
The first thing to do is to check the valid supply voltage range of the chips you want to use.  Compare those to the min/max USB voltage you are guaranteed at the end of the worst case cable.  If I remember right (your job to check), that is something like 4.2 V to a little over 5 V.

It would be very strange if a chip intended to interface with USB can't be powered directly from the USB.  If not, get one that can be.

There are many microcontrollers available that are fine with the full range of USB power voltage.  Unless you have an unusual niche application or need a lot of compute power, finding a micro that can be powered directly from USB and that can do the job you want shouldn't be hard.

You might even consider a micro with a built-in USB peripheral.  I usually use a PIC 18F for that.  There are definitely versions available that can run directly from USB power.  I've done that.

As for startup glitches, the limits are in the USB spec.  If I remember right (again your job to check), you are allowed up to 10 &micro;F directly on the USB power.  With a small number of ICs, distributing the max allowed capacitance among the bypass caps should be no problem.

If you really need 5 V within a tight tolerance for some unavoidable reason, then you will need a buck/boost switcher or a boost switcher followed by an LDO.  Keep in mind that you are only allowed 100 mA (I think) before enumeration.  During enumeration you can request up to 500 mA.  Although the host is not obligated to grant you 500 mA, in practice you will get that unless you are running from a USB-powered hub or in a few other special cases.