USB And The Myth Of 500 Milliamps

If you’re designing a universal port, you will be expected to provide power. This was a lesson learned in the times of LPT and COM ports, where factory-made peripherals and DIY boards alike had to pull peculiar tricks to get a few milliamps, often tapping data lines. Do it wrong, and a port will burn up – in the best case, it’ll be your port, in worst case, ports of a number of your customers.

Want a single-cable device on a COM port? You might end up doing something like this.

Having a dedicated power rail on your connector simply solves this problem. We might’ve never gotten DB-11 and DB-27, but we did eventually get USB, with one of its four pins dedicated to a 5 V power rail. I vividly remember seeing my first USB port, on the side of a Thinkpad 390E that my dad bought in 2000s – I was eight years old at the time. It was merely USB 1.0, and yet, while I never got to properly make use of that port, it definitely marked the beginning of my USB adventures.

About six years later, I was sitting at my desk, trying to build a USB docking station for my EEE PC, as I was hoping, with tons of peripherals inside. Shorting out the USB port due to faulty connections or too many devices connected at once was a regular occurrence; thankfully, the laptop persevered as much as I did. Trying to do some research, one thing I kept stumbling upon was the 500 mA limit. That didn’t really help, since none of the devices I used even attempted to indicate their power consumption on the package – you would get a USB hub saying “100 mA” or a mouse saying “500 mA” with nary an elaboration.

Fifteen more years have passed, and I am here, having gone through hundreds of laptop schematics, investigated and learned from design decisions, harvested laptops for both parts and even ICs on their motherboards, designed and built laptop mods, nowadays I’m even designing my own laptop motherboards! If you ever read about the 500 mA limit and thought of it as a constraint for your project, worry not – it’s not as cut and dried as the specification might have you believe.
Continue reading “USB And The Myth Of 500 Milliamps”

Hackaday Links Column Banner

Hackaday Links: June 16, 2024

Attention, slackers — if you do remote work for a financial institution, using a mouse jiggler might not be the best career move. That’s what a dozen people learned this week as they became former employees of Wells Fargo after allegedly being caught “simulating keyboard activity” while working remotely. Having now spent more than twice as many years working either hybrid or fully remote, we get it; sometimes, you’ve just got to step away from the keyboard for a bit. But we’ve never once felt the need to create the “impression of active work” during those absences. Perhaps that’s because we’ve never worked in a regulated environment like financial services.

For our part, we’re curious as to how the bank detected the use of a jiggler. The linked article mentions that regulators recently tightened rules that require employers to treat an employee’s home as a “non-branch location” subject to periodic inspection. More than enough reason to quit, in our opinion, but perhaps they sent someone snooping? More likely, the activity simulators were discovered by technical means. The article contains a helpful tip to avoid powering a jiggler from the computer’s USB, which implies detecting the device over the port. Our guess is that Wells tracks mouse and keyboard activity and compares it against a machine-learning model to look for signs of slacking.

Continue reading “Hackaday Links: June 16, 2024”

USB Dongle Brings Python-Controlled GPIO To The Desktop

Microcontroller dev boards are wonderfully useful items, in testament to which most of us maintain an ample collection of the things. But dragging one out to do a simple job can be a pain, what with making sure you have the whole toolchain set up to support the device, not to mention the inevitable need to solder or desolder header pins. Wouldn’t it be nice if there was a simple plug-and-play way to add a few bits of GPIO to your desktop or laptop machine?

[Nick Bild] thinks so, and came up with the USBgpio. The hardware in the dongle is pretty much what you’d expect — an Arduino Nano 33 IoT. Yes, you could just bust out a Nano and do this yourself, but [Nick] has done all the heavy lifting already. Eleven of the Nano’s IO pins plus 3.3V and ground are broken out to header pins that stick out of the 3D-printed enclosure, and the dongle is powered over the USB cable. [Nick] also built a Python library for the USBgpio, making it easy to whip up a quick program. You just import the library, define the serial port and baud rate, and the library takes care of the rest. The video below shows a quick blinkenlight test app.

Earth-shattering stuff? Perhaps not; [Nick] admits as much by noting the performance doesn’t really dazzle. But that’s hardly the point of the project, and if you need a couple of pins of IO on the desktop for a quick tactical project or some early-stage prototyping, USBgpio could be your friend. Continue reading “USB Dongle Brings Python-Controlled GPIO To The Desktop”

2024 Business Card Challenge: Adding Some Refinement To Breadboard Power Supplies

