Sunday, November 9, 2014

AP2331 FTW

I've been using and selling my USBTiny clone for a little while now, and it's been a great little device for the most part. But there's one little detail that's bugged me just a tiny bit: It's not hot-plug safe. In general, you need to attach the ISP header first, then plug the USB cable in. If you try and hot-plug it,  particularly when it's jumpered for 3.3 volts, you risk glitching the Vcc supply of the Tiny2313. This can cause the USB to reenumerate, at best, but most of the time it just causes the 2313 to lock up. Solving the hot-plug problem is particularly meaningful when you're using pogo pin programming, as cycling the USB connection while holding the pogo pins perfectly in place is difficult at best. I've tried to address this in the past by adding additional capacitance before and after the 3.3 volt LDO, but that didn't really help.

I happened to think about the Raspberry Pi. On the model B, I was able to cause a reset by removing the WiFi USB dongle. But for the B+, they added additional circuitry to mitigate this. What was it? The AP2331. The device is simplicity itself. It's an SO23-3 with pins for in, out and ground. It was designed for USB power applications, but it's usable at 3.3 volts as well, which makes it ideal for my purposes.

I tested one using pin clips to attach it to my current revision of board, making it the bridge between the 3.3 volt and target power pins of the jumper block, and pulling ground from the controller. Without it in place, I could cause glitches on the controller fairly consistently with a pogo adapter and a Crazy Clock board. But with the device in place? Nothing. It just worked.

So I'll be adding one to the 0.5 version of the ┬ÁISP. That'll raise the price of it by a dollar, but that won't go into effect until the current inventory of 0.4 boards is cleared out.