An isolated flyback SMPS? That would allow for a voltage tracker so power dissipation could be limited in (presumably) the linear output regulator.

What would the level of isolation be - will the output be truly isolated (e.g. with optocoupler) or will it just have a floating ground limited to +/-12V (for one additional output)?

USB ports can supply 5V @ 500mA but only with negotiation - are you going to worry about this Dave - I know most systems don't really care or enforce it but there are a few ones which do. Also for a 12V output this is ~200mA which is probably okay for most circuits but will this current limit be the same at lower output voltages?

looks interesting, like on the "other" usupply, another 7mm between the knobs would be ideal, (enough to push your index finder between to turn and not have the finger joint catch on the upper one)

also like the look of how simple it looks, (perhaps add a Vin and ground pad for people who might want to make this battery powered, but nothing more on that front i would think)

still the back looked rather bulky, but not quite bulky enough for a transformer, i would then guess a charge pump?

still if the box it end up using is about as thick as a fat calculator, then i would think it would make a great kit / tool, likely using 90 degree binding posts, or...? binding posts mounted to box and a small connector used? but thats for you to enlighten us on i suppose

Notwithstanding Dave's unmeasured skill at passing gas through mobile loops of bread, could one take power from 2 USB ports if one actually needed to?I am pretty sure that no USB ports on consumer equipment actually does any sort of current limiting to 500ma.

Notwithstanding Dave's unmeasured skill at passing gas through mobile loops of bread, could one take power from 2 USB ports if one actually needed to?I am pretty sure that no USB ports on consumer equipment actually does any sort of current limiting to 500ma.

A suggestion that would both solve the negotiation issue and provide extra functionality - put an FTDI chip in there. Not necessarily for controlling the PSU (although the ability to display and log current draw may be handy), but just as a TTL level serial port that will often come in handy when debugging.

Something else worth considering is that there are plenty of USB supplies that can provide more current, so if there is a 500mA current limit, there should be a way to override it. I think there is some sort of standard that uses resistor values to tell a device how much current is available from chargers.

USB ports can supply 5V @ 500mA but only with negotiation - are you going to worry about this Dave - I know most systems don't really care or enforce it but there are a few ones which do.

That is a myth. USB ports do not require negotiation to supply 500mA, they must supply 500mA at all times regardless.Approved USB devices are required to "play nice" and negotiate first before drawing 500mA, but it makes no actual difference to the USB hosts ability to supply it.

i think you can shave some of the price by removing those bulky LED displays and displaying voltage and current in software on the computer (it will be connected to computer after all, right?)

i would leave rotary encoders though.

But you'd need to pass the data over the isolation barrier - not hard but more cost. I think local display is essential - laptop screen space is small enough already. Maybe should be LCD though to avoid eating into the available power.

And of course the first comments all say the same thing, can it supply more current and work with higher current ports etc. Feature creep

As we will no doubt see, it's all a trade-off with the size of the unit, and the cost, complexity and size of the isolated DC-DC converter required to handle it all.

For those interested, no data comms ability, it's just not worth it. I want a simple lowest possible cost unit that is just a PSU.

Dave.

Simplicity makes sense, and avoiding doing anything with data makes a lot of problems go away - can I suggest you put a USB type A pass-though socket on - some laptops don't have enough USB ports, so not losing one for the PSU would be handy and not cost much.

Simplicity makes sense, and avoiding doing anything with data makes a lot of problems go away - can I suggest you put a USB type A pass-though socket on - some laptops don't have enough USB ports, so not losing one for the PSU would be handy and not cost much.

No, it isn't. Last time we had that discussion we even quoted the standard to you. You could have used that as an opportunity to educate yourself. This time I am to lazy to dig out the standard again. One can lead a horse to the water ...

I like the idea.. power/gnd isolation is good to have, saves some hassle at later times. Of course it might be nice to have usb-controllability (and back-read) but isolated data does add cost and needs board space.

Led-displays are quite nice, but they tend to eat quite a lot power (many mA per each segment on). I wonder if one could find somekind of suitable smallish LCD (seperate segments, not generic text/matrix) that could be used instead for those two readings.

No, it isn't. Last time we had that discussion we even quoted the standard to you. You could have used that as an opportunity to educate yourself. This time I am to lazy to dig out the standard again. One can lead a horse to the water ...

I've read the standard, you simply did not understand what I was saying.You could not show me where it said that the USB port cannot actually provide 500mA at all times. That is the myth I'm talking about. People actually think the USB port somehow limits itself to 100mA output current and cannot/will not provide any more until 500mA is negotiated. That is simply not the case, 500mA is available at all times.

I think you're missing out on a great opportunity to design a low voltage flyback. It's not too difficult and there's a lot to be discussed. Many different ways to do it. Thermal calculations, and an introduction to magnetic "circuits". You can even get pre-made transformers for chips such as LM2577 so there's no need to design or wind your own (Coilcraft sell some IIRC.)

Led-displays are quite nice, but they tend to eat quite a lot power (many mA per each segment on). I wonder if one could find somekind of suitable smallish LCD (seperate segments, not generic text/matrix) that could be used instead for those two readings.

I think you're missing out on a great opportunity to design a low voltage flyback. It's not too difficult and there's a lot to be discussed. Many different ways to do it. Thermal calculations, and an introduction to magnetic "circuits". You can even get pre-made transformers for chips such as LM2577 so there's no need to design or wind your own (Coilcraft sell some IIRC.)

Yes, commercial DC-DC.I don't really have the time or inclination to dick around designing my own I'm afraid, as educational as it would be.

dave has yet to tell us what method of isolation he is using, transformers arent the only way and at low voltages and currents transformers usually arent the most ideal method,

while i do agree about 7 segment displays sucking down a bit of juice, i think they are better for this application, as generally they are far easier to read from a distance, and something like this is very likely to be used in barely lit rooms, perhaps using a few smd current limiting resistors or somehow through the driver chip, but once again unless its built into whatever is driving it, it adds parts,

I would find it helpful to have a usb socket on it to test devices if it were possible. Might not be that appropriate for a lab power supply but having something where you can quickly find the current drawn by a usb device could be helpful. It would also have to be constant 5v volts to avoid mishaps though. Also having the ability to isolate the USB device under test so there is lower risk to the computer rather than hooking up directly to the 5v on the USB port. I would imagine there are devices like this already though.

Do you need two displays?, might work if you had a display and a button to toggle between volts and amps or it's done, or as in the low power gecko development board using a thin LCD diplay like on the usb sticks with capacity meters.

Fascinating how everybody wants Dave's small USB power supply to do something else...in the end it's going to end up making tea aswell . Dave, don't let yourself be distracted too much. Just keep it simple, what you said so far sounds good .

Fascinating how everybody wants Dave's small USB power supply to do something else...in the end it's going to end up making tea aswell . Dave, don't let yourself be distracted too much. Just keep it simple, what you said so far sounds good .

There can always be more versions with greater power ability and data transfer etc, but I want small, cheap, and simple first.

I have many different types of supplies, but this one is very interesting, portable, when I go to work at a client's office. It would be even nicer if you publish the code for the micro controller (if there is one in) so we can have fun programming it too... i'd definitely buy one !

That is a myth. USB ports do not require negotiation to supply 500mA, they must supply 500mA at all times regardless.

You are (as usual) being overly tricky with words there. The USB spec requires devices to negotiate in order to draw 500 milliamp. It does not require hosts to implement any sort of current limiting, although contrary to your statement they are allowed to. A USB host would be perfectly within its rights to shut off a device that attempts to draw more than 100 milliamp without negotiating for it, although this does not happen in practice.

More to the point, USB hubs are not required to implement programmable current limiting depending on whether they are powered or unpowered. A conforming USB device inserted into an unpowered hub should enumerate and then fail to operate if it can't get enough power. It should not short out the power supply of the hub which could crash the hub and any other connected devices.

That is a myth. USB ports do not require negotiation to supply 500mA, they must supply 500mA at all times regardless.

You are (as usual) being overly tricky with words there.

Not trying to be.

Quote

The USB spec requires devices to negotiate in order to draw 500 milliamp. It does not require hosts to implement any sort of current limiting, although contrary to your statement they are allowed to.

I never meant to say they are not allowed if they want to, just that the standard does not actually require them to do so, so they don't, as you say.And if they did actually limit 100mA to the first device plugged in, and it draws that 100mA, then there is nothing left to power the next device that is plugged in which is rightly allowed to also take another 100mA off the bat. That's the likely reason why they never implement limiting?

Quote

A USB host would be perfectly within its rights to shut off a device that attempts to draw more than 100 milliamp without negotiating for it, although this does not happen in practice.

Correct, and that's what I meant, sorry for any confusion.I'm not going to get into word games, just trying to clear up a common myth that I often see repeated.You nailed it on the head.

I think you're missing out on a great opportunity to design a low voltage flyback. It's not too difficult and there's a lot to be discussed. Many different ways to do it. Thermal calculations, and an introduction to magnetic "circuits". You can even get pre-made transformers for chips such as LM2577 so there's no need to design or wind your own (Coilcraft sell some IIRC.)

The problem is the range of ready-made transformers is much smaller than ready-made DC-DC's. The ready-made ones tend to run at pretty high frequencies for efficiency, and this is less practical for a discrete design. Obviously good efficiency is important for this application.

Simplicity makes sense, and avoiding doing anything with data makes a lot of problems go away - can I suggest you put a USB type A pass-though socket on - some laptops don't have enough USB ports, so not losing one for the PSU would be handy and not cost much.

Notwithstanding Dave's unmeasured skill at passing gas through mobile loops of bread, could one take power from 2 USB ports if one actually needed to?I am pretty sure that no USB ports on consumer equipment actually does any sort of current limiting to 500ma.

Many modern microcontrollers have USB peripherals on them; presumably you are using a microcontroller on the board to drive the displays, so why not pick one with USB and do the enumeration to get 500mA? If it fails you could make something like the current display flash to indicate that the USB current is being exceeded. Just like I don't like using a 3A diode above 3A, or a 40 MHz micro above 40 MHz, it's just bad engineering practice. Sod's law will mean that some really popular series of laptops or desktops have current limiting.

Many modern microcontrollers have USB peripherals on them; presumably you are using a microcontroller on the board to drive the displays, so why not pick one with USB and do the enumeration to get 500mA?

Because it makes the isolation harder. The MCU needs to be on the isolated side to talk to the PSU circuitry

You could not show me where it said that the USB port cannot actually provide 500mA at all times. That is the myth I'm talking about. People actually think the USB port somehow limits itself to 100mA output current and cannot/will not provide any more until 500mA is negotiatedDave.

Ehhh.. It depends. Most desktop computers simply have a 500 mA polyfuse from the 5 volts rail to the USB Vbus pin.Laptops do the same.

But... There are motherboards out there that use intelligent power switches typically from the TISP family (TI). These are digital mosfets in SO8 package with 2 feedback signals .. And these things detect 40,100 and 500mA. Combine that with a usb host controller that supports this and you have troubls. Truth be told , i haven't seen many of these around but they do exist. Some SuperMicro server boards use them as well as some intel workstation grade boards.Try plugging a usb powered harddisk in that does not behave well and there is no starting it. Windows gives you a little balloon that say something along the lines of 'this device draws too much power and has been disconnected.'

TI also makes usb hub controllers that can interface with these intelligent power switches. If a peripheral kicks the bucket it doesnt drag down the whole system. The host simply turns the channel of. The host can also forca a 'reboot' of an unwilling slave..TISP2401 series if my memory works right this morning.

Many modern microcontrollers have USB peripherals on them; presumably you are using a microcontroller on the board to drive the displays, so why not pick one with USB and do the enumeration to get 500mA?

That requires isolation of the data too. Adding large cost and complexity, for almost certainly no benefit.

Quote

If it fails you could make something like the current display flash to indicate that the USB current is being exceeded. Just like I don't like using a 3A diode above 3A, or a 40 MHz micro above 40 MHz, it's just bad engineering practice. Sod's law will mean that some really popular series of laptops or desktops have current limiting.

I've yet to see one or hear of a confirmed case of one that does 100mA current limiting. To increase the cost and complexity on such an otherwise simple design just to do proper enumeration that is not needed in practice would just be silly.Sorry to all the perfectionists out there. Reality engineering wins out.No further correspondence will be entered into.

Ehhh.. It depends. Most desktop computers simply have a 500 mA polyfuse from the 5 volts rail to the USB Vbus pin.Laptops do the same.

But... There are motherboards out there that use intelligent power switches typically from the TISP family (TI). These are digital mosfets in SO8 package with 2 feedback signals .. And these things detect 40,100 and 500mA. Combine that with a usb host controller that supports this and you have troubls. Truth be told , i haven't seen many of these around but they do exist. Some SuperMicro server boards use them as well as some intel workstation grade boards.Try plugging a usb powered harddisk in that does not behave well and there is no starting it. Windows gives you a little balloon that say something along the lines of 'this device draws too much power and has been disconnected.'

I am well aware of these USB current limit devices, I've used them myself.But I have yet to see or hear of an actual USB host implementation that limits the 100mA until negotiation.There might very well be some device out there that does it, but that's no reason to jump through hoops to cater for the remote possibility with proper enumeration. Yes, that windows popup message is not uncommon, with devices that measure and enforce the 500mA.

Two laying down next to each other makes a 14x5 array. Which is enough for 3 numbers plus a dot (3x5 font)And at US$1.58 it's cheaper than the $1.60 for 3x7segs. The only extra requirement is I/O to drive it, in my project i multiplexed and drove 4 of those modules directly from ATMega i/o running on 3V (they're quite bright at low current but transistor driven rows is probably best for daytime/bright use).

Now you probably could find slightly cheaper 3x 7 seg displays from china but i think two 5x7 matrix displays is better for displaying data.If it's an open hardware project it allows more freedom for people to customize the code (letters maybe) and doesn't change the price.* The DC-DC module.I've not seen any info on output voltage but you could have multiple footprints on the PCB for multiple DC/DC modules with all their outputs in series. It would then be possible to customize the max output voltage for a unit without upping the price for people who don't need it.Of course if you can find a single module that can output 0-15V from 5v input then there isn't any need for more.But i'm guessing the module is a generic isolated 5V out.

* Power jackI saw a DC jack on one of your prototypes, this is definitely a good idea.If you're out-and-about and need more voltage/current then finding a 9-15v wallwart on some nearby device is pretty easy.Coupling the dc jack with a rectifier deals with the polarity and ac/dc issue quite nicely.

* Current.It shouldn't be hard to source some USB HDD cables from china that have the double ends for more current. And people will likely have these already anyway.Might as well design the electronics to handle as much current as it can. I suspect the DC/DC will be the limiting factor here.But as said above, multiple footprints for extra modules (this time in parallel) might be a solution for people who want extra current.

And if they did actually limit 100mA to the first device plugged in, and it draws that 100mA, then there is nothing left to power the next device that is plugged in which is rightly allowed to also take another 100mA off the bat. That's the likely reason why they never implement limiting?

What I mean with hubs is the following. An unpowered USB hub draws up to 500 mA from the upstream host and can provide up to 100 mA each to up to 4 downstream devices. However, they don't implement 100 milliamp current limit on the downstream port because most of them also support operating in powered mode with a 5V 2A power supply. If the external power adapter is used the ports operate as genuine high power ports. If you plug your supply into such an unpowered hub, you will potentially draw more power than it is capable of supplying, and there will be no current limiting to stop it. Instead, the hub and any other devices connected to it may lose power because the upstream host is being asked to supply more than 500 milliamp.

This problem with hubs is the real practical reason why you should always negotiate for power -- not the rare to non-existent problem of a motherboard that adjusts its current limit based on the negotiation.

Because non-compliant devices are so common it is possible that new hubs have real per-port programmable current limiting to protect against this sort of thing, but it is certainly not universal.

I've yet to see one or hear of a confirmed case of one that does 100mA current limiting. To increase the cost and complexity on such an otherwise simple design just to do proper enumeration that is not needed in practice would just be silly.

Server motherboards and workstation grade motherboards. There are several ones.

Now, the enumeration isnt hard.. Slap on an ftdi232 chip and set the current limit in the eeprom to 500 mA . Done. And you can now control the supply through a serial port , or log the current consumption ! Instant chart recorder ! Now, that opens possibilities. For people that dont need that feature and are cost sensitive: dont solder the ftdi on ...

Heres a couple of other ideas.Why waste the limited power of usb on driving power hungrey leds... Use a 2*8 lcd display. Only one Led for backlight...Mount the display on the underside of the pcb and mill a rectangular hole in the pcb. That protects it mechanically. The display sits inside the case and is readable through the hole. You can have ot mounted flush withe pcb.besides an 2*8 lcd display will be cheaper than led displays and you can show more info.

Use only one retary encoder , but one with a centre pushbutton. Turn to set parameter , push to toggle between voltage and current.Stop turning and display switches back to read values. A little arrow on display shows what you have under control.Top line voltageBottom line current

above thee display scenarios.Arrow shows selected parameter ( can be toggled by pushing on encoder) the wavy line means usb is connected through ftdi and someone has talked to us to set er request parameters. This acts like a Remote' indicator on test equipment

Second scenario shows output off.. A long push on the rotary button toggles output on / off.

Third scenario shows overcurrent condition. Voltage is now zero and ammeter show overload.

Now, rush in current protection :Make sure there is ample buffer capacitor for the regulator ! So as not to trip the pc supply if we draw peaks.Fat capacitors on usb give problems.Use a 100 resistor from VBus to the supply section cap. Short the resistor with a simple powermos under control of the cpu. Monitor voltage on cap at plugin. If you use a cheap cpu like a 8051f410. That has lots of a/d channels and two 12 bit dacs.

There you go. The money i saved you on displays , an extra rotary encoder can pay the ftdi232...

I'd love to have a little supply like i just described. Especially if i can use a simple serial connection to read or set the parameters.

Coming back to usb current limiting. It is a problem. When i designed the first usb ADSL modem we had endless trouble with that. Plug in with fat capacitors . Port shuts down.. Enumerate wrong .. Port shuts down .. Do not enter sleep mode correctly .. No power at resume... And other annoyances.

Logged

Professional Electron Wrangler.Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).

It isn't entirely clear to me how isolated the supply is intended to be. Is it intended to be isolated enough to connect the output side to a mains powered device, or simply sufficient to tie them in series to produce +/-12V rails? If it's the latter, isolation isn't so difficult: just make the power supply output floating, and use a differential amp to measure voltage (you already need one for current, so it's not too much additional cost to do it for voltage too) then your USB doesn't need to be isolated. I think it's a recipe for disaster to have a device which is meant to be mains-safety isolated with a µCurrent style construction, but there's no problem with low voltage DC.

* Power jackI saw a DC jack on one of your prototypes, this is definitely a good idea.If you're out-and-about and need more voltage/current then finding a 9-15v wallwart on some nearby device is pretty easy.Coupling the dc jack with a rectifier deals with the polarity and ac/dc issue quite nicely.

DC jack (2.1mm) would be a useful addition - don't think adding the cap to support AC is necessary nowadays as most wall-warts are switchmode- rectifier for dual polarity probably a good idea though.

Re. the negotiation stuff - may be worth sticking down a footprint for an FTDI chip - maybe the new X series, even if you don't populate it.

In terms of display, if it's LED then 7-seg will probably draw less power than matrix - you can get some pretty low power ones nowadays. Individual LEDs on the PCB might be able to squeeeze a little more efficiency at a slight reduciton in readability.

$3.61 in 100qty might be a killer though - so again, it could be an optional feature. And this of course opens up the avenue for computer control, datalogging etc. It would be very useful to log the power consumption of a widget against time. If you break out some GPIOs on your micro to an unsoldered header (don't need any extra components, just bare GPIOs, let users install divider resistors if they need), you've just created a product which could measure power consumption or efficiency with temperature, humidity, processing load...

In terms of display, if it's LED then 7-seg will probably draw less power than matrix - you can get some pretty low power ones nowadays. Individual LEDs on the PCB might be able to squeeeze a little more efficiency at a slight reduciton in readability.

Yeah, from a purely power usage factor, a 7 seg is going to use less power.But i don't think led power usage is really that much of an issue on a usb powered device.

With a message scrolling on my 28x5 LED matrix ID tags the current draw was ~10mA most of the time. (20mA max if you had lots of pixels in use)Now, granted, it was designed for a computer gaming event which is a darkened environment so that isn't really enough current for a bright daylight room. But it was pretty damn awesome for 10mA.The liteon red led matrix arrays i was using only required 0.6mA (DC) to be visible in a semi dark room!

$3.61 in 100qty might be a killer though - so again, it could be an optional feature. And this of course opens up the avenue for computer control, datalogging etc. It would be very useful to log the power consumption of a widget against time. If you break out some GPIOs on your micro to an unsoldered header (don't need any extra components, just bare GPIOs, let users install divider resistors if they need), you've just created a product which could measure power consumption or efficiency with temperature, humidity, processing load...

If you wanted USB control/readback, it would be much cheaper to have a USB interface on the PC side and isolate the low-speed UART lines with a cheap optoisolator

My Logitech USB hubs limit the current that they supply.When using a external power supply for the hub, it still limits according to what has been negotiated. If the device tries to draw more, it gets cut off.My computer is also horrible with this and it cuts off just before reaching the negotiated limit. This is why I use the hubs, they at least give me the full power.This would make the product unusable unless using a separate mains USB power supply.

I will guess older Nokia display with COG, as it has enough onboard intelligence to run the display while being simple to interface to a micro. Plus needs only a few pins, ultra low power, cheap and plentiful. Build a few bitmaps in the software and output them to drive it and away you go.

Logged

jucole

It's not that mobile if you need to connect it to a laptop to make it work or did i miss something?, why not add a rechargeable battery and make it charge-up via a usb, in-car, solar or even a novel toothbrush type charger. If it was portable and I could use in the field (literally) now that would be different.

It's not that mobile if you need to connect it to a laptop to make it work or did i miss something?, why not add a rechargeable battery and make it charge-up via a usb, in-car, solar or even a novel toothbrush type charger. If it was portable and I could use in the field (literally) now that would be different.

Design Goal : To be used with a laptop and fit inside a laptop bag for a reason.

Dave's other portable power supply will have a rechargeable battery and all the other stuff (USB control etc). No point duplicating it in this, which is supposed to be cheap, simple and small. In fact, I would drop the secondary display and just illuminate an LED when it was in current mode.

With all the talk above about power negotiation, I'm surprised nobody has mentioned the USB Battery Charging Specification. This allows compliant devices to supply and draw up to 1.5 A by simple hardware negotiation, with no USB protocol negotiation necessary. Some summary details are quoted below, extracted from a Maxim data sheet.

Dave, I wonder would your power supply be able to take advantage of this capability in devices that support it?

Charging downstream port (CDP) BC1.1 defines this new, higher current USB port for PCs, laptops, and other hardware. Now the CDP can supply up to 1.5A, which is a departure from USB 2.0 because this current can be supplied before enumeration. A device plugged into a CDP can recognize it as such by means of a hardware handshake implemented by manipulating and monitoring the D+ and D- lines. (See USB Battery Charging Specification, section 3.2.3.) The hardware test takes place before turning the data lines over to the USB transceiver, thus allowing a CDP to be detected (and charging to begin) before enumeration.

Dedicated charging port (DCP) BC1.1 describes power sources like wall warts and auto adapters that do not enumerate so that charging can occur with no digital communication at all. DCPs can supply up to 1.5A and are identified by a short between D+ to D-. This allows the creation of DCP "wall warts" that feature a USB mini or micro receptacle instead of a permanently attached wire with a barrel or customized connector. Such adapters allow any USB cable (with the correct plugs) to be used for charging.

Additional details on these port types are described in the USB Battery Charging Specification, Rev 1.1, 4/15/2009

jucole

Dave's other portable power supply will have a rechargeable battery and all the other stuff (USB control etc). No point duplicating it in this, which is supposed to be cheap, simple and small. In fact, I would drop the secondary display and just illuminate an LED when it was in current mode.

It would be cool to be able to set the maximum current draw from USB -- and perhaps be able to go over 500mA@5v if you use this with a mobile phone charger that can supply more. (Like 1000mA@5V from iPhone chargers and 850mA@5.1v from most Motorola chargers.)

Like a momentary you can hold down then turn the current rotary encoder to set the max.

I don't know why everyone seems to think the more current the better, most small size projects only end up drawing 50-100mA.Really if you need more current you should be at your bench or carry a few pocket size batteries with you.

Personally I'm more interested in the output noise and ripple, USB is typically pretty nasty so I'd be interested in seeing what Dave does to tackle it, assuming he decides to with this appearing to be more targeted towards 'digital' users where noise is not so much an issue.

Well you've probably forgotten more about electronics than I have learned so far so I'll stay away from that end, but since you are thinking about something that can be tossed in a laptop bag might I suggest something a little bigger than a mint tin, but in water resistant plastic and see thru so only the connectors and nobs are outside to cut down on gunk and such that traveling can accumulate.

With all the talk above about power negotiation, I'm surprised nobody has mentioned the USB Battery Charging Specification. This allows compliant devices to supply and draw up to 1.5 A by simple hardware negotiation, with no USB protocol negotiation necessary. Some summary details are quoted below, extracted from a Maxim data sheet.

Dave, I wonder would your power supply be able to take advantage of this capability in devices that support it?

There is quite direct comment against Dave-method ... (Ie using 500mA blindly without any negoation)

Quote

"Cheating"—Noncompliant USB Charging

A bolder noncompliant scheme assumes that 500mA will be available and instructs users to plug only into powered ports and hubs that are capable of 500mA. Again, since most USB ports do not disconnect power, this approach can work in most cases. When such a device is plugged into a port that cannot support 500mA, the port is supposed to shut down. However, the overload behavior of a USB port is not always well defined and can lead to system reset or damage. Fortunately, this level of desperation is no longer required since battery charging is now an active part of the USB specification.

I'll elaborate. The reason I thought binding posts are overkill here is simply because they are large, bulky, expensive, protruding, and generally capable of 15-30 Amps. Overkill. It's ultimately your design, and others may not think the same as me, but I'd be happy with a thinner device, not a bulkier device. I was thinking thin, not bulky, and mentioned captive or pluggable red/black cables with croc clips. As you said, it should fit inside a laptop bag. I'd like to see it just 1cm thick. Capacitive touch sliders and buttons, and a 2 line LCD, like free_electron mentions. If there's no USB data capabilities, then for sure it needs some control and display on board. Just like the binding posts, I wouldn't want to have a large rotary encoder protruding.

In my opinion, something as large as the uCurrent is too large for a laptop bag. (your prototype uSupply shows the same packaging, but I acknowledge that you might have different ideas for the final product)

If you put 4mm binding posts, I'd like to see them side mounted, not top mounted, in order to make the package ultra thin. Not much larger than the base of the binding post itself.

So there's some extra thoughts for you. (Have you got a headache yet from everyone's different design ideas designed by Internet committee. )Cheers!

Server motherboards and workstation grade motherboards. There are several ones.

So you claim.Even if that's the case, my supply will still work with virtually 100% of intended machines out there that don't.Seriously that's all I care about, I'm trying to be practical and design the cheapest/simplest device possible.If anyone has any real evidence that says my device will not work on the vast majority of USB ports, then please present it. And I mean real evidence, not just speculation and hearsay and guesses.

According to the USB standard, I am 100% ok with:- Powered hubs.- Any USB port with the charging specification, that means every wall wart charger, car charger etc, and any modern computer that implements it.- I'm also ok with any standard USB port that does not implement 100mA current limiting (which the standard does NOT say to implement, it's only a software power budget thing). That is practically almost every USB port in existence in notebooks and desktop computers. If anyone has any real evidence to back up that is not so, please present it. If my PSU worked on 95% of USB ports I'd still be happy I think. As it stands I think it'll work on practically 100%, and that's a fact. A very inconvenient fact for those arguing that I'm making a bad choice.