For small electronics projects, prototyping a design on a breadboard is a must to iron out kinks in the design and ensure everything works properly before a final version is created. The power supply for the breadboard is often overlooked, with newcomers to electronics sometimes using a 9V battery and regulator or a cheap USB supply to get a quick 5V source. We might eventually move on to hacking together an ATX power supply, or the more affluent among us might spring for a variable, regulated bench supply, but this power supply built specifically for breadboards might thread the needle for this use case much better than other options.

The unique supply is hosted on a small PCB with two breakout rails that connect directly to the positive and negative pins on a standard-sized breadboard. The power supply has two outputs, each of which can output up to 24V DC and both are adjustable by potentiometers. To maintain high efficiency and lower component sizes, a switch-mode design is used to provide variable DC voltage. A three-digit, seven-segment display at the top of the board keeps track of whichever output the user selects, and the supply itself can be powered by a number of inputs, including USB-C or lithium batteries.

Continue reading “2024 Business Card Challenge: Adding Some Refinement To Breadboard Power Supplies”

Multiply Your Multimeter With Relays And USB

Multimeters are a bit like potato chips: you can’t have just one. But they’re a lot more expensive than potato chips, especially the good ones, and while it’s tempting to just go get another one when you need to make multiple measurements, sometimes it’s not practical. That’s why something like this 2×4 relay-based multiplexer might be a handy addition to your bench

In this age of electronics plenty, you’d think that a simple USB relay board would be easy enough to lay hands on. But [Petteri Aimonen] had enough trouble finding a decent one that it became easier to just roll one up from scratch. His goal was to switch both the positive and negative test leads from up to four instruments to a common set of outputs, and to have two independent switching banks, for those times when four-lead measurements are needed. The choice of relay was important; [Petteri] settled on a Panasonic DPDT signal relay with low wetting current contacts and a low-current coil. The coils are driven by a TBD62783A 8-channel driver chip, while an STM32 takes care of USB duties.

The mechanical design of this multiplexer is just as slick as the electrical. [Petteri] designed the PCB to act as the cover for a standard Hammond project box, so all the traces and SMD components are mounted on the back. That just leaves the forest of banana-plug binding posts on the front, along with a couple of pushbuttons for manual input switching and nicely silkscreened labels. The multiplexer is controlled over USB using the SCPI protocol, which happily includes an instrument class for signal switchers.

We think the fit and finish on this one is fantastic, as is usual with one of [Petteri]’s builds. You’ll probably recall his calibrated current reference or his snazzy differential probe.

A Simple Hack For Running Low-Power Gear From A USB Battery Pack

We’ve all been there. You’ve cooked up some little microcontroller project, but you need to unhook it from your dev PC and go mobile. There’s just one problem — you haven’t worked up a battery solution yet. “No problem!” you exclaim. “I’ll just use a USB battery pack!” But the current draw is too low, and the pack won’t stay on. “Blast!” you exclaim, because you’ve been watching too much Family Guy or something.

[PatH] had this very problem recently, when trying to work with Meshtastic running on a RAKwireless WisBlock Base Board. You’re supposed to hook up your own rechargeable LiPo battery, but [PatH] was in a hurry. Instead, a USB battery pack was pressed into service, but it kept shutting down. The simple trick was to just add a 100-ohm resistor across the device’s battery terminals. That took the current draw from just 15 mA up to 53 mA, which was enough to keep portable USB power banks interested in staying switched on.

It’s an easy hack for an oddball problem, and it just might get you out of a bind one day. If you’ve got any nifty tricks like this up your sleeve, don’t hesitate to let us know!

Eliminate That Pesky Power-Only USB Cable With This Cable Tester

Ever wondered why your Arduino wasn’t programming, only to find out that the cable doesn’t have any data conductors? Worry not, [Spencer Maroukis] has got you covered with the USB Sleuth Cable Tester!

The cable tester is a beautiful black circular PCB, with USB ports of nearly every type on the edges. It works partially through passive detection with LEDs and otherwise through active detection of things like the orientation with an STM32 powered by a coin cell battery. But it gets better: There are disconnect switches and exposed pads to test some of the conductors with a digital multimeter!

It may not be necessary for all of us, but one thing is clear: When you needed a good USB cable, you wished you had this to actually test it. The design is open-source too, which is definitely nice if you want one for yourself.

Meanwhile this isn’t the first USB cable tester we’ve seen here.