Security Monitoring - Creative Uses of CHDK - CHDK Forum  

Security Monitoring

  • 3 Replies
  • 3295 Views
Security Monitoring
« on: 17 / October / 2009, 23:33:17 »
Advertisements
Hello, I'm an experienced programmer but new to CHDK.

I want to build a security monitoring solution for the end of a long driveway at the bottom of a hill, over 100m away.

I'm looking to purchase a new Canon camera (since I don't already own anything compatible with CHDK) to be remote controlled over USB from an old PC which is no longer in use, which will be running a modern Linux distribution to provide remote access.

The idea is the optical zoom on a Canon camera plus the megapixel resolution will be far greater than any normal security camera, and at a better price - in particular versus one which has wired networking or Wifi support built in.

I have been reviewing the forums and wiki and am a little confused as to how to determine which camera models support which features of CHDK (so far I assume all features are supported unless otherwise explicitly stated in the "Known Issues" section of the firmware page). Specifically, I want/need to be able to do the following:

1. Instruct camera to take a high-resolution photo with no flash at arbitrary intervals via USB connection.

2. Retrieve the photos from the camera over the USB connection.

3. Power camera via AC power (using an AC/DC converter)

4. In the event of a power failure ensure camera will be rebooted back into a mode which permits PC control.

5. Control optical zoom function (again in case of power loss should settings need to be manually reset).


It sounds like #1 should be no problem, and I've seen example scripts which perform #5. #3 I am assuming should not be a problem for any camera, though I will likely need to purchase a special AC/DC adapter.

I believe #4 is possible by configuring the SD card to be "bootable" but I've found conflicting reports regards actually getting the camera to automatically power back up. Ccan I just have the battery in place and when there's a power loss assume the battery will take over powering the camera? If so that would still mean periodically needing to remove the battery to recharge it manually. Some comments suggested using a zip-tie to force the power button to remain permanently depressed, in this thread: http://chdk.setepontos.com/index.php/topic,2388.0.html

#2 Sounds like it could be fairly tricky. I've heard suggestions such as using CHDK to manually flicker an LED on and off, coupled with a separate optical sensor connected to the computer - in effect a binary protocol (morse code style) to transmit the images that way. Surely there is an easier method however?



Visiting my local electronics store, they have the following CHDK-supported models in stock (listed by increasing price)


IXUS 80 IS (8MP, 3x Optical Zoom)

A2000 (10MP, 6x Optical Zoom)

SX110IS (9MP, 10x Optical Zoom)

SX10IS (10MP, 20x Optical Zoom)


The SX110IS seems the best price/zoom ratio. The SX10IS costs twice as much as the IXUS 80IS. Unfortunately the A480, which costs half as much as the IXUS 80IS but has nearly identical stats, is completely unsupported.


Any advice regards what I am trying to do and/or specific camera recommendations or models worth further investigation would be most appreciated!


Cheers


« Last Edit: 18 / October / 2009, 17:20:40 by professional_amateur »

Re: Security Monitoring
« Reply #1 on: 18 / October / 2009, 16:43:27 »
It's a lot easier than you think, and no need to involve CHDK. You can just use linux app 'gphoto2' and a supported camera (the camera needs to support 'remote capture' - I think the list of cameras supported by PSRemote is much the same as that supported by gphoto2 (note: gphoto2 supports loads of cameras for downloading photos etc, but only a few can be commanded to take pictures over USB). The process is fairly painless but there seems to be no documentation on the web now - send me a message and I'll try and get you started, and hopefully get some documentation written to help others along the way.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Security Monitoring
« Reply #2 on: 18 / October / 2009, 16:48:54 »
The "correct" way to do this would probably be to find a camera that's supported by the Canon SDK (and as such I suppose gphoto2 would work). More or less all recent A series and IXUS cameras don't support remote control, but AFAIK there are cameras in the S and SX series that do...from gphoto2 docs it looks like sx110 is one: http://www.gphoto.org/doc/remote/)

There's a very recent thread here: http://chdk.setepontos.com/index.php/topic,4338.0.html that shows some advances in USB PTP control for CHDK. Before that, it was basically not possible to both transfer images via USB and control the shutter (or zoom) via USB in the same session (I'm oversimplifying a bit here, but that's roughly how it's been... I'm not sure if the SDM's rec/play switching 'transfer images for' stuff is able to disable USB remote for the duration of the transfer; if it is, what you need could be possible using some external custom hardware).

Powering on by pluggin in a DC supply while power button pressed may or may not work on all cameras. If you need that, you'll need to find someone to test it before you buy if you can't do that yourself. Some cameras power on from USB voltage too, see the camera features table in the wiki.

I can't speak for all cameras, but I do know that my 2*AA cell powered a570 does not let you use the batteries for backup power: the camera will halt to power loss (it does not shutdown cleanly if I remember correctly) if I remove the DC plug (even if a fresh set of batteries is installed) and it will also shutdown if I plug in the DC plug while the camera is powered on from batteries. Anyway, unless your PC is a laptop with a good battery, there's probably no sense trying to thing about using the batteries if AC is absent... you just need to make sure you can restart the camera (and having PC control a relay on the AC side of your AC/DC converter is possibly the easiest way to achieve this).

All in all this stuff is what a lot of people would like to do, but not many are able to because Canon has made it pretty hard... I have no experience whatsoever with cameras that do support remote control originally (even without CHDK), so can't really help much with that.

Re: Security Monitoring
« Reply #3 on: 18 / October / 2009, 17:06:06 »
An IP Camera may be more suited to the task. These can be either ethernet connected, or wifi (somewhat line-of-sight regarding the 'hill'). Would not need to co-locate a PC. Viewing is from any PC/Mac on your LAN (option to extend access to WAN, host-server, etc). "Cam sftw" has built-in Motion-detection options/settings, and also settings for periodic or triggered save to file. Some have pan tilt zoom PTZ. IP Cam can have very good resolution, but not photo quality.

Another alternative is the 'hunting camera' if it's just image-capture you want, although these are intended for periodic visits to the camera to retrieve it or the card.

As for CHDK/SDM approach, do look into 'MD' (motion detection). For what you've outlined, I think the weak link is the expectation to retrieve the photos thru USB (at least if you mean unattended). Overall it seems like overkill or wrong tool for the job IMO. What's the reason for wanting photo-quality for perimeter security?
[Edit:  I just see fudgey's post has identified some more-recent USB related capabilities.]

Some canon models have AC adapter as an accessory... but probably will not power-up automatically after power failure.
« Last Edit: 18 / October / 2009, 17:14:06 by CoffeeGrip »


 

Related Topics