home   articles   archive   forum   masthead  
Published at 5.10.2000
Author: Matthias Kranz
Translator: Andy Ziegler
Languages: de
Printer printer-version
Support Us!

An analoge camera for about EUR 60,-

Analog-Camera A few web-cams are working with Linux.
So what should be easier than building your web-cam yourself ...

Author: Matthias Kranz

1. Introduction

If you wanted to record from a video source, there would not be many choices: either a web-cam for the parallel port or an expensive analog camera (HI8 etc.) connected to your VIDEO-IN port of the TV card. USB web-cams do not solve the problem completely: since the kernel version 2.4, working USB support has existed for Linux but not all cameras are supported.

I always wanted a small "observation camera" which I can access from my Linux computer (Aim: to keep me from running 3 floors down to answer the door and it's just a man who wants to sell magazines).

Alternatives exist. At Conrad Elektronik (for example) camera modules exist. These send analog video signals which you can receive with the VIDEO-IN input on your TV card or modern graphic cards.

2. List of purchase

Before we start you need a few items:

Conrad Elektronik offers different camera modules. The price lays between EUR 25 for a b/w module and EUR 50 for a color module. Also camera modules exist which have an lens as big as a needle - ideal for a spy cam (costs EUR 100).

We chose a color module for EUR 50 with a resolution of 628 x 582 pixels in PAL (European TV) and 510 x 492 in NTSC (American TV). The sizes of the camera module are about 3x2 cm^2. The sheet of paper with the data, exact size and specifications of the camera can be downloaded

In addition you need a few capacitors and small items like a power supply with 1 2 Volt that automatically regulates itself.
Here you find the complete list for Conrad Elektronik - total costs about EUR 60.

  • 1 x Order number 190317 - the camera module
  • 1 x Order number 527769 - a map to solder
  • 1 x Order number 179205 - the voltage divider
  • 1 x Order number 188271 - the cooling block for the voltage divider
  • 2 x Order number 453358 - capacitors
  • 2 x Order number 460699 - mini-ELKOs
  • 1 x Order number 731510 - Chinch plug for the simple connection to the T V card

That is all.

3. Map to solder

A schematic showing how to solder the items is already included in the data sheet. But someone like me, who does not really know electronics cannot work with something like this. In the Conrad catalog I found a schematic for our camera (Module 3).

Here you find a sketch (The catalog is not really made for scanning it - the paper is too thin).

The following things have to be followed:

  • the two black ELKOs (Order number 460699) have to be set in a way that the positive pole is connected with the white bar. In the latest Conrad catalog you'll find a technical sketch for this element.
  • the tiny little capacitor (Order number 453358) does not care where the positive and negative pol is connected to - so I placed two black bars there.
  • the voltage divider has to be included correctly (it exists a description of the connectors in the Conrad catalog on page 941, otherwise you cannon regul ate the voltage from 12 Volts down to 5 Volts. However the camera module will ru n - but unfortunately only for 4 hours ... tears. From the front side, the side wher e you can read the text, the connectors are from the left to the right: Input, Mass, O utput.
  • the voltage divider really needs the cooling device. Saving the E UR 0.40 would be wrong.
  • at the camera the output one is PWR, the output 2 is GND and the output 3 is CVO (compare with the Conrad catalog).

On the following photos the map should become more clear.
Here you see our solution.

The main plate from the top

The camera module itself is smaller than my thumb

The camera with the power supply

That is it.
Before you test your new camera you should check with a proper device if any shorted connections exist where none should be. After finishing this, you connect the power supply (12 Volts) to the camera and put the end of the Chinch cable in the antenna input of the TV card.

If everything was soldered correctly we will see the picture of the camera. Don't forget to remove the lens cap on the camera module.

If you want, you could improve the map. You could see if the camera was turned on or not if you add a red LED. Therefore the special LED (Conrad catalog , order number 182427) is perfect. The LED has to be soldered before the camera mo dule (the connections 1 and 2 in our sketch)

Have fun with your new camera.

4. Way to use

Programs like Kwintv or xawtv can record the signals o the camera. I connected it to my Hauppauge WinTV card. You have to know that you plug the Chinch of the camera into the small gray adapter for the composite input - all other inputs do not work. In addition, you have to set the source to composite 1 in the program (xawtv or kwintv).

An other solution can be obtained with bttvgrab (can be got via www.freshmeat.net). Here you have the web-cam option. You can automatically transmit the picture to your web-server via FTP if you used ncftpput (which you also get from www.freshmeat.net). Important: The config file of ncftpput must not be visible for anyone else than the user himself because it contains the user name and the password on the web-server in clear text.

My solution is not the best, but it works. I use two scripts: webcam-on and webca m-off. What they do should be clear.

   echo "an" > /tmp/camera-status
   set-tv camera
   echo "Tuner to Composite1";
   # nohup bttvgrab -f file:/tmp/webcam1.jpg -s 10 -w 200 -o jpg -Q -g /tmp/videolog &
   while (test -e /tmp/camera-status) 
   echo "Camera on - pictures are send";
   nohup bttvgrab -f file:/tmp/webcam1.jpg -l 1 -s 1 -w 200 -o jpg -Q -g /tmp/videolog &
   sleep 3
   cp /tmp/webcam1.jpg /tmp/webcam.jpg
   sleep 3
   sleep 3
   echo "Camera off - transmission stop";


   if (test -e /tmp/camera-status)
   then {
   rm /tmp/camera-status
   sleep 10 
   cp /tmp/webcam-offline.jpg /tmp/webcam.jpg
   echo "Camera off - transmit picture or off-status";
   else {
   cp /tmp/webcam-offline.jpg /tmp/webcam.jpg
   echo "Camera was off";

Now the pictures are automatically put to the web-server. Have fun with it!

5. Documentation

  • Latest Conrad catalog pages 880, 881, 941ff
  • man ncftp
  • man ncftpput
  • man bttvgrab
  • man xawtv
  • man kwintv

6. Acknowledgments

I want to thank Jan. He had the idea to build a camera and he soldered the items. Without him, this article would not exist. Thank you, my old friend!

This article bases on a text written by Matthias Kranz. Other texts by M. Kranz and Jan Thiele can be found on their homepage http://www.price-of-freedom.de

Talkback Area

Enter Own Comment