I am not ok with any power specifically configured as "low power". But nothing you can do about that of course, the PSU will only be capable of 0.5W

Yes, I'm not designing a proper compliant USB device, I know that, I accept that, and am doing that to keep it simple and low cost. Sue me.

Quote

Now, the enumeration isnt hard.. Slap on an ftdi232 chip and set the current limit in the eeprom to 500 mA . Done. And you can now control the supply through a serial port , or log the current consumption ! Instant chart recorder ! Now, that opens possibilities. For people that dont need that feature and are cost sensitive: dont solder the ftdi on ...

No, you don't get to control the device for free. Adding a FTDI chip requires comms isolation. You've just double the cost and complexity of the project, not to mention additional space. It is a no-go.

I'll elaborate. The reason I thought binding posts are overkill here is simply because they are large, bulky, expensive, protruding, and generally capable of 15-30 Amps. Overkill. It's ultimately your design, and others may not think the same as me, but I'd be happy with a thinner device, not a bulkier device. I was thinking thin, not bulky, and mentioned captive or pluggable red/black cables with croc clips. As you said, it should fit inside a laptop bag. I'd like to see it just 1cm thick. Capacitive touch sliders and buttons, and a 2 line LCD, like free_electron mentions. If there's no USB data capabilities, then for sure it needs some control and display on board. Just like the binding posts, I wouldn't want to have a large rotary encoder protruding.

In my opinion, something as large as the uCurrent is too large for a laptop bag. (your prototype uSupply shows the same packaging, but I acknowledge that you might have different ideas for the final product)

I do. Like I've said, don't take the earlier prototypes as the final form factor. The binding posts are going horizontal.

Quote

If you put 4mm binding posts, I'd like to see them side mounted, not top mounted, in order to make the package ultra thin. Not much larger than the base of the binding post itself.

I have to agree with others that the USB 2.0 Specification states that a device must not draw more than 100mA until it has negotiated 500mA with the host.

The following are from section 7.2.1 of the Universal Serial Bus Specification Revision 2.0. I have emphasised the key points.

Quote

The power source and sink requirements of different device classes can be simplified with the introduction of theconcept of a unit load. A unit load is defined to be 100 mA. The number of unit loads a device can draw is anabsolute maximum, not an average over time. A device may be either low-power at one unit load or highpower,consuming up to five unit loads. All devices default to low-power. The transition to high-power is undersoftware control. It is the responsibility of software to ensure adequate power is available before allowingdevices to consume high-power.

Quote

High-power bus-powered functions: All power to these devices comes from VBUS. They must draw nomore than one unit load upon power-up and may draw up to five unit loads after being configured.

However, you may be correct that in general most usb hosts do not enforce this specification.

Maybe you could do a quick video which tests the current capability of a few USB ports to either prove or disprove this myth?

What I mean with hubs is the following. An unpowered USB hub draws up to 500 mA from the upstream host and can provide up to 100 mA each to up to 4 downstream devices. However, they don't implement 100 milliamp current limit on the downstream port because most of them also support operating in powered mode with a 5V 2A power supply. If the external power adapter is used the ports operate as genuine high power ports. If you plug your supply into such an unpowered hub, you will potentially draw more power than it is capable of supplying, and there will be no current limiting to stop it. Instead, the hub and any other devices connected to it may lose power because the upstream host is being asked to supply more than 500 milliamp.

Unpowered USB hubs will be an issue, and one that isn't going to be solved with negotiation. The simple fact is you can't have a USB PSU capable of drawing potentially 500mA, and have other devices on the hub as well taking power. It won't work.

High-power bus-powered functions: All power to these devices comes from VBUS. They must draw nomore than one unit load upon power-up and may draw up to five unit loads after being configured.

However, you may be correct that in general most usb hosts do not enforce this specification.

For the last time, what people don't understand here is whilst this is telling you what a compliant hardware device should do, it is effectively a software negotiation specification. It is not a hardware specification. Ports do not limit the current to 100mA first and then open that up to 500mA when requested.That clause is in there to ensure that multiple devices on the same bus that may require more than 100mA, do so by asking nicely first "please sir, can I take more than 100mA?". The PC knows how many devices are already connected to that bus, so can them tell the device that's it's ok (or not) to use the 500mA available (at all times anyway) on the port.

If you know you are the only device connected to the port, then it certainly possible to cheat and simply draw your 500mA.It's not nice, and it's not a USB compliant device, but there is virtually no real practical issue with cheating like this.There are several good reasons why I'm taking this shortcut, and I accept any limitations it may have. I'm a bad, bad, person!, get over it people, really.

There are ports called "low power ports" that only have 100mA at all times, but these are relatively rare. Nothing you can do about that.

Quote

Maybe you could do a quick video which tests the current capability of a few USB ports to either prove or disprove this myth?

I've done it countless times over many many years. General USB ports do not limit the current 100mA. 500mA is available at all times.Even if I measured 100 USB ports in a video, people would still crap on that what I'm doing is wrong. Those who don't believe me can go around themselves and stick a 10 ohm resistor on USB ports and see for themselves.

Unpowered USB hubs will be an issue, and one that isn't going to be solved with negotiation. The simple fact is you can't have a USB PSU capable of drawing potentially 500mA, and have other devices on the hub as well taking power. It won't work.

I don't care that the power supply doesn't work in this case. Obviously it can't work, and negotiation won't fix that. My problem is potentially crashing the hub and other devices on the hub by drawing down their power supply. This is not good. Especially if those devices are USB flash drives.

I don't doubt that your power supply will work with 99% of host ports and many hub ports, including unpowered hub ports. However, it absolutely has the potential to cause malfunctions in compliant devices including the potential for data loss. I don't consider this acceptable behavior. It is clear that you do, and that you expect the user to have some sense to use it as designed (i.e., only with high power capable ports). That is a fair position, but denying there is a problem is simply incorrect.

That is a myth. USB ports do not require negotiation to supply 500mA, they must supply 500mA at all times regardless.Approved USB devices are required to "play nice" and negotiate first before drawing 500mA, but it makes no actual difference to the USB hosts ability to supply it.

There are situations where a port can not provide 500mA - specifically bus powered hubs. These need one power unit for themselves and provide up to four ports one unit each (100mA) for a total upstream load of 500mA. If you connect a high power device to such port it will not be configured by the host and error message about insufficient power will be issued.

A high-power function requires staged switching of power. It must first come up in a reduced power state of less than one unit load. At bus enumeration time, its total power requirements are obtained and compared against the available power budget. If sufficient power exists, the remainder of the function may be powered on.

