Pleasant Flashing

IMG_2801

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.

IMG_2739My 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.

IMG_2799The 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?

Right!

IMG_2796

 

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.

retainer1clamp

 

I printed both parts on my Mendel and mounted the programming connector on the mill:

IMG_2795

 

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:

IMG_2798

With help of these pins, the panels can be changed quite fast and easily with very good repeatability of the panel’s position.

IMG_2791

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.

G-Code Sender

I added a button (to start the automated flashing) and a text view (for protocol output) to the GUI and finished was the PleasantFlash software :)Pleasant Flash

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:

KlappQuad

I recently built a foldable Quadrocopter for FPV, the KlappQuad.

It’s basic form is inspired by the FQuad from Warthox. I own one of these and like it a lot, but I always wanted a foldable version. Also, in order to use a brushless gimbal for the camera, the frame needed some other modifications.

The KlappQuad has a 3 piece body. The lower two plates form the rigid body, holding the foldable arms and the landing skid in place. Also the RC receiver, the flight controller and the AV sender are mounted on this rigid section of the copter.

On top of this section, hold by four soft rubber spacers, a third plate is mounted, holding the gimbal assembly (including it’s electronics PCB) and the LiPo battery (to provide inertia). Since they need to have clear view to the sky, the GPS antenna from the flight controller and the OSD (also containing a GPS antenna) are mounted on the top plate. The rubber spacers (in conjunction with the high mass of the LiPo battery) provide decent vibration decoupling of the camera from the rest of the copter.

 

I use a Naza Light as flightcontroller and it’s GPS antenna is supposed to be mounted on a small spike in order to get best reception. To minimize the folded size of the KlappQuad, I mounted the GPS antenna on a foldable retainer:

 

I machined this retainer out of brass stock on my lathe. The three pieced part took about 2hrs to produce (I’m somewhat out of practice and was happy to have something to machine after a while).

Folding the KlappQuad is a little bit more sophisticated than simply folding all four arms backwards:

In order to minimize the folded length, the two arms on the back are not only rotated to the back but also retractable. The arms are not hold in place by a single bold (like the front arms) but by two bolt heads, running in grooves on the under side of the arms. Milling these grooves was a nice and easy job for my Pleasant Mill…

One bolt head is guiding the shift and rotation of the arm with the long groove visible in the image above. The second bolt holds the arm in is “flight” end position. The groove for the second bolt is open at the end of the arm and visible in the following picture of the folded copter.

IMG_2232a

The above picture also shows the position of the front ESCs. The both ESCs for the back motors are concealed between the two lower plates in the back of the copter.

Since all arms slide partly between the two lower two plates when folded, using cable binders to mount the cables from the ESCs to the motors on the arms wasn’t an option. Instead, I drilled small holes into the arms (1mm diameter) and used 0.8mm silver wire to fix the cables to the side of the arms.

Here are some pictures of different stages of folding/unfolding the copter:









 

The folded copter measures LxBxH 47 x 14 x 14 cm with props and 36 x 14 x 14 cm without props. So it fits easily into a small suitcase (including RC transmitter, and some clothes).

The total weight (ready to fly, including Gimbal, GoPro Hero 1 and a 2400mAh LiPo battery) is 1150 gramms.

Last but not least:

It flights great so far. Here’s a video I shot entirely with the KlappQuad. I wanted to know if it would be possible to use this copter to shoot an “action scene”. A friend of mine an his son were so kind to help me out as actors :)