Go Down

Topic: Connecting and reading USB Webcam with Arduino? (Read 45761 times) previous topic - next topic

ShalawMajeed

Hello everyone,

I have an old USB Webcam, i wanted to connected to Arduino Mega board. I want to read and store the data output in a file on PC using Serial port or SD card.  I cut off the USB connector and got four wires: 5v, Data-, Data+ and GND. I connected to D- to Tx and D+ to Rx of Arduino board.

my questions are:

1- Is this possible to do?

2- Is that a correct connection?

3- How can I read data from the output of the webcam? what will be the format?

4- Are there any protocol needed for this connection?

I'm open to suggestions,

appreciate your help, thanks for your answer :) 

KenF

No, not as it stands.  Those wires are supposed to connect to a USB port.  Furthermore the camera will behave as a USB slave device.  The arduino mega will also behave as a USB slave device.  So they won't be able to communicate with each other over USB.  (one device has to be a host for that to work).

You could get around this slight hiccough by getting yourself a USB Host shield, but this would still be just a tiny step towards a solution.

The next issue you would have is that all webcams are not equall.  This is why you can't have one driver fits all in windows.  Within windows this is bad enough but to get all the low level details of exactly how YOUR particular camera communicates, is going to be more trouble than it is worth.  It would involve extensive research and likely endless hours of perseverance to get to the stage where you can finally start communicating with it.

Alas even after all this effort you'll realise that the sRam on the Arduino Mega can't even hold a single image from that camera, so it'll be next to useless.

Add to this the fact that your final solution would only work for THIS exact camera and the technical details you've gleaned along the way won't even be portable.  I'd say this project is a non runner.  Sorry :(

ShalawMajeed

Thanks for your clarification,

I've already ordered a camera module for Arduino, but I couldn't wait till it gets me :) so I wanted to give this a thought.

thanks for your answer again, :)


KenF


wilsonajdesign

Sad there isn't a common way to hijack old web cameras. I'm looking at two I've collected right now scratching my head. Although I only have Arduino Uno's, I'm under the assumption the Yun could potentially take on this task.

_pepe_

#5
Mar 23, 2015, 10:13 am Last Edit: Aug 20, 2018, 02:38 am by _pepe_
Supprimé

Go Up