How To Properly Use USB 5V For µC Power? - Page 1
Forum section: electronics / beginners

author: algorhythm
author_rank: Contributor
timestamp: April 18, 2016, 09:51:32 pm
content: Hello EEVblog members.I am not a trained EE person, but more of a hobbyist with huge gaps in my electronics knowledge.I'm getting into smd stuff and am making a super tiny desk clock using an atmega328p, maxim ds3234 rtc, and avago hcms-29xx display. I am using a mini usb connector to supply power and have made a test/development board. The schematic for this board is shown in "old.png".When the dev board is powered by the usb connection, the display lights up, but it seems like the µC or clock chip keeps resetting and the time never increments. If the board is powered via a spark-fun ftdi basic board, the time increments and the dev board seems to work fine.I suspect it's an issue with the dirty USB power, so I made a new schematic with more filter caps on the usb power input, as well as some caps across the IC power and ground pins. The new schematic is shown in "new.png".I would really love to read feedback/suggestions/hints about my schematic and how to best use USB power, or anything else that could be improved.Cheers.

author: sleemanj
author_rank: Super Contributor
timestamp: April 18, 2016, 10:01:00 pm
content: If your footprint matches the sch symbol for that usb port, it's wrong

author: algorhythm
author_rank: Contributor
timestamp: April 18, 2016, 10:58:22 pm
content: The footprint is ok. The sch symbol is just mirrored to put gnd on the bottom.Any tips about using the USB power itself?

author: KE5FX
author_rank: Super Contributor
timestamp: April 18, 2016, 11:13:12 pm
content: Quote from: algorhythm on April 18, 2016, 10:58:22 pmHow much current does your project draw? Technically, anything over 100 mA is supposed to be requested from the host before actually drawing that much current. A lot of PCs don't seem to enforce that policy but maybe you've found one.

author: sleemanj
author_rank: Super Contributor
timestamp: April 18, 2016, 11:34:42 pm
content: Quote from: algorhythm on April 18, 2016, 10:58:22 pm"Mirroring" would not make your sch symbol look like that, your schematic symbol pins are not in the same order as the footprint, not just reversed but jumbled.If you are certain your footprint is OK, then that's fine (I wouldn't have thought it was a convenient layout for the sch symbol, but it's fine), but if your footprint somehow has Vcc and Gnd pin next to each other, that would be wrong.Correct pinouts:

author: algorhythm
author_rank: Contributor
timestamp: April 19, 2016, 12:36:07 am
content: Quote from: KE5FX on April 18, 2016, 11:13:12 pmIt draws about 30 mA. This little clock is intended to draw power from any usb port so that it can plug into a computer, power brick, or whatever else. I think it will need relatively robust power filtering to keep the µc/ics happy regardless of usb power input...Quote from: sleemanj on April 18, 2016, 11:34:42 pmYes, it's a wonky usb schematic symbol and the pins are "jumbled", but the footprint is correct. I assure you the pads are not jumbled, and the pins map to the pads just fine.What I'm really interested in here is how to properly use the USB power, i.e. how to filter it, etc., so that I'll have stable power for my µc and other ics from any usb supply. If you have any advice about that side of things it would be greatly appreciated.

author: sleemanj
author_rank: Super Contributor
timestamp: April 19, 2016, 12:43:37 am
content: I suggest you for starters measure what your USB voltage is, and preferably put a scope on it to see what's going on.Your project only drawing 30mA should not be any problem at all, even without any filtering unless your USB is really messed up.What is your brownout detection fuse set to... if it's 4.3v then a (very) marginal USB could easily trigger that.Your capacitors look more than adequate to me.

author: algorhythm
author_rank: Contributor
timestamp: April 19, 2016, 02:07:46 am
content: Ok great thanks for the info.