Alternative to the Pi
After the availability issues of the last 2 years Raspberry Pi has widely announced that they are “back”.
Unfortunately, for this project the Pi Zero W (and the new successor the Pi Zero 2 W) has returned to the market with a considerable price increase.
The base Pi Zero W now is anywhere between 17-25 euros with camera modules skyrocketing from 20 euros up.
Although the ~60 euro that you will spend on getting a decent base up and running is still relatively low cost, I started looking for alternatives.
Pi is still SBC King
When it comes to finding a single board computer competitor for the Pi: There simply isn’t one that can compete with their price point. (and community support)
https://www.makeuseof.com/what-is-the-cheapest-single-board-computer/
Although I very much appreciate the higher power and industrial new generation Pies, the niche that the Pi Zero filled had seems to have fallen by the wayside.
So if not a SBC, what then?
ESP32 Cameras
The ESP32 has been my go-to microcontroller for a while. It’s low cost and extremely versatile. There have been loads of comparisons done between it and the “new” Raspberry Pi Pico but the native wifi/BLE of the ESP32 is a massive advantage.
https://www.makeuseof.com/raspberry-pi-pico-vs-esp32-microcontroller/
In recent years several dedicated ESP32 camera boards have popped up on the market
https://makeradvisor.com/esp32-camera-cam-boards-review-comparison/
at prices from 9-20 euros (camera included) so I decided to invest some energy into investigating this as an alternative.
Criteria I have decided to study are:
- Image quality
- Sleep power draw
- Peripherals
AI Thinker ESP32-CAM
The first board that caught my eye was the AI Thinker ESP32-CAM and will be the board I will be reviewing in detail.
https://randomnerdtutorials.com/esp32-cam-ai-thinker-pinout/
https://docs.ai-thinker.com/esp32-cam
Right off the bat this looks great.
Small module, SD Card, 2MP camera and LED “flash”. These are peripherals that I would need for this project.
So let's review this against our criteria:
1. Image quality
The 2 megapixel OV2640 camera is probably not going to be good enough for the underwater environments, but doing some research has shown that the board is actually compatible with several other camera modules, including the 5MP OV5640, which might be good enough.
Previous tests with the Pi Cameras has shown that the difference between the 8MP and 12MP cameras are not that big and that the 8MP is good enough. Perhaps the 5MP will still suffice.
The board also matches the 5MP module pin to pin and using the OV5640 as a drop-in replacement seems to work well.
Below is the standard OV2640 (~60 KB file size):

Here is the OV5640, with a fisheye lens from the same distance (~408 KB):

As you can see it is a massive difference. Certainly the OV5 + fisheye lens is a great combo for landscape or security applications. It is for sure worth looking into alternative higher quality camera modules for compatibility. Below is my quick comparison of alternatives.
Comparing other camera module boards for compatibility:
Manufacturer | ESP32CAM | WaveShare | M5 Timer FLIP | M5 Timer |
Cam module | OV2640 | OV5640 | OV3660 | OV3660 |
MegaPixels | 2 | 5 | 3 | 3 |
ESP32 incl | yes | no | yes | yes |
USB incl | no | no | yes | yes |
SD Card incl | yes | no | no | no |
Price (EUR) | 11 | 18.17 | 20.5 | 20.5 |
Pin | ||||
1 | 2.8V | GND | ||
2 | GND | 3V3 | GND | |
3 | CSI_D2 | Y4 | SIO_DAT | |
4 | CSI_D1 | Y3 | 2V8 | |
5 | CSI_D3 | Y5 | SIO_CLK | |
6 | CSI_D0 | Y2 | RESET | |
7 | CSI_D4 | Y6 | VSYNC | |
8 | CSI_PCLK | PCLK | PCLK | PWDN |
9 | CSI_D5 | Y7 | HREF | |
10 | GND | GND | GND | 1V2 |
11 | CSI_D6 | Y8 | 3V3 | |
12 | CSI_MCLK | XCLK | XCLK | Y9 |
13 | CSI_D7 | Y9 | XCLK | |
14 | 3V3 | 3V3 | 3V3 | Y8 |
15 | CSI_1.2V | 1.5V | 1V2 | GND |
16 | CSI_HSYNC | HREF | HREF | Y7 |
17 | 1k | PWDN - GND | PWDN | PCLK |
18 | CSI_VSYNC | VSYNC | VSYNC | Y6 |
19 | CAM_RST | RESET | RESET | Y2 |
20 | TWI_SCK | SIO CLK | SIO_CLK | Y5 |
21 | CSI_2.8V | 2.8V | 2V8 | Y3 |
22 | TWI_SDA | SIO DAT | SIO_DAT | Y4 |
23 | GND | GND | GND | 3V3 |
24 | GND |
2. Sleep power draw
The ESP32 typically has great low power capabilities and are super easy to put to sleep. For this project I aim to sleep in the sub milliAmp range.
Power consumption measurements I have done show a sleep current of ~19.1mA and a peak current use (when the picture is taken) of 170mA - 195mA. This is of course too high.
But WHY is it so high?
First of all, the “FLASH” Led is connected to one of the SD card data lines, so it will be active more than desired. This can be rectified by simply removing/desoldering the LED.
Measurements with the LED removed reduced the sleep current down to 5.6mA and peak current to 140mA - 170mA.
So what is causing the rest of the current draw? Let’s look at the peripherals.
3. Peripherals
SD Card
The built in SD Card is fantastic to get from nothing to timelapse very quickly, but there are some very real problems here. First of all there is the old problem (discussed here before) of SD Cards actually being unreliable little power parasites if not managed well. In this case, the power to the SD card is never cut, so this is very likely where +5mA extra sleep draw is coming from.
Additionally, resources online state that the maximum storage that can be handled is 4GB. To test this I loaded the SD card with 2x 3.7Gb image files and ran it. It seems to work okay.
GPIO: There are no real GPIO pins available on this board except for one general use LED pin.
Conclusion
There is of course tons more testing I could have done, but this is how far I got. My honest conclusion is that the ESP32cams are great for cheap camera projects, but the price point comes with limited room for improvements. The "high" current draw and lack of extra IO out of the box is enough to ward me off from future projects. I am sticking with the Pi Zero!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.