1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Electronics Microcontroller + Camera

Discussion in 'Modding' started by alcedes, 27 Aug 2007.

  1. alcedes

    alcedes What's a Dremel?

    Joined:
    1 Jan 2005
    Posts:
    121
    Likes Received:
    0
    Has any one ever interfaced a microcontroller to a camera?

    I need to know what (cheap) options there are for getting crude video input into a microcontroller. My objective is to get a Microcontroller to identify an object of a certain color in it's field of view.


    I was hoping some one had either interfaced a micrcontroller to a web cam or figured out how to use a disposable digital camera for such a purpose.
     
  2. lost_modder

    lost_modder What's a Dremel?

    Joined:
    5 Dec 2006
    Posts:
    164
    Likes Received:
    4
    yea that's been done. the most recent thing I have seen was a guy made a setup to cheat with a gameboy or psp. if the camera sees a block of wood, a motor spins & pushes the button. was possibly on here but don't know.
     
  3. jakenbake

    jakenbake full duplex

    Joined:
    5 Jun 2005
    Posts:
    495
    Likes Received:
    3
    http://www.hackaday.com/2007/01/15/lazy-psp-player-automatic-woodchopper/

    follow the green link to see the actual site
     
  4. alcedes

    alcedes What's a Dremel?

    Joined:
    1 Jan 2005
    Posts:
    121
    Likes Received:
    0
    Thanks, but that is not quite what I'm looking for.

    For this project a requirement is that the final product must be controlled completely by a microcontroller. The project referenced by hackaday uses a web cam connected to a laptop computer.

    If it helps any, this is what I'm doing; I'm in an embeded design class and I have a project due in december. I was going to go with an automated water gun turret that would attempt to shoot a painted target. The targets of interest would be painted with a red or infrared laser. I would need for the turret to automatically respond upon detecting the laser.

    I've got most of the design detailed in my mind. The turret itself can be built with parts from a lego-mindstorm kit , I've got a number of microcontroller evaluation boards from which to select. The only thing missing is a crude camera that I can interface to the board. I've seen a few solutions that are insainly expensive, and i know there must be a reasonable solution somewhere.
     
  5. jakenbake

    jakenbake full duplex

    Joined:
    5 Jun 2005
    Posts:
    495
    Likes Received:
    3
    why not just use a ir receiver/transmitter? or you could use sonar. or you could use RFID tags. just a couple of options that i think would be easier.
     
  6. alcedes

    alcedes What's a Dremel?

    Joined:
    1 Jan 2005
    Posts:
    121
    Likes Received:
    0
    I looked a PIR and ultrasonic transcivers, but based on the information I found it looks like they were suitable for detecting movement in a general area but didn't provide enough information to aim. I haven't a clue how one would use RFID to pin point a location
     
  7. const_

    const_ What's a Dremel?

    Joined:
    15 Nov 2005
    Posts:
    121
    Likes Received:
    1
    hope you love and know math pretty well this not easy by any means. search google there must by something similer.

    good luck
     
  8. ConKbot of Doom

    ConKbot of Doom Minimodder

    Joined:
    2 Jul 2003
    Posts:
    2,160
    Likes Received:
    6
    how beefy of a microcontroller? with a PIC 16F series... it would be pretty hard.

    http://www.cs.cmu.edu/~cmucam/
    CMUcam is probably your best bet for implementing simple vision.
     
  9. alcedes

    alcedes What's a Dremel?

    Joined:
    1 Jan 2005
    Posts:
    121
    Likes Received:
    0
    Found a Camera

    I think I've found a viable solution. http://www.sparkfun.com/commerce/product_info.php?products_id=637
    It's a camera that's been used in many samsung phones. I only need to hardwire a few lines to high or low and the camera will continuously output the pixel data for as long as I give it a clock signal.

    I wasn't going to use a PIC. I couldn't really get the performance data on them that I wanted to make sure they are suitable for this task. I only saw that the 18F series works at up to 10 MIPs peak. I was going to stick with the 8051 family. They typically have only 128-256 Bytes of RAM they peak aroung 100 MIPs. With such a small amount of ram I'll have to process the video data as it comes in. I plan to calculate the average luminance value and standard deviation durring the data stream for the first video frame. If the standard deviation is small enough then I'll proceed to finding the brightest area of the photo during the next frame.
     
  10. Gambler

    Gambler What's a Dremel?

    Joined:
    16 Jun 2006
    Posts:
    90
    Likes Received:
    0
    I am assuming you want to take pictures with the camera.

    However, if you want to be able to color tracking or other things, check out the CMUCam2 (looking for link).
     
  11. alcedes

    alcedes What's a Dremel?

    Joined:
    1 Jan 2005
    Posts:
    121
    Likes Received:
    0
    I finally got around to looking at it in detail. It looks like that camera works to well!!!:hehe:

    I think I'll leave it alone for this project for fear that it may be doing to much work for me (since this is agraded assignment) but I am definitly bookmarking it for some other ideas!
     
  12. ConKbot of Doom

    ConKbot of Doom Minimodder

    Joined:
    2 Jul 2003
    Posts:
    2,160
    Likes Received:
    6
    yeah it can do a lot if you can actually sit down and learn it. I had an opportunity to do something with it for FIRST robotics, but I was just overwhelmed with otherstuff to do at the same time, so I never got down to using it. :blah:
     
  13. Moriquendi

    Moriquendi Bit Tech Biker

    Joined:
    3 Nov 2005
    Posts:
    1,691
    Likes Received:
    58
    Ive got a couple of links for you here Laser rangefinder although hes talking about a range finder there is probably some applicable info in there. And second (same bloke) Colour machine vision. Both projects are using pretty high powered microcontrollers simply because the data rate is so high for video.

    Moriquendi
     

Share This Page