Shop OBEX P1 Docs P2 Docs Learn Events
Prop Camera (PSM + C328) — Parallax Forums

Prop Camera (PSM + C328)

RaymanRayman Posts: 14,849
edited 2009-09-04 20:07 in Propeller 1
Here's a little demo of using the C328 camera with the PSM (Propeller System Module)
to create a controllable digital camera.

There are several formats available, but this demo shows a 160x120 16-bit color
preview until the button is pushed and then it saves a 640x480 jpg file to the SD card.

There are a few tricks going on here...· The preview image is actually bigger than Prop RAM.
So, I'm writing the data directly from the camera to the LCD GRAM.· There are several other
preview modes in case you do want to manipulate image data in RAM...

Also, I'm using an undocumented high-speed baud rate of 460800 baud to get the preview
data, so it can refresh once a second.

Here's the code, photos of it working, and a sample jpg image from the camera (not the best, but I'm in a hurry!)...

·

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

Post Edited (Rayman) : 9/4/2009 9:57:03 AM GMT
2856 x 1904 - 1M
2856 x 1904 - 1M
640 x 480 - 72K

Comments

  • RaymanRayman Posts: 14,849
    edited 2009-09-04 09:54
    Let it run overnight and it took over 26,000 preview images!

    (So, I think it's robust enough to do time-lapse work...)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
    2856 x 1904 - 2M
  • TreeLabTreeLab Posts: 138
    edited 2009-09-04 16:38
    How did you find the undocumented baud rate of 460800 ?

    BTW : WinZip complains about the archive file (bad menu handle). Was it prepared by the tool?
    Cheers!
    Paul Rowntree

    Post Edited (TreeLab) : 9/4/2009 4:44:56 PM GMT
  • RaymanRayman Posts: 14,849
    edited 2009-09-04 16:48
    TreeLab: Found it by looking up the datasheet for the OV528 chip on the device...

    Zip was created by the tool. I just downloaded it and it worked, so I don't know what's going on with that...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2009-09-04 19:28
    erco has a thread over in the sandbox about those
    imported keychain cams. They cost $20-50 from various sellers
    and take 1280x960 jpg stills and 640x480 video/audio at 30fps.
    Some have cmos sensors but the best quality have ccd.
    There is an 4gb micro sdhc card inside in a socket.
    Some cams come with 8gb!
    erco popped one open and took some closeups..it looks
    like the cams are easily hackable for control by a prop.
    The cam has a 3.7v lion battery inside and so the prop
    and the cam could probably both run from a single v source
    just a tad lower than this...maybe something like three D cell
    nimh's with a diode in the line to the prop?
    I'd say these cams are probably sensitive in IR so you could
    do night vision time lapse by switching on a few powerful IR LEDs
    just as you snap a pic.

    Here is a sample video from one of the ccd versions.
    www.youtube.com/watch?v=zTxh-veCALU&

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Some mornings I wake up cranky.....but usually I just let him sleep -
  • RaymanRayman Posts: 14,849
    edited 2009-09-04 20:07
    That does look like a great hacking project!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Sign In or Register to comment.