Also note hubs are allowed to introduce additional funny things like voltage drops way below the 5.00V.

Many modern microcontrollers have USB peripherals on them; presumably you are using a microcontroller on the board to drive the displays, so why not pick one with USB and do the enumeration to get 500mA?

That requires isolation of the data too. Adding large cost and complexity, for almost certainly no benefit.

Quote

If it fails you could make something like the current display flash to indicate that the USB current is being exceeded. Just like I don't like using a 3A diode above 3A, or a 40 MHz micro above 40 MHz, it's just bad engineering practice. Sod's law will mean that some really popular series of laptops or desktops have current limiting.

I've yet to see one or hear of a confirmed case of one that does 100mA current limiting. To increase the cost and complexity on such an otherwise simple design just to do proper enumeration that is not needed in practice would just be silly.Sorry to all the perfectionists out there. Reality engineering wins out.No further correspondence will be entered into.

Dave.

Yep, I like your idea best. A nice simple device that functions well for it's intended task. I don't see any reason for extra complexity to make it talk to the PC. Basically just use the USB connector as a source of the power for the device, and the device being small, relatively simple, and self-contained sounds brilliant to me. This way, it will be a nice simple kit that doesn't need any complex programming, just soldering a chip or two and some passives, a screen and a connector onto a PCB, and away you go!

I don't doubt that your power supply will work with 99% of host ports and many hub ports, including unpowered hub ports. However, it absolutely has the potential to cause malfunctions in compliant devices including the potential for data loss. I don't consider this acceptable behavior. It is clear that you do, and that you expect the user to have some sense to use it as designed (i.e., only with high power capable ports). That is a fair position, but denying there is a problem is simply incorrect.

I am not denying there is a potential problem.Thank you for thinking that I'm taking a fair position, I think it's a fair compromise too.Any well designed USB port (low or high power) should have current limiting on it (the standard says they must), so damage to low power ports is unlikely.I agree it would be nice to have the unit check to see if the port is low or high power first and then software limit the available output power, but it's just not worth it for the few cases where this might be an issue. It increases the cost, complexity, and size of the design considerably.

There are situations where a port can not provide 500mA - specifically bus powered hubs. These need one power unit for themselves and provide up to four ports one unit each (100mA) for a total upstream load of 500mA. If you connect a high power device to such port it will not be configured by the host and error message about insufficient power will be issued.

In that case, too bad. You either limit the PSU to 0.5W, or you dispense with the hub. it's not like you can have the PSU taking 500mA and the other devices on the hub too sucking current current. So the hub is useless, you may as well disconnect it.

Which type of USB connector do you think it would be best to use on the device (Micro/Mini/Standard)?Are they all rated for the same power/current capabilities?How do the rated connect/disconnect numbers compare?I read on wikipedia that standard USB A is only rated for 1500 connect/disconnects, whereas the newer micro are 10,000 and mini is 5000... Strange, because the smaller connectors don't seem as robust?

I could, potentially, test my laptop's USB ports then. I believe (speculate) that the BIOS throws a fault when I over-load my USB ports. I was using a quite large development board, a logic analyzer, wireless USB mouse, and a USB flash drive... System then throws some IRQ error and reboots. Not worried about it with the power supply, I thought it was just an interesting thought. It is up to the user to make sure such conditions are met when pulling larger loads, not you.

About the hub, always used one with an external power brick, capable of supply 2.5A @ 5V (7 Port HUB).

A curious situation happens with my iPhone. The proper iPhone power cube is marked 5 V 1 A and doubtless the iPhone takes this much current from it when charging.

If I plug the iPhone into a regular USB port on a computer it gets recognized as a USB device and also charges, but it doesn't shut down the USB port. So I presume it limits itself to 500 mA in this case.

If I plug the iPhone into a USB charging port on a particular Duracell battery charger, it overloads the port and shuts it down. At this point I do not know if the phone is trying to pull 1 A and causing an overload, or if it is trying to pull 500 mA and the USB port can't supply it.

I presume if I want to find out what is going on I need a USB breakout cable and to insert an ammeter in the circuit. Maybe I'll get round to doing that at some time.

Which type of USB connector do you think it would be best to use on the device (Micro/Mini/Standard)?Are they all rated for the same power/current capabilities?How do the rated connect/disconnect numbers compare?I read on wikipedia that standard USB A is only rated for 1500 connect/disconnects, whereas the newer micro are 10,000 and mini is 5000... Strange, because the smaller connectors don't seem as robust?

IIRC mini B is the worst with only several hundred insertions tops?Micro USB is the best, and one of the main reason why the switched to it.I was thinking Micro-B is best, but happy to have a vote on it. Unfortunately on the new design there is not enough room for two, unless I mounted one on the bottom of the board, but then it's a two sided machine assembly which is not desirable.

IMO although micro is the 'new' standard, mini is still more common in the avarage pile of random USB leads. Both would be ideal, to the extent that a slight size increase may be justified. If there is no room, at least put a footprint on the other side so the a) user can fit the other if they want, and b) it gives a repair option if the socket gets ripped off the board.

IMO although micro is the 'new' standard, mini is still more common in the avarage pile of random USB leads. Both would be ideal, to the extent that a slight size increase may be justified. If there is no room, at least put a footprint on the other side so the a) user can fit the other if they want, and b) it gives a repair option if the socket gets ripped off the board.

Good point, an extra footprint is worthwhile. I'll see if it fits, as there might be an issue with the case fouling.

With any standard, it's interesting to see how actual practice diverges from the printed spec or how undefined parts of the spec take shape. Though USB is, with little doubt, one of the best thought out, reliable, and useful standards efforts in quite some time, it has not been immune to the impact of the real world. Some observed USB characteristics that may not be obvious, yet can influence power designs, are:

USB ports do NOT limit current. Though the USB spec provides details about how much current a USB port must supply, there are mile-wide limits on how much it might supply. Though the upper limit specifies that the current never exceed 5A, but a wise designer should not rely on that. In any case, a USB port can never be counted on to limit its output current to 500mA, or any amount near that. In fact, output current from a port often exceeds several Amps since multi-port systems (like PCs) frequently have only one protection device for all ports in the system. The protection device is set above the TOTAL power rating of all the ports. So a four-port system may supply over 2A from one port if the other ports are not loaded. Furthermore, while some PCs use 10-20% accurate IC-based protection, other will use much less accurate poly-fuses (fuses that reset themselves) that will not trip until the load is 100% or more above the rating.

USB Ports rarely (never) turn off power: The USB spec is not specific about this, but it is sometimes believed that USB power may be disconnected as a result of failed enumeration, or other software or firmware problems. In actual practice, no USB host shuts off USB power for anything other that an electrical fault (like a short). There may an exception to this statement, but I have yet to see it. Notebook and motherboard makers are barely willing to pay for fault protection, let alone smart power switching. So no matter what dialog takes place (or does not take place) between a USB peripheral and host, 5V (at either 500mA or 100mA, or even maybe 2A or more) will be available. This is born out by the appearance in the market of USB powered reading lights, coffee mug warmers, and other similar items that have no communication capability. They may not be "compliant," but they do function."

In that case, too bad. You either limit the PSU to 0.5W, or you dispense with the hub. it's not like you can have the PSU taking 500mA and the other devices on the hub too sucking current current. So the hub is useless, you may as well disconnect it.

Negotiation does not fix this problem on self powered hubs.

It does not magically make it work, It stops things from blowing up for unfortunate users.The user may not know what type of port is he plugging into. Some old/cheap laptops have only one USB "root hub" and have an internal hardware hub to multiply the ports. I had my eee PC blown up by a power hungry USB device with what amounted to power rail short.

I agree doing things "properly" will make it complex and expensive.I would suggest you at least issue a big fat warning that users should only plug this into a high power host ports or powered hubs.Maybe check for too low input voltage and shut down if the power is not strong enough. DC-DC converters can do nasty things if there is no undervoltage lockout (AVR Dragon blowup reference here).

Anyway, in a theoretical properly USB negotiating version, I'd consider turning the thing around and keeping the controller on the non-isolated side so that it can easily talk to USB, and figure out how to isolate the feedback/current/voltage readings. May be easier than isolating USB communication because of the speed and bidirectional nature of USB.

IIRC mini B is the worst with only several hundred insertions tops?Micro USB is the best, and one of the main reason why the switched to it.I was thinking Micro-B is best, but happy to have a vote on it. Unfortunately on the new design there is not enough room for two, unless I mounted one on the bottom of the board, but then it's a two sided machine assembly which is not desirable.

Dave.

I don't think the device needs to have 2 USB ports... But you could look at doing what many of the portable hard drive enclosures do. Due to their current draw, they often use a cable that has one connector that goes into the HDD, and 2 USB plugs at the PC end, to draw more power from 2 ports rather than just 1.

