Arduino Backlight Project

Arduino BacklightMy backlight is mainly for gaming, but it makes films more interesting as well

I’m a gamer at times – I like to pillage innocent villages and build houses with blocks as much as the next guy.

I’ve never really mixed my addiction to gaming with my love for electronics, however I finally found a cool way of merging the two in aggressive harmony.

Today I’m showing you my Arduino Backlight project – great for games, films and anything else noisy!

Anyone else think my Arduino backlight looks like a REALLY happy robot?

Shootin’ Stuff

First up, here’s a 60-second video of what the Arduino backlight looks like in action once fitted:

As you can see, when loud things happen, the Adafruit sound sensor picks that up, which makes the LEDs flare up behind my screen, adding an awesome immersion that makes it actually feel like I’m participating in hopeless trench warfare!

It’s all about loudness. Loud thing = flash.

Here are some pictures of the finished build:

Arduino gaming backlight front

Clean, Simple and effective – with the LED rings at the sides, you get the most out of your lights.

Arduino backlight mount rear

Can’t show the front without showing the rear – I’ve hidden the wires between the two rings

Wanna Make It?

I’ve added a shopping list below to make your own Arduino backlight – you may have most of these parts already:

  • RasPiO InsPiRing Circle x2 = £30 (RasP.IO)
  • Arduino Nano (clone) = £5.99 (Amazon)
  • Adafruit Electret Microphone Amplifier – MAX4466 = £7 (
  • Adafruit USB Micro-B Breakout Board = £1.50 (
  • Arduino Data cable = £1.99 (
  • Micro-B USB cable = £1.99 (
  • Prototyping Wire = £1.50 (
  • VESA Screws (M4x10 screws) = £1.40 (Amazon)
  • Power Supply = £11.99 (Amazon)
  • VESA Mount Materials = £ Varies depending on build
Arduino backlight parts

Just some of the parts you’ll need for this Arduino backlight project.

Wire It Up

You may want to make your mount before you start connecting parts – see further down this post for the mount build.

Here’s a Fritzing diagram that I edited to give you an idea of where everything goes. I’ve also added some instructions below:

Arduino backlight Fritzing diagram

Thanks to for the cracking software (click the diagram for a larger version)

InsPiRing Connections:

The RasPiO InsPiRing has 2 sets of 4 connections. Those labelled ‘i’ are inward connections, and those labelled ‘o’ are outward.

Inward is for power coming into that ring, outward is where you’re linking further rings into the circuit.

Circle 1:

The first LED circle (the first one in the chain) connects to the Arduino and power breakout as follows:

Circle 1ArduinoUSB Power Breakout
GGND lane
5V5V lane

Circle 2:

The second circle just connects to the first circle, as follows:

Circle 1Circle 2

MAX4466 Sensor Connections:

The Adafruit sound sensor has just 3 connections to the Arduino:


USB Power Breakout Connections:

The power breakout board is already connected to the first light ring, however as we’re using two sources of power in this project, we need to ensure there’s a ‘common ground’.

Connect the GND of the USB Breakout to a GND pin on the Arduino board.

Power Supplies:

Connect a 5v power supply to the Adafruit Micro-USB breakout board.

Plug your Arduino into a USB port on your PC – which will both power your Arduino and allow you to transfer code to it.

Backlight Arduino wiring

The completed wiring on my finished mount.

The Code

My Arduino backlight code is mostly a mash-up of:

The main bulk of the code is for the sensor – giving us readings and also sending those to the serial monitor to give us an idea of what level of sound makes the numbers jump.

The last section is where we set the sensitivity and tell the code to light the LEDs when that level has been breached.

Line 49 (highlighted) is where I’ve set this to ‘0.40’ – if the numbers jump above that, the lights come on. You can also set the RGB colour of the LEDs by changing the numbers in line 52 (also highlighted):

#define NUM_LEDS 48
#define DATA_PIN 8
#define CLOCK_PIN 10
CRGBArray<NUM_LEDS> leds;

const int sampleWindow = 50; // Sample window width in mS (50 mS = 20Hz)
unsigned int sample;

void setup() 
   FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, BGR, DATA_RATE_MHZ(12)>(leds, NUM_LEDS);

void loop() 
   unsigned long startMillis= millis();  // Start of sample window
   unsigned int peakToPeak = 0;   // peak-to-peak level

   unsigned int signalMax = 0;
   unsigned int signalMin = 1024;

   // collect data for 50 mS
   while (millis() - startMillis < sampleWindow)
      sample = analogRead(0);
      if (sample < 1024)  // toss out spurious readings
         if (sample > signalMax)
            signalMax = sample;  // save just the max levels
         else if (sample < signalMin)
            signalMin = sample;  // save just the min levels
   peakToPeak = signalMax - signalMin;  // max - min = peak-peak amplitude
   double volts = (peakToPeak * 5.0) / 1024;  // convert to volts

   if (volts > 0.40) // change this number to alter the sensitivity
       for(int i=0; i<NUM_LEDS; i++){
          leds[i].setRGB( 255, 255, 255);;   

Preparing & Uploading the Code

Fire up the Arduino IDE (download it here if you haven’t got it already) and follow the steps below:

Add the FastLED Library

The FastLED library is used to control the LEDs, but it probably won’t be installed by default. We need to do this before we upload any code.

To install it, select Sketch > Include Library > Manage Libraries:

Arduino IDE add library

When the pop-up box appears, type ‘FastLED’ into the search:

Arduino IDE Fast LED

Select ‘install’ then restart your Arduino IDE (this might not be necessary but I always do it just in case).

Set Up Your Arduino IDE

We need to tell the IDE what board you’re using, and on which COM port it’s communicating with your computer on. We’ll assume you’re using an Arduino Nano here.

Click on Tools >  Board > Arduino Nano. This tells the IDE which board you’re using:

Arduino IDE Select Board

For the COM port, select Tools > Port > [Your device’s COM port]:

Arduino IDE COM selection

Uploading the Code

Open a new sketch using File > New.

Delete any code that appears in the new sketch, then copy & paste the code above in its place. Click ‘upload’ and you’re ready to go!

Tweak & Test It

Turn everything on, and once it’s booted up, blow into the microphone. Did you see the lights flash?

If not, or if it was a bit weak, there are a few things you may want to play around with to get this project working properly:

Backlight tweaks

If your sensor isn’t working as you expected, there are a few tweaks you can make.


Depending on your speakers or the volume you’ve set, or even the game you’re playing, you may need to tweak the sensitivity number in line 49 of the code.

This number is the voltage reading that the lights will activate on. If they come on too much, increase the number. If you’ve just shot 75 bad guys dead with a Desert Eagle and didn’t get a single flicker, drop that boy down!

Monitor Ambient Readings

You can also use the Arduino IDE serial monitor to see what your ambient sound is registering at, and base your sensitivity setting on that.

Click on Tools > Serial Monitor. That will open a window like the one below, and stream the readings to you.

As you can see, my ambient sound sits at around 0.10, so my trigger for the lights at 0.40 should work well for loud shots only.

Arduino Serial Monitor

Hardware Adjustment

On the back of the MAX4466 board you’ll find a very small potentiometer that controls the gain. I set mine all the way left as it wouldn’t pick up much noise otherwise.

Play with that if you feel the need, but be gentle – those little pots break really easily.

Arduino Backlight Mount

Luckily it doesn’t matter what your mount looks like as it sits behind a monitor. What matters is that you can’t see it from the front and it doesn’t obstruct cable access.

Everyone has different levels of skills and equipment available to them, so I’ll just do a quick run through of what I did:

Material & Shape

I opted for some 6mm MDF from my local hardware store, then cut that to a shape that wouldn’t stick out from the edges of my screen, whilst also giving enough room to mount the lights and parts.

I also measured where parts would go and drilled the VESA mount holes:


Just over £3 for a little slab of 6mm MDF. Not bad.

Arduino backlight mount cutting

Chop chop – I used my hand saw and jigsaw to cut the mount shape. I then changed the shape later on as I couldn’t get my monitor’s cables in!

I then gave my shape a lick of some spare black paint I had in the shed – no prep, no primer, a really rough job!

(No one will ever see it, not even me, so this was excessive anyway)

Arduino backlight mount paint

A quick and dirty paint job for the mount that no one will ever see…

After some head scratching, I decided to use spacers to mount the LED rings, and my trusty Gorilla Glue to fix the other electronics to the panel.

I did this whilst measuring and soldering the wire to the parts:

InsPiRing Mounting

As the InsPiRing rings lack mounting holes, I had to get creative with spacers and screws

Adafruit Electret Microphone

Is this thing on? The PCB elements of this project are secured with Gorilla Glue

Now to Enjoy the Immersion

So that’s it then – an Arduino backlight!

All that’s left to do is continue to lose hours of my life in these games, but at least I’ll be enjoying them that little bit more!

Remember to get subscribed for future projects, reviews, giveaways and other electrical goodness!


Be the first to comment on "Arduino Backlight Project"

Leave a comment

Your email address will not be published.


This website uses cookies. Please visit our privacy policy page for more information. Privacy policy

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.