# Wireless USB webcam - Capture frame

Status
Not open for further replies.

#### MrNobody

##### New Member
Hi, previously I have posted regarding building a wireless USB webcam that send real time images.
I was adviced that that wasn't a good idea due to the huge amount of bandwidth needed and also other factors.

I have thought it through and I have another idea, a simpler one and a more practical one (I hope).

Instead of transmitting real time life images, the webcam only captures a still image and send it to the PC when I click a button. For a start, just a monochrome image will do because it will need less bandwidth.
The webcam will then send the data via wireless (radio signal) to the receiver attached to the USB port.
The process of the webcam taking a picture, process it and send it to the PC can take about minutes. It doesn't really matter as I am more interested in the mechanics/how it is done compared to the speed.

So, can anybody please point me in the direction of how to do it..?
I have started by reading the book "USB Complete".. Thanks..

##### Banned
A book on USB is about as useful to a hobbyist as a lead weight. You need to use a serial to USB converter (which are capable of some fairly high speeds) and a micro controller. There are camera and radio modules out there aplenty that use simple serial protocols that are easy to interface with a micro controller.

#### MrNobody

##### New Member
A book on USB is about as useful to a hobbyist as a lead weight. You need to use a serial to USB converter (which are capable of some fairly high speeds) and a micro controller. There are camera and radio modules out there aplenty that use simple serial protocols that are easy to interface with a micro controller.
Yes, I intended to use micro controller and any other component that is needed.
Do you have any link of the camera and radio modules that I can use..?

#### MrNobody

##### New Member
Actually, the project uses a Wireless device (2 pairs of transmitter/receiver or 1 pair of transceiver unit) that is able to convert USB signal to radio signal and vice versa. These unit is connected to the USB port and the webcam

Here are 2 options of how the wireless device work.

The first option is the Wireless device is an active device.
When I click a button on my PC, the USB transmitter (attached to the PC) will send a signal to the receiver (attached to the webcam). That signal will turn the webcam on, capture an image, do the necessary convertion (and maybe modulation) and send the data (of the signal) back to the unit attached to the PC. The PC unit will them convert the RF signal into USB signal so that the computer can receive and interpret it. After the webcam capture the image and process it.

The second option is the Wireless unit acts as a passive one. It merely transmit the data and sent from the device driver to the webcam and receive the data from webcam to the device driver. Because some delay may be involved due to the travelling of signal, the wireless unit (attached to the PC) need to slow down the execution time of the command so that the 'handshake' between the webcam and the PC is still active and the USB is still connected to the PC (eventhough there are some transmission delay).

I personally prefer the second option but I do not know if the option can be implemented.

Any thoughts on the idea..? Thanks..

#### hjames

##### New Member
You'll need to implement the "host" side of a USB interface in order to use a USB webcam. This is a couple times *harder* than building up a normal USB device, which is already something that not very many hobbyists can do. Not impossible, but it is at least a couple thousand lines of code... There may be a couple ASIC parts which can simplify this task, but it is definitely not easy. Doing completely custom hardware is a really bad idea.

Personally if I had to do something like this, I'd start with a Linux based computer like a NSLU2 (google for it) or other ARM/Linux based wireless router and make this into a software task. Drivers are already in place, and you might be able to use off-the-shelf software like (http://www.seismo.ethz.ch/linux/webcam.html).

##### Banned
Sparkfun has a wide variety of wireless modules, cheap low end ones that cost just a few bucks, and slightly more expensive ones that offer a lot of features and bandwidth (possibly enough to do slow scan TV)
www.sparkfun.com

This website sells cmos camera modules that even do object tracking but have the core feature you're looking for, a straight serial image dump.
http://www.cs.cmu.edu/~cmucam/home.html

Add one wireless module, one cmucam module, and one micro controller, shake briskly =) and have fun hooking it all up and codeing it.

#### MrNobody

##### New Member
Thanks for all the feedbacks..

Sceadwian, you make it sound soo easy.. hahaa... Thanks man, will look into the links..

#### hjames