I would suggest you at least issue a big fat warning that users should only plug this into a high power host ports or powered hubs.

Of course.

Quote

Anyway, in a theoretical properly USB negotiating version, I'd consider turning the thing around and keeping the controller on the non-isolated side so that it can easily talk to USB, and figure out how to isolate the feedback/current/voltage readings. May be easier than isolating USB communication because of the speed and bidirectional nature of USB.

Yes, in such a case you'd have to weigh up which is the easiest and cheapest method to use. I doubt it would be an easy choice to make, lots of factors involved.

"What Your Mom Didn't Tell You About USBUSB ports do NOT limit current. Though the USB spec provides details about how much current a USB port must supply, there are mile-wide limits on how much it might supply. Though the upper limit specifies that the current never exceed 5A, but a wise designer should not rely on that. In any case, a USB port can never be counted on to limit its output current to 500mA, or any amount near that.

I've found that port protection and current limiting is in fact quite common. In fact it is required by the standard, but the exact value is indeed not specified:

Quote

11.4.1.1.1 Over-current ProtectionThe host and all self-powered hubs must implement over-current protection for safety reasons, andthe hub must have a way to detect the over-current condition and report it to the USB software.Should the aggregate current drawn by a gang of downstream facing ports exceed a preset value,the over-current protection circuit removes or reduces power from all affected downstream facingports. The over-current condition is reported through the hub to the Host Controller, as described inSection 10.11.5. The preset value cannot exceed 5.0 A and must be sufficiently higher than themaximum allowable port current or time delayed such that transient currents (e.g., during power upor dynamic attach or reconfiguration) do not trip the over-current protector. If an over-currentcondition occurs on any port, subsequent operation of the USB is not guaranteed, and once thecondition is removed, it may be necessary to reinitialize the bus as would be done upon power-up.The over-current limiting mechanism must be resettable without user mechanical intervention.Interoperability and Power Delivery11-5Polymeric PTCs and solid-state switches are examples of methods that can be used for over-currentlimiting.

Good thing my USB supply ensures it does not take more than 500mA by design.I'm a bad, bad, person for not doing negotiation, but I'm not that bad

Well I'll be damned.Testing leds with no current limit??And what's the deal with D2 on the output after the feedback sensing divider?No isolation, and less than 5V limit (which will drop significantly with the cable) doesn't make it very capable IMO.

Well I'll be damned.Testing leds with no current limit??And what's the deal with D2 on the output after the feedback sensing divider?No isolation, and less than 5V limit (which will drop significantly with the cable) doesn't make it very capable IMO.

Dave.

Total fail - 5v max is not very useful, no current set or measure, no output on/off switch, knob sticks out too far, and how the hell do they need $14k to get this piece of crap made..?

A curious situation happens with my iPhone. The proper iPhone power cube is marked 5 V 1 A and doubtless the iPhone takes this much current from it when charging.

If I plug the iPhone into a regular USB port on a computer it gets recognized as a USB device and also charges, but it doesn't shut down the USB port. So I presume it limits itself to 500 mA in this case.

If I plug the iPhone into a USB charging port on a particular Duracell battery charger, it overloads the port and shuts it down. At this point I do not know if the phone is trying to pull 1 A and causing an overload, or if it is trying to pull 500 mA and the USB port can't supply it.

I presume if I want to find out what is going on I need a USB breakout cable and to insert an ammeter in the circuit. Maybe I'll get round to doing that at some time.

Phones and devices that use more than 500mA look for particular resistance values on the data lines so they know to go to high-power mode. There is no standard to this but most Android phones will accept the resistance offered by Apple chargers and go into full charge mode. If they don't recognize the value, they just drop down to a slower 500mA charge.

Anyway, tell us more about the current prototype!I know people think LED displays are a waste of limited power, but somehow I feel a power supply needs LED displays LCD does not feel right for some reason...

What can be done about limiting the losses on the LED displays? Low voltage rail amounting to LED+switch drop and a miniscule resistor?Or some funny stuff with inductors and PWM power? I have seen some pretty small SMD 10uH inductors with 1Ohm resistance in 1206 size, but it would take something like 5MHz PWM frequency to use them as a lossless LED current limiter... and the EMI would be a mess I guess.

There is no standard to this but most Android phones will accept the resistance offered by Apple chargers and go into full charge mode. If they don't recognize the value, they just drop down to a slower 500mA charge.

Well I'll be damned.Testing leds with no current limit??And what's the deal with D2 on the output after the feedback sensing divider?No isolation, and less than 5V limit (which will drop significantly with the cable) doesn't make it very capable IMO.

Dave.

Yuk -- your very early prototype looks 100x better than that thing. Surprising it has gotten as much funding as it already has.

I know people think LED displays are a waste of limited power, but somehow I feel a power supply needs LED displays LCD does not feel right for some reason...

That's what I felt too, hence the LED displays.

Quote

What can be done about limiting the losses on the LED displays? Low voltage rail amounting to LED+switch drop and a miniscule resistor?Or some funny stuff with inductors and PWM power? I have seen some pretty small SMD 10uH inductors with 1Ohm resistance in 1206 size, but it would take something like 5MHz PWM frequency to use them as a lossless LED current limiter... and the EMI would be a mess I guess.

I've got a novel solution that saves power and cost, that I'm sure not everyone will agree with. Many will positively hate the idea (at least they'll forget about the USB negotiation )

I've got a novel solution that saves power and cost, that I'm sure not everyone will agree with. Many will positively hate the idea (at least they'll forget about the USB negotiation )

LOL, think of all the billions of stupid USB "accessories" like laptop fans, coffee mug warmers, Christmas lights, etc. that people use every day... 500mA with no negotiation and they work on pretty much every USB port on the planet.

Please think about mechanical stability too. Micro usb is flimsy. And my experience with surface mounted usb connectors is that they are easily peeled of the board unless there is an external mechanical block like a case..... If you get the micro , find one that has through hole chassis pins. The usb pins can be smd , but the metal sleeve should have pins.

For cost saving on the led displays take a look at liteon multiplexed display with 4 digits. Easier to rout since the muxing is already internal and cheaper. Can often be found for around 1$ ..

Logged

Professional Electron Wrangler.Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).

As for the isolation on usb. If you use the ftdi232 you can have that sit onthe vbus. You only need to put two optos to cross into the isolated section where the cpu is. Cheap optos will do. You just run at 9600 baud. Cy127 for example. In smd.

Logged

Professional Electron Wrangler.Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).

Well I'll be damned.Testing leds with no current limit??And what's the deal with D2 on the output after the feedback sensing divider?No isolation, and less than 5V limit (which will drop significantly with the cable) doesn't make it very capable IMO.

Dave.

Yeah that's what I saw too. No current set/limit/readback, no isolation, and only 5V out, max... if that. I've seen USB ports actually put out 4.8V, so they might have a 0-4.5V variable supply with a readout. Whoopee!

The writeup talks about charging batteries, so I assume D2 is to protect it in case someone leaves a fully chargedbattery connected and pulls the USB power connector. They can't put the voltage sense after the diode because then it would feed back into the (unpowered) regulator. But I don't think it would harm it. With the diode there as they've done it, they would haveto account for the (unknown) diode voltage drop in their micro. But now the accuracy has all gone to shit.

Nice to see them using a Renesas R8C/2K. I like any design bold enough to break away from the AVR's, and PIC's.However, for all that they are doing with the micro (just an ADC to provide a voltmeter), a PIC might have been cheaper.

Yeah that's what I saw too. No current set/limit/readback, no isolation, and only 5V out, max... if that. I've seen USB ports actually put out 4.8V, so they might have a 0-4.5V variable supply with a readout. Whoopee!

I doubt a single unit will ever be able to give out 5V and any significant current.

Quote

The writeup talks about charging batteries, so I assume D2 is to protect it in case someone leaves a fully chargedbattery connected and pulls the USB power connector. They can't put the voltage sense after the diode because then it would feed back into the (unpowered) regulator. But I don't think it would harm it. With the diode there as they've done it, they would haveto account for the (unknown) diode voltage drop in their micro. But now the accuracy has all gone to shit.

Nice to see them using a Renesas R8C/2K. I like any design bold enough to break away from the AVR's, and PIC's.However, for all that they are doing with the micro (just an ADC to provide a voltmeter), a PIC might have been cheaper.

In the comments they mention maybe being forced into using an NEC processor to add data logging or something.And they talk abut another design that goes to 20V?

Voltage drop across a standard usb mini/micro cable of 1m length is horrendous!

