Jeff's Blog

My daily (well I am trying to update daily now) weblog covering topics such as wind power, embedded electronics, software development, CNC Machines and some fun stuff like travel and sailing.

Tuesday, January 13, 2009

Canon A590 IS + Eye-Fi Card + CHDK open source software = FUN

A friend of mine owns a liquor store and was robbed recently of some high priced bourbon. He had a professionally installed security camera system which recorded the thief's car leaving the parking lot. Unfortunately, the detail of the NTSC video output was insufficient to recognize the license plate number, hampering the investigation by the police.


I wondered why the resolution in pixels in security cameras hasn't improved much since the 1950's. I researched some newer, higher definition, security cameras, and found a very nice one:


The Sony EVI-HD1





"The Sony EVI-HD1 is a color motorized PTZ camera that can be switched from displaying standard NTSC/PAL resolution video to outputting high definition images with a maximum resolution of 1080i. By starting off with such outstanding video quality, images will retain their sharpness and color depth even under extreme digital magnification."




This is a very nice piece of equipment. Unfortunately, it costs over four thousand dollars. Because of the price, this was not a cost effective purchase for a small liquor store.


I began to look around and found out about the EYE-FI card, a secure digital card with 2GB of storage combined with a limited Wi-fi capability. I already new about CHDK, an open source software project which allows one to "take over" the firmware of certain models of Canon digital cameras. I researched work done by the many programmer volunteers who contribute to CHDK, and came up with a solution which combines a Canon A590 IS inexpensive point and shoot camera, an Eye-Fi Card, and CHDK open source software to produce a "poor man's" high definition security camera. Total hardware outlay for the development prototype was less than $300. Now, because of sales on the camera and chip, this number can drop to under $200. While it does not have remote pan and zoom capability, it does have very high 8 Megapixel resolution, which may preclude the need to pan and tilt by instead using an optional wide angle lens to cover a large area of a parking lot. Also, being more inexpensive than the alternative would allow the deployment of multiple DIY cams for the price of a single high end camera.

I wrote a script to run under the CHDK firmware which detects motion, snaps a picture, uses the eye-fi card to send the picture to a PC or photo sharing site over my home wi-fi network, and then automatically delete old images on the eye-fi card so the card does not run out of space (this should be built into the eye-fi card but is not). I used a language called LUA, used to write advanced scripts under CHDK, and eventually got the camera to successfully upload eight gigabyte images in real time. Here are some images I was able to capture in my front yard while pointing the camera at a bird feeder (you can click on the images to see them at 1600 x 1200, the actual images out of the camera are at 3264 x 2448 pixels which is too big for my blogging software to upload):











This week I will be stress testing this solution. Others working with the eye-fi card in similar endeavors on the CHDK wiki report that they are having reliability problems with the eye-fi card after 18 hours of constant use. They are attacking the problem by using an embedded computer to reboot the camera by simulating depression of the power switch. I am going to see how long I can run this system without a lockup before attempting to make any hardware modifications of my own. Obviously, to be used a security camera, the system must be reliable. I am not putting this into the liquor store until it has run at least a month in my house without failure. I will keep you abreast of the project as it progresses. My final script will be published on the CHDK forum. I am going to get back on wind turbines and RF remotes later this week.



Labels: , , , ,

16 Comments:

Blogger Rts9999999 said...

Of all the home made vertical wind turbines I have see yours is definitely the easiest to make and best designed. However, how many units would you have to have to make enough wind for a average house to benefit? Would you have batteries to collect the storage and then run a AC inverter to convert and what would the number of batteries be needed?
Would like to talk more..... rts9999999@aol.com

February 1, 2009 12:30 PM  
Blogger JADRAN said...

I have a netbook ASUS EeePC 701 with built in camera and would like to enable it to post pictures to my Facebook from motion detected shots.
Would that Eye-fi card help?
Love also your VAWT power generator, good invention though.

July 11, 2009 4:07 AM  
Blogger S.A. said...

Jeff have you completed your testing of the script? I'm working on a time lapse project and really would like to see your script to get some ideas. In particular I would like to know how automatically delete old images.
Thanks much,
Shannon

August 2, 2009 8:20 PM  
Blogger ajohng said...

Hi Jeff,

I've greatly enjoyed your work and the variations of vertical windmills you have produced.

