Link to home
Start Free TrialLog in
Avatar of DLJ
DLJFlag for United States of America

asked on

USB Web Cam linked 150 ft away via cable or network.

I am building an application VB6 to show the operation of a piece of equipment 200 ft away.  This web camera is mounted to show a drain and to show how the drain is operationing.  The operator can look at this before he leaves to go outside to check the drain.

I picked up the code at http://www.shrinkwrapvb.com/ezvidcap.htm

I need to take a usb device and read it from 150 ft away.  What is the best way to do this?  Can I convert it to an ethernet network, and convert it back to USB.  What is the best way to do this cheaply and effectively.  Wireless is not allowed.

Thanks
Avatar of Bawer
Bawer
Flag of Afghanistan image

if you cannot get a 150mt USB cable then try cutting the original USB cable and join it with another same type of cable, i mean the wires and test the functionality....
Avatar of DLJ

ASKER

Sorry, but I don't think that is possible.  A USB cable uses only 5 volts and is only recommended for up to, say, 20 ft.
Avatar of staplar
staplar

A device like this will do the trick works upto 330 feet:

http://uk.buy.com/pr/product.aspx?sku=215400657 
Avatar of DLJ

ASKER

I like this idea, but the cost is a little expensive for me.  But it gives me direction.  I am still looking, but this item from Amazon might work

http://www.amazon.com/Cables-Unlimited-Over-Cat5e-Extender/dp/B000NOAHS8/ref=sr_1_fkmr2_1?ie=UTF8&qid=1284253076&sr=8-1-fkmr2
The problem with USB, even the one you found, is distance.  USB is low voltage and low current, and you'd need something to boost and maintain the signal voltage to go that distance.  Even if you get it sort of working, you won't have very good performance.

I think at that distance, you'd be better off with something like this:
http://www.amazon.com/Video-9100A-Network-Server-Black/dp/B000HBVTCA

It's an IP-based video server that has a built-in web server generating JPG images for static or video content.  You can add a very inexpensive video camera (maybe $30 if you want to keep it cheap).  I have one and it works well.  You can still use your VB app to pull images or video from the unit using it's web address and it can be as far away as any ethernet connection.  Here's a link to someone that took it apart and explains the guts of the unit:

http://www.solivant.com/9100aplus/
Avatar of DLJ

ASKER

KB - It looks neat.  i have to figure out a way to display the image from a ip camera in a window on a VB form.  I have been searching and have not come up with an example yet.  I like your idea of using an ip camera - strikes me a pretty elegant, but I have to get some example or go by to do this.   I'm not familiar with IP but would like to try.

I have a Panasonic bl-c1 IP camera that I could work with.  Here is info on that

http://panasonic.net/pcc/support/netwkcam/download/us.html

Any thought where I can get an example?  It might be here

http://www.shrinkwrapvb.com/ezvidcap.htm

Thanks for your help.  This seems like a really good solution, if it is not beyond me.
I've looked a little at the manual for the  Panasonic camera you have.  Being that it is IP based, I think you can use your Panasonic camera if you want to do what I know is feasible with the video server I have (the 9100Aplus).  So far, though, I've only taken mine to the first step I wanted to do.  I created a simple web page to display the camera output on our Intranet.  The next thing I was going to do is place a browser control in a VB app and display it there, which should be easy enough.  But I won't be able to try that until tonight.

Basically, the way the video server I mentioned works is this: it has a URL that has the instantaneous snapshot picture it takes using any of the 4 possible cameras connected to it.  It's not high quality images though, maybe because of the camera I'm using.  In your case, the Panasonic may have better image quality because of the integrated and dedicated design.  But I think the concept would be similar.  Here's what I've determined so far.

Using the manual "BLC1A_20A_OI.pdf" on this page:
http://panasonic.net/pcc/cgi-bin/products/netwkcam/download_us/tbookmarka_m.cgi?m=%20&mm=2006062017180448

...page 25 shows what I think you'll need, the URL to pull just the images: "http://IP address (or URL):Port Number/mobile" where Port Number is 80 (default) or whatever you set it to.  I'll call that your "image address".  

From the manual, the web interface of the camera would be used to set it up the way you need it, and then you'd create a loop in VB to continually grab an image from that image address above and display it on a picture element on your VB form.  OK, so now how do you grab the image?  I haven't written mine yet, but I will try to get to it tonight.  Basically, it's this:

- example for VB6: http://www.daniweb.com/forums/thread136819.html
- example for VB .NET: http://www.xtremevbtalk.com/archive/index.php/t-280302.html

That's as far as I got.  I'll post my sample once I get it done tonight.
ASKER CERTIFIED SOLUTION
Avatar of kbirecki
kbirecki
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DLJ

ASKER

Thanks for your continued help with this.  I appreciate it.  I am demo-ing a prototype using the USB code today and will be looking at computer placement.  Maybe I can place the computer within 30 ft of the sewer and mount the monitor with a 30 VGA extension cable - I have had good luck with these cables.  I would be pleased to buy a ip camera and hub based on your recommendations.

Thanks
I have successfully implemented VGA monitor extensions to over 50 feet with video splitters from ATEN.  Just an fyi.
Avatar of DLJ

ASKER

KB did a good job trying to solve my problem and I feel that he deserves credit for a great effort.  I
Thanks!  What final solution did you settle on?
Thanks!  What final solution did you settle on?
Avatar of DLJ

ASKER

I did not settle on an answer yet, so I am still researching.  I figured you worked pretty hard on it, so you deserved full credit even if we did not come up with a solution.
Thanks again
OK, so sometimes finding a solution is a matter of asking the right question, or using the right search terms, and in this case, bouncing the ideas around enough to find what works.  I found this solution (https://www.experts-exchange.com/questions/21502420/Load-a-Web-Image-Into-a-Picturebox-VB6.html) and set it up with my IP Camera mentioned earlier.  It works great.  See the snapshot to see what it looks like running.  For the VB6 app, I added a little to the example in the other solution.  Create a form with a picture box, text box, command button, and timer.  Paste the code below and modify the IP address to point to the address of your Panasonic IP camera (I think you need to look at page 25 for the address you need.)

The rest of the code is pretty straight forward.  Thanks much go to eql1044 for this solution.
Const intDelay = 3000

Private Sub Command1_Click()
    Static bRunning As Boolean
    If Not bRunning Then
        Me!Timer1.Interval = intDelay
        'GetImage Me!Text1
        bRunning = True
        Me!Command1.Caption = "Stop"
    Else
        Me!Timer1.Interval = 0
        bRunning = False
        Me!Command1.Caption = "Start"
    End If
End Sub

Sub GetImage(URL As String)

    Set WinHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")

    Dim d() As Byte
    WinHttpReq.Open "GET", URL, False  ' Send the HTTP Request.
    WinHttpReq.Send
    Debug.Print WinHttpReq.Status & " - " & WinHttpReq.StatusText '200 means success

    Open "temp.gif" For Binary As #1
    d() = WinHttpReq.ResponseBody
    Put #1, 1, d()
    Close

    Picture1.Picture = LoadPicture("temp.gif")
    Set WinHttpReq = Nothing

End Sub

Private Sub Timer1_Timer()
    Me!Timer1.Interval = 0
    GetImage Me!Text1
    DoEvents
    Me!Timer1.Interval = intDelay
End Sub

Open in new window

Screenshot.jpg
Avatar of DLJ

ASKER

Wow - I can use this.  Thank you much

I'll let you know how it goes.