Author Topic: EEVBlog #285 - Isolated USB Lab Supply  (Read 62274 times)

0 Members and 1 Guest are viewing this topic.

Offline bruce273

  • Contributor
  • Posts: 39
  • Country: gb
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #25 on: May 30, 2012, 11:38:51 am »
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.

 

Offline stryker

  • Regular Contributor
  • *
  • Posts: 98
  • Country: au
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #26 on: May 30, 2012, 11:46:42 am »
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?)
May not be a computer.
PC control needs data across isolation, and can't be used standalone with any 5V USB supply.
Dave.
My choice for power source will likely be a small battery pack, or a car cigarette lighter USB power adapter - even a minty boost.  Keeping the display allows this flexibility, so has my vote.

Very much looking forward to this.  Certainly will help reduce the bulk in the tool kit.
 

Offline david77

  • Frequent Contributor
  • **
  • Posts: 934
  • Country: de
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #27 on: May 30, 2012, 11:55:08 am »
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 :).

 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 37661
  • Country: au
    • EEVblog
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #28 on: May 30, 2012, 12:16:54 pm »
Absolutely - must have 4mm sockets and binding posts - a possible compromise if space is short is 4mm sockets plus some sort of spring terminal - like the sort used for speakers on some amps.

I have considered the dual 4mm socket and spring terminal idea, as it does save protrusion space. But ultimately 4mm binding posts are just too irresistible.

Dave.
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 37661
  • Country: au
    • EEVblog
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #29 on: May 30, 2012, 12:18:45 pm »
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.

Dave.
 

Offline LuckyJaker

  • Contributor
  • Posts: 16
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #30 on: May 30, 2012, 12:33:37 pm »
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 !
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 3685
  • Country: us
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #31 on: May 30, 2012, 12:35:15 pm »
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.
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 37661
  • Country: au
    • EEVblog
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #32 on: May 30, 2012, 12:46:02 pm »
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 !

It will be open source hardware of course.

Dave.
 

Offline TbayBoy

  • Newbie
  • Posts: 8
  • Country: ca
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #33 on: May 30, 2012, 12:48:19 pm »

It will be open source hardware of course.

Dave.

Thumbs up :)
=-=-=-=-=-=-=-=-=-=-=-=-=-=
2 antennas got married... the
ceremony was lousy but the
reception was excellent...
http://www.tbaygeek.org
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 37661
  • Country: au
    • EEVblog
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #34 on: May 30, 2012, 12:53:03 pm »
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.

Dave.
« Last Edit: May 30, 2012, 12:58:48 pm by EEVblog »
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13695
  • Country: gb
    • Mike's Electric Stuff
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #35 on: May 30, 2012, 12:54:20 pm »
Dave, you are using a commercial isolated DC-DC?

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

And an app-note here: http://www.ti.com/lit/an/snva028a/snva028a.pdf
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.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13695
  • Country: gb
    • Mike's Electric Stuff
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #36 on: May 30, 2012, 12:57:28 pm »
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.

Not enough room I'm afraid.

Dave.
Oh well, suppose you can always make up a Y-splitter cable...!
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #37 on: May 30, 2012, 01:02:28 pm »
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.


Legally, i.e. while staying within the USB specs, no.
For those who like their computer occasionally reset or like to risk to burn it, there is junk like this http://www.walmart.com/ip/Startech-6-USB-Y-Cable-for-External-Hard-Drive/14659917

Actually they do work ... work as in really work and not have your laptop up in flames
 

Offline firewalker

  • Super Contributor
  • ***
  • Posts: 2450
  • Country: gr
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #38 on: May 30, 2012, 01:10:32 pm »
Make it Arduino compatible!!!

 :P :P :P :-X :-X :-X

Alexander.
Become a realist, stay a dreamer.

 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 37661
  • Country: au
    • EEVblog
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #39 on: May 30, 2012, 01:19:40 pm »
I am pretty sure that no USB ports on consumer equipment actually does any sort of current limiting to 500ma.

Any well designed port will have some form of current limiting, it is very common.
Maxim for example make a range of USB current limit devices:
http://para.maxim-ic.com/en/search.mvp?fam=cl_usb_sw&tree=hotswap
Polyswitches are common too, although not as accurate as a current shunt measurement chip of course.

Dave.
 

Online tom66Topic starter

  • Super Contributor
  • ***
  • Posts: 6679
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #40 on: May 30, 2012, 01:40:37 pm »
I am pretty sure that no USB ports on consumer equipment actually does any sort of current limiting to 500ma.

Any well designed port will have some form of current limiting, it is very common.
Maxim for example make a range of USB current limit devices:
http://para.maxim-ic.com/en/search.mvp?fam=cl_usb_sw&tree=hotswap
Polyswitches are common too, although not as accurate as a current shunt measurement chip of course.

Dave.

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.
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13695
  • Country: gb
    • Mike's Electric Stuff
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #41 on: May 30, 2012, 01:47:26 pm »
I am pretty sure that no USB ports on consumer equipment actually does any sort of current limiting to 500ma.

Any well designed port will have some form of current limiting, it is very common.
Maxim for example make a range of USB current limit devices:
http://para.maxim-ic.com/en/search.mvp?fam=cl_usb_sw&tree=hotswap
Polyswitches are common too, although not as accurate as a current shunt measurement chip of course.

Dave.

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
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8515
  • Country: us
    • SiliconValleyGarage
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #42 on: May 30, 2012, 01:48:49 pm »


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

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.

Nope, memory doesn't work quite right yet, but is was close

TSP2041. Here is the whole family : http://www.ti.com/corp/docs/landing/usb-power/index.htm
« Last Edit: May 30, 2012, 01:53:10 pm by free_electron »
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 37661
  • Country: au
    • EEVblog
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #43 on: May 30, 2012, 01:56:35 pm »
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.
 

Offline chrome

  • Regular Contributor
  • *
  • Posts: 185
  • Country: be
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #44 on: May 30, 2012, 02:03:51 pm »
No further correspondence will be entered into.

Dave.
That sounds a lot like "lalala i can't hear you" while plugging you ears

My motherboard also shuts of the offending port if it draws too much current, it stays off till I power-cycle the computer.
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 37661
  • Country: au
    • EEVblog
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #45 on: May 30, 2012, 02:07:15 pm »
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.

Dave.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: nz
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #46 on: May 30, 2012, 02:09:47 pm »
I have a few ideas on the uSupply.
Take them as just food-for-thought, I'm sure whatever you come up with will be awesome.

* The led display.
A quick digikey search for 3 digit led displays came up with the cheapest unit at US$1.60 for 100.
Recently i made some led ID tags that used 0.7 inch 5x7 LED matrix modules and they turned out awesome.
You can get them from Jamaco for US$0.79 for 100.
http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_2005454_-1

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 jack
I 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.
« Last Edit: May 30, 2012, 02:53:57 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 3685
  • Country: us
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #47 on: May 30, 2012, 02:21:32 pm »
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.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8515
  • Country: us
    • SiliconValleyGarage
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #48 on: May 30, 2012, 02:33:55 pm »

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 voltage
Bottom line current

Code: [Select]
--------
> 1.45V~
  0.23A
--------
> OFF ~
--------
> 0.00V
  O.LD.

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.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: nz
Re: EEVBlog #285 - Isolated USB Lab Supply
« Reply #49 on: May 30, 2012, 02:40:06 pm »
Here's 2 pics of the LED matrix displays i was talking about in my previous post.
Same price char for char as cheapest digikey 3x7segs and more useful.


(colour difference is camera vs multiplexing issue, they look fine IRL)

« Last Edit: May 30, 2012, 02:41:40 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf