CURRENT ISSUE

Contests

bottom corner

Feature Article



Issue #202 May 2007
The Wittness Camera
Build a Self-Recording Surveillance Camera
Grand Prize Atmel AVR Design Contest 2006
by Alberto Ricci Bitti

Start | Solid-State Recording | Full Interaction | Complete Picture | Basic Instinct | Filled To Capacity | Speech Preparation | Circuit Implementation | Concept To Prototype | Picture Inspection |Design Evolution | Sources & PDF

SOLID-STATE RECORDING
The operation of the camera’s recorder is conceptually simple, but it involves many ingredients. Some are physical components and some are software blocks.

The most important hardware component is Intertec Components’s ITC-M-328 camera module. It consists of a CMOS color sensor and a JPEG compression chip. The compression chip includes a serial interface suitable for a direct connection to a microcontroller’s UART. By issuing the appropriate commands, you can take snapshots as JPEG-compressed byte streams. The camera comes in a handy module including a lens and a four-pole connector for power and data.

The most important software component is the AVR-DOS file system. It is a library for driving mass storage devices like SD and Multimedia cards (MMC), as well as CompactFlash and hard disks connected to the AVR microcontroller. The system provides a high-level programming interface for accessing disks formatted according to FAT16 and FAT32 specifications, which means its files are directly compatible with PCs. By linking AVR-DOS to your program, you can create and open files, write and read data, and create and change directories through simple commands like you would do on a PC. Restricting read/write access to one file at a time, the RAM and flash memory footprints are minimal (8 KB and 1.3 KB), making it possible to use a small 8-bit device like the ATmega32 for tasks usually accomplished by larger processors.

These two blocks are the foundation and starting point of the camera’s design. The simplified block diagram in Figure 1 shows how the blocks interoperate as a time-lapse recorder during normal operation. It also introduces a second hardware block, Intertec Components’s ITM-PIR-256 passive infrared (PIR) movement sensor. This module can sense people up to 16' away by measuring changes in the IR radiation caused by human body temperature. The sensor is an inexpensive mass-produced part. It includes a Nicera Philippines RE200B thermopile and a CoMedia KC778B companion chip in dice form under the familiar epoxy blob. A Fresnel lens with an angle of 60° snaps in the PCB, which connects to the outside world through a short three-pole cable (power, ground, and signal).

Figure 1—The PIR sensor triggers the recorder as soon as movement is detected, taking JPEG-compressed pictures from the VGA camera. After time stamping, files go to mass storage. You can select how many pictures per trigger to take or alternate recording modes like External Trigger, Interval Timer, and Continuous Recording.

The PIR triggers the recorder, a software block that decides whether or not to take a picture and how many pictures to take according to its trigger inputs and operating mode. The recorder controls the camera driver (another software module) in order to get the JPEG byte stream. The real-time clock is a hardware feature of the ATmega32 controller and the recorder uses it for time-stamping the JPEG files with the current date and time. It is also used as an interval timer if Time-Lapse Photography mode is selected. After time stamping, the recorder hands over the picture data to the file system, which stores it permanently on the SD card.

Previous | Next

 


bottom corner