I did a bit of design on making external batteries for consumer electronics equipment that charge from USB ports(generally iPad/tablet devices) and this was my biggest issue. My device could pump out 5v@2.5A no problems for charging an iPad but on the other end of the Apple USB cable it had dropped to a measly 3.7v! My battery pack also had similar issues when charging itself; it would charge very slowly so I intentionally used a more "rare" usb socket, the USB B socket and included a more bulky cable.

Even at 500ma this can raise issues!

Also, about the whether it should be 100ma vs 500ma vs ???ma, spec for it to only draw 500ma at most but leave a footprint beside the resistors to put in a small trimpot, that way you stay inside the rules, but people who want to push it can, and can use it with devices like the iPad charger to their full advantage.

How about backlit LCD instead of LED? Means you can use it in bright sunlight easily AND in the dark, also saves power.

If it's the latter you probably wouldn't need to worry too much about USB isolation as the output could be floating and measured using a diff amp... you need a diff amp for current already anyway so it's not too much additional cost.

Also, about the whether it should be 100ma vs 500ma vs ???ma, spec for it to only draw 500ma at most but leave a footprint beside the resistors to put in a small trimpot, that way you stay inside the rules, but people who want to push it can, and can use it with devices like the iPad charger to their full advantage.

People forgot get that isolated DC DC converter cost so many $/watts, and it's not often linear. To design the thing worst case around some of the figures being thrown around, it could double the BOM cost or more.

USB.3. will provide 900ma. and since 2007 most usb are at the battery charging spec. so will provide 500ma without any jiggery pokery. So why not make the unit to USB3 standard also if you want to run from battery there is a plethora of battry usb phone and mp3 ipod etc power booster/chargers on the market which will enable mobile use without a computer for the power supply and totally gets around usb power limits.

Also, about the whether it should be 100ma vs 500ma vs ???ma, spec for it to only draw 500ma at most but leave a footprint beside the resistors to put in a small trimpot, that way you stay inside the rules, but people who want to push it can, and can use it with devices like the iPad charger to their full advantage.

People forgot get that isolated DC DC converter cost so many $/watts, and it's not often linear. To design the thing worst case around some of the figures being thrown around, it could double the BOM cost or more.

Dave.

Easy - multiple footprints. Most DC/DCs are through-hole so easy to allow for a few different ones. Won't add much cost to make your regulating back-end capable of, say, 1 amp for use with an external PSU,

Quote

Voltage drop across a standard usb mini/micro cable of 1m length is horrendous!

There are a LOT of cheap crap cables that are well below spec - USB standard does specify maximum voltage drops, but the proliferation of junk cables means it can be hard to find a decent one, as even manufacturers that want to do it right can't afford to because nobody wants to pay for a properly made cable.

Perhaps a kit should include a known-good (distinctively coloured) cable, to avoid problems caused by junk cables.

Also, about the whether it should be 100ma vs 500ma vs ???ma, spec for it to only draw 500ma at most but leave a footprint beside the resistors to put in a small trimpot, that way you stay inside the rules, but people who want to push it can, and can use it with devices like the iPad charger to their full advantage.

People forgot get that isolated DC DC converter cost so many $/watts, and it's not often linear. To design the thing worst case around some of the figures being thrown around, it could double the BOM cost or more.

Dave.

The more I think about it, the more I wonder if it really needs to be isolated, a significant portion of the devices connected will be isolated themselves, mainly because they are just things like arduinos, timers and other small devices. Would it not be more benificial to just offer some input and output filtering (and flyback protection) and more flexability at the cost of isolation?

Voltage drop across a standard usb mini/micro cable of 1m length is horrendous!

There are a LOT of cheap crap cables that are well below spec - USB standard does specify maximum voltage drops, but the proliferation of junk cables means it can be hard to find a decent one, as even manufacturers that want to do it right can't afford to because nobody wants to pay for a properly made cable.

Perhaps a kit should include a known-good (distinctively coloured) cable, to avoid problems caused by junk cables.

Indeed, a known good cable would be VERY helpful, and if you are going to supply one, I would consider offering a "y" cable as well.

Easy - multiple footprints. Most DC/DCs are through-hole so easy to allow for a few different ones. Won't add much cost to make your regulating back-end capable of, say, 1 amp for use with an external PSU,

Sorry, not that easy. Bigger isolators and more heat sinking requirement takes more space in an already tight design.Much better leave it to a bigger battery powered design that uses the USB for just charging (like the bench PSU), then you can still have the small cheap isolator as well because the battery can provide the amps.

The more I think about it, the more I wonder if it really needs to be isolated, a significant portion of the devices connected will be isolated themselves, mainly because they are just things like arduinos, timers and other small devices. Would it not be more benificial to just offer some input and output filtering (and flyback protection) and more flexability at the cost of isolation?

No, I deem isolation to be an essential feature. That way you can connect say multiple devices to the same PC/USB hub (that use a common ground) and you can get a split supply, or put them in series etc.

Even my lab supply is only 240V between any terminal and earth, but I suppose the isolation will just be achieved with a decent gap between USB and output sides. I don't know if you will need EMI filtering or not, like a Y-cap, or if that's only important for mains powered stuff.

Will you be using a tracking pre-regulator, or just use a big heatsink on your pass transistor?

Even my lab supply is only 240V between any terminal and earth, but I suppose the isolation will just be achieved with a decent gap between USB and output sides. I don't know if you will need EMI filtering or not, like a Y-cap, or if that's only important for mains powered stuff.

Will you be using a tracking pre-regulator, or just use a big heatsink on your pass transistor?

The 1KV converters are really noisy, so do need a suppression cap across the isolation, yes.

Have you calculated overall efficiency of the DC-DC and pre-reg combined yet? In an ideal world you could combine the pre-reg with the DC/DC to maximise efficiency. I suspect however there aren't any cheap DC-DC's that expose the feedback input to do this.

I suspect however there aren't any cheap DC-DC's that expose the feedback input to do this.

Correct.But if anyone knows of one, I'll all ears.The overall system efficiency isn't great. The isolated converters do 80% at best. Tack on the tracking pre-reg ad then linear reg, and you are lucky to get 1.5W out.

In addition, if you adjust the isolated DC-DC, then you need some way to find the 5V or 3.3V for the microcontroller; you might have to use a higher voltage tap for the micro (say 10V out when the main out is 3V) then use a regulator.

And of course the first comments all say the same thing, can it supply more current and work with higher current ports etc. Feature creep

As we will no doubt see, it's all a trade-off with the size of the unit, and the cost, complexity and size of the isolated DC-DC converter required to handle it all.

For those interested, no data comms ability, it's just not worth it. I want a simple lowest possible cost unit that is just a PSU.

Dave.

But Dave, you already have a micro in it, you can use a USB enabled one or put a FT232 which means you can do 100% software control using a simple terminal software(no need to write anything fancy), which enables you to do away with *at least* 1/2 knobs+rotary encoder, 6 LED digits(clunky, big and they eat lots of power which from the already low supply).Because if you're going to plug it to a notebook, the notebook is on and chances is you're already using it to develop/program/whatever it is you need for your electronic thing, so what's the harm of doing it software controlled?.

I think the cost of those parts is way more than a simple ft232 or a usb enabled micro.

Also, you can use a "dongle" cable like in several common USB HDDs which will net you 1 AMP combined (but adding some sort of detection based on consumption could be tricky, adding a pusbutton or switch or software key at start to select between "hi/normal power" could solve it)

Plus the size and weight shedding means you can use a much slimmer package in the same footprint (half the height or less) and no protruding stuff means easier shipping!.

He mentioned it already. It doubles the BOM cost and needs more space.AND it must be isolated ISOLATED !

Physical knobs and screens are much better, what if your laptop would supply USB power but wouldn't get boot to windows/linux?Plus 7segs are physically proven to be the best solution. Cheap,simple and what would it do to the 500mA supply?

(only) Software controlled is no go for me. I have a bus pirate which I bring with me each time I have to fly somewhere and I don't expect to do any EE work at all (weight is always an issue as I tend to pack everything so I try to cut down at least on multimeters, interfaces, cables, adapters, etc). It can deliver 5V and 3.3V but you need to give it a couple of commands first. And it starts with installing the FT32 drivers (oh, I don't have the Administrator password?). Where's the com port, what you don't have hyperterminal? Of course google for the manual because I forgot the command to enable 5V. You get the picture.

Now software controlled in addition to knobs will be nice, but it seems to be "no go" because of the "isolation" requirement. Also logging would be nice, maybe basic power and mAh totals can be implemented on the existing micro without PC communication ?

i'm also in favor of at least having the option to install an ftdi chip, not so much for 'control' but for logging !if i run something overnight i may want to be able to chart power consumption .. or if i detect an overcurrent in the script power cycle the target.

Logged

Professional Electron Wrangler.Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).

