Competition Winners, PCBs and PS3s

Sometimes I worry that I’m not accomplishing enough each week to have something to say here, while others I’ve got so much to write about I have to cherry pick to avoid putting those who stumble here into an irreversible coma. This week I think I’ve hit the right balance.

First and foremost – it’s time to announce the winners of the USBTINY-MKII competition! I was a bit annoyed that the finish date crept up on me so quickly, as I had plans to create a LUFA noise generator device using the CDC class driver and a zener noise source to pick the winners. Not to worry, I ended up just using three values from to choose the lucky three. Without further ado, let’s all congratulate the winners:

  1. Marco (No Last Name Given)
  2. Jim Bowen
  3. Martin Degelsegger

I’ll notify the winners via email also to get their shipping addresses. I’ve been really, really happy with the way the competition’s gone; some great (big and small) bugs were reported, leading to a less buggy code and (hopefully) more satisfied user-base in the future. Totally win-win and something I hope to repeat in the future, with (possibly) a small reward for every reported bug so that no one misses out. My apologies to those contributors who didn’t win this time around; as much as I’ve love to give away something to everyone who contributed, I simply can’t afford to.

Each of those three winners has won a brand new USBTINY-MKII V1 programmer from Tom – but paid for by yours truly, of course. Last week I reported on Tom’s adapter boards and reset recovery board, however I’ve now been told this is false information; while the reset recovery board is now available, the remaining adapter boards are only being considered for production. Actually, Tom’s now told me that he’s considering selling the adapter boards with the programmer as a small “kit” for a few dollars more than the base price, as the adapters alone would be swamped by shipping costs.

One last thing I’ll post here for now on the programmers is a shot of Tom’s “V2” prototype, which come in a fancy blue translucent case with silk-screening, and will become available in a limited supply soon. I really hope Tom posts some articles on the production process, as he’s done the case milling and silk-screening himself.

Tom's USBTINY-MKII Programmer Kit

Tom's USBTINY-MKII Programmer Kit

Now on to my own electronics efforts. Last week I mentioned that I was laying out a PCB as part of my third year electronics project (I’m actually in my fourth University year, however as I’m doing a double degree, I’m doing third year subjects of both Electronics and Computer Science at the moment). Since that post I’ve come a long way and I’m actually very nearly finished:

My first PCB design

My first PCB design

Which I’m fairly happy with, given that it’s my first ever PCB layout, and first time using Altium Designer. There’s still some tweaking to be done before the final submission for production on Monday, but all things considered I think I’ve learned a huge amount in only a few short weeks. Special thanks to my friend Andrei for his great feedback on my (cruddy) design, as his advice has helped me a great deal in improving my layout.

After production comes board population, which will be a huge undertaking it of itself; I’ll need to work out a strategy for which components to populate first in order to make later components easier to mount. Actually, given that I’ve only soldered a few surface mount components before, I’m a little worried about trashing the board since we only get the one.

Finally will come the coding, and that’s where I hope to shine, since it’s my strong suit. What got me was that no one is expected to actually finish the project. Exactly bunk number of people finished it completely over the past few years – the point of it is to get us comfortable progressing from schematic to finished board, with the operation being, well, optional. I’m told one can pass if the board powers on without catching fire and the LCD can be controlled – but of course I aim to be the first in several years to make it work before the final deadline.

As of this week, I’ve now got a job at the University teaching C code (regular and embedded) to a bunch of 5th year international master’s students once a week for the next month or so. It’s certainly an experience for me and a good chance to develop my teaching skills, so I’ve taken it on quite happily. In a few weeks I’ll be running my first lab class solo, meaning that I’ve been given a copy of the laboratory task sheet, a stack of marking sheets, a pat on the back and a “you’ll do fine“.

But finally today is a bit of news I stumbled across this afternoon while idling. A few weeks ago there was a lot of buzz about an Australian crew who managed to jailbreak the Playstation 3 console, using only a small USB dongle that plugs into the front USB ports. It’s great to hear news of a solution to PS3 homebrew problem now that Sony’s killed the “OtherOS” functionality of the consoles, however the inevitable legal injunction taken out by Sony means the (rather expensive, I thought) dongles are currently off the market. Not to worry, as an enterprising hacker has come up with an open source – and LUFA powered – clone of the dongle’s functionality, called PSGroove. Just download the source code, compile it for the USB AVR of your choice, and plug it into your console.

That’s bloody great news, as it will obviously be a high-visibility project right up until Sony’s pack of fun destroying jerks engineers figure out a patch to prevent the jailbreak. Until then, LUFA should become quite a bit more popular – and used around the world – and hopefully other interesting hacks will come about from it.


Comments: 14

Leave a reply »


That’s pretty sweet Dean. I subscribe to the popular magazine Circuit Cellar and they had a USB article mentioning you by name again. It seems you’re becoming synonymous with the USB Atmel chips!



I wasn’t aware of that – do you have a link, or the article title? I wish the authors would send me a copy when they mention me and my work, but I realise it would be too difficult for every article. Still, I like reading what people have to say about it.

– Dean


