Shop OBEX P1 Docs P2 Docs Learn Events
Microcontroller Controlled Video Camera? — Parallax Forums

Microcontroller Controlled Video Camera?

varnonvarnon Posts: 184
edited 2014-09-26 04:42 in General Discussion
Hi all,


I'm part shopping again. I am looking to add image and/or video capture to some of my apparatuses. I would like a device that can take a still image or video when instructed by a Propeller. I do not want to have a camera pass data to a Propeller. I am not looking for any type of machine vision. I want the Propeller completely free from image processing. The camera device needs to be able to save its own files. It would be great to be able to pass a file name through serial or some other format, but that really isn't necessary.


Applications might include taking a picture of an animal every time it breaks an IR beam in a laboratory experiment or recording a few seconds of video anytime something sets of a PIR sensor in a field experiment.


The HackHD so far is the only thing I have seen that really fits what I want.
https://www.sparkfun.com/products/11418


It looks pretty good for videos, but it might be a bit expensive if we just want still images. Has any one here used the HackHD? Does anybody know any other alternatives? I might even consider a grey scale still image alternative for some projects.


Thanks,

Comments

  • JonnyMacJonnyMac Posts: 9,105
    edited 2014-09-11 12:11
    If you have an off-the-shelf video camera with a LanC port, it's very easy to control with the Propeller. The interface between the Propeller and the LanC connection is a simple bi-directional level shifter (3 cheap parts).

    lanc_interface.jpg


    The LancC object is a specialty UART that allows the control (Propeller side) to modify the first two bytes of the LanC stream which the camera monitors for control input. You'll have to check with the camera vendor for which control bytes it responds to. LanC has been around a long time, but is still used in many products.
    800 x 480 - 65K
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-09-11 12:17
    Canon camera has a whole feature rich set of hacks that can be deployed via a bootable SDcard. I have a PowerShot SX150 that does this and it is a very good entry point to look at enhanced digital photography.

    Here is the link to their site.

    chdk.wikia.com

    I do realize this is not a Propeller powered solution, but it is hard to beat for a lot of situations... worth a mention.
  • Heater.Heater. Posts: 21,230
    edited 2014-09-11 12:21
    Get your self a Raspberry Pi and the camera module for it. Very cheap, very simple, and good pictures.
    http://www.raspberrypi.org/products/camera-module/

    Connect the Pi to the Propeller over the UART Tx and Rx on the Raspi GPIO header.
    Write some simple code at each end to get pictures/video taken when ever you like.
  • GadgetmanGadgetman Posts: 2,436
    edited 2014-09-11 12:35
    Hm...

    Have you considered the FlyCam One?
    It can do video, photo or serial photo, all triggered through a normal servo connector.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2014-09-11 13:42
    If your camera doesn't have a remote shutter, you can opt to hack a less expensive camera and press-fit it for the job. I've hacked quite a few of those miniature keyfob keychain cameras that are useful for general-resolution snapshots (many also do video). All were quite happy with leads soldered to the operating buttons; the leads were then activated by microcontroller. You can find this type of camera, as well as other cheapies, on eBay in the $5 to $20 range. The HD ones are more, but still considerably less than the HackHD (which, by appearances, is a keyfob camera with some stuff soldered onto it by someone).

    On the cameras I hacked all needed to be "turned on" first, which is pressing and holding down one of the buttons for about a second. The shutter is then activated by pressing the button again, or another button. The thing either turns off by itself after about 30 seconds, or you can explicitly turn it off. Because of the extra time to turn on the camera it's not a good solution if you need to snap the picture immediately when the IR is triggered. The minimum delay is about a second.

    My application was in fact with a Parallax PIR. I wrote it up for a MAKE magazine article, but it has not yet run. I'm sure there are other examples out there of the same thing.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-09-11 18:38
    varnon wrote: »
    Has any one here used the HackHD? Does anybody know any other alternatives?

    I've used the HackHD. To start recording video you just need to ground the button line.

    I've also used Gordon's trick of soldering wires to the buttons on cameras to trigger them with a microcontroller. HobbyKing sells a several different camera with button which are easy to access. I've used this one with a Propeller. You can also solder wires to the LEDs and use them to keep track of the camera's state.

    Pretty much any camera can be triggered electronically but some you need to open the case to access the electronics.

    If you have a camera with an IR remote control, you can use the Propeller to trigger the camera with the IR signal.
  • varnonvarnon Posts: 184
    edited 2014-09-13 20:44
    You guys are great. These are all really good ideas.


    Control though LanC sounds like a great idea. I had not heard of that protocol before. I might have aces to something in university surplus that uses LanC protocol.


    I love the scripting of the CHDK. I have a few photographer friends that might really be into that. I don’t think it really fits for my applications though.


    Wow the Pi has really dropped in price since the last time I checked. Heater when you posted that I thought it was a bit too elaborate, but the cost is very reasonable. I’ve been pondering getting a microprocessor anyway.


    The FlyCamOne also looks really great. I’m not totally sure about the servo connector protocol, but at the very least it looks like I could get good control by connecting the Propeller to the push button and LED circuits.


    Gordon, I will keep an eye out for that article. One second of delay can be too long for some of my applications. But perhaps there is a way to keep a camera in standby. I didn’t even realize there were key fob cameras. That might not be a bad way to go about it. (I don’t mess with images or video that often).


    I am starting to like the HackHD more and more, despite the price. I don’t need great quality, but wow the quality is really great! I didn’t realize it has video output. That might be really great for some of my projects. Some of the animals I work with, particularly the snakes, do not like being watched. I could use the HackHD to record short clips when instructed by the Propeller and also get see constant video feed inside the apparatus. I’m sure I could find a monitor at university surplus.


    So I can’t decide! But thanks for all the good ideas. I’ll have to do some more research. I’ll post an update when I get something working.
  • varnonvarnon Posts: 184
    edited 2014-09-21 23:25
    I picked up a HackHD. It was obviously not necessarily the most inexpensive option, but wow is it cool! I also really like the standard wide angle lens it comes with. For my laboratory work, I often want to record the activity of animals in boxes. A wide angle lens is pretty much required to get everything in view. I am pleased that I don't have to buy an additional lens. I am very eager to set up a time-lapse or PIR recording system just for fun. Actual use will likely be recording a few seconds of video when certain events in an experiment occur. The HackHD is tolerant for up to 5.5 volts. I have been testing it with a 5 volt power supply. It works fine, but I would rather use a lower voltage before testing anymore. I won't be using with battery power so I'll need to get a better power source set up before doing any more with it.

    One of my colleagues will be getting a FlyCamOne eco v2 for his project. I am interested to see how that works out. The manual is very cryptic.

    Thanks again for the responses.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-09-22 08:01
    You can get lenses for the HackHD from this site. I've emailed them a few times and they were very helpful.

    I purchased a couple "zoom" lenses with auto irises. Apparently auto irises are difficult to control. It's not hard to have the iris open or close but holding the iris partially open requires a lot of electronics intervention.
  • varnonvarnon Posts: 184
    edited 2014-09-25 19:13
    Thanks for the lens site length. I think I should be good with the default lens, at least for my current applications.

    Anyone have any idea how much current the FlyCamOne Eco V2 draws? Duane I stumbled upon some posts you made on the FlyCamOne on the sparkfun forums (is there any device you don't have?). Did you ever try it with a Propeller? I think my colleague is going to power and control it through the RC cable. It seems pretty straight forward. It looks like, based on various comments, that sensing the state of the camera through the LED line is a must.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-09-25 19:56
    varnon wrote: »
    Duane I stumbled upon some posts you made on the FlyCamOne on the sparkfun forums (is there any device you don't have?). Did you ever try it with a Propeller?

    I suppose "technically" I've used the FlyCamOne with the Propeller but all the Propeller did was pass the RC signal from an input pin to an output to the camera. The Propeller didn't contribute to the control of the camera.

    And no, there are not many devices sold by SparkFun or Parallax I don't have. It's getting kind of crowded in our house. I hope to find treatment soon.
  • GadgetmanGadgetman Posts: 2,436
    edited 2014-09-26 04:42
    Treatment?

    I thought all the gadgets IS the treatment...
    (For boredom, of course)

    I can't remember the power draw for the FlyCam one, but it's negligible, really.
Sign In or Register to comment.