Recently, I’ve been working on the development of a USB device, ie, a device designed to hook up to a PC via a USB cable and become a “bus powered peripheral”. Along the way, I realised that I was going to have to measure the current drawn by the device, to make sure it conformed to the USB specification. Since I also struck trouble getting the device to “enumerate” properly when it was first hooked up to a PC, it was also going to be handy to be able to check the voltage levels on the two USB signal lines with my scope, to see if the voltage levels were within specification.
Now since the device’s USB connector was mounted directly on its PCB, the only way to measure the current drawn from the host via the USB bus would be to cut the pin 1 track on the board, so I could connect in a milliammeter. But I didn’t want to cut a track on the board just for this test, because it would need to be bridged again with a short length of wire afterwards.
It also turned out to be a bit tricky connecting my scope’s probes to the two USB signal lines, because my board was fairly small, with a high component density near the USB socket. In fact, this is always the way with USB interfaces – they’re hard to get at.
What I really needed was a small “breakout box” which could be connected in series with the USB cable between the PC and the device. This would make any of the bus lines available for testing. So I knocked one up using a small piece of PCB cut from an old prototype board. The latter already had a USB type-A socket mounted on it, so all I had to do was add a type-B socket and a handful of other parts. It looked a bit untidy (as you can see from the above photo) but it worked well and let me do the testing in short order.
When I mentioned that I had built up this handy little USB testing jig to SILICON CHIP’s esteemed publisher Leo Simpson, his response was as quick as a shot: “If it’s that handy why don’t you take a quick picture of it and draw up the circuit, so we can publish the details in the magazine and give other people the chance to build one?”
In the end, as well as taking a few photos and drawing up the circuit, I also designed a PCB pattern for it. So when you build one, it will look better than my prototype. What’s more, it will take take just 10 minutes or less to put together.