I apologize in advance for asking this question but ya never know, ya know? The question is why not shield the backside of the mill so the vanes don't fight the wind. If it couldn't be incorporated into the revolving wind capability, could a tunnel set up that works with the prevailing wind make sense?

From what little a have read it seems the backside of the mill greatly cuts down the efficiency of the device.

I expect that there is a simple reason it can't be done, but I can't come up with it.

I'll be looking for your answer or if you care to respond directly I'm ajohng at yahoo.com

Again thanks for posting your experiences.

ajohng Manitowoc, Wi

August 3, 2009 2:03 AM  
Blogger :::vanpix::: said...

Hi Jeff

Any update on your findings with the eye fi card?

Are you able to share your script? I am sure many people will be interested in a solution to auto delete old images from the eye fi card - a much requested feature that doesn't look like being added in the near future, if at all.

Thanks
Paul

August 20, 2009 3:12 PM  
Blogger :::vanpix::: said...

... paul@vanpix.com

August 21, 2009 5:17 PM  
Blogger embeddedprogrammer said...

Paul and Shannon,

I have not finished the script yet as I have been concentrating on my wind turbine work. I will get back to this shortly and post the script on this blog when I have it working.

Thanks.

Jeff

August 21, 2009 5:43 PM  
OpenID volatus said...

Hi Jeff and everybody reading this,

I got my Eye-Fi Card today. Tor run CHDK you have to lock the card. I can't lock my Eye-Fi card manually due to the mechanical design of the Eye-Fi card. Has anybody a solution for this issue?

Thanks Thomas

August 25, 2009 7:58 AM  
Blogger embeddedprogrammer said...

Volatus,

All you have to do is file a groove (I used a leatherman tool) into the card. Make sure the groove is in the same place as the write protect notch in a normal SD card (I used one as a template). Then you need to put tape on it (painters tape is what I used) to block the notch when you want to place files on the card from your PC.

Its a hassle and some people on CHDK forum have modified SD card readers to ignore the write protect tab altogether to eliminate the need to use tape.

August 25, 2009 12:46 PM  
Blogger J said...

Hi Jeff,

I'm currently working on a project aimed at monitoring bird usage of mudflats at restoration sites in SF Bay, CA. We're using a CHDK+Eye-fi setup similar to yours, but we're also incorporating directional wi-fi routers (ubnt.com) and a modified power supply for remote deployment. I would love to check out your script if you're willing. Our goal is to achieve near real-time photos of the mudflat every 15 min. during daylight. Ideally, our unit will be deployed for weeks/months without visits. Any caveats/suggestions would be appreciated.

Thanks,
Joel

October 6, 2009 4:15 PM  
Blogger embeddedprogrammer said...

Joel,

Give me a way to contact you via email or phone.

You can send me a private message from my youtube video page.

Jeff Berezin

October 6, 2009 7:05 PM  
Blogger :::vanpix::: said...

Hey Jeff

I am also working on a very similar project to the above post. Directional wifi and battery/solar power for remote aplications. I have a system built using conventional motion detection, and high efficiency power supply solutions. I would love to share ideas with you and the previous poster 'J'

October 9, 2009 1:07 PM  
Blogger Nic said...

Hi,

I have a Canon A470 and am trying to get CHDK working on it, with an Eye-fi card. I carved the slot and loaded the CHDK, however, now when I put the card in it starts loading the CHDK, stops and gives me a Memory card error. Anybody experience this before? Any solutions?

October 20, 2009 2:59 PM  
Blogger embeddedprogrammer said...

Nic, I have not seen that. Are you sure the notch is cut correctly? Also, can you still read the SD card in a pc. Also, you may want to reformat the SD card using FAT or FAT16.

Jeff

October 20, 2009 3:17 PM  
Blogger mslocum said...

Jeff,
I'm using CHDK and an eye-fi card too. I'm trying to do a year long timelapse. Can you send me how you auto deleted old pictures?

matt.slocum (at) gmail (dot) com

March 10, 2010 12:37 AM  
Blogger Sammy Olivier said...

Jeff, Where can we dowload your script ? Thanks in advance ! samolg@free.fr

March 22, 2010 4:39 PM  

Post a Comment

Links to this post:

Create a Link

<< Home