Code and Life

Programming, electronics and other cool tech stuff

Supported by

Supported by Picotech

USB password generator PCB

The most popular project of all time at Code and Life has been my DIY USB password generator. When I made it, I used a piece of veroboard that just fit inside a USB memory stick enclosure. Well, guess what: Benjamin Lunt just recently designed a custom PCB for it! I’ve been exchanging e-mails with him (Ben has written a book on USB, another very popular topic also in my blog) and he was kind enough to ship me one of these neat boards. Here’s what it looked like:

In addition to a nice USB connector footprint, this design also has a green power LED and a red transmission LED (which needs a small firmware change). Once assembled, the thing is really tiny, and it does work great. Thanks a lot for Mr. Lunt for designing this one! Be sure to visit his blog, as he’s interested if anyone would also like to have one (I know I did :). Maybe he’ll even publish the design files if someone wants to tinker with it (of course making your own isn’t too hard either).

On the right you can see what mine looked after some soldering (click for a larger image) – I love the fact that small resistors from Partco all had different base color for different values… I had to compromise a bit and use 48 ohm resistors instead of 58, and 4k7 instead of 2k2. For the LEDs, I used 480 ohms.



You’d have to ask the designer, but I have heard that the PCB version sometimes has connection problems (uneven amounts of solder, no flexibility in the pads…) – so a mechanical connector is somewhat more reliable.

Personally I also think a metal connector looks a bit cooler. :)


It seems to work on Mac now, what was changed in the firmware? The requirement for cold booting RST response?


Strange. Maybe they addressed the issue in Snow Leopard. ;) In the passgen firmware nothing much has changed, so if it’s not the Mac and its software, either it works on random or the electrical characteristics of your device have spontaneously improved.


Oh and regarding your question at IRC – no, SparkFun never responded further to my idea of having this firmware on their AVR stick.


No capacitors needed for this circuit? How is this different from

Thank you.


Capacitors are recommended but it tends to work without just fine. the basic circuit is almost exactly the same as in the post you linked, the password gen hack is actually just a further refinement (USB HID keyboard emulation with some tweaks).


hello, does he share the PCB design file?

Joonas Pihlajamaa:

Well it wasn’t available in his blog post (now offline, I recall the URL changed at some point), and I forgot to ask Ben about it. So currently, unfortunately no, although it would be easy to make another based on the layout.

Ben Lunt:

Sorry for the late reply. I am on a short vacation, have some down time, and looked back on some older projects. I remembered Joonas’s post and my contribution, and came across these posts.

I have had a URL change, which should now be a permanent change. The new address is
I still have the Gerber files and can send them to anyone whom asks as fys [at] fysnet [dot] net.

Thanks Joonas for the project. I remember this one being one of my favorites.