Showing a board with a Pi Pico plugged into it, a USB-A socket marked "USB host", and a character display that says "PASSED" referring to the board being the brains of a testing jig.

USB Host On RP2040 – With PIO

Folks from [Adafruit] are showing off a neat hack – USB host on RP2040, using the now-famous PIO peripheral. [Adafruit] builds a lot of RP2040 boards, and naturally, you gotta test them before you ship them to customers. They’ve been using very specific Teensies for that, and at some point, those became unobtainium. Based on the work of [sekigon-gonnoc] and with help of [Thach], they’ve made their TinyUSB library support bitbanging of USB over PIO, and successfully ported their test jig firmware to it!

The base Pico-PIO-USB repo by [sekigon-gonnoc] shows a pretty impressive state of affairs – with low-speed and full-speed USB host and full-speed USB device modes supported, and quite a few examples to get you started. [Adafruit]’s work integrates this code into their TinyUSB stack, specifically focusing on MST (mass storage) features – as this is what you need to program a RP2040. Of course, they also provide a mass storage example to boot!

Test jigs are pretty important to have when making multiple pieces of a board, and with RP2040 supporting more and more interfaces thanks to PIO, it sounds like the perfect chip for your next production testing-intended PCB. With the jig brains taken care of, you’ll want to look into building no less important mechanical part, and we’ve covered quite a few ways to sort that out – here’s an OpenSCAD script that generates lasercutting files out of KiCad boards, or a jig built out of scrap copperclad FR4, and a pretty extensive tutorial on making your own lasercuttable jigs, to boot.

Continue reading “USB Host On RP2040 – With PIO”

An SLA-Printed Pogo Pin Programming Jig

If you have a microcontroller to program, it can be an easy enough process to hook up a serial lead and perform the task. If however you have hundreds of microcontrollers on PCBs to program, connecting that lead multiple times becomes an impossibility. In manufacturing environments they have pogo pin jigs, an array of spring-loaded pins carrying the programming signals that line up perfectly with the appropriate pads on a PCB places on top of it.

[Conor Patrick] is working on an upgrade to the U2F Zero 2-factor authentication token, and he faces exactly this problem of needing to program a lot of boards. His pogo pin jig is very nicely executed, and he’s taken us through his design and manufacture process for it.

Starting with his PCB design in Eagle, he exported it to Fusion 360 in which he was able to create a jig to fit it. Into the jig model he placed the holes for his chosen pogo pins in the appropriate places, before printing it with an SLA 3D printer. He is particularly complementary about the pins themselves, a solder bucket design that comes from mill-Max, and was sourced via DigiKey.

The proof of the pudding is in the eating, and happily when his completed jig received its first board, everything worked as planned and the programming proceeded flawlessly. We’ve shown you other pogo pin jigs, but this one is particularly nicely executed.