Building the worst digital camera ever
Digital cameras work by letting light through a lens onto a sensor composed of photosites, each with a photodiode that outputs a signal relative to the brightness of the light. Modern digital camera sensors have millions of photosites, each of which contains a microscopic photodiode. The number of pixels in the captured image is equal to the number of photodiodes. To demonstrate that concept, Electromechanical Productions used an Arduino to build “the worst digital camera of all time ever.”
Photodiodes alone can’t detect color, only brightness. Professional and consumer digital cameras incorporate color filters and algorithms to interpolate color. But in this case, the picture is black and white. This “camera” doesn’t utilize color filters and doesn’t even have a lens. It also only has a resolution of 8 x 6 — 48 pixels in total. Each of those photosites is a simple photoresistor, which is a component with a variable resistance proportional to the intensity of the light that hits it.
Electromechanical Productions used an Arduino Nano board to measure the brightness detected by each of those photoresistors. The Nano doesn’t have enough analog input pins to handle 48 photoresistors, so a series of multiplexer chips enable consecutive measurements. The measurement process is fast enough that this doesn’t have a negative effect here, since the picture quality is so poor anyway. After collecting the array of brightness values, the Arduino sends the data to a computer that runs a Python script to draw a grid of rectangles representing each pixel.
The resulting image is so poor that it is difficult to make out even the simplest shapes, but this is still an interesting educational project that helps to explain how digital cameras work. It would be possible to increase the resolution by adding more photoresistors, but there is only so much one can do with components of this size.