DIY / Build your own camera ambilight
Build your own camera ambilight

This guide takes you from the parts to a working ambilight. A small camera films the TV and works out the colours at the edge of the picture. An LED controller uses them to light an LED strip behind the TV and, if you like, Philips Hue lights as well. Because the camera sees the finished picture, it works with any source: smart TV apps, console, receiver or projector.
Status: this guide describes firmware 0.5.234 of 2 December 2026 and the new AmbiBack interface. I tested the firmware on my own hardware; the modes and the colour test work. Automatic corner detection and Philips Hue straight from the firmware are not yet confirmed on hardware, and the interface has so far only been tested with simulated devices. I have not yet rebuilt the whole setup from start to finish with this version. Expect differences and let me know where you get stuck. There is no product support.
How it works
- Camera (M5Stack Timer Camera X): sits opposite the TV, runs in camera mode and works out the colours for each side from the picture. It sends them over Wi-Fi to the LED controller, using UDP or TCP on port 1337.
- LED controller (M5Stack Atom Lite): sits behind the TV and drives the LED strip. As soon as colours arrive it switches to video mode by itself. It also passes the colours on to Philips Hue. The camera itself cannot drive Hue.
- The LED layout belongs to the Atom Lite. The camera fetches it from there, so you set it only once, on the LED controller.
For Hue alone you still need the Atom Lite, just without an LED strip.
What you need
| Camera | M5Stack Timer Camera X, plus a USB-C cable and a USB charger |
|---|---|
| LED controller | M5Stack Atom Lite. Do not take the AtomS3 Lite, there is no firmware for it. |
| LED strip | WS2812B at 5 V, for example with 60 LEDs per metre, up to 255 LEDs |
| Power | 5 V power supply sized for the number of LEDs (rule of thumb below) |
| Connections | Grove cable for the Atom Lite, lever connectors (WAGO 221), LED connectors |
| Optional | Philips Hue Bridge and Hue lights, 3D-printed holders for camera and Atom Lite |
| For the setup | a computer with Chrome, Edge or Opera, a USB data cable, a 2.4 GHz Wi-Fi network and a phone or computer on the same network |
Specific products are on the parts list, cases and holders in the 3D print files.
How many LEDs? Measure the sides of the back about 3 to 5 cm inside the edge. At 60 LEDs per metre, a 55-inch TV with a back of about 1.15 × 0.6 m needs around 69 LEDs at the top and 36 on each side. You can leave out the bottom if a stand sits there.
Power: a WS2812B LED draws up to about 60 mA at full white, so 150 LEDs need up to 9 A. Choose the power supply accordingly and feed long strips at several points. The camera gets its own USB charger.
1. Flash the camera
The quickest way is the AmbiBack Web Flasher, right in the browser. If you want to build the firmware yourself, use the AmbiBack USB Flasher for Windows.

- Connect the camera to the computer with a USB data cable.
- Open the Web Flasher and pick the device AmbiBack M5Stack Camera Timer X (Norm/Wide) OV3660.
- Keep the newest version, press Install firmware and choose the USB port.
- After flashing the camera restarts. Enter your Wi-Fi name and password. The ESP32 only works with 2.4 GHz networks.
- Note the address the Web Flasher shows once the camera is online. Otherwise you find it in your router's device list.
If the camera does not respond while flashing, some camera boards need boot mode by hand. How that works is on the Web Flasher page.
2. Flash the Atom Lite
Same as for the camera, only with the device AmbiBack M5Stack Atom Lite. Set up Wi-Fi straight away here too and note the address. Then disconnect the Atom Lite from the computer.
3. Connect the LED strip
- Unplug the power supply.
- Stick the strip all the way round the back. It starts at one corner, and the arrows on the strip point away from the start. Remember the corner and the direction.
- Wire it as shown in the table. The Atom Lite also takes its power from the 5 V supply, and ground is shared by all.
| +5 V | power supply, LED strip and Atom Lite |
|---|---|
| GND | power supply, LED strip and Atom Lite, shared |
| LED data | GPIO 26, the yellow wire of the Grove connector, to the data input of the strip |

