Author Topic: How To Properly Use USB 5V For µC Power?  (Read 2308 times)

0 Members and 1 Guest are viewing this topic.

Offline algorhythmTopic starter

  • Contributor
  • Posts: 20
  • Country: us
How To Properly Use USB 5V For µC Power?
« on: April 18, 2016, 09:51:32 pm »
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.
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3043
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: How To Properly Use USB 5V For µC Power?
« Reply #1 on: April 18, 2016, 10:01:00 pm »
If  your footprint matches the sch symbol for that usb port, it's wrong
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline algorhythmTopic starter

  • Contributor
  • Posts: 20
  • Country: us
Re: How To Properly Use USB 5V For µC Power?
« Reply #2 on: April 18, 2016, 10:58:22 pm »
The footprint is ok.  The sch symbol is just mirrored to put gnd on the bottom.

Any tips about using the USB power itself?
 

Online KE5FX

  • Super Contributor
  • ***
  • Posts: 2002
  • Country: us
    • KE5FX.COM
Re: How To Properly Use USB 5V For µC Power?
« Reply #3 on: April 18, 2016, 11:13:12 pm »
The footprint is ok.  The sch symbol is just mirrored to put gnd on the bottom.

Any tips about using the USB power itself?

How 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.
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3043
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: How To Properly Use USB 5V For µC Power?
« Reply #4 on: April 18, 2016, 11:34:42 pm »
The footprint is ok.  The sch symbol is just mirrored to put gnd on the bottom.

"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:


~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline algorhythmTopic starter

  • Contributor
  • Posts: 20
  • Country: us
Re: How To Properly Use USB 5V For µC Power?
« Reply #5 on: April 19, 2016, 12:36:07 am »
How 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.

It 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...

. . . 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 . . .

Yes, 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.
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3043
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: How To Properly Use USB 5V For µC Power?
« Reply #6 on: April 19, 2016, 12:43:37 am »
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.




~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline algorhythmTopic starter

  • Contributor
  • Posts: 20
  • Country: us
Re: How To Properly Use USB 5V For µC Power?
« Reply #7 on: April 19, 2016, 02:07:46 am »
Ok great thanks for the info.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf