Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Web Camera — Parallax Forums

Propeller Web Camera

BrianmcmBrianmcm Posts: 33
edited 2010-05-18 05:21 in Propeller 1
Greetings, if this question has been asked before I apologize for the repeat.
I have a propeller based mobile platform I've been experimenting with and decided I wanted to add real-time color video monitoring. I purchase one of those 2.4gHz "spy" cameras and connected it to a video capture card on the laptop. Unfortunately·to get a useful·image·I needed to backlight the subject with 60 watt bulb in a clamp style reflector; defeats the idea of mobile. In my stash of stuff I have several USB web cameras so my question is;
· Can a usb-camera be integrated with the propeller chip such you can tranmit video remotely, say set it as an IP camera? Or is this out of the realm of practicallity?

Any advice will be greatly appreciated.
Thanks
Brian Mc.

Comments

  • LeonLeon Posts: 7,620
    edited 2010-05-14 17:45
    You need host mode. It might be feasible using a Vinculum chip, but the memory for storing the images will be a problem, as well as the processing speed. I don't think that the USB host software that runs on the Propeller would be suitable. It'll be a lot of work, anyhow.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • Mike GreenMike Green Posts: 23,101
    edited 2010-05-14 17:47
    It is not at all practical. There's not enough memory and, even if there were enough memory, the data rates are way too high to handle without multiple cogs involved. In addition, although there's a USB host driver, it only handles relatively low speed connections and uses multiple cogs to handle the data rates needed. Do the math.
  • TubularTubular Posts: 4,717
    edited 2010-05-15 06:33
    One technique for snapshots is to "dual port" the SD card, which is shared with both the camera and prop.

    The image below has been taken using that technique (you can see the shadow of the solar/camera/modem box atop a 25m pole)
    4288 x 2848 - 2M
  • heaterheater Posts: 3,370
    edited 2010-05-15 06:56
    Ha! Mike: "It is not at all practical." As you know that kind of statement is like a red rag to a bull around here[noparse]:)[/noparse]

    Tubular: Are you saying that example is done with Prop? Where is that camera located, on the moon?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • rjo_rjo_ Posts: 1,825
    edited 2010-05-17 15:24
    Tubular,

    If you have posted this to a separate thread, I completely missed it. It is important enough to refresh the thread or start a new one... I have been toying with the idea of dual porting an SDcard, but it would take me an unreasonable amount of time to get it right.

    Anything you could add would be appreciated.

    Thanks,

    Rich
  • Mike GreenMike Green Posts: 23,101
    edited 2010-05-17 15:50
    heater,
    The nice thing about saying "practical" is that each of us gets to define what that means. In my case, I understood the question to ask whether a standard USB web-cam could be interfaced to a Propeller such that the Propeller transfers the images via a WiFi connection to a PC somewhere.

    The existing Prop USB host driver has nowhere near the throughput needed for a webcam. It may be possible to increase the throughput modestly by using more than the 3 cogs needed currently, but I still think that it won't be high enough. The Prop doesn't have enough memory for even a single frame of video at 320 x 240 x 8-bits, so external high speed SRAM would be needed for buffering. On top of that, I don't think the current Ethernet driver has the throughput needed either. It may be that the forthcoming Parallax WiFi board will be able to handle the throughput given that the low level networking is offloaded to the processor in the WiFi interface.

    So, I think one of you smart, hard-working people could make something that would work given some significant external hardware, but we're not talking about a couple of objects to be thrown into an existing program that already uses 2 to 4 cogs and a few, mostly passive components to be attached to a few spare I/O pins.
  • BrianmcmBrianmcm Posts: 33
    edited 2010-05-17 17:03
    Guys, thanks for the information. I kind-of suspected the answer, but thought I'd post it to the experts.

    Brian
  • TubularTubular Posts: 4,717
    edited 2010-05-17 20:57
    The concept I used was conceived here in Prop land (i'll try to find the thread) but executed using a different 32k micro, because there is an RTC requirement to wake up every hour to take a shot. The essential hardware is a sparkfun SD or uSD "sniffer", SD/uSD card, and 4PDT relay to switch which 'host' the SD is connected to (camera/uC). With the existing hardware there is a rare but persistent glitch where it drops a couple of bytes in the middle of a jpg, and I blame evil interrupts. One solution may well be to port it back to a prop with external RTC. There will be a way to eliminate the relay too, but right now it simplifies things nicely.

    @heater, you're right it does look like another planet. But if you zoom in on the horizon you can just make out the city skyline of civilization...
  • rjo_rjo_ Posts: 1,825
    edited 2010-05-18 01:55
    Tubular ... thanks.

    I had seen the sniffer... but decided that for my app there was probably a simpler way to do it... then I got involved in something else and it all evaporated.

    Rich
  • rjo_rjo_ Posts: 1,825
    edited 2010-05-18 02:02
    Brian ... Mike Green is always right and in this case I suspects that he has an idea of what you need and where you are going, and he doesn't want you going down the wrong alley.

    At the same time... guys around here routinely do things that are originally thought to be impossible. For completeness only... there has been a thread (and I wish I could reference it for you) recently about USB solutions for the Prop... and I meant to ask why this couldn't apply to a USB camera... 512K ram cards are available, with supporting objects and done by very good guys. The one for the Hydra can be used in any system and is fully documented right down to the external bits. As I recall the USB solution used up a lot of resources... whether it used so much that there wouldn't be enough left to drive the RAM... I don't know.
  • heaterheater Posts: 3,370
    edited 2010-05-18 04:22
    Mike: I think what I was hinting at is that when some one asks "Can I do X with the Prop?", where X is some specific hardware/software thing, then perhaps it is not very practical on the Prop. But perhaps with a bit more probing we find out that X is not the actual requirement but rather a means to an end which can actually be done another way.

    In this case X seems to be a "WEB cam and USB and image transfer over Ethernet." But what if this is recast as "image grabbing from some camera (no USB), transmission out from Prop to remote location (not necessarily Ethernet) and speed does not matter so much."

    Then there may be a host of simpler solutions all be it with less performance that might suffice.

    Don't forget what radio amateurs did, and still do, with slow scan TV before we had any computers to worry about fitting it in[noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-05-18 04:51
    heater,
    Very true about slow scan TV, but remember that the pixel dimensions were smaller and they used a long persistence phosphor to hold the image long enough for the slower scan to take place. Similarly here in that less resolution and less pixel depth (like 4 bit grey scale) would go a long way towards making this practical for the Propeller to do without significant external hardware.
  • heaterheater Posts: 3,370
    edited 2010-05-18 05:21
    I know nothing about interfacing camera devices but I was thinking that if one does not have the speed or memory to pull whole frames from the camera at the full frame rate then why not just collect some portion of the frame every frame period or every other frame period or whatever fits. Then transmit that out of the prop via whatever medium.

    With this one could make trade offs between resolution/pixel depth/speed.

    This might lead to some funky images when things are moving but there we go.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
Sign In or Register to comment.