CURRENT ISSUE
Contests
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
CONCEPT TO PROTOTYPE
I started
development with a card and a camera connected to an STK300 evaluation
board fitting an ATmega128 microchip. Developing on a larger chip facilitates
development, because you have more pins, flash memory, and RAM to use
for debugging. Once I was confident with the design, I started building
a prototype. With most parts being SMT devices, I decided it was time
to learn to etch PCBs at home. I knew in advance that the board would
have been a single-sided one. Thus, I adopted a couple of tricks worth
mentioning.
First, I designed the board as if it were double-sided, except I placed as few streamlined copper-side tracks as possible. I ended up with just a dozen of them. Later, I etched only the component-side tracks and replaced the few copper-side tracks with insulated wire jumpers.
Second, I placed all through-hole parts on the (now trackless) copper side, so they could be soldered to the pads lying on the same side as the SMT parts. I opted for the through-hole version of all cumbersome components (like electrolytic capacitors and power regulators) in order to get a flat SMT side facilitating SD-card access.
I didn’t use special tools for etching. I printed a mirrored layout image on plain paper and used it to expose pre-coated PCB material manufactured by Bungard Elektronik, a German company. The light came from three standard white, energy-saving lamps from IKEA. Exposure time was very long to balance the use of nontransparent paper and the low amount of UV light produced by the lamps. Despite this rude setup, the board turned out well. After soldering and double-checking every component, I was ready to apply the power and program the AVR.
BASCOM makes porting from the ATmega128 code (used for the STK300) to the ATmega32 (prototype) a trivial process. I merely selected the new target processor from the BASCOM IDE and changed the single line of code that used the second hardware UART of the ATmega128, instructing the compiler to use a bit-bang implementation instead. Everything else was handled automatically by the compiler.
The PCB doesn’t hold all the parts. The camera and the PIR sensor, among others, are placed on the enclosure box. I used breakable pin-strip headers and sockets to connect the parts secured to the box. Colored self-shrinking tubing and matching color-coded labels can prevent connection mistakes and give the unit a tidy aspect (see Photo 3). The enclosure needs special care. The SD card must be extracted without removing the PCB screws, so the PCB must protrude outside of the box walls. Also, the lid switch must be placed in a way that it is engaged when the box closes.
![]() |
| Photo 3—Pin-strip headers and sockets are a handy replacement for connectors on prototypes. To prevent connection mistakes, it’s worth using colored self-shrinking tubing and matching color-coded labels. |
I modified a sturdy plastic box originally intended for holding electrical switches (see Photo 2b). I removed the DIN Norm rail that provided a switch holding on its bottom. I placed the loudspeaker in its place, drilling holes for sound diffusion. The other half-box holds the lid-switch, the PCB, and a small front panel with the camera, PIR sensor, remote-control sensor, and LEDs. That, along with a little aluminum, plastic cutouts, a pinch of hot-melt glue, and plenty of extra-strong double-adhesive tape, does the trick. Additional pictures, instructions, and source code are posted on the Circuit Cellar FTP site.
The finished prototype is aesthetically pleasing. Place it in your living room with the remote control next to it for a real conversation piece at your next party.
|
