Pages

12/11/2019

Can you use an ESP32-CAM module like a standard ESP32?

I've recently been experimenting with detecting if my flat is occupied using Bluetooth Low Energy (BLE) Trackers attached to my wife and I's keys in order to trigger various smart home "scenes". There's been trials and tribulations, but after trying various methods I've managed to get arrival detection down to pretty much instantaneous, and detecting someone leaving to below than 60 seconds, which I'm pretty happy with. After initially trying to do the detection with a Raspberry Pi, I quickly moved onto to an ESP32 based solution as the software on the Pi would frequently crash.

One thing I discovered fairly early on was now and then a BLE tracker would "disappear" for a brief period, usually a minute or two. I wasn't able to figure out the cause but put it down to interference or a collision, but the work around was to have multiple ESP32s receiving the beacons and aggregate the results. For my modest flat I'm currently using 3, although I could probably get away with 2.

A recent update to the ESPHome BLE Tracker has significantly reduced these disappearances but they still happen now and then. In a bid to eliminate them all together, I started to wonder if an external antenna would improve reliability. After looking around online it became apparent only a small number of ESP32 dev modules had an antenna connector, and they were hard to come by and fairly expensive.

But wait... what are these ESP32-CAM things? They're cheap, readily available and have an antenna connector which can be selected by switching the 0 ohm resistor to the second position. I bought one without doing much research (obviously) and it turned up last week.

ESP32-CAM Module
Anyway, I digress. I should really cover the BLE detection in another blog post so watch this space. If you want to find out if the ESP32-CAM can be used like a standard ESP32, click read more...