Total Pageviews

Wednesday, 22 August 2007

Drain Cam












I will try not to bore you all to much.

Well over the last few months our drain has backed up and required me to get the drain rods out to clear it through.

As you can imagine only minimal time is spent doing this task as you just want to finish and clean up.

During the summer shut down from work again the drain backed up, I felt wile trying to clear it this time the blockage seemed harder to shift than normal.

The blockage seemed about 9 - 10 meeter's down the line.

This gave me a position around the middle of the public footpath.

How was I going to see what if anything was wrong.

so I set to with the "Drain Cam" Project,

This consisted of robbing a second hand web cam off my daughter i had purchased from a car boot some months prior and wondering how i could get it 10 meeters down a drain pipe.

Challenges

1. web cam to large to fit in pipe.
2. No light
3. Length of USB cable ( half a meeter )
4. software because of the age of the web cam

Well last Friday when i finished work i decided to get stuck in and try to overcome these problems and get a £1.00 web cam to return a visual of the drain 10 meeter's underground.

Step 1
First thing i did was to spend 15 mins on the web looking for a suitable driver for this old cam.
what more can i say the web came up trumps as usual,

downloaded it, installed it to my main system ( Running xp to my son's disgust) ( could be worse VISTA ) I don't think so......

Anyway back onto the subject.

The display was a little poor given today's web cam standards but hay what do you expect for £1.00

so at least i knew it worked,

Step 2
Strip the cam down into its main component a PCB , lenses with attached USB cable.

Step 3
What to put it in?
After standing in the shed for 5 mins glancing at all the junk and thinking there is somthing in here there has to be, something caught my eye, don't laugh it was an empty no-nales tube that was still on my bench.

I know why was it not in the bin? Who knows but if it was well i may have had to stand in the garage even longer.

so i cut the Tube in half and just long enough to ensure the PCB and lenses would fit inside to protect it and be water resistant ish.....

Using the current hole that dispensed the old contents of the tube i opened it out to 15mm dia
this allowed the lenses to be pushed nicely into place from the inside of the tube.

This was a manual focus and required the end of the lenses to be turned to bring items into focus.

I pre-set the focal length to close items given the application it was gong to be used.


Step 4
Lights ? what to use ?
The USB line could supply 5V total with about 500ma.

I was nervous about the voltage drop over a 10m length cable that was home made, so i made decision to use torch bulbs 2 of them purchased from wilko's 59p each.

I also decided to run a separate cable to the bulbs and run the two 4.5v bulbs in series across a 9v battery.

So i had a PLAN !

Step 5
I drilled two holes either side of the CAM lenses just big enough to make the bulb a push fit into the tube.

First Error
On lightly forcing the bulbs into place, One broke ( Bugger ) the error was, i never purchased a spare.

I was so determined this would work i set off down town to get a new build and left my son shaun to take some pics of drain cam wile I was gone.

( guess what i now has a spare bulb because i purchased two this time, will i ever use it probably not.)

Anyway lights went in a treat and wired up nicely.

A quick connection to the 9v battery and result we have light.
Because the lenses is set back inside slightly it stops the glare i thought may be a problem being so close to the lenses.

Step 6
seal around the two bulbs and lenses with a small amount of "Blue Tack" i know this is not going to be waterproof to 1 foot let alone 100m. It was just to keep any splashes out of the electronics.

Step 7
I made the PCB secure in the tube by wedging some polystyrene down both sides.
this worked well.

step 8
How to seal the rear of the tube?
I know i could have filled it all full of silicone and it may have done 100m but i wanted to be able to change it if it did not return a clear enough pic. ( hard when sealed with silicone)

So I opted for a plastic bag and insulation tape and 2 cable ties to hold the USB cable secure on the outside of the Tube of the cam.

Looks naff but seems that it will work and who is going to care how it looks down that pipe.

Step 9
extend the cable what to use?
wile in
wilko's I settled for some 4 core bell wire at 14p per meeter.

This gave me the four wires needed to duplicate the four uses in the USB cable.

I had no idea if this would work 10m is long for a USB cable.

I cut the original USB cable and added 10m of four core bell cable in its place.

Step 10
Connected the cam to the PC, with fingers crossed, " A small ding noise " came from the computer and a message usb device found .

Great start !

Oh dear then followed by a message " device not recognised " The small red LED on the cam did not come on, this also indicated a problem.

:-(


Oh well you have to have some problems don't you.

I had a feeling we may have to change the cable type ( maybe speaker cable, Less loss in speaker cable )

But being on a high and the sun being out we continued

we cut about 1 meeter off the cable taking it to about 9 meters + the 1m std cable and tried again.

"Ding" (Device found) Red LED lit up and then the message ( your device is installed and reddy to use )

Bingo !! we had a result.

Step 11
Move Web CAM software to Laptop (sinking feeling) would we have a voltage problem on the laptop USB?

We had not tested with the Laptop.....

We plugged it in and luckily it all seemed to work fine but we must have been running on on the maximum limit with the length of the usb cable.

The picture would become dark and pixelate than then disconnect just after 1 min of being switched on.

Oh dear again the cable may have to change from the bell cable to speaker cable as we are unable to reduce it further or we would we to short see the possible fault.

Step 12
How to resolve the problem?

I asked shaun if he could try and get a cam driver for linux and use his laptop to try and see if it would resolve the issue, this was a long shot as we know the problem was defenetly down to the length of the cable.

But we hoed the flexibility of Linux may allow the signal gain to be increased or smething.

Shaun spent about 30 Mins finding some software that would support the cam and we ran the test again.

Bingo !!!!

Result Linux and open source software gave a better picture and no disconnections.

Linux has again given a better end result than windows.

We where off

Sorry No AVI files can be uploaded.

Drain collapsed 9.2m into drain pipe






No comments: