So, I’ve taken a part an old cellphone (LG P500 Optimus One) I had and took out the 3 megapixel camera. I am very interested in connecting it to the Hydra an then either storing images or sending them (maybe even video, but let’s not get ahead of ourselves).
I have attached the electrical ICD of the camera (top middle, named “3M Camera”. I’d appreciate answers to my questions, to get me started:
[ol]Is this possible altogether with Gadgeteer?
Is this the right place to ask this kind of questions? If not, where? Any ideas?
What’s the hardware needed to make the full way from the camera ti the Hydra? What connectors and modules are required?
What is the software implementation of “taking a picture” with this?[/ol]
There’s a general connection diagram of the phone here http://htmlimg3.scribdassets.com/6o47t9uwsg1kdbrg/images/148-7d39360f34.jpg which suggests I2C is being used (how?) and here’s the complete wiring od the phone: En LG-P500 SVC Eng 101008 | PDF | Amplifier | Electronic Circuits
Thanks a lot !
If its an I2C device, that is likely only for controlling the engine, not for taking a picture or extracting the picture data. “CAM_IF” to me is just a “standard” form of Camera interfece, so you’ll need to find the details of that. You might find the details are on page 158 of the second doc you linked to, although I can’t read it.
I don’t know where you’re best to get info about interfacing this camera with a microcontroller. You will need to find the specific information about it’s command set so you can configure it and then take shots.
You will need to move into RLP here because typically with this kind of camera you need to read the image values quickly and at a consistent time interval.
Connectors? Well, you’ll need to custom-build everything I’d say, and it’ll depend on what you find out about the camera interface. That means you’ll need a LOT of GPIOs, there’s 34 pins on that header of the camera, and you may well need all of them connected (once you figure out what they all are)
Is it achievable? Possibly, but will be dependent on how much you want to dig and play. You could always just go buy something that would do this.
It could very well be DCMI, which is quite commonly paired up with an I2C control channel. Sparkfun sells cameras like this, and they’re surprisingly cheap: http://www.sparkfun.com/products/8668
The USBizi doesn’t have the internal hardware required to interface with the camera (which means that EMX doesn’t either), and Hydra doesn’t have the internal hardware required (which means that ChipworkX doesn’t either). LPC17xx doesn’t have the internal hardware required (which means that G120 doesn’t).
STM32F4 does have the internal hardware required (which means that Cerberus, Cerb40, and Cerbuino Bee do). It’s not clear to me that Cerberus and Cerbuino could actually take advantage of it, however, without lots of custom wiring and losing some/all of the sockets). Cerb40 also might not have all the pins necessary broken out, I haven’t checked.
It’s possible that Hydra/ChipworkX has enough horsepower to move the data through quickly enough to interface with the camera, but I doubt it. This interface involves moving a truly staggering amount of data even on the 1.3MP 15fps Sparkfun camera (we’re talking megabytes per second). Your camera is 3MP, and probably has a faster framerate.
With the STM32 it’d be doable, but you would be working in native code, and you wouldn’t be able to do basically anything except use DMA to move the data straight out to somewhere else, such as an SD card, or external memory. If you were working at anything but low resolutions and frame rates, you probably would have to use unformatted SD cards. A FAT filesystem might slow you down too much.
It seems I am here over my head… RLP… that is some serious stuff. Not for the feint of heart.
Let’s see if I got it right:
[ol]The Hydra has 16MB sdram, so it could handle a single 3 megapixel image. Forget about video (that OK) since there’s no enought memory/bandwidth/speed.
The interface is hellish, both HW (exposing a gazillion pins etc.) and SW (RLP). This is uncharted territory.
I dodn’t understand the bottom line about the feasibility of doing stills with the Hydra and the http://www.sparkfun.com/products/8668[/ol]
So I guess I am stuck for now with the 320x240 Camera Module (http://www.ghielectronics.com/catalog/product/283). The thing is it requires an H socket, which Hydra does not have. How can I connect it? Maybe using the IO60P16? Is there any way to put a camera of the Hydra?
The GHI camera is a USB camera. If you wire it up correctly then you can connect it to your PC’s USB (Host) port.
They Hydra doesn’t have a USB Host port, thus there is no way to connect the GHI camera to the Hydra.
Connecting a raw camera like the sparkfun ones is hell, even when you do have the supporting hardware. If you read through the comments at sparkfun you will notice that the datasheets for these devices are not complete, and all they could get out of the camera was a garbled 320x240 image. That was the last time I checked anyway.
Chances are you don’t find any datasheet for the camera you have.
I also have a few cell phone cameras lying around and have given up on using them…
Serial Cameras of small form factor and small image size are available, but understandably are hellishly slow because it’s, well, serial. But they are useful in my opinion, since the onboard controller does all the hsync/vsync timing etc and captures the image into a frame buffer that you then take out at your leisure. Much more achievable.
( <-- Scratches his head, realizing he’s playing in the big boys’ pool)
Well, how about something different as using DaisyLink elements, either for reading images and/or storing them and/or sending them without reaching the Hydra board? I mean, can I connect ALSO a chain of DaisyLink elements that will take care of all that?
Using Holy (who’s Holly?) Water has proved that this gadgetry is “dark matter”. Every time I toss a few drops on, it sizzles and smokes, purging evil spirits. I am then compelled to seek good spirits in liquid form as my previously possessed hardware no longer works.
Cameras are deeply specialized hardware. They move staggering amounts of data, and require enormous amounts of memory to work with. The Gadgeteer camera, in my humble opinion, is a nasty hack, using USB. Still, there wasn’t really any other option, since none of the available mainboards at the time had DCMI peripherals, and only the STM32 does now. The STM32 is quite unique in that regard, as the DCMI peripheral is only commonly available in much larger, more powerful hardware (such as that in your cell phone) or in specialized (non-microcontroller) hardware. The usual response to the question “how do I interface with a DCMI camera” is “Get an FPGA”.
So to sum things up - the solutions are:
[ol]Get an FPGA and good luck to you.
Use nothingXnothing resolution cameras and understand that this is the best it’s going to get.
Use a video transmission system (like POV quadcopters) mounted on the frame, possibly with gimbals.
Put a cellular phone on the copter and transmit video using cellular data / wifi.[/ol]
Thanks for all the remarks and ideas. I really appreciate it. There we some nice ideas here.
Yes, it is standards based, but I think that having to resort to USB is less than optimal. I would rather have seen something like the LinkSprite serial cameral or one of those Sicube cameras (they’re impressive! they have a 5mp camera!) used instead. That way, it wouldn’t have been limited to mainboards with USB host functionality (H socket). At the moment, only the FEZ Spider and Argon R1 have such a socket.
The LinkSprite camera is available from Sparkfun directly for $50, which usually means it’s available more cheaply elsewhere. If adding a Gadgeteer socket and shutter button adds $20 over retail for the camera module, that’s not what I’d consider a reasonable price. You’re also not comparing apples to apples, because the LinkSprite camera can do VGA, while the GHI camera is limited to 320x240.