How to Make a Self-Tinting Car Window with Sugru and a Microcontroller


Making your own self-tinting car window can be a fun and rewarding DIY project. With some basic electronic components, the moldable glue Sugru, and a bit of coding, you can create auto-tinting windows that react to sunlight.

In this article, I will walk through the full process of designing, building, and installing self-tinting windows step-by-step. I'll cover:

What You'll Need

How It Works

Step-by-Step Assembly

Installation Tips

Troubleshooting Issues

So whether you want privacy, protection from sunlight, or just a cool project to show off - making self-tinting windows is totally doable. Follow along below and you'll be well on your way to automatic tint!

What You'll Need

The components needed to make self-tinting windows are relatively inexpensive and easy to source. Here's what you'll need:


Sugru is a flexible, adhesive putty that air cures into a durable rubber. It's moldable like clay, adheres to most surfaces, and can be formed into any shape. Sugru will be the actual auto-tinting material in this project.

You'll need at least two packs for a single car window, but more may be needed depending on window size. Opt for their original formula in a dark color like black or graphite to fully block sunlight.


A small programmable microcontroller will handle detecting sunlight levels and activating the tint. The most popular options are:

Either can be programmed using free software like the Arduino IDE. I prefer Arduino for its simplicity and compact size.

Photo Resistors

Photo resistors, also called light dependent resistors (LDRs), are sensors that change resistance based on light intensity. They allow the microcontroller to detect sunlight levels.

You'll want at least 2, but I recommend 4-6 LDRs placed around the window for more accurate readings. They are very inexpensive.

Wires, Circuit Board, Resistors


For assembly you'll need:

And for Sugru application:

With these parts and tools gathered, you're ready to start building!

How the Self-Tinting System Works

Before we jump into the project, let's briefly cover how the system works:

The photo resistors (LDRs) are placed on the window and detect incoming sunlight. They act as variable resistors, lowering in resistance when light is brighter.

The LDRs are wired to analog input pins on the microcontroller. The microcontroller is programmed to continually read the resistance values from the LDRs.

When the LDR readings drop below a calibrated threshold, indicating bright sunlight, the microcontroller activates the tint. It sends power to the Sugru, which darkens to tint the window.

Once light levels fade in the evening, the LDR readings rise again. The microcontroller cuts power to the Sugru, effectively untinting the window.

This process repeats automatically at sunrise and sunset each day! The microcontroller handles all the logic automatically.

Step 1 - Mold and Apply the Sugru

Sugru starts out very soft and moldable, so the first step is shaping it to fit on the window. Here's how:

Make a Mold

Cut a frame or mold from cardboard, plastic, or acrylic to hold the Sugru as it cures. The mold should be roughly 1-2mm thick and about 2-4mm smaller on each edge than the window itself.

A plastic frame cut to size acts as the perfect Sugru mold.

This allows the Sugru to fully cover the glass and form an even layer across the window.

Knead and Press Sugru

Open your Sugru packs and knead it thoroughly until it softens up and becomes pliable like clay. Ensure there are no air bubbles.

Press the Sugru firmly into the mold, filling up the frame fully and evenly. Try to eliminate any gaps for maximum light blocking.

Let Cure

Leave the Sugru to cure in the frame for at least 24 hours. Longer (48-72 hours) is better to allow it to cure completely and bond strongly to the glass. Once fully cured it can't be reshaped.

Cut and Install

When ready, use a craft knife to cut away any excess Sugru around the edge of the frame. Carefully peel the Sugru off the mold and apply it firmly to the car window glass.

Press out all air bubbles and edges. Allow to set 12-24 hours before driving. Consider using primer or epoxy on edges for better adhesion.

Step 2 - Assemble and Wire Electronics

With the Sugru mounted, it's time to add the electronic auto-tinting components.

Mount Components on Circuit Board

Solder header pins to the LDRs and microcontroller. Connect resistors to each LDR. Mount them along with the breadboard power rails on a protoboard or perfboard.

Use jumper wires to connect:

A partial electronics assembly with LDRs, resistors and microcontroller.

Refer to microcontroller pinouts and diagrams for exact wiring.

Connect LDRs Around Window

Place the wired LDRs around the edges of the Sugru, spacing them evenly. Use double sided tape or small dabs of epoxy.

Ensure the light sensors face outwards and aren't blocked. Extend wires as needed.

Supply Power

Run wires from the microcontroller to a 5V USB car adapter. This will power the system whenever the car is on.

Make connections and test the circuit before mounting everything permanently.

Step 3 - Programming the Microcontroller

Now for the brains - programming the microcontroller to handle tinting logic.

Take Initial Light Readings

Upload a basic sketch to read analog values from the LDRs and print to serial monitor.

Park the car outside on a sunny day and take light readings from each LDR. Note the values.

Set Threshold

Determine a maximum threshold value to activate the tint. This should be right above the highest sunny reading.

For example if the sunny readings are 800-1000, set the threshold to 1100.

Write Logic

With a threshold set, write a sketch with logic like:

// Check LDR readings
for(int i=0; i < numLDRs; i++){

ldrValues[i] = analogRead(ldrPins[i]);

// Activate tint if ANY under threshold
if(ldrValues[i] <= tintThreshold){
digitalWrite(tintPin, HIGH);

// Deactivate tint if ALL above threshold
if(ldrValues[0] > tintThreshold &&
ldrValues[1] > tintThreshold &&

digitalWrite(tintPin, LOW);

This turns the tint on whenever light goes below the threshold, and off when it rises back above. Adjust the logic as needed.

Set Tint Pin and Upload

Specify a output pin to control the Sugru tinting. Wire this pin to the positive rail of the Sugru. Upload the code and test it!

Step 4 - Installing in the Car

You're ready to permanently install your self-tinting system into the vehicle. Here are some tips:

With some attention to detail, you can end up with a very integrated, OEM looking self-tinting system!

Troubleshooting Problems

Here are some solutions to possible issues you may encounter:

Inconsistent tinting - Adjust LDR threshold values in code. Take new readings from all sensor locations and recalibrate.

Tint not darkening fully - Add more layers of Sugru if it is too thin and letting light through in bright sun.

Sugru falling off - Ensure window is very clean when applied. Roughen the surface lightly with fine sandpaper first. Use additional adhesive (epoxy, primer) around edges.

Electronics stop working - Check all power and ground connections. Reflow any loose solder joints. Check fuses.

LDRs not responding - Check orientation and that they are not blocked. Use a multimeter to check for continuity and resistance values. Replace if faulty.

Don't be afraid to troubleshoot and iterate if needed. With some tweaking and tuning, you can get a reliable self-tinting system up and running!

Closing Thoughts

Adding automatic sun-reactive tint to your car windows is a straightforward electronics project using simple components like Arduino, Sugru, and LDRs.

The key steps are:

With some patience and testing, you can build an integrated self-tinting system. No more manual sunshade or complex mechanics!

This project is a great way to learn more about Arduino coding, electronics, and working with unique materials like Sugru. The result is practical DIY car customization that really stands out.

So grab your Sugru and microcontroller, and start developing your own automatic solar tint system today! Just let me know if you have any other questions.