The VDIP1 module has all the USB support you need for $27. It can connect to a PC as a peripheral and to a thumb drive a the same same as a host, AND you can command it through a UART! http://www.mouser.com/search/ProductDetail.aspx?R=VDIP1virtualkey62130000virtualkey895-VDIP1 Dan I think that device only handles USB storage devices and USB RS232 style interfaces: http://www.vinculum.com/documents/fwspecs/DS_VNC1L_FW_VDIF.pdf Trying to handle a real webcam is quite a bit harder. Obviously not having the USB interface as part of this project would make the software part a lot easier. #### cadstarsucks ##### Banned hjames said: I think that device only handles USB storage devices and USB RS232 style interfaces: http://www.vinculum.com/documents/fwspecs/DS_VNC1L_FW_VDIF.pdf Trying to handle a real webcam is quite a bit harder. Obviously not having the USB interface as part of this project would make the software part a lot easier. Actually it handles any camera that uses the USB mass storage standard. He would then be able to take high res piccys with any normal camera. And, there are web sites that might be able to direct him to how to cheat and use the camera chipset commands to get streaming video if he ever gets that far. It does not, however handle "USB RS232 style interfaces" The UART interface is for the microcontroler. There is also a synchronous serial and a parallel interface in it for better through put though PICs could not keep up with the latter. Dan #### hjames ##### New Member cadstarsucks said: Actually it handles any camera that uses the USB mass storage standard. He would then be able to take high res piccys with any normal camera. And, there are web sites that might be able to direct him to how to cheat and use the camera chipset commands to get streaming video if he ever gets that far. It does not, however handle "USB RS232 style interfaces" The UART interface is for the microcontroler. There is also a synchronous serial and a parallel interface in it for better through put though PICs could not keep up with the latter. Dan I was still going under the impression that he wanted a webcam, but I guess using a snapshot camera would fulfill his requirements. I do know that my own camera can't access the memory and take pictures at the same time (there's a switch for camera mode/access mode), so there might be a couple of gotchas. As for the VNC1L chip, confusing is the key word. From http://www.vinculum.com/documents/fwspecs/DS_VNC1L_FW_VDAP.pdf page 11, it has some commands to interface to a FT232/245/2232 on it's USB port 1. Also, it looks like it can also use a serial USB interface as the command interface - I think... #### cadstarsucks ##### Banned hjames said: I was still going under the impression that he wanted a webcam, but I guess using a snapshot camera would fulfill his requirements. I do know that my own camera can't access the memory and take pictures at the same time (there's a switch for camera mode/access mode), so there might be a couple of gotchas. As for the VNC1L chip, confusing is the key word. From http://www.vinculum.com/documents/fwspecs/DS_VNC1L_FW_VDAP.pdf page 11, it has some commands to interface to a FT232/245/2232 on it's USB port 1. Also, it looks like it can also use a serial USB interface as the command interface - I think... Actually you can't. The command interface is on page 4 and is pin selectable for one of three options:UART, parallel, or SPI. There are two USB interfaces on the chip, both can be used as masters but only one has the mass storage interface. Here is the IC data sheet. I hate the way they split it as all the pinning info should not be on the firmware spec that you found. Dan #### Attachments • 797.3 KB Views: 417 #### MrNobody ##### New Member Thanks alot for all the suggestions and ideas.. cadstarsucks said: The VDIP1 module has all the USB support you need for$27. It can connect to a PC as a peripheral and to a thumb drive a the same same as a host, AND you can command it through a UART!

http://www.mouser.com/search/ProductDetail.aspx?R=VDIP1virtualkey62130000virtualkey895-VDIP1

Dan
I went to the website and have a look at it..
However, there are several things that I do not understand and need clarification.

Uses of VDIP1
If my understanding is correct, by using VDIP1 connected to the USB port, I can control a microcontroller by using USB signal.
And if I understand correctly again, by attaching a micro controller to VDIP1 and VDIP1 to a USB device, I can program the microcontroller to control the USB device.
Again, if I understand it correctly, by using 2 pairs of VDIP1 and microcontroller (1 pair connected to the USB port of the computer and another pair to the USB device) and by using RF to transfer signal between 2 microcontroller, I can access the USB device remotely (provided it is a mass storage system device)..
Well, having said that, I do know that my understanding is not that correct.. so please correct me so that I can understand it better.

Controlling of VDIP1
The datasheet says that I can control VDIP1 with UART, parallel FIFO, or SPI.
The only thing I know is UART stands for Universal asynchronous receiver/transmitter, SPI is Serial Peripheral Interface, and FIFO is First in first out (i think). I never had any experience using those things or commands or language. I dun actually know what they are and what they do.
If I want to interface it to a microcontroller, what microcontroller should I use and how should I control VDIP1, with UART, FIDO or SPI..? (So far, I have only used PIC16F84A before but I am keen on trying new things.)

Using it with camera
Since it is not possible for me to use VDIP1 with webcam, can I use it with a C328 camera..? C328 is a camera that is able to transfer the image in RS-232 format. Below is the link to the camera. If I cannot use it directly, what is the component that I need to add so that I can interface C328 camera with VDIP1. http://www.sgbotic.com/product_info.php?products_id=98&osCsid=1f...e20526b7a9e6b1b9cbf56888f

Thanks for your time and patience..

#### hjames

##### New Member
I'm actually pretty confused as to what the VDIP part actually does. In the DS_VNC1L_FW_VDIF.pdf, page 4, first paragraph it mentions something about USB port 1 being able to become the "command monitor" port, but it doesn't mention this anywhere else. Having the data sheet spread across a dozen different files with lots of replicated information is just plain strange. Needing clarification is a polite understatement...

There are a couple categories of USB devices: a standard device, a host, a hub, and some new thing they call USB "on-the-go" which is mix of a device and a host. The VDIP part is a USB Host device, and can only talk to USB devices. Your PC is also a USB Host, so your PC and the VDIP part can't talk directly to each other. There are cheap USB->RS232/serial devices which are
the easiest way of connecting a uC to a PC. So the data chain in this case (if the VDIP part could talk to a camera) would be:

Camera -> USB host chip (i.e. the VNCL1 chip) -> uC -> RF
RF -> uC -> USB device interface(*not* a VNCL1) -> computer

Although it's easier to just do
RF -> uC -> computer (through a RS232 serial port)

A UART is typically used for RS232 style data(the serial port on the PC is this type. Look it up - this is common info). PIC's should be able to use any of the interfaces, and it's up to you to decide how much bandwidth / pins you want to use.

If you use that camera module, you don't even need to use the VNCL1 parts. It isn't USB, so you don't need to bother with any of this mess. Just get a RS232 RF interface module (http://www.radiotronix.com/ ?) and just hook it up to the computer. <waving hands furiously>

#### MrNobody

##### New Member
hjames:
Thanks alot for the explanation.
Really helps..

##### Banned
hjames said:
I'm actually pretty confused as to what the VDIP part actually does. In the DS_VNC1L_FW_VDIF.pdf, page 4, first paragraph it mentions something about USB port 1 being able to become the "command monitor" port, but it doesn't mention this anywhere else. Having the data sheet spread across a dozen different files with lots of replicated information is just plain strange. Needing clarification is a polite understatement...

There are a couple categories of USB devices: a standard device, a host, a hub, and some new thing they call USB "on-the-go" which is mix of a device and a host. The VDIP part is a USB Host device, and can only talk to USB devices. Your PC is also a USB Host, so your PC and the VDIP part can't talk directly to each other. There are cheap USB->RS232/serial devices which are
the easiest way of connecting a uC to a PC. So the data chain in this case (if the VDIP part could talk to a camera) would be:

Camera -> USB host chip (i.e. the VNCL1 chip) -> uC -> RF
RF -> uC -> USB device interface(*not* a VNCL1) -> computer

Although it's easier to just do
RF -> uC -> computer (through a RS232 serial port)

A UART is typically used for RS232 style data(the serial port on the PC is this type. Look it up - this is common info). PIC's should be able to use any of the interfaces, and it's up to you to decide how much bandwidth / pins you want to use.

If you use that camera module, you don't even need to use the VNCL1 parts. It isn't USB, so you don't need to bother with any of this mess. Just get a RS232 RF interface module (http://www.radiotronix.com/ ?) and just hook it up to the computer. <waving hands furiously>
So I see...I did not have the VDIF file...on looking into it, it turns out that VDIF is the second generation firmware. I do not know if it will work with a first generation VNC1 since that would require port 1 to be a master as well.

I rarely see the need for PICs but in this case with the newer machines not having RS232, I would say that the choice should be based on price for the USB interface if you need the USB. I do not know about the bridges but I know most places want $50 for an RS232-USB bridge. Dan #### Sceadwian ##### Banned You're looking in the wrong places, you can find them for 15 dollars. #### cadstarsucks ##### Banned Sceadwian said: You're looking in the wrong places, you can find them for 15 dollars. Interesting.... I think I said that I have not actually priced them, but I might have neglected to... At that price it would not make sense to bother with anything...just connect it through. Dan #### CaptainObvious ##### New Member You can actually get some USB to TTL chips fairly cheap, but they're kind of hard to solder. One side is 1mm spacing, the other side.. is a little bit smaller, but it's solder pads cut in half. http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=380179064995&ssPageName=STRK:MEWNX:IT Anyways, they're about the size of your fingernail, and they have a driver to download to get it to work. (I can't solder as well as I thought.. so can't tell you if it works as expected or not) But yeah, I got the VDIP2 Module from Digikey for$29.50, after shipping and taxes it was \$38, and I paid a little extra for faster delivery. So far I'm.. so confused! lol I'm able to connect.. right now just through a USB-to-TTL converter from one of my Microcontroller boards (Arduino) and I can see the firmware when it starts up, as well as query the device and query the port.. just no idea how to do anything with it. I connected a mouse at first, I send SC 0 and it accepts, then I send DRD, it responds but with some weird characters I'm not familiar with! (btw, I set it in ASCII mode by sending IPA at the beginning.) I've also tried using a bluetooth dongle.. I'm able to get back like 30 bytes, but no idea what any of that means and how to use that data to use the dongle itself.

Last edited:
Status
Not open for further replies.