For a project of mine, I need to flash several hundred of ATMegas.
I use a special programming connector, which sits on the SMD chip and connects directly to the ISP and power pins on the chip.
My first attempt to ease the flashing process was to mount the programming connector to a lever with some additional weight on it. That way, once the connector was in place, I didn’t need to hold down the connector manually during the flashing process.
The PCBs come in panels of 40 (10 x 4 PCBs per panel) with milled slots in between each PCB. So to make the positioning of the PCBs under the connector a little easier (and more repeatable), I put two metal pins (with the same diameter as the milled slots) on the base of the lever.
The whole thing worked well so far, but since it takes
about a minute or so [Update: after changing some default settings in avrdude, the time to flash a chip is down to 15 seconds…] to complete the flash process for each chip, it was still an annoying job to flash several hundreds of them: Position the next chip on the pins, lower the lever with the connector, start the flashing script, wait a minute for the flashing process to finish, lift the lever, position the next chipon the pins and so on…
With the standardized PCB panels, a Pleasant Mill on hand and some custom coding, it should be possible to completely automize this process, right?
After removing the spindle from the mill, I needed some kind of retainer for the -more or less- irregular shaped programming connector. The only regular shape on the connector is it’s square footprint (about 10x10mm) at it’s lower end. So I designed a simple bracket with mounting holes for the mill on its back and a square hole for the programming connector on its base. A clamp on top of the programming connector hold it in place when it is pressed onto the chip during the flashing process.
I printed both parts on my Mendel and mounted the programming connector on the mill:
To hold the PCB panel in place, I put four metal pins (with the same diameter as the milled slots in the panels) in the base plate:
With help of these pins, the panels can be changed quite fast and easily with very good repeatability of the panel’s position.
Finally, I needed some software to control the whole thing.
Fortunately, I wrote a very simple app some years ago to send gcode over the serial port of my Mac. Originally this app was written for the SphereBot but later slightly changed for use with the PleasantMill.
Ok, I still needed to code some functions for synchronously send the gcodes to move the programming connector in the correct position, execute some “avrdude” shell commands, pipe the shell output for verification back into the app and protocol the whole thing accordingly. But all this was more or less straight forward and done in about an hour.
Of course, the code is hacked together without much care to be user configurable. The paths to avrdude, the program files (.hex) and the fuses are all hard coded in the source. But since I use this setup only for this one project in the foreseeable future, I guess thats ok. And if I’ll need it again for another project, the sources are changed easily enough…
[Update:] After changing a default setting in avrdude (“-B 1″), flashing a chip takes only about 15 seconds now. This means, that flashing a complete panel of 40 PCBs takes only about 10-12 Minutes!
And here’s the Pleasant Flash at work: