Introduction
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
- Sugru - the malleable glue that will act as our auto-tinting material
- A microcontroller like Arduino or Raspberry Pi to control the tint
- Photo resistors to detect sunlight
- Wires and basic electronic components
- Tools for assembly
How It Works
- Using photo resistors to detect sunlight
- Microcontroller reads photo resistor values
- Tint activated when sunlight reaches set threshold
- Sugru blocks light to tint the window
Step-by-Step Assembly
- Molding and installing the Sugru
- Wiring up the photo resistors
- Writing code for the microcontroller
- Installing the electronics in the car
Installation Tips
- Best practices for securely installing the tint
- Hiding wires and components
- Aiming the photo sensors properly
Troubleshooting Issues
- Adjusting sensitivity thresholds
- Fixing loose connections
- Re-molding Sugru if needed
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
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.
Microcontroller
A small programmable microcontroller will handle detecting sunlight levels and activating the tint. The most popular options are:
-
Arduino - Arduino Uno or Nano boards are inexpensive but powerful. Code is uploaded with USB.
-
Raspberry Pi - The Raspberry Pi Zero is affordable and has WiFi/Bluetooth.You'll likely need a breakout board or HAT for ease of use.
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
- Jumper wires to make connections
- A breadboard or circuit board to mount components
- Resistors (10k ohm) paired with each LDR
- Power wire to supply 5V from car USB
Tools
For assembly you'll need:
- Soldering iron
- Wire cutters/strippers
- Needle nose pliers
- Screwdriver
- Double sided tape or velcro
And for Sugru application:
- Silicon mold or frame
- Craft knife
- Gloves for handling
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:
- LDRs to analog input pins
- Microcontroller ground and power (5V)
- Resistors to LDRs
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:
```cpp
// 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 &&
etc...){
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:
-
Mount the circuit board securely under the dash using velcro or doublesided tape. Avoid areas with moisture or dirt.
-
Run LDR wires through crevices and under trim. Use automotive wire clips and cable sleeves to hide and protect.
-
Mount the USB power adapter securely in a 12V outlet. Inspect connections and fuse it if desired.
-
Try to keep wires as short as possible. Extend LDRs closer to the microcontroller using small gauge wire.
-
Place LDRs on edges facing different directions to avoid sun glare on any single one.
-
Consider spraying edges of Sugru with black paint if they stand out. The borders around your window tint should be minimally visible.
-
For rear windshields, take care to avoid blocking the defrost lines with Sugru. Leave gaps if needed.
-
Make sure you have at least 2-3mm clearance around the edges of the window glass so it can move properly in the seals when opening/closing.
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:
- Molding and applying the Sugru to fit the window
- Assembling the microcontroller, LDRs, and wiring
- Programming custom sunlight threshold logic
- Carefully installing all components in the vehicle
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.