(only) Software controlled is no go for me. I have a bus pirate which I bring with me each time I have to fly somewhere and I don't expect to do any EE work at all (weight is always an issue as I tend to pack everything so I try to cut down at least on multimeters, interfaces, cables, adapters, etc). It can deliver 5V and 3.3V but you need to give it a couple of commands first. And it starts with installing the FT32 drivers (oh, I don't have the Administrator password?). Where's the com port, what you don't have hyperterminal? Of course google for the manual because I forgot the command to enable 5V. You get the picture.

Now software controlled in addition to knobs will be nice, but it seems to be "no go" because of the "isolation" requirement. Also logging would be nice, maybe basic power and mAh totals can be implemented on the existing micro without PC communication ?

you can do software controlled ISOLATED, with a couple optos for the datalines.i don't see how shedding all the excess would double the BOM...

every computer has a terminal program, if you use an arduino you already have one even!about hte manual, unnecessary, simply make a rudimentary "help" command or a simply hello message that says "Vxxx and Axxx to set current and voltage, ON/OFF toggle output, LOG: show current values", done, that's it, a simple string in the program.

anyway, if Dave makes it open hardware similar to the ucurrent anyone can change it to suit their need afterwards and compare the BOM

Oh, yes, I got too tied up in my story about the bus pirate to mention independent use without computer (as in a huge obvious disadvantage for a software-only-controlled PSU).On the same note: there are already plenty of USB "powerpacks" of all sizes and prices, you can easily use one of those for portable operation.

Yeah with FTDI you can do the current negotiation from EEPROM, and just isolate the TX and RX low speed (9600 baud) with cheap as chip optos. Instantly solved the current problem and the now you have an interface to use with a computer.

OLED's are nice to look at. Sharp contrast, easy to see in different lighting, extremely wide viewing angles. Aren't they power hungry though? I thought the OLED multimeter Dave reviewed once was a power pig. Maybe no worse then LEDs though.

A year or so ago, I wanted to use an OLED on a hobby project of mine. I found they were just too expensive in small quantities.I think they are insanely expensive still.

What about allow the option of installing a FTDI and optoisolators (on a secondary board, perhaps) so those who want it can install it?

And I think there should be the option of adjusting the input current limit. USB 3 can do 900mA and it's becoming very common nowadays. There are also various motherboards out there that can supply as much as 2A for charging tablets.

Logged

Cryptocurrency has taught me to love math and at the same time be baffled by it.

What about allow the option of installing a FTDI and optoisolators (on a secondary board, perhaps) so those who want it can install it?

And I think there should be the option of adjusting the input current limit. USB 3 can do 900mA and it's becoming very common nowadays. There are also various motherboards out there that can supply as much as 2A for charging tablets.

with software control it would be very easy to do (some: SET INPUT xxx command in milliamps).I wonder if Dave would use an energy micro for this project, a directly programmed pic/AVR or an arduino

If someone wants to design/make decent adjustable power supply with settings and measured values shown .. IMHO it's better be microcontroller based.. I know One could do it with pure amalog circuits, 4000-series logic or code it all on smallish FPGA, but in the end that's system cheap 4-8-16 bit µC is quite suitable.

china-Cheap producs are usually made with as old and as cheap parts as can be found. Usually even cloning decades old designs and layouts.

It's 3 part more, he doesn't even have to add them on the PCB, just add the footprints (FTDI chip and 2 optocouplers).

Correct, I don't have to add them.I am considering putting in the footprints if I have room.FYI, the FTDI chip then becomes the most expensive chip on the board, by double.Still cheap, as chips go, but double...And my micro doesn't have a UART, so it would have to be bit banged.

Hi everyone! Nice conversation about this USB powered PSU. I read the 11 pages of the conversation and maybe I missed it but: what are the specifications of this PSU? I know it will be USB isolated (a lot of comments on that) but what about current it will be able to provide and the voltage? I know that it is still on design and has to be decided but does anyone knows if Dave has decided how much voltage and current he wants this PSU be able tu supply?

Looking at the input power available and what Dave said about the architecture:

With the isolated DC-DC conversion, linear regulator in tandem with variable voltage DC-DC boost preregulator and LED displays, and output side power rail for powering a microcontroller which would also have to magically appear at the isolated output side where the microcontroller would be, and about 4.2V/500mA worst case input power due to USB cable voltage drop, my estimates come to at best 1W reliably usable for output.That is 3.3V/303mA, 5V/200mA, 10V/100mA, 12V/83mA, 15V/66mA, 20V/50mA.

If you want more you would probably have to drop something.Some power could be saved on the LED displays. Assuming multiplexed digit mode, up to 8 segments lit with 20mA each at any time, and classic resistor current limiting on these from 5V power rail, LED displays alone can take up to 0.8W. This could be lowered to about 0.4W if powered from a low voltage supply rail right above the LED voltage drop + digit switch drop. You could also reduce the current/pwm on ratio at the cost of reduced brightness. And get some high efficiency LED displays that need much less than 20mA to light up probably at higher price.

Drop the linear regulator and leave just isolated variable DC-DC with an output LC filter for about 20% more power in exchange for a bit of output ripple.Drop LED displays and replace with LCD with efficient single LED or no backlight for another 10% or so.

Maybe you could get down to 0.5W overhead/1.5W usable supply for3.3V/454mA, 5V/300mA, 10V/150mA, 12V/125mA, 15V/100mA, 20V/75mA.

Not sure how much lower you can get, with classic optocouplers for isolation probably not as these include power hungry IR LED that will easily want 5mA, 6.5mA if you want to leave slack for LED burnout over time... Maybe with some fancy inductive type of isolators? I have even seen an isolated op-amp with these somewhere...

I can't wait to see how efficient will Dave get with this

If he changes his mind and actually does use some USB talking chip, a great feature to add would be an isolated built in logic level RS-232 port for debugging the powered device

--I agree with Dave. Small and simple, is the way to go. Being that USB is ubiquitous, this device will be kind of like the Swiss Army Knife of Power Supplies. One can always go get a Ka-Bar, if real mayhem is called for.

--The horizontal binding posts are a great idea. Shortening the height, and getting rid of the empty space in the box is another problem entirely. Please see the attached pictures, where I cut down a standard project box (one off) with a razor knife, to house and shield the Sparkfun Cap Meter. I do not quite know how DJ could achieve this in a practical manner. No doubt, it is not cost effective to order a custom box, that is only as tall as it needs to be. Perhaps someone has an idea.

--I was also glad to see that people could disagree, without being disagreeable.

"All I wants of you, Cap'n Simmons, is plain seevility, and that of the commonest goddamndest kind!"Zeph W. Pease

It's 3 part more, he doesn't even have to add them on the PCB, just add the footprints (FTDI chip and 2 optocouplers).

Correct, I don't have to add them.I am considering putting in the footprints if I have room.FYI, the FTDI chip then becomes the most expensive chip on the board, by double.Still cheap, as chips go, but double...And my micro doesn't have a UART, so it would have to be bit banged.Dave.

Doesn't have to be the $6 FT232RL, there are a few cheaper ones for about half that.Though i guess if its left unpopulated on the pcb it's better if it's something common.

It's 3 part more, he doesn't even have to add them on the PCB, just add the footprints (FTDI chip and 2 optocouplers).

Correct, I don't have to add them.I am considering putting in the footprints if I have room.FYI, the FTDI chip then becomes the most expensive chip on the board, by double.Still cheap, as chips go, but double...And my micro doesn't have a UART, so it would have to be bit banged.Dave.

Doesn't have to be the $6 FT232RL, there are a few cheaper ones for about half that.Though i guess if its left unpopulated on the pcb it's better if it's something common.

I'm going by the 1K Digikey price for the FT230XR-S, and stand by my original statement!

I'm still worried about the binding posts. Sure, they'll probably fit, but how is the durability? Don't want the damn things to come loose after 6 months. And if you're going to use taller buttons, you'll still need to drill holes in the clear cover. One option might be to use a PCB as the side panel on the USB side. This way you could put the buttons on that board, and not use elevated buttons.

I think this would be a good jack to use. Digikey per 1000 prices are $1.84 each and that's for both positive and negative. Plus it's lower profile than others and hey made in the USA if that matters.

Not sure if there is anything low profile about those sockets. 50mm long and they project over 30mm front the panel. They would take more room then the cheap sockets Dave showed us - I doubt they would even fit.

I'm going by the 1K Digikey price for the FT230XR-S, and stand by my original statement!

MCP2200 is cheaper even after the required external crystal, 1.47 in hundreds and 2.12 in singles. Direct from manufacturer might be different but I'm too lazy to look it up. Not sure why everyone is so fond of the FTDI parts for trivial UART applications.

But it's not up to me to tell you how to bloat your projects. Maybe you should have chosen something that everybody doesn't think they understand :-)