Building A Better Serial Camera

camera

If your next project does anything with cameras or machine vision, you’ll probably be looking at something like a USB webcam attached to an ARM board or a netbook. Sometimes, though, that setup blows will blow your budget – power or otherwise – out of the water. For small projects, you’re limited to small, serial-accessible cameras, and in that domain you really don’t have a lot of choices.

[Ibrahim] realized the cheapest serial cameras are about $35, and with basic image processing that cost skyrockets up to about $100. He set out to build his own alternative, and ended up with an awesome serial camera module that should only cost about $15 in quantity.

The module is built around an STM32F4 microcontroller running at 168 MHz. This micro has a DCMI port to which a OV9650 camera is attached. The resolution ends up being 1280×1024, far better than other serial cameras.

Already [Ibrahim] has the hardware working and a few demo apps. He has a real time color tracking demo (video below) up and running and a machine vision repo for his tiny camera. Now if we could only get a few of these boards on Tindie.

Comments

  1. Kerimil says:

    Somewhat related question…. How much more resource consuming is face tracking based on haar cascades when compared to simple colour tracking?

    • iabdalkader says:

      Very resource consuming compared to color tracking of course, I’ve had the same thing on my mind, I have some experience with viola-jones, but I was more concerned with storing the cascades, I’m thinking of using the on board flash or adding an SPI flash, not sure yet, anyway I’m going to try and see how it goes.

  2. peter says:

    Over at the open source science tricorder project, I have been looking for a serial camera with high-speed SPI and JPEG compression that fits into ~20x20mm, 3.3v, for under $30, for some time now. There are some modules out of China, but they have very poor documentation and seem to rely on old chips that could disappear suddenly. I’d love to see a module that could sustain 640×480 at 5-10fps, and take still shots at a higher resolution, although that’s going to be limited by the memory on whatever device you use to control the camera, whether it’s an STM32F4, FPGA, or other device. I’ve been wondering if setting up a bounty with a few-month timespan for an open module would help move this along — please contact me if you’d like to contribute.

    • iabdalkader says:

      Hi, the SRAM is somewhat limited, it’s enough to keep small frames in memory (QQVGA/QVGA) but not whole 640×480 frame, you see the DMA doesn’t support peripheral to peripheral transactions so you need to store the whole frame in memory first, then send it out, so basically the STM32F4 can’t handle that resolution, you can add an SRAM chip however, or use an FPGA. As for the size, the module is 25x36mm it can be made much smaller, there’s another sensor that can be attached to the board directly (without the connector and the ribbon cable it would be much smaller) and it has JPEG compression too, so I guess what you want is quite doable.

  3. Arren says:

    I am very impressed by this. It seems like a good start, and the processor attached should be beefy enough to do some decent work.

    There is still a lot of work to be done with improving tracking capabilities, and things like motion detection, etc.. But this definitely falls into the capabilities of a decent low cost Machine Vision alternative.

  4. ino says:

    at $15, I take 20 and we’ll be able to finally talk about real Bullet Time here ;)

    • potatoman412 says:

      lastminuteauction.com my friend. Look under computers and tablets and ereaders. They show up daily and often for a buck and 6 shipping ;) They often just have just bad screens or digitizers. Plus you can cobble up frankentablets to sell to further your camera pile (just kidding). There may be other and cheaper devices, I’m just putting that out there to help as I have traveled those waters. Heck, I’ll send ya a few cameras for free if ya want. Got a few unsavable tabs that could be scrapped. Take care and keep on tinkering :)

  5. fartface says:

    “If your next project does anything with cameras or machine vision, you’ll probably be looking at something like a USB webcam attached to an ARM board or a netbook.”

    $12.00 usb camera + $25.00 Raspberry Pi A board. plus you get all the free processing power on the A board. How can that “blow out” your budget?

    Every single serial camera is about that price. and his is $20.00 + custom board cost + you have to solder it all. There is no way he can ever get to the price he hopes for except at 1000 pieces and even then it’s still at the price of a cheapie USB camera plus Pi.

    Very cool design, but it’s not low cost by any stretch unless you have free PCB manufacturing.

    • rj says:

      I was going to point out how you must have missed the words “power budget”, and then I noticed I was replying to fartface again.

      His STM32F407 has a power allowance somewhere around 300mW. The camera module he chose has a power budget somewhere around 90mW. 390mW for the full solution is about 2/3 of the model A by itself before we even get to the power consumption of a USB camera.

      USB cameras aren’t sold on their power consumption, but taking a few random samples, powers on the order of a watt seem not atypical.

      I don’t know about you, but 1.6W vs 0.4W sounds easily like “blowing out a power budget”.

      • Ibrahim says:

        Hi, I would like to add that the *whole* module costs around $20-$22 including the PCB, if manufactured in quantities I would expect the cost to drop significantly, also keep in mind that this module is 25x36mm and weighs a few grams which means it can fit on small quad-copters or robots compared to the Raspberry Pi + USB camera + Power supply solution.

  6. strider_mt2k says:

    Serial? -Killer!

  7. Nick says:

    “Sometimes, though, that setup blows will blow your budget…”

    Was that a Freudian slip?

  8. ymo says:

    plz pray tell me if you can remove the ir filter or no ? This would be ideal for me.

  9. Hack a Day Reader from Europe says:

    Very good idea, Ibrahim! I’ll keep that in mind, when i’ve trying to get cheap at moderate cost ant quality camera for robot vision. I found an attempt to make own camera module here: http://letsmakerobots.com/node/32507 Of course this is not that powerfull than your’s, but in case of CCD sensors use I think is interesting. What You and other people think about this?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s