Programming Thousands of AVRs

It is funny how almost everything has its own set of problems. Rich people complain about taxes. Famous people complain about their lack of privacy. It probably won’t happen us, but some Kickstarter campaigners find they are too successful and have to scale up production, fast. We’d love to have any of those problems.

[Limpkin] found himself in just that situation. He had to program several thousand Atmel chips. It is true that you can get them programmed by major distributors, but in this case, he wanted unique serial numbers, cryptographic keys, and other per-chip data programmed in. So he decided to build his own mass programming workbench.

The bench programs nine devices at a time (due to the number of I/O available) and uses a Raspberry Pi to orchestrate operation. A microcontroller monitors the requests for programming and displays status at each socket using LEDs. It also drives a status LCD. The total cost was about $1,500. Not cheap, but less expensive than the alternatives and actually a bargain if you need the capability.

The layout of the device accommodates three simultaneous operators to maximize the throughput. That’s the kind of thing you have to think about when you scale. If you are ever lucky enough to have that problem, we’ve covered scaling for production before, and you can learn some lessons from people who have been through it.

23 thoughts on “Programming Thousands of AVRs

    1. Trouble is they are using QFN, that’s always going to be a tricky expensive socket, even in China you’d be hard pressed to get one for under $50, there’s not a great deal of alternative either, it’s hard enough to solder QFN, let alone make a quick temporary but reliable connection.

  1. So did this need to happen at the assembly house and get shipped directly to backers? Or is there some other reason the chips had to be programmed before assembly? Unless they were just that pressed for space on the PCB, I don’t understand why you couldn’t just break out JTAG headers or something.

    1. The ubiquitous 6 pin AVR ISP header would be called for here. It’s a personal hard rule of mine to always, always, ALWAYS put a field programming header on the board. If you can’t reprogram them, then the smallest bug threatens to be the “landfill moment.”

      1. If the only thing preventing tampering is the ISP breakout then you might want to rethink it. Handheld pogo pin programming sockets are not hard to get, or if someone is keen they’ll break out a fine point soldering iron and some magnet wire.

          1. If that is the case, there their is a case for keeping pogopins or headers on the board… no reason not to if there is no way to access the board without leaving physical evidence… and as others have said anyone that could access it and cared enough to bother would just solder wires to the chip and be at it.

  2. I Was hoping you found a way to emulate multiple programmers. A gang programmer is really convenient. I’m building test equipment for electronics and still need a solution to gang ISP program AVR. I’ve build my own STM gang programmer but it was not cheaper in the end.

    I’m opting for programming every chip, all at once. Then verify individual. Now the programmer is multiplexed. Because every firmware is the same this is possible. I’ve also ran into the problem of obsolescence. We’ve since replaced them with AVR-ISP-MK2 and later with AVR-ICE.

    Because the diversity of programmers needed I’m opting to replace them for a universal ISP programmer.

  3. Programming micros this way brings into question manual operator handling, which raises the risk of dropped micros and bent pins. To reduce operator error, sometimes one might use AOI (Automatic Operational Inspection) to ensure that the component pins aren’t bent and the part is correctly orientated and the pins are positioned on all solder pads. Parts that have gone through the manufacturing process with damaged micros also might need repairs. All this quality control raises the price of the manufacturing process and consequently the product cost. At one place where i previously worked, to reduce programming and handling costs, we programmed the microcontrollers (probably about 40 MSP430s) before the pcbs were depanelled from the fairly large motherboard. The process was that the motherboard was inserted into a bed of nails jig, and each microcontroller was programmed via JTAG with the main program prior to the production information. Once each part was read back and verified, the fuses were blown before the motherboard could be removed from the jig and the programmed pcbs were removed from the motherboard.

    1. Nitpicking here, but AOI is acronym for Automated Optical Inspection. Your point is correct, though.

      I’m just trying to figure something out: Since they’re QFNs, there’s no point in not having programming pins on board. If I can access programming pins, I can access controller pins directly to program.QFNs have small side contacts available (usually for AOI purposes), to which electrical connections can be made. So a cracker that would go for the programming pins on the board could just as easily go for programming pins on the controller itself. Am i missing something?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s