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.
22 thoughts on “Building A Better Serial Camera”
Somewhat related question…. How much more resource consuming is face tracking based on haar cascades when compared to simple colour tracking?
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.
The CMUcam5 supposedly will be able to support face tracking as well as SIFT. Having a dedicated board that does CV seems like a much better approach than using something like the BBB.
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.
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.
Thanks for your reply! Would you happen to have a link to the surface mount sensor that includes JPEG compression? It looks like the STM32F4 has 196k of SRAM, which should be enough for a 640×480 JPEG-compressed image?
Search for “TCM8240MD” and the STM32F4 SRAM is divided to 3 blocks, the main one is 112KBs.
The 196k is 4k (boot RAM) + 128k + 64k.
IIRC the 64k is special in that it cannot be reached by the DMA controller. This means that the CPU core can use that memory at “full blast” even if there is a DMA transfer going on.
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.
at $15, I take 20 and we’ll be able to finally talk about real Bullet Time here ;)
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 :)
Thank you for the link ! Much appreciated :)
No problem, chief :) I’m sure you can find something on there that is in budget. Do check the Other link and wholesale link as there are often tabs hidden there. The vintage computing tab also has neat stuff/tubes to pick up cheap. Take care :)
“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.
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”.
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.
Shut up and take my money!
Seriously, make these.
“Sometimes, though, that setup blows will blow your budget…”
Was that a Freudian slip?
plz pray tell me if you can remove the ir filter or no ? This would be ideal for me.
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?
This looks great.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)