From 6e57cbcf2b772c0af3d0e85e7515b22e560291c6 Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Fri, 6 Jun 2025 17:55:08 -0700 Subject: [PATCH 01/17] Create docs --- docs | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs diff --git a/docs b/docs new file mode 100644 index 0000000..73709ba --- /dev/null +++ b/docs @@ -0,0 +1 @@ +Testing From fdfdca9dc827c91144925f77f43491882fe325f2 Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Fri, 6 Jun 2025 21:53:30 -0700 Subject: [PATCH 02/17] Create content --- docs /content | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs /content diff --git a/docs /content b/docs /content new file mode 100644 index 0000000..e61e6ea --- /dev/null +++ b/docs /content @@ -0,0 +1 @@ +From Docs to Content From 40ff777b6555670de52ec4ff1c9a25516a95dd4a Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Fri, 6 Jun 2025 21:58:26 -0700 Subject: [PATCH 03/17] Delete docs --- docs | 1 - 1 file changed, 1 deletion(-) delete mode 100644 docs diff --git a/docs b/docs deleted file mode 100644 index 73709ba..0000000 --- a/docs +++ /dev/null @@ -1 +0,0 @@ -Testing From 307d1d3ea5697eb484db7f2e9bce54028ccf6551 Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Fri, 6 Jun 2025 21:59:50 -0700 Subject: [PATCH 04/17] Create tutorials --- docs /content /tutorials | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs /content /tutorials diff --git a/docs /content /tutorials b/docs /content /tutorials new file mode 100644 index 0000000..b36c723 --- /dev/null +++ b/docs /content /tutorials @@ -0,0 +1 @@ +Tutorials now From 7dccefa15f135dc74aa708b56940537cb5bc3374 Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Fri, 6 Jun 2025 22:02:02 -0700 Subject: [PATCH 05/17] Create your_tutorial.md --- docs /content /tutorials /your_tutorial.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs /content /tutorials /your_tutorial.md diff --git a/docs /content /tutorials /your_tutorial.md b/docs /content /tutorials /your_tutorial.md new file mode 100644 index 0000000..259db1b --- /dev/null +++ b/docs /content /tutorials /your_tutorial.md @@ -0,0 +1 @@ +Your Main Tutorial goes here From 00d1cb3fb50722d1b405ab7c93b6c9df0d5b17c3 Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Fri, 6 Jun 2025 22:02:46 -0700 Subject: [PATCH 06/17] Delete docs /content /tutorials --- docs /content /tutorials | 1 - 1 file changed, 1 deletion(-) delete mode 100644 docs /content /tutorials diff --git a/docs /content /tutorials b/docs /content /tutorials deleted file mode 100644 index b36c723..0000000 --- a/docs /content /tutorials +++ /dev/null @@ -1 +0,0 @@ -Tutorials now From a936d60ef52c54b0c1fa86aa764679e6d976bf22 Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Fri, 6 Jun 2025 22:03:48 -0700 Subject: [PATCH 07/17] Delete docs /content /tutorials /your_tutorial.md --- docs /content /tutorials /your_tutorial.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 docs /content /tutorials /your_tutorial.md diff --git a/docs /content /tutorials /your_tutorial.md b/docs /content /tutorials /your_tutorial.md deleted file mode 100644 index 259db1b..0000000 --- a/docs /content /tutorials /your_tutorial.md +++ /dev/null @@ -1 +0,0 @@ -Your Main Tutorial goes here From 1681c2295699050bbbfa348ae7a431c023c03691 Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Fri, 6 Jun 2025 22:04:26 -0700 Subject: [PATCH 08/17] Create tutorials --- docs /content /tutorials | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs /content /tutorials diff --git a/docs /content /tutorials b/docs /content /tutorials new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/docs /content /tutorials @@ -0,0 +1 @@ + From bbe62d5bebeb8a76feb26bd3081f8f8287e11186 Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Fri, 6 Jun 2025 22:05:03 -0700 Subject: [PATCH 09/17] Delete docs /content --- docs /content | 1 - 1 file changed, 1 deletion(-) delete mode 100644 docs /content diff --git a/docs /content b/docs /content deleted file mode 100644 index e61e6ea..0000000 --- a/docs /content +++ /dev/null @@ -1 +0,0 @@ -From Docs to Content From 26e66d2becdefe0813f9220065d9ce1eaee6da11 Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Fri, 6 Jun 2025 22:05:18 -0700 Subject: [PATCH 10/17] Delete docs directory --- docs /content /tutorials | 1 - 1 file changed, 1 deletion(-) delete mode 100644 docs /content /tutorials diff --git a/docs /content /tutorials b/docs /content /tutorials deleted file mode 100644 index 8b13789..0000000 --- a/docs /content /tutorials +++ /dev/null @@ -1 +0,0 @@ - From 58d918a470627dbc59475a2a19a91f924e961dc0 Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Fri, 6 Jun 2025 22:05:34 -0700 Subject: [PATCH 11/17] Create docs --- docs | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs diff --git a/docs b/docs new file mode 100644 index 0000000..d8f8d46 --- /dev/null +++ b/docs @@ -0,0 +1 @@ +docs From 754c8f0791a16dd20a7fe209f7cd8a90982db084 Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Fri, 6 Jun 2025 22:06:15 -0700 Subject: [PATCH 12/17] Create content --- docs /content | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs /content diff --git a/docs /content b/docs /content new file mode 100644 index 0000000..037f7a4 --- /dev/null +++ b/docs /content @@ -0,0 +1 @@ +Content here From 52e007beaa0b312fdda5005b490768aa91dcf30c Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Fri, 6 Jun 2025 22:06:49 -0700 Subject: [PATCH 13/17] Create tutorials --- docs /content /tutorials | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs /content /tutorials diff --git a/docs /content /tutorials b/docs /content /tutorials new file mode 100644 index 0000000..f4994f5 --- /dev/null +++ b/docs /content /tutorials @@ -0,0 +1 @@ +Tutorial From 4176676e4661799666051bac56f568ca75b7859d Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Fri, 6 Jun 2025 22:07:38 -0700 Subject: [PATCH 14/17] Create your_tutorial.md --- docs /content /tutorials /your_tutorial.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs /content /tutorials /your_tutorial.md diff --git a/docs /content /tutorials /your_tutorial.md b/docs /content /tutorials /your_tutorial.md new file mode 100644 index 0000000..e59bb61 --- /dev/null +++ b/docs /content /tutorials /your_tutorial.md @@ -0,0 +1 @@ +Tutorial.md goes here From b1c1d8c3762c75289542065378f274a0ad64b22a Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Fri, 6 Jun 2025 22:08:11 -0700 Subject: [PATCH 15/17] Create _index.md --- docs /content /tutorials /_index.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs /content /tutorials /_index.md diff --git a/docs /content /tutorials /_index.md b/docs /content /tutorials /_index.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/docs /content /tutorials /_index.md @@ -0,0 +1 @@ + From 952968c2746c42d537597e406d2a856d493a3a85 Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Sat, 7 Jun 2025 00:05:20 -0700 Subject: [PATCH 16/17] Update TEMPLATE.md --- TEMPLATE.md | 354 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 304 insertions(+), 50 deletions(-) diff --git a/TEMPLATE.md b/TEMPLATE.md index 298d19c..046b87e 100644 --- a/TEMPLATE.md +++ b/TEMPLATE.md @@ -1,107 +1,361 @@ --- -title: My Super Awesome Tutorial -date: 1970-01-01 +title: ESP32 Digital Privacy Window Tutorial +date: 2025-06-06 authors: - - name: John Doe - - name: Mary Jane + - name: Jason Young --- -![relevant graphic or workshop logo](image/path) +![Digital Privacy Window System](image/path) ## Introduction -Write a short section on what the tutorial is aiming to accomplish. -What is the motivation behind the tutorial? -What do you want readers to gain from the tutorial? +This tutorial will guide you through building a Digital Privacy Window system using an ESP32 DevBoard to control a switchable (electrochromic or liquid crystal) window film. The motivation is to enable dynamic privacy and solar control for smart homes, offices, or any space where on-demand window opacity is desirable. By following this tutorial, you will gain hands-on experience in embedded programming, hardware integration, and smart device prototyping. ### Learning Objectives -- Bullet list of skills/concepts to be covered - -Any additional notes from the developers can be included here. +- Interface an ESP32 DevBoard with a digital privacy window film. +- Program the ESP32 to control window transparency via GPIO. +- Understand the principles behind electrochromic and liquid crystal films. +- Assemble, test, and troubleshoot basic embedded hardware. +- Document and communicate technical processes and results. ### Background Information -Describe your topic here. What does it do? Why do you use it? -Are there other similar things to use? What are the pros and cons? -Explain important concepts that are necessary to understand. -Include (and cite if needed) any visuals that will help the audience understand. +A digital privacy window uses switchable film (electrochromic or liquid crystal) that changes between transparent and opaque states when voltage is applied. This technology is used in offices, healthcare, retail, and homes to provide privacy at the touch of a button or via automation. The ESP32 DevBoard is a powerful, Wi-Fi/Bluetooth-enabled microcontroller that can be programmed to control such films through its GPIO pins. + +**Alternatives:** +- Smart blinds/shades (mechanical, less sleek) +- Traditional curtains (manual, less automated) +- Other microcontrollers (Arduino Uno, less powerful than ESP32) + +**Key Concepts:** +- *PDLC (Polymer Dispersed Liquid Crystal)*: Film scatters light when unpowered, becomes clear when voltage aligns the crystals. +- *Electrochromic Film*: Tints gradually with voltage. +- *GPIO*: General-purpose input/output pin on the ESP32, used to switch the window state. + +--- ## Getting Started -For any software prerequisites, write a simple excerpt on each -technology the participant will be expecting to download and install. -Aim to demystify the technologies being used and explain any design -decisions that were taken. Walk through the installation processes -in detail. Be aware of any operating system differences. -For hardware prerequisites, list all the necessary components that -the participant will receive. A table showing component names and -quantities should suffice. Link any reference sheets or guides that -the participant may need. -The following are stylistic examples of possible prerequisites, -customize these for each workshop. +Before you begin, you’ll need to install software and gather hardware components. ### Required Downloads and Installations -List any required downloads and installations here. -Make sure to include tutorials on how to install them. -You can either make your own tutorials or include a link to them. +- **Arduino IDE** + Download from [arduino.cc](https://www.arduino.cc/en/software) and install for your OS (Windows, macOS, Linux). + [Arduino IDE Install Guide](https://www.arduino.cc/en/Guide/HomePage) -### Required Components +- **ESP32 Board Support Package** + In Arduino IDE: + - Go to File > Preferences and add: + `https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json` + - Tools > Board > Boards Manager > Search “ESP32” > Install. + +- **USB-to-Serial Drivers** + Only if your ESP32 board is not detected. Download from the chip manufacturer’s website (e.g., CP210x or CH340). -List your required hardware components and the quantities here. +### Required Components -| Component Name | Quanitity | -| -------------- | --------- | -| | | -| | | +| Component Name | Quantity | +| ---------------------------------- | -------- | +| ESP32 DevBoard | 1 | +| USB Data Cable (ESP32) | 1 | +| Electrochromic or LC Window Film | 1 | +| MOSFET or Relay Module | 1 | +| Power Supply (per film specs) | 1 | +| Jumper Wires | 5+ | +| Breadboard (optional) | 1 | ### Required Tools and Equipment -List any tools and equipment you need here. -(Ex, computer, soldering station, etc.) +- Computer (Windows/macOS/Linux) +- Internet access +- (Optional) Soldering station +- (Optional) Multimeter + +--- + +## Part 01: Setting Up the ESP32 Development Environment + +### Introduction + +This section covers installing and configuring the Arduino IDE and ESP32 Board Support so you can program your ESP32 DevBoard. + +### Objective + +- Install Arduino IDE and ESP32 board support. +- Connect ESP32 to your computer and verify communication. +- Upload a test program to confirm setup. + +### Background Information + +You’ll need basic computer skills and familiarity with installing software. No prior microcontroller experience is required. + +### Components + +- Computer +- ESP32 DevBoard +- USB Data Cable + +### Instructional + +1. Download and install the Arduino IDE from [arduino.cc](https://www.arduino.cc/en/software). +2. Open Arduino IDE. Go to File > Preferences. Add + `https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json` + to “Additional Boards Manager URLs.” +3. Go to Tools > Board > Boards Manager. Search for “ESP32” and install “ESP32 by Espressif Systems.” +4. Connect your ESP32 to your computer. Install drivers if needed. +5. Select your board (e.g., “ESP32 Dev Module”) and port under Tools. +6. Open File > Examples > 01.Basics > Blink. Upload to the ESP32. +7. If the onboard LED blinks, your setup is complete! + +--- + +## Example + +### Introduction + +Let’s test your setup by uploading the “Blink” sketch to your ESP32. + +### Example + +// ESP32 Blink Example +int LED_BUILTIN = 2; +void setup() { +pinMode(LED_BUILTIN, OUTPUT); +} +void loop() { +digitalWrite(LED_BUILTIN, HIGH); +delay(1000); +digitalWrite(LED_BUILTIN, LOW); +delay(1000); +} + + +**Visual:** +![ESP32 Blink Example](image/path-to-blink-visual) + +### Analysis + +- Confirms Arduino IDE and ESP32 board support are working. +- Verifies USB communication. +- Demonstrates the upload process for future code. + +--- + +## Additional Resources + +### Useful links + +- [ESP32 Guide – DroneBot Workshop](https://dronebotworkshop.com/esp32-intro/) +- [Arduino IDE Download](https://www.arduino.cc/en/software) +- [ESP32 Arduino Core Documentation](https://docs.espressif.com/projects/arduino-esp32/en/latest/) +- [ESP32 Getting Started Guide (Espressif)](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/) +- [YouTube: ESP32 Arduino IDE Tutorial](https://www.youtube.com/watch?v=MPW_Efjzv8U) [3] + +--- + +## Part 02: Understanding and Preparing the Privacy Window Film + +### Introduction + +This section introduces switchable privacy films and prepares you for installation and testing. + +### Objective + +- Understand how electrochromic and liquid crystal films work. +- Prepare the film for installation and testing. +- Learn best practices for handling and cleaning. + +### Background Information + +Switchable films use voltage to change between clear and opaque states. Proper handling and testing before installation are critical to avoid damage. + +### Components + +- Privacy window film (electrochromic or LC) +- Power supply (per film specs) +- Clean glass or acrylic panel + +### Instructional + +1. Inspect the film for any damage before use. +2. Test the film by connecting it to the power supply; observe the transition between states. +3. Clean the glass thoroughly before applying the film—80% of installation issues are due to dirt. +4. Carefully peel and apply the film, following manufacturer’s instructions for alignment and adhesion. +5. Connect film wiring to the power supply, ensuring correct polarity and voltage. + +--- + +## Example + +### Introduction + +We’ll test the privacy film’s switching function before installation. + +### Example + +**Visual:** +![Privacy Film Test](image/path-to-film-test-visual) + +**Steps:** +- Connect wires as per film datasheet. +- Apply power; film should turn clear. +- Remove power; film returns to opaque. + +### Analysis + +- Confirms film is functional before installation. +- Demonstrates the principle of voltage-controlled transparency. +- Ensures no defects before permanent mounting. + +--- + +## Additional Resources + +### Useful links + +- [Everything You Need to Know About Switchable Glass and Film](https://www.youtube.com/watch?v=MPW_Efjzv8U) [2] +- [DIY Window Film Installation Videos](https://www.apexfilms.ca/video-tutorials) [6] +- [How to Install Privacy Window Film - YouTube](https://www.youtube.com/watch?v=B9jrkrm5Nj4) [4] + +--- + +## Part 03: Wiring and Controlling the Privacy Window with ESP32 + +### Introduction + +This section covers connecting the ESP32 to the privacy film and programming it to control transparency via a GPIO pin. + +### Objective + +- Wire the ESP32 to a relay or MOSFET for safe film control. +- Write code to toggle the film’s state. +- Test dynamic switching via software. + +### Background Information + +The ESP32 cannot drive the film directly (due to voltage/current requirements), so a relay or MOSFET acts as a switch. GPIO pins send control signals to these components. + +### Components + +- ESP32 DevBoard +- Relay or MOSFET module +- Privacy window film (installed) +- Jumper wires +- Power supply (for film) -## Part 01: Name +### Instructional + +1. Connect the ESP32 GPIO pin to the relay or MOSFET control input. +2. Wire the relay/MOSFET output to the privacy film and its power supply. +3. In Arduino IDE, write a sketch that toggles the GPIO pin HIGH/LOW to switch the film. +4. Upload the code and observe the window film switching between states. + +--- + +## Example + +### Introduction + +Let’s program the ESP32 to switch the privacy film on and off with a button press. + +### Example + +#define FILM_PIN 5 + +void setup() { +pinMode(FILM_PIN, OUTPUT); +} + +void loop() { +digitalWrite(FILM_PIN, HIGH); // Film ON (clear) +delay(5000); +digitalWrite(FILM_PIN, LOW); // Film OFF (opaque) +delay(5000); +} + +text + +**Visual:** +![ESP32 to Relay/MOSFET to Film](image/path-to-circuit-visual) + +### Analysis + +- The ESP32 toggles the relay/MOSFET, switching the film. +- Demonstrates embedded control of physical hardware. +- Code can be extended for remote, sensor, or scheduled control. + +--- + +## Additional Resources + +### Useful links + +- [ESP32 Arduino Core Documentation](https://docs.espressif.com/projects/arduino-esp32/en/latest/) +- [Smart Glass Country: Smart Film Installation Guide](https://www.smartglasscountry.com/installation/) +- [YouTube: Switchable Privacy Glass / Smart Glass](https://www.youtube.com/watch?v=SaZWW5nASZk) [5] + +--- + +## Part 04: Troubleshooting, Safety, and Best Practices ### Introduction -Briefly introduce what you are teaching in this section. +This section addresses common issues, safety tips, and best practices for a reliable, safe installation. ### Objective -- List the learning objectives of this section +- Identify and resolve common hardware/software issues. +- Apply safe handling and wiring practices. +- Document and communicate troubleshooting steps. ### Background Information -Give a brief explanation of the technical skills learned/needed -in this challenge. There is no need to go into detail as a -separation document should be prepared to explain more in depth -about the technical skills +Working with high voltages and delicate films requires caution. Many issues stem from wiring errors, poor connections, or software bugs. ### Components -- List the components needed in this challenge +- All previously listed components +- Multimeter (for diagnostics) ### Instructional -Teach the contents of this section +1. Double-check all wiring before applying power. +2. Use a multimeter to verify voltages at each stage. +3. If the film does not switch, check: + - Power supply output + - Relay/MOSFET operation + - ESP32 GPIO output + - Film wiring and connections +4. Consult datasheets and guides for troubleshooting tips. +5. Always disconnect power before making changes to the circuit. + +--- ## Example ### Introduction -Introduce the example that you are showing here. +We’ll diagnose a non-switching film. ### Example -Present the example here. Include visuals to help better understanding +- Use a multimeter to check voltage at the film terminals when the relay/MOSFET is activated. +- Use Arduino IDE’s Serial Monitor to print GPIO states for debugging. ### Analysis -Explain how the example used your tutorial topic. Give in-depth analysis of each part and show your understanding of the tutorial topic +- Confirms whether the issue is in software, wiring, or hardware. +- Reinforces safe diagnostic practices. + +--- ## Additional Resources ### Useful links -List any sources you used, documentation, helpful examples, similar projects etc. +- [ESP32 Troubleshooting Guide](https://randomnerdtutorials.com/esp32-troubleshooting-guide/) +- [DIY Window Film Installation Videos](https://www.apexfilms.ca/video-tutorials) [6] +- [Smart Privacy Glass Installation Guide](https://www.smartglasscountry.com/installation/) + From d0ce61878a0c492750656c973152e54cd0cf329f Mon Sep 17 00:00:00 2001 From: ece196privacywindows Date: Sat, 7 Jun 2025 00:07:21 -0700 Subject: [PATCH 17/17] Update your_tutorial.md --- docs /content /tutorials /your_tutorial.md | 362 ++++++++++++++++++++- 1 file changed, 361 insertions(+), 1 deletion(-) diff --git a/docs /content /tutorials /your_tutorial.md b/docs /content /tutorials /your_tutorial.md index e59bb61..046b87e 100644 --- a/docs /content /tutorials /your_tutorial.md +++ b/docs /content /tutorials /your_tutorial.md @@ -1 +1,361 @@ -Tutorial.md goes here +--- +title: ESP32 Digital Privacy Window Tutorial +date: 2025-06-06 +authors: + - name: Jason Young +--- + +![Digital Privacy Window System](image/path) + +## Introduction + +This tutorial will guide you through building a Digital Privacy Window system using an ESP32 DevBoard to control a switchable (electrochromic or liquid crystal) window film. The motivation is to enable dynamic privacy and solar control for smart homes, offices, or any space where on-demand window opacity is desirable. By following this tutorial, you will gain hands-on experience in embedded programming, hardware integration, and smart device prototyping. + +### Learning Objectives + +- Interface an ESP32 DevBoard with a digital privacy window film. +- Program the ESP32 to control window transparency via GPIO. +- Understand the principles behind electrochromic and liquid crystal films. +- Assemble, test, and troubleshoot basic embedded hardware. +- Document and communicate technical processes and results. + +### Background Information + +A digital privacy window uses switchable film (electrochromic or liquid crystal) that changes between transparent and opaque states when voltage is applied. This technology is used in offices, healthcare, retail, and homes to provide privacy at the touch of a button or via automation. The ESP32 DevBoard is a powerful, Wi-Fi/Bluetooth-enabled microcontroller that can be programmed to control such films through its GPIO pins. + +**Alternatives:** +- Smart blinds/shades (mechanical, less sleek) +- Traditional curtains (manual, less automated) +- Other microcontrollers (Arduino Uno, less powerful than ESP32) + +**Key Concepts:** +- *PDLC (Polymer Dispersed Liquid Crystal)*: Film scatters light when unpowered, becomes clear when voltage aligns the crystals. +- *Electrochromic Film*: Tints gradually with voltage. +- *GPIO*: General-purpose input/output pin on the ESP32, used to switch the window state. + +--- + +## Getting Started + +Before you begin, you’ll need to install software and gather hardware components. + +### Required Downloads and Installations + +- **Arduino IDE** + Download from [arduino.cc](https://www.arduino.cc/en/software) and install for your OS (Windows, macOS, Linux). + [Arduino IDE Install Guide](https://www.arduino.cc/en/Guide/HomePage) + +- **ESP32 Board Support Package** + In Arduino IDE: + - Go to File > Preferences and add: + `https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json` + - Tools > Board > Boards Manager > Search “ESP32” > Install. + +- **USB-to-Serial Drivers** + Only if your ESP32 board is not detected. Download from the chip manufacturer’s website (e.g., CP210x or CH340). + +### Required Components + +| Component Name | Quantity | +| ---------------------------------- | -------- | +| ESP32 DevBoard | 1 | +| USB Data Cable (ESP32) | 1 | +| Electrochromic or LC Window Film | 1 | +| MOSFET or Relay Module | 1 | +| Power Supply (per film specs) | 1 | +| Jumper Wires | 5+ | +| Breadboard (optional) | 1 | + +### Required Tools and Equipment + +- Computer (Windows/macOS/Linux) +- Internet access +- (Optional) Soldering station +- (Optional) Multimeter + +--- + +## Part 01: Setting Up the ESP32 Development Environment + +### Introduction + +This section covers installing and configuring the Arduino IDE and ESP32 Board Support so you can program your ESP32 DevBoard. + +### Objective + +- Install Arduino IDE and ESP32 board support. +- Connect ESP32 to your computer and verify communication. +- Upload a test program to confirm setup. + +### Background Information + +You’ll need basic computer skills and familiarity with installing software. No prior microcontroller experience is required. + +### Components + +- Computer +- ESP32 DevBoard +- USB Data Cable + +### Instructional + +1. Download and install the Arduino IDE from [arduino.cc](https://www.arduino.cc/en/software). +2. Open Arduino IDE. Go to File > Preferences. Add + `https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json` + to “Additional Boards Manager URLs.” +3. Go to Tools > Board > Boards Manager. Search for “ESP32” and install “ESP32 by Espressif Systems.” +4. Connect your ESP32 to your computer. Install drivers if needed. +5. Select your board (e.g., “ESP32 Dev Module”) and port under Tools. +6. Open File > Examples > 01.Basics > Blink. Upload to the ESP32. +7. If the onboard LED blinks, your setup is complete! + +--- + +## Example + +### Introduction + +Let’s test your setup by uploading the “Blink” sketch to your ESP32. + +### Example + +// ESP32 Blink Example +int LED_BUILTIN = 2; +void setup() { +pinMode(LED_BUILTIN, OUTPUT); +} +void loop() { +digitalWrite(LED_BUILTIN, HIGH); +delay(1000); +digitalWrite(LED_BUILTIN, LOW); +delay(1000); +} + + +**Visual:** +![ESP32 Blink Example](image/path-to-blink-visual) + +### Analysis + +- Confirms Arduino IDE and ESP32 board support are working. +- Verifies USB communication. +- Demonstrates the upload process for future code. + +--- + +## Additional Resources + +### Useful links + +- [ESP32 Guide – DroneBot Workshop](https://dronebotworkshop.com/esp32-intro/) +- [Arduino IDE Download](https://www.arduino.cc/en/software) +- [ESP32 Arduino Core Documentation](https://docs.espressif.com/projects/arduino-esp32/en/latest/) +- [ESP32 Getting Started Guide (Espressif)](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/) +- [YouTube: ESP32 Arduino IDE Tutorial](https://www.youtube.com/watch?v=MPW_Efjzv8U) [3] + +--- + +## Part 02: Understanding and Preparing the Privacy Window Film + +### Introduction + +This section introduces switchable privacy films and prepares you for installation and testing. + +### Objective + +- Understand how electrochromic and liquid crystal films work. +- Prepare the film for installation and testing. +- Learn best practices for handling and cleaning. + +### Background Information + +Switchable films use voltage to change between clear and opaque states. Proper handling and testing before installation are critical to avoid damage. + +### Components + +- Privacy window film (electrochromic or LC) +- Power supply (per film specs) +- Clean glass or acrylic panel + +### Instructional + +1. Inspect the film for any damage before use. +2. Test the film by connecting it to the power supply; observe the transition between states. +3. Clean the glass thoroughly before applying the film—80% of installation issues are due to dirt. +4. Carefully peel and apply the film, following manufacturer’s instructions for alignment and adhesion. +5. Connect film wiring to the power supply, ensuring correct polarity and voltage. + +--- + +## Example + +### Introduction + +We’ll test the privacy film’s switching function before installation. + +### Example + +**Visual:** +![Privacy Film Test](image/path-to-film-test-visual) + +**Steps:** +- Connect wires as per film datasheet. +- Apply power; film should turn clear. +- Remove power; film returns to opaque. + +### Analysis + +- Confirms film is functional before installation. +- Demonstrates the principle of voltage-controlled transparency. +- Ensures no defects before permanent mounting. + +--- + +## Additional Resources + +### Useful links + +- [Everything You Need to Know About Switchable Glass and Film](https://www.youtube.com/watch?v=MPW_Efjzv8U) [2] +- [DIY Window Film Installation Videos](https://www.apexfilms.ca/video-tutorials) [6] +- [How to Install Privacy Window Film - YouTube](https://www.youtube.com/watch?v=B9jrkrm5Nj4) [4] + +--- + +## Part 03: Wiring and Controlling the Privacy Window with ESP32 + +### Introduction + +This section covers connecting the ESP32 to the privacy film and programming it to control transparency via a GPIO pin. + +### Objective + +- Wire the ESP32 to a relay or MOSFET for safe film control. +- Write code to toggle the film’s state. +- Test dynamic switching via software. + +### Background Information + +The ESP32 cannot drive the film directly (due to voltage/current requirements), so a relay or MOSFET acts as a switch. GPIO pins send control signals to these components. + +### Components + +- ESP32 DevBoard +- Relay or MOSFET module +- Privacy window film (installed) +- Jumper wires +- Power supply (for film) + +### Instructional + +1. Connect the ESP32 GPIO pin to the relay or MOSFET control input. +2. Wire the relay/MOSFET output to the privacy film and its power supply. +3. In Arduino IDE, write a sketch that toggles the GPIO pin HIGH/LOW to switch the film. +4. Upload the code and observe the window film switching between states. + +--- + +## Example + +### Introduction + +Let’s program the ESP32 to switch the privacy film on and off with a button press. + +### Example + +#define FILM_PIN 5 + +void setup() { +pinMode(FILM_PIN, OUTPUT); +} + +void loop() { +digitalWrite(FILM_PIN, HIGH); // Film ON (clear) +delay(5000); +digitalWrite(FILM_PIN, LOW); // Film OFF (opaque) +delay(5000); +} + +text + +**Visual:** +![ESP32 to Relay/MOSFET to Film](image/path-to-circuit-visual) + +### Analysis + +- The ESP32 toggles the relay/MOSFET, switching the film. +- Demonstrates embedded control of physical hardware. +- Code can be extended for remote, sensor, or scheduled control. + +--- + +## Additional Resources + +### Useful links + +- [ESP32 Arduino Core Documentation](https://docs.espressif.com/projects/arduino-esp32/en/latest/) +- [Smart Glass Country: Smart Film Installation Guide](https://www.smartglasscountry.com/installation/) +- [YouTube: Switchable Privacy Glass / Smart Glass](https://www.youtube.com/watch?v=SaZWW5nASZk) [5] + +--- + +## Part 04: Troubleshooting, Safety, and Best Practices + +### Introduction + +This section addresses common issues, safety tips, and best practices for a reliable, safe installation. + +### Objective + +- Identify and resolve common hardware/software issues. +- Apply safe handling and wiring practices. +- Document and communicate troubleshooting steps. + +### Background Information + +Working with high voltages and delicate films requires caution. Many issues stem from wiring errors, poor connections, or software bugs. + +### Components + +- All previously listed components +- Multimeter (for diagnostics) + +### Instructional + +1. Double-check all wiring before applying power. +2. Use a multimeter to verify voltages at each stage. +3. If the film does not switch, check: + - Power supply output + - Relay/MOSFET operation + - ESP32 GPIO output + - Film wiring and connections +4. Consult datasheets and guides for troubleshooting tips. +5. Always disconnect power before making changes to the circuit. + +--- + +## Example + +### Introduction + +We’ll diagnose a non-switching film. + +### Example + +- Use a multimeter to check voltage at the film terminals when the relay/MOSFET is activated. +- Use Arduino IDE’s Serial Monitor to print GPIO states for debugging. + +### Analysis + +- Confirms whether the issue is in software, wiring, or hardware. +- Reinforces safe diagnostic practices. + +--- + +## Additional Resources + +### Useful links + +- [ESP32 Troubleshooting Guide](https://randomnerdtutorials.com/esp32-troubleshooting-guide/) +- [DIY Window Film Installation Videos](https://www.apexfilms.ca/video-tutorials) [6] +- [Smart Privacy Glass Installation Guide](https://www.smartglasscountry.com/installation/) +