
Micro Camera
This project uses a very small ESP32-S camera module that costs about ten dollars. It has an OV2640 camera sensor plus several GPIO pins to connect peripherals. There is also a microSD card slot, which makes it much easier to store photos. Power comes from a 100mAh LiPo battery with a charging module. Pressing the photo button takes a picture, while holding it for one second toggles the flash on or off.
Challenges
Saving photos
Saving pictures to the SD card was not straightforward. The system could not remember file names between power cycles. Every time I turned it on, the first picture I took would overwrite the first picture from the last session. To get around this, I started giving each photo a random index between 1 and 10,000, which made it unlikely for one photo to replace another. I tried reading the files on the SD card to figure out which index to use, but that approach did not work. As a result, the files on the SD card are saved in a completely random order.
Image quality
Getting the resolution right was also difficult. Higher picture quality needed longer exposure times. The resolution could get much higher but this means the camera has to stay completely still, since even a small movement would make the photo blurry.
Fitting everything
Packing all the components into the enclosure was another challenge. Every wire had to be placed just right for it all to fit. This version is the fourth revision of the 3D printed case. The print quality is not ideal because the filament I used was waterlogged.