Thanks for the prize! I must admit that i wasn’t even aware of the competition; just ran into that bug at the right time.

The layout looks good indeed, although Altium’s colors are confusing me a bit (as an EAGLE user – quite good program, and free for non-commercial use with some restrictions, btw.) It’s been some years since i worked with Altium here at the university (they are giving us simpler assignments here 😉 ). Maybe you could post the two layers as seperate images?
If you run into problems with SMD soldering you can always drop me a mail; i spent quite some time doing just that in the past weeks.


I would start by populating the power supplies first and testing them before risking anything else. I’d load up and test the USB section before loading the Z8 socket so it doesn’t get in the way. The last thing I’d tackle is the input stage.

The layout looks rather good; you may want to look at the LM2575; it may make sense to rotate D2 and C26 so their grounds are closer to each other and the regulator’s ground. It’s probably OK with this large ground plane, but you really want to minimize the current loops. I would also pull the plane away from the mounting hole in the high voltage section so there’s no chance of shorting out to the screw.


Thanks Mike. I’ve posted a more updated version of the board here:

Where I’ve taken everyone’s feedback and fixed up some of the worst bits. I had a review with my lecturer yesterday who said it’s “acceptable”, which comming from him is akin to high praise. I’m pretty happy with it, given that it’s my first ever PCB. I’ll be building incrementally, getting the power supplies up and running before mounting the expensive analogue chips and Z8 module.

– Dean


The bad news is that all the at90usb boards are now hard to find, and expensive…

Not a good new for developers!


Yes, I feel a little bad about that, since I’m indirectly responsible for it. Still, perhaps this will encourage Atmel to produce more chips, so the general supplies go up quicker. At least LUFA gets more exposure now that everyone’s talking about the PSGroove hack!

– Dean


Any plans for adding a CDC device to USBTINY-MKII for target communication purposes? It would be sweet to get free serial port link with just a pair of wires from the programmer. I’m not experienced enough on the sw side to make it myself, but hw design will come if someone else does the sw…


I’ve looked into this in the past, and annoyingly I can’t get the official Atmel AVRISP-MKII drivers to bind to an interface, only the whole device. That means that if I wanted to add in a debug channel, it would require a button on the device to switch modes, by completely re-enumerating the device. Not ideal, but it could work if enough people are interested.

– Dean


So the Atmel drivers are the limiting parameter? I’m mostly interested about AVRDUDE and usb-serial support on Linux, so solving the access of the combo device should be easier. Any possibilities asking Atmel to tweak their drivers to provide unofficial support? Some OS side USB hacker could implement virtual device driver which splits the combo device to individual components, but I think that’s too big favor for supporting Atmel closed source… By the way, how many is enough? All USBTINY-MKII users on Thank you for your time 😉


Yes and no. I would be able to make the programmer compatible with both AVRDude and AVRStudio at the same time if the Windows drivers were a little more flexible; they currently blindly assume the endpoint data IN and OUT numbers. Due to a limitation of the USB AVRs, it’s only a fluke that I can get Windows AVRStudio compatibility, as the devices do not normally support the bidirectional endpoint scheme used in the official programmer.

For the debug channel, if the driver was able to bind to an interface I could get it to work using an INF file, however despite information on the Jungo site (the company who makes the driver Atmel licenses for its products) indicating this is possible I have not yet been able to do so. If Atmel can give me guidance on that – which they won’t, considering that my code clones their product – I could add in the debug channel.

Under Linux, I’d need to be able to tell the OS that the vendor specific interface in the device is the AVRISP-MKII, while still allowing the host to enumerate the debug (CDC) interface. This isn’t possible via the INF tricks used on Windows, and sadly I don’t know how to do that on *nix. AVRDude uses the device’s VID and PID to detect the device and communicate with it, however that could be changed if someone can get a way to still detect the device correctly in AVRDude while allowing the CDC interface to enumerate normally.

Frankly it would be easier to just have a button on the microcontroller switch between programmer and debug modes, as that way I can return entirely different descriptors to the host.

– Dean


Hey Dean,

I’ve seen (but not investigated) “dual” devices in the LUFA source tree. Don’t those present two devices to the host?

How about the following: Tell the host you’re a HUB, and that you have two devices connected….

That should work around any restrictions by OSes, right? Or is the avr-USB hardware not capable of such low-level trickery?



That’s true – many devices report themselves as containing a virtual hub internally so that there are no issues with drivers and the like for multiple platforms. It might be possible to do this with the USB AVRs if I write a hub driver (the PSGroove firmware actually shows this is possible, or at least partly so) however I’m not sure how well it would work with the AVRISP-MKII clone code, since that is already on shaky grounds to begin with via my simulated bidirectional endpoint code.

I’ll (as always) put it on my list of things to experiment with.

– Dean


[…] project board photos with me right now – some people might remember back a few weeks when I struggled with my board layout design – but no matter, I’ll post them tomorrow. The final board actually turned out quite […]


Leave a Reply

(will not be published)


Vital Stats

  • 34 Years Old
  • Australian
  • Lover of embedded systems
  • Firmware engineer
  • Self-Proclaimed Geek

Latest Blog Posts