Here is a video of how it all fits together:
The device checks pre-defined email mailbox once an hour. If a new email is received the camera takes a picture, saves it on a SD-card and emails the image to its owner.
Making of the camera was also an interesting journey I would like to share.
This GSM modem is great because of its built-in POP3 and SMTP support. Although these protocols are not very complicated to implement having them implemented saves some time.
LinkSpite JPEG Camera
This is a great little device. Built-in JPEG compression support saves a lot of development effort. The camera produces a 640x480 image. The image is around 50K; it is small enough to rapidly transmit over a cellular network.
Sparkfun's microSD Shield
Although there are a few SD card circuits available I decided to go with this one because it is very easy to work with both in software (Sparkfun provides great APIs) and in hardware (again, thanks Sparkfun for built-in voltage conversion).
This micro-controller was a natural choice. Arduino Uno uses this chip, so there are plenty of libraries and examples out there. Unfortunately, Arduino Uno itself consumes too much power when it is in a sleep mode, so I had to build a board with more efficient power supply system myself.
TPS2020 and LM2936
TPS2020 is a great power distribution IC. It allowed me turning circuit components on and off as I needed it. LM2936 is an awesome regulator with really low quiescent current. Combination of the two parts allowed my circuit to consume as little as 0.14mA in sleep mode. It stretches battery life for up to a month on a single charge; the camera is powered by 5V from two CR123A batteries.
It takes about a day of soldering, cursing, un-soldering and soldering again to put all components together.
Unfortunately, not all DIY projects have nice looking enclosures. I believe that a project is fully finished when it fully finished and the circuit, the program and the enclosure are in harmony. So, I decided to use 3D printing service to achieve a look I want.
After struggling quite a bit with 3D CAD tools, I have discovered a great program OpenSCAD. It is a great script-based CAD editing software. Instead of using mouse to draw 3D shapes one just types in commands. For example, a sphere with radius of 5 would be sphere(r=5). Awesome, right?
I decided to go with a clean sphere design. Body constists of three parts: top part that hosts the camera, bottom part that hosts primary circuit and batteries and a middle "holder" piece that binds top and bottom. The design was inspired by an 8-ball from any toy store.
Caliper and OpenSCAD allowed to make precise models of both circuit components and body parts. Source for the CAD files could be found under enclosure folder in the project source.
I have used Ponoko printing service to print my 3D enclosure. I should note outstanding quality of the print.
Once 3D printed case arrives components fit nicely in their places. I have used a combination of screws and double-sided adhesive tape to put everything together.
If everything fit together nicely the camera should be working and carefully surveilling your house. Even though emailed image resolution is not HD, it is quite enough to tell if everything is fine at home.
I am using AT&T GoPhone as a network plan. It costs about 8 cents to check an email and about 70 cents to send an email with a picture.