Over the years I've connected all sorts of sensors to Arduinos and ESP32 boards, but I've almost never built a project where a camera is the star of the show. A vision system that reads the world through a lens is a very different thing from a temperature sensor, and I wanted to finally try one properly.
So I picked up the DFRobot DFR1154, a smart AI camera module with an ESP32-S3 on the back. I tried it three different ways. First I flashed a simple camera web server through the Arduino IDE, then I connected it to Home Assistant with ESPHome, and finally I installed a custom firmware from the community that adds motion and person detection right on the board.
This video is sponsored by Altium Develop. Get your free trial here.
A Closer Look at the Module
The camera sits on a small ribbon connector at the front of the board. Around it there are four infrared LEDs that can light up the scene when it gets dark. Next to them there is a small ambient light sensor, which the board uses to measure how much light is around it. There is also a microphone, because DFRobot sells this as an edge image recognition, night vision and voice interaction module, so you can pair it with AI for voice commands.
On the back there is a USB connector for programming and power, and an external power input that accepts anything from 3.7 up to 15 volts. There is a slot for a microSD card so you can store photos and clips and a connector for a small speaker, which also comes in the box. You also get a boot button and a reset button, plus a connector with TX, RX, ground and 3.3 volts for the Gravity series devices from DFRobot. Those serial pins are GPIO 43 and 44, so you could use them to power and control something else from the camera.
The module comes with a protective cover so you don't damage it while handling it.
What DFRobot Promises
The product listing opens with a video and a set of pictures that show what the board can do. DFRobot suggests running models on the board itself for object recognition, or pairing it with ChatGPT to describe what is happening in a scene. With the infrared LEDs it should also handle low light well. It has Wi-Fi and Bluetooth LE 5, so you can talk to it in a few different ways.
The features list mentions edge image recognition, OpenCV, YOLO support and ChatGPT integration. The suggested uses are an electronic peephole, license plate recognition, a robot toy and smart glasses. I'm not sure about the smart glasses, though, because the board is 42 by 42 millimeters and that's a bit big to hide on your face.
The camera itself is a GC2145, a 2 megapixel sensor with a very wide 160 degree field of view. The board runs on 3.3 volts internally. The rest of the specifications are on the product page, and the product wiki has a set of example projects you can flash to get started.
Test One: The Arduino Camera Web Server
Flashing the Example
For the first test I opened the camera web server example from the DFRobot wiki in the Arduino IDE. I selected the ESP32-S3 module as the board, since that's the chip on the back, picked the COM port and pressed upload. After a few minutes it was done.
When I opened the serial monitor and pressed reset, I got an error. One line in the sketch was commented out by default, so I fixed it and uploaded again. This time the serial monitor stayed empty, and after another reset it complained about a configuration issue.
The Settings Nobody Mentioned
It took a bit of debugging to get it running. I had to enable USB CDC on boot so the serial output comes through the USB port. I changed the flash size to 16 megabytes, because the default was 4. I also had to select OPI PSRAM, which is the type of extra memory on this board. Everything else stayed on the defaults.
None of this is mentioned in the documentation, which is a shame. Still, it was fairly easy to work out from the error message, and an LLM helped me get there quickly. If you hit the same problem, those three settings are the ones to check first.
Connecting to Wi-Fi
With the right settings, the firmware started and told me it had no Wi-Fi credentials. It asks for the network name and then the password through the serial monitor. I typed both in, it connected, and it printed an IP address.
Trying the Web Interface
Opening that IP address in a browser gave me the familiar ESP32 camera page with all of its controls. I started the stream and could see myself and the camera I was recording with. The picture was rather sketchy and the preview stayed small even when I switched to HD.
The page lets you change contrast, white balance, night mode, lens correction, mirroring and flipping, and the quality setting. There is also a slider for the infrared LED brightness. I couldn't see the LEDs light up with my eyes or through the camera, because there seems to be an infrared filter in the way. I could only tell they were on from a reflection on my camera lens that disappeared when I stopped them.
There is a big advanced section too, but I'm not a camera expert and I understood maybe ten percent of it. I also couldn't get a proper still image. The saved image was just a screenshot of the small preview window. So this test at least proved the camera works, but it wasn't something I would trust for a real project.
Test Two: ESPHome and Home Assistant
Updating the Configuration
DFRobot's documentation has an ESPHome example that walks you through the setup. The problem is that it was written for an older version of ESPHome. These days the ESP32 camera is part of the standard ESPHome library, so you don't need the external components the guide adds.
The guide also misses one important setting. You need to tell ESPHome about the PSRAM on the board, so in my configuration I set it to octal mode with a speed of 80 MHz to match the hardware. The camera section itself stayed the same as the provided example. I've provided my full configuration below so you can copy it.
ESPHome YAML Configuration
psram:
mode: octal
speed: 80MHz
esp32_camera:
name: My Camera
external_clock:
pin: GPIO5
frequency: 20MHz
i2c_pins:
sda: GPIO8
scl: GPIO9
# data_pins: [GPIO4, GPIO6, GPIO7, GPIO14, GPIO17, GPIO21, GPIO18, GPIO16]
data_pins: [GPIO16, GPIO18, GPIO21, GPIO17, GPIO14, GPIO7, GPIO6, GPIO4]
vsync_pin: GPIO1
href_pin: GPIO2
pixel_clock_pin: GPIO15
# reset_pin: GPIOXX
resolution: 640x480
jpeg_quality: 10
brightness: 2
Seeing the Image
Once I added the device in ESPHome, the camera showed up in Home Assistant as a camera entity, and I could see myself through it. The quality wasn't great, and for some reason the image was mirrored. When I pointed it at my power supply, the writing was the wrong way round and the left side showed up on the right.
Even so, this worked a lot better than the Arduino example. From here you could wire up the LEDs and the camera settings as controls inside Home Assistant.
Test Three: The Custom Firmware
Installing It
The part I was most curious about was a custom firmware on GitHub by the user PeterkoCZ91. It was built specifically for this module and supports the light sensor, the PDM microphone and video streaming. It can also work together with a Raspberry Pi for more advanced processing, but I used the ESP32 on its own.
The project uses PlatformIO, so I followed its quick start, compiled the firmware and uploaded it. On first boot, the camera creates its own Wi-Fi access point. I connected to it with my phone, entered my home network details, and from then on it joined my network.
The Web Interface and Stream
The firmware has a nice little web interface that shows the camera's status and conditions. I didn't have an SD card inserted, so saving to the card wasn't available, but the stream page worked. It was blank while I was screen recording, so I fed the stream into my recorder directly. The image was the right way round this time, a bit dim, and a little slow.
Lowering the resolution made it much smoother. When I opened the stream in a normal browser without recording, it ran even better and the picture looked a lot nicer. I think my recording setup was part of the slowdown.
Night Vision
To test low light, I turned off the lights on my desk. The page noticed it was getting dark, and after a short while the infrared LEDs switched on by themselves. In the stream I could see the details of a board in front of the camera. It wasn't crystal clear, but I'd call it a usable image, especially if you want to run detection on it. When I turned the lights back on, it switched back to day mode and adjusted its settings again.
What Else It Can Do
The status page shows the camera's parameters, and one interesting reading is the temperature. It said the module was running hot, and when I touched it with my finger it really was. There are tools to take a snapshot, browse files, read a JSON status with health information and debug the motion detection. You can also see RAM usage and listen to the audio stream from the microphone, which worked but had a very large delay.
In the settings you can choose the output resolution, flip the image, adjust the picture, and set auto exposure. You can connect a Telegram bot so the camera sends you a photo when it sees movement, and there is an onboard model that analyses the frame and messages you when it detects something. It can also record clips to the SD card.
Connecting to Home Assistant with MQTT
Setting the Credentials
My favorite feature is that this firmware can connect to Home Assistant over MQTT. I pointed it at my Home Assistant server on port 1883. The catch is that there is no field in the web interface for the MQTT username and password. To set them, you send a curl request to the camera's credentials API endpoint with the username and password. After that you reboot the camera, and once it comes back up it appears in Home Assistant.
Motion and Person Detection
In Home Assistant you get a live brightness reading, a motion score, heap memory, uptime, a motion detected flag and a person detected flag. When I moved the camera around in my hand, the motion percentage jumped and motion detection triggered. With the camera pointed at me, it reported a person detected.
I then left it on the bench looking at the underside of my monitor stand. After a while the person detection cleared. It still reported a small amount of motion all the time, which I believe comes from small changes in the lighting that it sees as flicker. So you will need to tune the thresholds for your own setup. When I put my hand in front of the lens, the motion percentage went up and it said a person had been detected. I'm not sure if it really recognized the hand or just reacted to the movement, but it clearly noticed something was there. The stream was a bit buggy at times, though the data in Home Assistant kept up.
Conclusion
I had a lot of fun playing with this module. The Arduino example needed some hidden settings and wasn't great, ESPHome was a solid step up once the configuration was updated, and the custom firmware turned it into a proper little smart camera with night vision, motion detection and Home Assistant integration. This opens up plenty of project ideas where you need to act on what a camera sees, like a robot that avoids obstacles or a device that recognizes objects or patterns.
If you have an idea for what I should build with this camera next, let me know, and subscribe to my YouTube channel so you catch the next project when it lands.
Links And Resources
- DFRobot DFR1154 ESP32-S3 AI Camera Module
- FireBeetle 2 ESP32-C6 IoT Development Board
- UNIHIKER K10 AI Agent Coding Board
- Romeo ESP32-S3 Robot Development Board
- Beetle ESP32 Mini Wearable
Learning Resources
- DFR1154 Product Wiki and Examples: https://wiki.dfrobot.com/dfr1154/
- DFR1154 Custom Firmware by PeterkoCZ91(GitHub): https://github.com/PeterkoCZ91/DFR1154-ai-camera