projects | about

Arduino camera and geotagger

prototype

This projects demonstrates how to attach a c328 camera to an arduino microcontroller (atmega328), take geo-tagged pictures continuously, and write them to an SD card.

Here are the features:

Flickr set of the arduino on a quick tour of Valley Forge National Park.


View sdcam valleyforge in a larger map

Construction

Materials

materials

Pretty expensive where you might be able to hack up a gps enabled cellphone, this is more fun though!

Circuit

circuit

The arduino is attached to the GPS and SD card. All of the pricey components are in sockets so they can be re-used for something else later. ;) I'm a big fan of trying to kill myself by cramming everything in as tight as possible on a prototype board.

Prototype

prototype prototype prototype

In the pictures above there is the arduino microcontroller with a GPS module and an SD adapter stacked on top of each other. There are two connectors used for power and the camera unit which is not attached to the prototype board.

To attach the SD adapter and the gps module to the prototype board right angle male headers were soldered to the connection pads.

Container

An ipod nano container was used as the project box to protect the components from outside elements. It's a little big for everything but it does the job. A hole in the front was drilled for the camera and circuit foam was used to keep the lense in place.

container container container

Software

The following software is compatible with avr-gcc version 4.3.4 and Arduino 0017

A few existing libraries were combined to interface to the SD memory and the camera:

There is already a NMEA parser lib for helping to decode the NMEA messages off the GPS unit. For this project a custom parser was used instead however to conserve flash memory.

There is no easy way to write out an exif header to geo-tag images on a microcontroller. Free libs available for this are too large to run on the very limited resources available. The solution for this was to simply write out a raw header with information filled in for the position, altitude, date and time.

c328 camera

The c328 camera uses a very simple serial interface to setup its configuration and retrieve images. If you are having trouble getting it to work first try this python script if you have an FT232R breakout to talk to it over usb.

LS20031 GPS 5Hz Receiver

Because the gps receiver is interfaced without a uart the speed needs to be slowed down to something the 8MHz arduino can keep up with. It is initally configured to send messages at 1HZ at 4800bps.

Program Flow

program flow

Error Reproting

There are many different stages of operation for this device so to make troubleshooting easier a large enum of error codes was used. These codes are read off an attached LED if there are any problems reading from the camera, sdcard or gps unit. Once an error is detected the device needs to be reset to resume operation.

EXIF data

A basic exif header is used to store the GPS coordinates from the attached gps receiver, date, time, altitude and position are recorded. EXIF tags can be viewed using gthumb or any other program that can view extended image data.

exif




Copyright (c) jarv.org Verbatim copying and redistribution of this entire page are permitted provided this notice is preserved.
Validate (nerd)