Removing IR Filter From ESP32-CAM, Part II

**UPDATE (2020-05-08): I did a little bit of math and realized I was only running the IR illuminator at about a quarter of a watt. After a bit more poking around and squinting at part numbers, I’m pretty sure it can run at almost 10x the power. I will look into this further sometime soon.**

Shortly after my previous post on removing the IR-cut filter from the OV2640 camera that comes with the ESP32-CAM, I put the ESP in a safe place… so safe that I lost it.

I found it again a couple of days ago and finally got to tinkering with it this evening, with the plan to see how well it worked in the dark.

I changed the following settings from the defaults for all of the pictures taken with the ESP in this post:
– Frame size: 1024×768 (XGA)
– Gain ceiling set to 3
– Special effect set to 2 (greyscale)

Without the filter, the colours were all wrong and it was a little harder to focus. This is normal but a little annoying, so I set the image to greyscale. Here’s the first image I took, looking at the bird feeder as the sun was on its way down on the other side of the house:

ESP32-Cam with no IR filter
I tried to set the focus at where the bird feeder is. Not sure if I was entirely successful…

It’s not too bad. Things look a little weird – the trees, sky, and grass all look like they’re from a really cheap dream sequence. Two hours and fifteen minutes later, the sun had set but there was still plenty enough light for the camera:


Twenty minutes later, the streetlights were all on, there was very little glow in the sky, and the image started to get pretty noisy:


Another 25 minutes and it was dark:

The bright dot is a light the next block over

So, with ambient light in the suburbs at night, the ESP32-Cam isn’t a stellar performer. This is not a high-end CCD rig.

I have a couple of inexpensive little IR illuminators but they’re so inexpensive that they didn’t come with specifications and I can’t find datasheets for them. I ended up using an LM317 to limit the current to about 125mA. I’m pretty sure they can go higher but figuring out how high is a project for another day.

IR Illuminator
Yep, one of the many, MANY illuminators out there that look just like this.

Here’s what that thing running at 125mA did:

Well, I can see… something. Not much, though.
After shining it around to find the best angle, I can juuuust make out where the bird feeder hook comes out of the ground.
Yep, it’s definitely on…

Not so good. Or… was it not too bad? It’s not like I went out there with one of those 400 LED yard illuminators – this was a single diffused LED that’s pulling just over half a watt. Maybe I should revisit this with something that puts out a little more oomph.

The next thing on my list to check was how well it worked indoors. To test this, I put the camera and illuminator at one end of a hallway, closed the door, and turned off all the lights. My phone picked up a bit of light under the door at the far end of the hall, about 12 feet away:

Dark hallway with phone

And here’s what the ESP saw:


And with the same illuminator (at the same power) turned on:

You can even see the yellow sticky note I put on the door. Can’t see the smiley on it, though.
My shirt is black under normal light.

Having the IR confined to an area where it can bounce around and not just be lost to the night makes a big difference. With a better (or more than one) source of IR, the ESP32-CAM may well make a decent indoor night camera. Tweaking some of the camera settings may improve things, too.

So… not the best performer, but for the cost (I think I paid nine dollars for this particular one, camera and all) and the sheer number of features that the ESP32 series has, I find it a pretty attractive little device.

I think the next ESP-ish things I want to look at are getting some pictures of the animals that wander through the yard at night, and maybe trying this particular experiment again with a bigger/better IR illuminator.

6 thoughts on “Removing IR Filter From ESP32-CAM, Part II”

  1. Very helpful posts thanks. I have now also removed the IR filter from mine following your instructions and will be using it in a bird box with some IR illumination. Good news is I didn’t break it either!

    1. Hi Bruce – thanks for the comment!

      Sorry for the delay in replying – I’m glad to hear that things are working well. Good luck with the bird box camera!

  2. “Without the filter, the colours were all wrong and it was a little harder to focus.”

    Would be cool to see if it can do IR daytime photography, if you use a filter that lets in 750nm+ light and filters out visible light you can get some interesting looking scenes. Black skies and white leaves on trees. It’s something I’d like to try with an ESP32-CAM but just starting out experimenting with electronics.

    1. Hello Niall, thanks for the comment!

      That would be cool – I don’t have any filters like that on hand, unfortunately, but I think I read somewhere that people in agriculture and plant biology use setups similar to what you described to keep an eye on plant health.
      Good luck with your new hobby, electronics can be very rewarding and handy!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.