Back to the diary

When I experimented with the sensor tube, which I am using for the Galleryzone lasers, I pointed on different things in my workshop and outside the window, with that tube. Because of the built in laser, I could see very well, what I am pointing onto. At the same time, I was watching the ohm-meter to measure the resistance of the LDR inside the tube. And I found out, that I get very precise brightness values of the materials I am pointing at.

That brought me to the idea to build a quick hardware hack: The one pixel digital camera. To rebuild it, you don't need the laser. You only need a black tube with an LDR at the end. The image will get sharper, the longer and thinner that tube is. Mine was 20cm long and the diameter inside was 14mm. (In fact, this is nothing else, than a very basic pinhole camera.)

Here's again one picture of the tube, that I used. Inside, it is coated with black velour.


Because my camera did not have a megapixel ccd sensor, but a 1/1000000 megapixel light dependant resistor, I had to find a way to get the brightness values of some more pixels, surrounding the one that I am actually photographing.

So, I've built a very quick cardanic construction out of two potis and an angle bracket. On the upper poti, which detects the y-axis, I've glued a construction which holds the tube. I fixed the whole construction in a vice.

With that construction, I could automatically detect the x- and the y-position, where the tube points to.


Another picture of the cardanic device:


And a last one:


Here is a simple plan, how I constructed it. If you want to rebuild it, you might want to use a 100kOhm trimmer instead of the 10kOhm resistor. With that, you could adjust the brightness of the camera.

What you will also need, is a microcontroller to read out the voltages with three analog digital converters and you'll have to transmit them via RS232 to a PC. A basic code could look like this:

   readadc 1,xaxis
   readadc 2,yaxis
   readadc 3,brightness
   print xaxis;yaxis;brightness
goto loop


After that, you'll have to write a program on the PC to print the image on the screen. Depending on the syntax of the language that you use, a simple code could look like this:

   input xaxis
   input yaxis
   input brightness
   point (xaxis,yaxis,brightness)
goto loop

Since the data won't be synchronized, you will have to switch the camera on and off for several times until the computer reads the right values, which are intended for the right variables. (This could be improved easily with some more lines of code.)

However, this was how my code looked like and below, you can see the first picture, that I took. Red pixels are positions, that I did not scan. As you see, you don't see a lot. I had the laser switched on all the time and the light gray pixels are, where the laser pointed onto retro reflecting foil. Well, this was the useful part for me, so I could see, that the laser delivers very different values, when it points on that material. The value is even much higher than pointing directly into a light bulb or outside the window.


After a gamma correction in photoshop, the gray pixels really turn into something like a photo. The quality of the image reminds ma a bit to the quality of the first heliography of Joseph Nicéphore Nièpce (wikipedia article about him), because you can only understand his and my picture, if you already know, what is shown on it.


Here I've stitched some "normal" digital camera images to show what I've actually photographed:


Even if one could say, that the quality of the camera is quite bad, it has two very interesting features:

1st - The contrast range of the LDR is far higher than the contrast range of a normal ccd sensor.

2nd - Due to the wide range of the potis, the camera has an angle of almost 250° in any direction (I just could not scan the pixels which were very high or very low, because the tube hit the table, then.)

It should be also very easy to improve the camera:

- Three LDR's with red, green and blue gels in front of it would make it a color camera.

- Stepper motors or RC-servos would automate the scanning process. (In fact, my first test setup used two servos, but I found out that one was already damaged and I damaged the other one during a first test.)

At the end, I can recommend you to have a look at the video, that I've made about the camera. And because I thought, that this video without any sound could get a bit boring, I've put some music under it from a Gangsta rapper from Aachen, Germany. The title of his song is "Fickt Euch", which means "Fuck You" in English. I also found out on his webpage, that he is a real criminal, because he has robbed a gas station already.


Back to the diary

Creative Commons License

Please note, that the content on this webpage is licensed under a Creative Commons Attribution 2.0 License. Please respect the copyright of other webpages' content, which are linked from this webpage.