• EEVblog #298 – Dave’s Decade Digit Display – USB Supply Part 3

    Part 3 of the USB Power Supply design.
    A low cost 4 digit LED display solution = Dave’s Decade Digit Display
    Is it a triumph of novel idea over practicality perhaps?

    Be Sociable, Share!

      About EEVblog

      Check Also

      EEVblog #961 – Monkey Debouncing

      How do you debounce a clapping monkey? Probes The Monkey makes his return. All about ...

      • Filip

        It just seems to me like much poorer results just to save 1-2 dolars max…I mean if you look at the end sales price for this thing, which I asume wont be going for less then $30 it just seems like you’d get much more sales if you used a proper display then with a $2 smaller price…

        Also did you include the costs for the pick and plcae compared to the LCD…I think they charge per package. and having 32 leds seems it migh end up coting more then the LCD…

      • Luciano

        In addition to your DDDD and push buttons, you could use
        the PC to display and control the power supply via USB.
        The power supply will get only +5V from USB in standalone
        operation or will get +5V from USB and data via USB when
        remote controlled or in mixed mode operation.

        In any case the PC must be on in order to get 5V from its USB ports.

        From my understanding of the USB spec, a USB device is only
        allowed to draw 100mA of current, unless the host gives permission
        for the device to draw 500mA. (SW/driver).

        Best regards,


      • JRR

        Luciano – If I had one of these power supplies, I would FREQUENTLY be using it in the field or just away from the PC with a mains-to-USB power adapter, so you can’t rely on having the computer available.

        Also, the PC does not need to be on in order to draw power, most PCs have the capability to have some ports active in power down mode.

        Additionally, it’s likely that this could be plugged into a hub; I have all the USB stuff on my bench (logic analyzer, etc) plugged into a hub just for the extra isolation in case something happens to put high voltage on one of the devices, it’s a chance to not blow my mainboard. I’m probably not alone in doing this.

      • In my personal opinion i don’t like the Bar-LED solution – i think it is to difficult to read.

        If you like challanges and you want to design this powersupply super-geeky than you could save some more costs by introducing binary encoded Digits 😉

        Personally I think you should stick with the LCD-solution and use a Standard-uC without dedicated LCD-Peripharal to drive it.

        see Application note AVR241

        you will need 24 GPIO-Pins (for 3digits + 2dots) – I guess the presented approch from the datasheet would work with any standard uC.

        best wishes, Georg

        • Rafael


          I am pretty sure the number of GPIOs can be reduced even further by multiplexing the segment data itself.
          I have a project where I drive a display with just 8 GPIOs (7 segment + decimal point) + 4 Digit Select pins and was able to fit everything I needed in a 28-pin MSP430G2553. Of course the software becomes more complex.

          • Does your display have multiple common-pins?
            Do you introduce Latches/Shift-Registers to your design?

            • Rafael


              My configuration is very similar to the four-digit display ELF-512 from Everlight. Each segment of the four digits are connected together and every common anode allows selecting each digit. The only detail is the MSP can’t drive the LEDs directly (thus requiring a buffer).

      • Athar Rasul

        Dave, that few cents that you managed to save might shave off some ease of usability as well. Why not stick to the idea of making your own 7-segs using leds BUT instead of just multiplexing the digits, multiplex the segments too (provided of course that the micro manages to blink all of them in ~15ms).

        That way you’ll have current consumption of just one led AND the practical usability of a 7-segment display. Best of both worlds.

      • Daedalus

        why not just lay out your leds as a 7-segment display directly on the pcb? With 2 leds per segment it would look reasonable, and wouldn’t have the cutout issues any more.

        I wouldn’t buy a psu that required “decoding” to figure out what the voltage was set to, no matter how much was shaved off the BOM.

        • Frank

          I’m with you. A decade counter is too old school.

          And, given that there is going to be a laser cut clear plastic cover over it, the LED digits could be engraved in the plastic to give a diffused lens. Then you may be able to get away with 1 led per segment.

      • Alex

        Next Dave product rant: the Dave digital decade counter. Why deviate from the expected way of accessing measurement data? It becomes even more of a niche, or perhaps novelty, product then. I wouldn’t buy a book to research a famous English poet that had her works presented in Spanish unless I was part of some Spanish immersion hobbyist crowd.

      • Ppirokke


        i guess power and price is one thing, but the other big factor is the usability.. I wouldn’t buy a unit, where i have to count led’s and add them to get my setting. It’s just cheap.. but is that really what we want to get? What’s about multiplexing an 7-segment display? I think the consumption would go down, you can integrate a brightness control and it’s still user friendly, even in dark conditions.


      • Worf

        Surely there are other ideas that can be explored?

        The bargraph is innovative, but hard to read quickly.

        Another way is – do we need to keep the LEDs on constantly? I mean, think about it a bit – once the voltage and current limit are set, the displays can turn off. If we want to spot-check it, we can push a button and have the display flash the voltage and current (either through extra buttons, or realizing that if the display is off, pushing the V/A buttons can be used to turn them on and NOT adjust the voltage or current).

        Since there’ll be probably 4 buttons (V+/V-, A+/A-, or +/- V/A), if the display is off, pushing the V (or V+/V-) will turn the display on, show the current voltage setting (without adjusting it until the +/- is pushed while the display is ON). After a few seconds, it’ll show the current voltage output.

        Ditto for current – pressing A (or A+/A-) will display the current limit setting, then switch to the current being drawn.

        If you add an output on/off button (very handy!), if the output is OFF, the display can be on continuously for adjustment.

        Of course, I wonder about this goal to save every penny – there’s stuff like penny-wise and pound-foolish. Investing in a more expensive microcontroller (if we went LCD) might be worth it if it can be PC controlled (if you’re plugging into a PC, you MUST do a negotiation to ensure you have 500mA available – a USB host is only obliged to give you 100mA until enumeration). Also, sleep-power USB often requires the USB device to be enumerated before sleeping so the OS can tell the USB ports to remain powered.

        Plus, you’ll probably want to invest in a USB power management IC – these things generally are current limiters that initialize to 100mA default and on command can switch to 500mA. Drawing any more can destroy the PC side (yes, every USB host port is supposed to be current limited to 500mA, but the strive for cost reductions means the current detector often only monitors groups of ports – you can buy 500mA/1A/2A/3.5A overcurrent sensors/breakers. USB hard drives often take advantage of this when they start up and die when you have a port that only gives you 500mA. But you don’t want to blow the port by accident and a USB power controller can current limit for you. Another thing – USB cables aren’t all identical! Some cables are crappy and have HUGE voltage drops if you draw more than 500mA, even briefly.

        Yes, I’ve actually done USB work. You can get away with a lot, but if you want to do it properly there’s lots of issues to think about. And PC manufacturers play fast and loose to save pennies everywhere. It’s actually a wonder why we don’t see more burned USB ports (think back to the ganged current sensor – if there’s one sensor for 4 ports, some of the power traces between the sensor and the ports can be questionable – I doubt they can handle 2A).

        A suggestion – add a battery for those times you want to quickly try something but not boot the PC up. not everyone has a Macbook Air that can go from sleep to operational in under 10 seconds. It can charge while the power supply is off (those USB power controllers often have built-in LiIon/LiPoly chargers and can manage USB/AC adapter power, system power draw, and battery charging).

      • kyndal

        just add the extra dollar, and multiplex the segments!
        or make it from LEDs

        its not worth it in loss of usability!


      • I’m going to go with the sentiments expressed by the above majority. Ditch the DDDD. It kinda sucks. Novel, but you’re more likely to make mistakes with readings. I’d have to look twice to make sure the voltage and current are what they should be. Very irritating. Multiplexing the segments and the digits is an excellent solution. Infact the SuperProbe does exactly that (http://mondo-technology.com/super.html) And, if you use a single LED per segment, (which would make the digits small, but still completely readable) you’d need just 31 LEDs (7*4 segments + 3 points) or even less if you decide that 2 decimal points are sufficient and that the leading digits ‘1’ and ‘2’ can be represented by 6 LEDs. So slightly cheaper. Personally, I’ve used the segment multiplexing technique very successfully in several projects. The code will become a bit more complex, but nothing that the Tiny can’t handle.

      • Nicolas

        If your design is so cost saving oriented , you may consider creating your 7 segments from SMD LEDs and drive them using “Charlieplexing” led multiplexing method , this should allow you to keep a cheap uC , cheap display , pick and place friendly design and power efficiency. On the downside , the software part will be more complex , and maybe the pcb layout.

        • Manu

          I’d prefer the solution of Nicolas. Well, bargraph is geeky and I like it for that, but you can’t rely on that in terms of usability. Voltage and current must be readable at a glance without thinking of it (decodind leds would be very disturbing when you’re troubleshouting something).
          However, I like the idea of a USB power supply and I hope it will be soon available on your shop.
          Best reagrds,

      • Welcome to the 1950s! This is the sort of display that frequency counters and DVMs had back then. Dave, if you really want to save more money, then put four LEDs in a column and put out the information in BCD. It’s only a little harder to read than a decimal bar graph and saves 6 LEDs per column.

        Frankly, I think you’ve traded a boatload of usability for $1.70 (the differential between 30 penny LEDs and two 3-digit LED displays. Truly geeky, but not a good tradeoff in my opinion.

      • Dear Crazy Aussie Bloke:

        Didn’t you have a basket full of LCDs? Did you already give them all away? You could use those. From my perspective, a backlit 2-line LCD costs about $5, offers tons of usability, and draws a couple of mA. You ought to poll your readers and see if they prefer usability with text versus three bucks incremental savings over the LEDs.

      • LPM

        I think this could be made more serviceable if the silkscreen was a little better designed. Specifically, I think a single silkscreen line connecting each row of led’s to the number on the right would make it easier to read. Or maybe alternating negative/positive stripes of silkscreen. The vertical lines separating the columns aren’t very necessary to figure out which column you are in and break up the display too much imo.

      • FCB

        Why not use a Philips PCF2112 LCD driver ($1.16 from Digikey & Farnell) and that nice little 3 digit LCD part. Much nicer than that ‘retro’ LED thing.

        Don’t spoil a great design for a $2 saving.

      • Patrick

        The DDDD could display voltage and current at the same time if you use dual color leds.
        One color could be used for the voltage the other one for the current.
        This could/should be combined with multiplexing.

        For a product that others should use, i would be concerned about the usability.

      • Bob

        Let’s see,

        1. Hard to read display that requires multiple button pushes to read.


        2. Case that rocks every time you push a button and looks unfinished.


        3. Current limited to minimum spec.


        4. Uses extra long, cheap feeling binding posts instead of quality compact versions.


      • DJ

        If you’re going to go “decade” then use 3-4 RGB leds and color code them with the standard resistor code. Still worse for usability, but it gains you a few bonus points for cool, and takes up less space.

        For 4 multiplexed RGB leds, you only need 7 output pins.

      • Not a fan of DDDD but I understand your viewpoint. I think that redesign the silkscreen placing the number just to the left of each led will be a big readability improvement.

        Probably in the reality it looks better than in the imagination (make and film it can gain the approval).

        Thanks for your fantastic blog.

      • Jan

        Dave, this display idea is seriously dumb. I seriously hope it is only one of your April fool’s jokes.

        How easy will it be to misread a value and blow up your circuit because of voltage set too high?? I think the first fried circuit will cost more than having a proper display in the first place.

        Another solution would be to use USB to set/monitor the values, as suggested by other commenters. Even an ATTiny25 can do a bitbanged low speed USB – the VUSB lib takes only about 1.8kB of FLASH. If you prefer proper USB transciever (likely good idea, especially if you want to do proper enumeration), there are the super cheap PIC18f14k50 series PICs.

        If PC-less operation is a requirement, it could be handled either by pre-programming the PSU before using in the field and/or by providing two test pads/connectors to hook up your multimeter while you are adjusting the controls. Simply use the meter’s display for it, by converting the value to voltage using PWM. You would likely have a meter on you anyway when using a PSU like this, so it doesn’t impose extra burden on the user.

        I think any of these will result in a much more usable product than the decade display.



      • COG display used in this component tester (yt video, housing is cut with dremel so not very nice, but pay attention at lcd)


        was ~$2 per one and the whole component tester (9V battery -> 7805 -> ATMEGA + COG) uses 11mA while testing components.

      • f4eru

        Don’t like that display.
        A lab PSU must be read fast, often, and current/voltage in paralell. Sometimes you have to react fast.

        I would go for the homemade LED version.
        Another option : optocoupler + ATTINY on the primary side as bitbang USB => display on the laptop !!! you can have both variants with only one populated (but i think dave does not like many variants 🙂

        The general problem with LCD : lack of standardization, which makes sourcing a hot issue, especially for matrix ones ! Perhaps you should swallow that pill and look for a single source/ off the shelf part.
        I’m pretty shure a lot of asian LCD manufacturers have some two lines 7 seg or alphanum displays they use for some specific customer and that they be happy to sell you also.
        How about OLED ?

      • I LOVE the DDDD display. I would consider using different color LEDs to make reading less erroneous.
        Do you NEED a 99.9 count display? With max 15 volt, 19.9 might be enough?

        How about touch pads in stead of buttons?
        Being a Microchip-fan-boy, I would go with a USB capable chip, like the PIC18F14k50, thou your CPU budget will be ~2$… This way you can play ‘nice’ with the USB-specs, have the PC set up predefined voltage outs, setting max/min voltage, have a feedback pin, to datalog, and, and, and…


      • I applaud your creativity. However, I agree with most people above that this would not be a very user friendly solution. I thought one of your ideas ( building the 7 segment display out of LEDs on the board and multiplex them) was very good. By multiplexing it, you could use a low pin count micro.

      • I like the LCD solution, with the LCD driver PCF2112C. It is a serial shift register type device. That means low pin count for the microcontroller that drives it.

      • Steve

        Tried that solution on a commercial project when battery consumption, space, and cost was a major factor. It failed the HMI study.

        Tried the “Build own 7 segment display using LEDs” approach, but it didn’t work either.

        Ended up using an LCD Glass-type display. Started off at 99c, now we have it custom made for more functionality and its 79c. Processor is 8051-based and costs 89c.

        Only problem is you can’t see it in the dark, but if your in the typical environment, thats not going to be a problem.

      • Alex


        Your idea is great, but… non usable. When you use the power source the last thing you want to do – is to recheck, if you’d set current and voltage right.

        And another idea – please don’t use COG without backlight. Sometimes it is not possible to work with enough light, and sometimes power source is far enough from you.

      • Laurynas

        Just get some small SMD 7-segment displays and multiplex them.
        these are very low profile, small and can be placed by machine.

      • Nick

        It’s “clever” and if you only need to visually decode the value once (set and forget) it may be a reasonable compromise. It will never work as an effective and user friendly real-time readout (active current draw?)

        For a few dollars extra I would prefer a backlit LCD (possibly with an onboard serial interface to allow a greater range of micros to be selected from?) or equivelant, just for usability. This would also allow extra functionality and greater “hackability” in conjunction with the microcontroller and a JTAG header.

      • Cheers for an engaging blog. I always find it interesting the vast amount I learn each and every day. Love to learn more.

      The EEVblog Store is closed for the XMAS and New Year season. It will re-open mid January. US Customers can still order on Amazon.