Best option to power a project - Page 1
Forum section: electronics / beginners

author: rrinker
author_rank: Super Contributor
timestamp: December 15, 2017, 06:28:07 pm
content: The thread on DC power jack standards raised a question. I have an idea for a project (in my head only so far) that will need 5V at less than .5A. I see maybe 3 ways to get power to this (not counting batteries, it has no need to be portable enough that a battery supply is necessary).1. Put a USB jack on it and use one of the ubiquitous 5V power adapters used with cell phones. I might even have a spare one or two.2. Put a 2.1mm jack on the thing and use a 5V wall wart with a matching plug.3. Put a 2.1mm jack on it and use a higher voltage wall wart with a matching plug, and include a 5V regulator circuit int he project.Technically, they all will work. Nothing here is costly - although I don't have any 5V wall warts but I do have plenty of 9V ones which, post protection diode would be great to feed a 5V linear regulator. All provide stable enough power (at least if I use the proper caps with the regulator).So, assuming a box that will sit on the bench and needs 5V power, which option would you pick?Oh - I guess there is a 4th option, since it will generally live and be used on my bench - I could throw a couple of banana jacks on it and power it from one of my bench supplies. Doh!

author: Gyro
author_rank: Super Contributor
timestamp: December 15, 2017, 06:57:06 pm
content: How important is the tolerance of the 5V to you? There can be a relatively large variation from 5.0V provided by different USB sources - it could be a bit high or a bit low. Likewise, how important is the noise level on the 5V rail? USB / 5V mains adaptors are obviously SMPS, so won't exactly be silent, this might be an issue for sensitive analogue circuitry.If the answer to either of the above is'quite important'then I'd go for an internal regulator. If not, then either option 1 or 2 would work, depending on what you have available in the way of cables, and adapters, ie. minimum cost.EDIT: One further point. Fitting a 2.1mm jack on it makes it more open to being connected to the wrong adapter. If there is an internal regulator it will protect against this a lot better than a direct feed to your supply rail! This implies either Option 1 or 3 depending on the tolerance and noise issues I mentioned above.

author: mariush
author_rank: Super Contributor
timestamp: December 15, 2017, 07:54:37 pm
content: If you put a barrel jack on your project, you'll need to have a regulator or some protections, because people are likely to accidentally plug a 7.5v or 9v wallwart instead of your 5v regulator. It's rarer, but some switches and routers still come with AC output adapters so if you are really paranoid you would also have to add a diode in series with your input to block reverse voltage from damaging your device.Put a microUSB connector or a usb type b connector on your product, to basically make sure you're gonna get less than 5.6v .. 6v - most 5v phone chargers output decent voltage but some of the cheapest just use a 5.6v zener diode in the feedback to control the output voltage, so your project may get up to 5.6v or possibly even more for brief moments.Most microcontrollers are designed to tolerate up to 5.5v or 6v and most should also work with 4.5v or some voltage around that value (because at 500mA through a thin usb cable you have to account for voltage drop on the cable, you may only get 4.8v at the connector at 500mA , even though the adapter outputs 5v.You could add a LDO (linear regulator with very low dropout voltage) to make it output 5v or Vin - ~ 0.1-0.2v , so if your adapter is crappy and outputs 5.5v then you get 5v, and if it's good adapter and outputs 5v and you have 4.8v at the connector due to losses on the cable, you'd still get around 4.6v..4.7vBut if your project is not that sensitive to the low voltage threshold, it would be easier to just put a schottky diode ... for example this one has 0.3v drop at 1A, less at 500mA :https://www.digikey.com/product-detail/en/diodes-incorporated/DFLS130L-7/DFLS130LDICT-ND/673203

author: james_s
author_rank: Super Contributor
timestamp: December 15, 2017, 11:59:27 pm
content: While it does solve the voltage problem, I have to say I'm not a big fan of using USB connectors to supply power. The micro ones tend to be quite fragile and a lot of USB power sources have rather poor regulation. Personally I tend to use a 2.1mm barrel connector with an internal regulator, these days usually a buck type switchmode regulator.

