Archive for category Electronics

GPS rocket update, PIC32 pinout spreadsheet

The 2009 rocket flying season is nearly over, and I haven’t had a single flight all year toward my GPS-guided rocket recovery project. I’ve been too busy with business stuff to work on it, but my goal for this winter is to get the new “Rev4” PCB up and running, ready for flight in the spring.

For that, I’ve decided to shift from the PIC18 to the MIPS-based PIC32 parts.

Which means I’ll be porting over a lot of code from the PIC18, so now seems a good time to post my long-promised source code and schematics for what I’ve done so far, which I plan to do in the coming days.

For now, here is a Excel spreadsheet with the PIC32 pinout for the 64 pin TQFP parts. Each time I do a MCU-based design, I make a table like this for allocating MCU pins by function. If you’re working with the PIC32, you may find it useful for the same purpose.

Click the image to download the .XLS file.

PIC32MXx40 pinout

PIC32MXx40 pinout

New, improved SMD Pitch-o-meter

Here’s a new, improved SMD Pitch-o-meter for all your SMD measurement needs.  (Also may be useful as a general microscopy scale.)

This version has a more readable distance scale marked in increments of 0.01 inches (10 mil) and 0.1 millimeters (100 microns), plus size outlines for 1206, 0805, 0603, 0402, and 0201 SMD packages.

Print it out at 600 pixels/inch (glossy photo paper recommended) and keep it handy near your binocular microscope.

Be sure to click on the image and download the full-sized version.

SMD Pitch-o-meter

SMD Pitch-o-meter

To measure SMD lead pitch (usually called parameter ‘e’ on datasheets) measure 4 (four) pins on the part from the line marked “zero”. Then read up for the pitch.

Tiny Rocket Altimeter Fits In 18mm Motor Casing

I just finished building this tiny rocket altimeter.  It fits inside a standard 18mm (diameter) rocket motor case – in this case, a used Estes C6-7 motor.

side_img_0376

It’s based on Robert DeHate’s PICO-AD4 altimeter.  It measures peak altitude and will fire the ejection system at either apogee or a main deployment point (a few hundred feet AGL).

The most difficult thing was finding an adequate battery that would fit – I ended up with a L1016 6v alkaline; they are widely available (online) and inexpensive.   It uses a 220 uF capacitor to fire a AG1 flashbulb for deployment (220 uF is enough to do this reliably).

Here’s the schematic – not much to it:

ad4-altimeter-schematic_500px

I drew a power switch, but I couldn’t get it to fit.  So I just take out the battery to turn it off.

I made the hole for the battery with a Dremel tool.

Here’s the back side:

bottom_img_0379

The jumper on the back (J1) selects whether the ejection will happen at apogee or using the main deployment point.

The two bolts/nuts on the end are the attachment for the AG1 bulb (2-56 hardware), the battery clips were made from parts in my junk box.  The negative terminal is soldered onto two cut-off pieces of paperclip (paperclips are made out of good-quality steel), which are in turn soldered onto the perfboard.

(By the way, I’ve discovered the perfect tool for cutting PCB traces – a little battery-powered engraver. Harbor Freight sells the one I use for less than $10.  Just make sure you blow away all the tiny copper pieces afterward with canned air.)

The resistor is just to limit the charging current on the capacitor – that little battery really doesn’t like high currents.  The resistor value is not critical – anything from 500 to 3000 ohms or so should be fine.

Here’s a top view (with it running and the LED blinking):

top_img_0366

The 220 uF cap is held in place with some hot glue (as are some of the wire-wrap wires on the back).  I used epoxy to hold down the jumper, screws and base nuts and to reinforce the thin bits of perfboard next to the battery – otherwise the whole thing bends too much under the off-axis tension from the battery springs (I broke an earlier version that way).

Here it is snug in it’s 18mm motor case:

end_img_0362

The flashbulb wires are meant to go out the other end, thru the rocket nozzle hole.

As you can see, I had to ream out the inside of the motor case a bit to get things to fit.  (This was desirable anyway, to get out all the black soot left after firing – do NOT try this with a unused motor!!)

The reaming was done starting with a 1/2″ drill bit, then a 9/16″, finishing with sandpaper wrapped around the 9/16″ bit (use some double-stick tape to keep it on there).  It helps a lot to have a drill press.

I haven’t flown it yet, but it works well on the workbench.

Interim Report: GPS-guided Rocket Recovery

Saturn Zero

or,

Nevada Dave and the Rocket-Eating Trees

This is my presentation for NARCON 2010 (was NEMROC 2008 … see below), summarizing my efforts over the last three years since 2006 toward building a model rocket that won’t get lost.

The idea is that it carries a GPS and a steerable parachute, so it steers itself back to the launch pad on the way down.

An introduction to the project is in the PowerPoint presentation below.  Fair warning: It’s 60 Mbytes.

Update January 2010: I’ve posted all the hardware design and source code for the “Rev 3” hardware on this site.   The main index to the series of posts is here.

Update March 2010: I’ve replaced the presentation with a slightly updated version that I presented at NARCON 2010.  It discusses a little about the “Rev 4” hardware, based on the 32-bit PIC32 MCU, toward the end. Download all 3 files (and put them in the same folder) if you want the Google Earth links to work.

2010-03 NARCON Presentation.ppt (PowerPoint file)

1004_f2_pressure.kml (Google Earth .KML file, flight of 2008-10-04)

1101f2_pressure.kml (Google Earth .KML file, flight of 2008-11-01)

If PowerPoint is an issue, here’s a PDF version of the slides (15 MB):

2010-03 NARCON Presentation.pdf (PDF)

New, improved rocket tracks in Google Earth

I’ve been working on the routine that converts my logged GPS and altimeter data into Google Earth .KML files.

It’s a lot nicer looking now – below is the same flight I posted on July 19 2008, but re-converted with the new routine.

New, improved Google Earth snapshot

New, improved Google Earth snapshot

Black marks pre-flight data, green marks ascent, yellow marks apogee (actually 1.5 seconds of data starting with apogee) and red marks descent.  The lighter “whitish” marks are the GPS fixes, in this case 1.0 seconds apart.  All the data in between is from the altimeter (25 Hz samples), with interpolated lat/lon position.

Here’s the .KML file – it’s fun to load it into Google Earth and fly around the track.

You can see where the rocket electronics detected launch (where black turns to green) and where it detected apogee and ejected the parachute (where green turns to yellow) – the crazy below-the-ground data point is the overpressure (sensed by the altimeter) from the ejection charge.

Last, if you click on the pad icon, you’ll see all kinds of flight data, automatically calculated from the log by the new routine.

It’s rather ugly MATLAB/SCILAB code.  Someday I’ll post the source code online (once I clean it up a bit).  If you’re desperate, drop me a note and I’ll email it to you.

SMD Pitch-o-meter

If you’re working with SMD stuff, it’s really helpful to have a 10 to 20 power stereo microscope (stereo, not “binocular” – it’s not the same thing) to see what you’re doing.

(The most common type is called a “dissection microscope” – try eBay; they can be had for < US$100.) Here's something I made to help measure and identify SMD parts under the microscope - the SMD Pitch-o-meter: [Update: See the new, improved version here.]

Print it out at 600 DPI (most any Canon or HP printer – I don’t know what will happen with an Epson printer – they do 720 DPI. It might scale it OK, might not.).

It has a scale of inches (to 1/250″) and millimeters (to 0.2mm) for measuring parts.

To measure SMD lead pitch (usually called parameter ‘e’ on datasheets) measure 4 (four) pins on the part from the line marked “zero”. Then read up for the pitch.