Solved

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

Posted on 2010-09-11
16
745 Views
Last Modified: 2013-12-14
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
0
Comment
Question by:DLJ
16 Comments
 
LVL 10

Expert Comment

by:Bawer
ID: 33654500
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....
0
 

Author Comment

by:DLJ
ID: 33654592
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.
0
 
LVL 2

Expert Comment

by:staplar
ID: 33654881
A device like this will do the trick works upto 330 feet:

http://uk.buy.com/pr/product.aspx?sku=215400657
0
 

Author Comment

by:DLJ
ID: 33655261
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
0
 
LVL 11

Expert Comment

by:kbirecki
ID: 33657489
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/
0
 

Author Comment

by:DLJ
ID: 33658613
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.
0
 
LVL 11

Expert Comment

by:kbirecki
ID: 33661187
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.
0
 
LVL 11

Accepted Solution

by:
kbirecki earned 500 total points
ID: 33661589
I forgot to mention that I did also look at the http://www.shrinkwrapvb.com site you mentioned and pulled down the sample VB6 code.  It works for my local USB camera, and it works well.  But I think that is primarily for USB camera's because it uses VFW.  I'm not sure if it can be used for IP based camera's.  And you'd probably have a hard time getting in touch with the developer since that site seems to not have been touched in over 10 years.  (It's nice that it's still running, though.)

I found some other sources of related info that I am sifting through that I'll post shortly.
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:DLJ
ID: 33663216
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
0
 
LVL 11

Expert Comment

by:kbirecki
ID: 33663302
I have successfully implemented VGA monitor extensions to over 50 feet with video splitters from ATEN.  Just an fyi.
0
 

Author Closing Comment

by:DLJ
ID: 33692495
KB did a good job trying to solve my problem and I feel that he deserves credit for a great effort.  I
0
 
LVL 11

Expert Comment

by:kbirecki
ID: 33693075
Thanks!  What final solution did you settle on?
0
 
LVL 11

Expert Comment

by:kbirecki
ID: 33693077
Thanks!  What final solution did you settle on?
0
 

Author Comment

by:DLJ
ID: 33693806
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
0
 
LVL 11

Expert Comment

by:kbirecki
ID: 33696544
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 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_21502420.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
0
 

Author Comment

by:DLJ
ID: 33696565
Wow - I can use this.  Thank you much

I'll let you know how it goes.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

    Over the past few years, small business and home owners have become so dependent on internet that a need for redundancy has arisen.    What happens when your small business or home / home office loses its internet connection?  The results c…
This solves the problem of diagnosing why an internet connection is no longer working. It also helps identify the likely cause of the lost connection if the procedure fails to re-establish your internet connection. It helps to pinpoint the likely co…
This video teaches viewers how to process images for a time-lapse video. Programs required: Adobe Lightroom, Adobe After Effects, Video Editing Program. In Adobe Lightroom: Import sequence image files into Adobe Lightroom: Develop settings of an I…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now