author: Nusa
author_rank: Super Contributor
timestamp: December 16, 2017, 01:02:09 am
content: The main advantages of the USB option are that you can power it from nearly any computer made in modern history, given that your current requirements are under 500ma. Not to mention generic phone/tablet/battery chargers. Plus you don't have to make cables yourself.Add your own protection if charger regulation scares you.

author: james_s
author_rank: Super Contributor
timestamp: December 16, 2017, 01:13:36 am
content: It depends on what it is though, for example I have a flashlight that is charged by a USB plug. I use it in my garage in which a computer is nowhere to be found. I do have various USB chargers of course but most of them are rather bulky for the power they provide and the cord is not built in but is a separate USB cable. The bigger issue is as mentioned previously the connector is rather fragile and I've had to repair them on a number of occasions.Many things do make sense to have USB powered but generally speaking I'm not a fan.

author: Nusa
author_rank: Super Contributor
timestamp: December 16, 2017, 01:21:28 am
content: Aye, although he did indicate it's something that isn't likely to need remote power.Don't fixate on a particular USB connector's drawbacks. There are other choices in the USB line-up. A fixed cord to a USB plug is another option, particularly for devices that have no unplugged functionality.

author: james_s
author_rank: Super Contributor
timestamp: December 16, 2017, 01:24:01 am
content: I was only stating my opinion, he's free to take all suggestions into consideration and make any decision he likes. There are advantages to using USB, I just personally don't care for it in most cases.

author: rrinker
author_rank: Super Contributor
timestamp: December 18, 2017, 03:08:40 am
content: Thanks for the suggestions.To be more detailed, the device will have an Arduino Nano embedded (why, instead of just a bare chip? Because I have a dozen that cost me little more than $1USD each, and I have a large supply of header pins). So regulation isn't super critical. The problem (and why it needs an independent power source) is that is needs to drive more than can be provided from the on-board 5V source (but less than 500ma total).I did forget one other possible option, instead of a linear regulator, I do have a whole bunch of small buck converter modules capable of sourcing sufficient current.My thoughts on my options: (also I failed to mention directly that this project is for my exclusive us - I'm not making it to hand off to others to use, so any screw ups with plugging in the wrong power or whatever are strictly on me)1. A USB power connector could be confusing, since there needs to be a second USB connected to the Arduino So while the easiest way to get 5V/up to 500ma in the thing might be a USB connector, there is this drawback.2. Feeding 5V in via a barrel connector - I'd still need to clamp it in case a higher voltage supply were used. And protect against a backwards adapter being used, which will drop the voltage slightly.3. Feeding in 9-12VDC and regulating it myself - remembering I have the buck converters, I think this is probably my best bet. Even using a simple diode reverse polarity protection (not even low forward voltage types like a Schottky), the input will be high enough for the buck, and the max input can actually go well above 12V and be good - these have a max input of 40V. I did test them and they have decent output without a ton of ripple and they hold up a 5V output down to a 6V or so inputI'm trying to do this with what I have on hand, which unfortunately isn't a whole lot, but it does appear that option 3 is the best way to go as it is the most foolproof (I need all the help i can get) and I have the required parts.Thanks everyone for the advice. Now to complete the design and start building.

author: paulca
author_rank: Super Contributor
timestamp: December 19, 2017, 01:03:28 pm
content: Quote from: rrinker on December 18, 2017, 03:08:40 amYou could tap the USB supply pre-regulator in the Arduino so your 500mA is not running through the arduino but is coming in on the same USB connection. So you only have one USB input that provides access to the ardy and provides power to the other parts of the board.A common USB port will by default provide around 500mA.Taking a quick look at an Arduino nano I have here, the USB micro pins are accessible and there are veers through to the protection diodes and regulator on the back side. You should be able to tap the 5V supply off somewhere there.