One-Pixel Wonder
Hugh Brown's single-pixel camera may look like something pulled out of the trash can, but it takes decent pictures and is simple to build.
These days you can pick up a decent quality image sensor for no more than a few dollars. Given how inexpensive they are, and how simple they are to incorporate into a project, there is really no need to try and roll one’s own basic imaging solution. But hackers are going to hack, and Hugh Brown is no exception to that rule. After being inspired by an Arduino-based single-pixel camera project, Brown set out to build a copy of it. And why not? Because as we all know, a single-pixel camera is very useful for … well, something or other. Probably, anyway.
Unlike the device that the inspiration was drawn from, Brown’s version was a bit more, shall we say, rustic. That is a great aspect of this build, however. Despite looking like something that was pulled out of a trash can, Brown’s camera works pretty well just the same. It goes to show that determination can be more than enough to get you over the finish line in building an electronics project — even if you do not have the skills to make it look polished.
A traditional image sensor has an array of photosensitive elements that capture a scene by measuring the level of light striking each element. A single-pixel camera, on the other hand, only has a single photosensitive element. As such, that element must be physically moved to collect light level measurements from many positions, which can then be stitched together into an image.
In Brown’s case, the sensor contains a single photoresistor wired into a piece of perfboard. This is enclosed by the tube from a roll of paper towels. At the end of the tube is a covering of aluminum foil that has a small hole poked into its center. These simple components are all it took to create a basic pinhole camera. For readout, the photoresistor was hooked up to an analog pin on an ESP32 microcontroller. Each pixel is read ten times, and all of the values are averaged to produce the final result.
The pinhole camera was mounted on a platform and base made up of scrap cardboard and plastic with zip ties and hot glue to keep it all together. A TG90 servo was used to rotate the base, which controls the X-axis. For movement along the Y-axis, there is an SG90 servo that moves the imager up and down. A PCA9685 servo driver interfaces the motors with the ESP32.
Software for the camera was coded in MicroPython, and it basically just methodically moves, one degree at a time, and captures light intensity measurements. These measurements are fed to a laptop and saved as a CSV file, after which they can be represented as grayscale images. These images are 90 x 90 pixels, and all around of pretty poor quality. But nevertheless, the images are recognizable, so this junkyard one-pixel camera was certainly a successful build.
Brown does intend to improve on the design a bit in the future, so be sure to check back in on the project at a later time to see what has become of it.