IoT Project on Automated Curtain System
Aim
To design and implement a voice-activated automatic curtain mechanism that can open and close curtains using Google Assistant voice commands via the Sinric Pro platform.
Components Required
- ESP32 WiFi Module Development Kit
- L293D Motor Driver (4-channel)
- 12V 5RPM DC Motor
- Breadboard
- Jumper wires(M-M & M-F)
- Power supply (12V for the motor)
- Smartphone with Google Assistant
- Sinric Pro account
- Pulley Wheel(s)
Software Required
- Arduino IDE with ESP32 board support
- Sinric Pro library for Arduino
- Google Assistant app on smartphone
- ESP32 WiFi library
- PWM control libraries for motor speed control
Theory
DC Motor Operation
DC motors convert electrical energy into mechanical energy through electromagnetic principles. The 12V 5RPM motor specified for this project offers low speed but high torque, making it ideal for curtain operations where smooth, controlled movement is essential. The direction of rotation can be controlled by reversing the polarity of the power supply to the motor.
L293D Motor Driver
The L293D is a quadruple half-H driver IC designed to drive inductive loads such as DC motors. It can control up to four DC motors in one direction or two DC motors in both directions. Key features include:
- Operating voltage: 4.5V to 36V
- Can drive motors with current requirements up to 600mA per channel
- Protection against voltage spikes
- TTL compatible inputs
The driver serves three essential functions in our circuit:
- Protecting the ESP32 from high voltage used by the motor
- Receiving signals from ESP32 to control motor direction
- Amplifying PWM signals to control motor speed
Sinric Pro is an IoT platform that facilitates communication between smart devices and voice assistants like Google Assistant and Amazon Alexa. It provides:
- Cloud-based APIs for real-time device control
- Simple integration with various voice assistants
- Support for custom device types and actions
Google Assistant Integration
Google Assistant serves as the user interface for our system, accepting voice commands and routing them to the appropriate device via Sinric Pro. Since its 2016 launch, it has become one of the most advanced voice assistants available, offering robust smart home control capabilities.
Circuit Diagram
The circuit connections, based on the provided image, show:

- ESP32 connected to the L293D motor driver:
- ESP32 GPIO pins connect to the IN1 and IN2 pins of the L293D for direction control
- PWM-capable GPIO pin connects to the Enable pin for speed control
- L293D motor driver connected to the DC motor:
- Motor outputs from L293D (OUT1, OUT2) connect to the DC motor terminals
- VCC1 (logic voltage) connects to 5V from ESP32
- VCC2 (motor voltage) connects to external 12V power supply
- GND pins connect to common ground
This setup allows the ESP32 to control both the direction and speed of the DC motor through the L293D driver, which handles the higher voltage and current requirements of the motor.
Implementation
Hardware Setup
- Connect the ESP32 to the L293D motor driver:
- Connect two GPIO pins (e.g., GPIO32 and GPIO33) to the IN1 and IN2 inputs
- Connect a PWM-capable GPIO pin to the Enable input
- Connect 3.3V to VCC1 (logic supply)
- Connect GND to the GND pins
- Connect the L293D to the DC motor:
- Connect OUT1 and OUT2 to the DC motor terminals
- Connect external 12V power supply to VCC2 (motor supply)
- Ensure common ground between ESP32, L293D, and power supply

Sinric Pro Account Setup
- Create a Sinric Pro account
- Add a new device (select “Switch” type for simple on/off control)
- Note down the APP_KEY, APP_SECRET, and DEVICE_ID for use in the code

Google Assistant Setup
- Link Sinric Pro to Google Assistant
- Discover devices through Google Home app
- Test voice commands for device control
Code Implementation
Use the file available in Repository name IoT Project on Automated Curtain System for the code and implement them in the Arduino IDE
Results
When properly implemented, the system enables:
- Voice commands through Google Assistant to control curtains:
- “Hey Google, turn on Open Curtain” to open curtains
- “Hey Google, turn on Close Curtain” to close curtains
- The ESP32 receives these commands through the Sinric Pro platform and controls the DC motor via the L293D driver to perform the requested action.
- The 5RPM motor provides smooth, controlled movement suitable for curtain applications, with sufficient torque to handle the weight of standard curtains.