The firmware sends the colours in GRB order, as usual for WS2812B. There is no setting for other orders.
4. Set the LED layout on the Atom Lite
- Switch on the power supply and open
http://<atom-address>/uiin the browser. The device loads the full AmbiBack interface and connects with no further input.http://<address>/is the simple page served by the device, which also works without internet. - The wizard starts by itself the first time. Give the device a name, for example “Living room LEDs”.
- In the LEDs step enter the number of LEDs at the top and on the side, tap sides without LEDs and tap the corner where the strip starts.
- Check sides lights the sides white one after the other. If the wrong side lights up, the corner or the direction is wrong.
- In the Target step keep This device drives the LEDs. Finish with the Colour test: the LEDs must light up in the colour you pick.
5. Place the camera
- The camera sits opposite the TV, for example on a shelf or by the sofa, and sees the whole screen with a little margin. The straighter the view, the better.
- It runs from a USB charger and needs less than 1 watt.
- There are holders for camera and Atom Lite to print yourself, including a ball mount for the Timer Camera X.

6. Connect the camera to the Atom Lite
- Open
http://<camera-address>/ui. The wizard starts with the name again, for example “Living room camera”. - If the picture is upside down or mirrored, correct it in the Camera step. Do not let it find the corners yet.
- In the Target step pick the Atom Lite. The camera looks for other AmbiBack devices on the network. It then shows Sends to and the name of the Atom Lite. Later you find this under TV → Connection → Colours go to.
- Set the mode under Light to Camera.
On the camera's simple page this is Camera → Send to with the button Search LED controllers. UDP is fine as the connection.
7. Set the corners of the TV
For the camera to know where the picture is, it needs the four corners of the screen.
- Automatically: darken the room, press Find corners automatically at the camera picture under TV and do not move the camera. The LED sides light up one after the other, the camera compares the pictures and finds the edges of the TV from them. This takes about 20 seconds, at most a minute. If a side is missing, it is estimated. The target from step 6 must be set for this.
- By hand: drag the four points in the camera picture onto the corners of the screen. This always works and is the way to go if the automatic search fails.


Screenshots use a simulated device. Automatic corner detection is not yet confirmed on hardware.
If the search reports that the TV is not completely visible, realign the camera. Swapped sides point to a wrong start corner or direction in step 4.
8. Add Philips Hue (optional)
Hue runs through the Atom Lite. The firmware uses the Hue Entertainment API and creates its own entertainment area “AmbiBack” with the device ID.
- Open the interface of the Atom Lite from the device (
http://<atom-address>/ui). From the HTTPS address on GitHub the browser often cannot talk to the Bridge. - Under Device → Philips Hue enter the address of the Bridge or let it search.
- Press the round button on the Bridge and tap Pair within 30 seconds.
- Pick the lights and tap, for each light, which picture area it takes its colour from, for example left and right for two light bars beside the TV.
Philips Hue straight from the firmware is not yet confirmed on hardware. So far AmbiBack PC has been tested with a real Hue Bridge.
9. Fine-tuning
| White balance | under TV → Picture and exposure. Default, Cloudy and Sunny usually fit. |
|---|---|
| Flicker | set flicker detection to 50 Hz if the room light flickers |
| Frame rate | 20 to 50 frames per second. More looks smoother. |
| Brightness and colours | under Light: brightness, luminance, gain, colour strength and motion |
The page on the AmbiBack interface explains the individual settings.
Problems
| The Web Flasher finds no port | Try another USB data cable and another port, on Windows install the CP210x or CH340 driver. More on the Web Flasher page. |
|---|---|
| The device does not join Wi-Fi | Check name and password. Only 2.4 GHz networks work. |
| The LEDs stay dark | Check the arrow direction of the strip, data on GPIO 26, shared ground of power supply, strip and Atom Lite. |
| Wrong colours | The strip must be a WS2812B or compatible (GRB order). |
| “Select the LED controller first” | Set the camera's target first (step 6), then let it find the corners. |
| The light runs the wrong way | Correct the start corner or direction on the Atom Lite and repeat Check sides. |
| Hue pairing fails | Open the interface from the device instead of GitHub, press the button on the Bridge and pair within 30 seconds. |
Security: LED and mode control stay open on the local network, and the transfer is not encrypted. Only run the devices on a trusted network. More on the firmware page.
Join in
You rebuilt the setup? Every report helps, even “it works”. Write to me or report bugs on GitHub.

