Control your window blinds with voice commands via Google Assistant! No potentiometer needed - just say "Ok Google, open the blinds" and watch them move.
- ✅ Google Assistant voice control
- ✅ "Ok Google, open the blinds" (100% open)
- ✅ "Ok Google, close the blinds" (0% closed)
- ✅ "Ok Google, set blinds to 50%" (any percentage)
- ✅ Smooth acceleration/deceleration with AccelStepper
- ✅ WiFi connectivity (no physical controls needed)
- ✅ Remembers last position after power cycle
- ✅ Works from anywhere (phone, Google Home, Google Nest)
- Arduino Nano ESP32-S3 (with WiFi)
- Stepperonline 17HS19-2004S1 NEMA 17 stepper motor
- Pololu DRV8825 stepper driver
- 12V battery or power supply
- Jumper wires and breadboard
DRV8825 Control Pins:
- STEP → ESP32 GPIO3 (D3)
- DIR → ESP32 GPIO2 (D2)
- ENABLE → ESP32 GPIO4 (D4)
- SLEEP → Connect to RESET pin (or 3.3V)
- RESET → Connect to SLEEP pin (or 3.3V)
Microstepping Configuration (1/32 mode):
- M0 → ESP32 3.3V (NOT 5V!)
- M1 → ESP32 3.3V (NOT 5V!)
- M2 → ESP32 3.3V (NOT 5V!)
Power:
- VMOT → 12V battery positive
- GND → 12V battery negative AND ESP32 GND (common ground required!)
- VDD → ESP32 3.3V (logic power)
Motor Connections:
- A1, A2 → Motor coil A
- B1, B2 → Motor coil B
ESP32 Power:
- VIN → 12V (or use USB-C for development)
- GND → Common ground with DRV8825
MUST set current limit before use!
For 17HS19-2004S1 motor (2.0A rated):
- Target current: 1.4A (70% of rating)
- Vref setting: 0.7V
- Formula: Vref = Current / 2
Use multimeter to measure voltage between trimpot wiper and GND, adjust to 0.6-0.7V.
Using Arduino IDE:
- Library Manager → Install "AccelStepper" by Mike McCauley
- Library Manager → Install "SinricPro" by Boris Jaeger
Using Arduino CLI:
arduino-cli lib install AccelStepper
arduino-cli lib install "SinricPro"Your device is already configured with:
- Device Name: (check your Sinric Pro dashboard)
- Device Type: Blinds
- App Key: c831c095-xxxx (in code)
- Device ID: 694f82666ebb39d664d5169d
One-time setup:
- Open Google Home app on your phone
- Tap + (Add) → Set up device → Works with Google
- Search for "Sinric Pro"
- Tap Sinric Pro and sign in with your Sinric Pro account
- Your blinds device will appear in Google Home!
- Assign it to a room (e.g., "Bedroom")
Done! Now you can control it with voice.
Using Arduino IDE:
- Select Board: "Arduino Nano ESP32"
- Select Port: /dev/ttyACM0 (or your port)
- Click Upload
Using Arduino CLI:
arduino-cli compile --fqbn esp32:esp32:nano_nora neema_esp32_wifi.ino
arduino-cli upload -p /dev/ttyACM0 --fqbn esp32:esp32:nano_nora neema_esp32_wifi.inoMonitor Serial Output:
arduino-cli monitor -p /dev/ttyACM0 -c baudrate=115200Once setup is complete, try these commands:
Basic Control:
- "Ok Google, open the blinds" → 100% open
- "Ok Google, close the blinds" → 0% closed
- "Ok Google, turn on the blinds" → Open
- "Ok Google, turn off the blinds" → Close
Position Control:
- "Ok Google, set blinds to 50%" → Half open
- "Ok Google, set blinds to 25%" → Quarter open
- "Ok Google, set blinds to 75%" → Three-quarters open
Relative Adjustments:
- "Ok Google, increase blinds by 20%" → Move up 20%
- "Ok Google, decrease blinds by 10%" → Move down 10%
When connected via USB, you'll see:
Neema ESP32 WiFi - Google Assistant Blinds Control
==================================================
Motor initialized
Steps per revolution: 6400
Rotation range: 3200 steps (180 degrees)
Connecting to WiFi...
Connected! IP address: 192.168.x.x
Sinric Pro connected!
You can now control blinds with Google Assistant:
'Ok Google, open the blinds'
'Ok Google, close the blinds'
'Ok Google, set blinds to 50%'
Setup complete! Listening for Google Assistant commands...
Google Assistant requested position: 50%
Moving to 1600 steps (50%)
✓ Movement complete! Position: 50% (1600 steps)
If your blinds need more or less rotation:
// In neema_esp32_wifi.ino:
const int ROTATION_RANGE = TOTAL_STEPS / 2; // 180° (default)
// Options:
// TOTAL_STEPS / 4 = 90° rotation
// TOTAL_STEPS / 2 = 180° rotation (default)
// TOTAL_STEPS = 360° full rotationFor faster or slower movement:
const int MAX_SPEED = 2000; // Increase for faster (try 3000)
const int ACCELERATION = 1000; // Increase for quicker starts (try 1500)Edit these lines in the code:
#define WIFI_SSID "Frontier2211_EXT"
#define WIFI_PASS "ChairNotebook8146"- Check SSID and password in code
- Ensure 2.4GHz WiFi (ESP32 doesn't support 5GHz)
- Move ESP32 closer to router
- Check serial monitor for error messages
- Verify App Key, App Secret, and Device ID in code
- Check internet connection
- Ensure Sinric Pro account is active
- Check serial monitor for connection errors
- Make sure Sinric Pro is linked in Google Home app
- Try saying "Ok Google, sync my devices"
- Check that device appears in Google Home app first
- Restart Google Home app
- Check DRV8825 current limit (Vref = 0.6-0.7V)
- Verify common ground between ESP32 and DRV8825
- Check that M0, M1, M2 are connected to 3.3V
- Ensure SLEEP and RESET are tied together or to 3.3V
- Check motor coil connections
- Swap one motor coil pair (A1/A2 or B1/B2, not both)
- Motor might be skipping steps (lower MAX_SPEED)
- Current limit too low (increase Vref slightly)
- Check for mechanical binding
- WiFi password is stored in code (plaintext)
- For production, consider using WiFiManager for secure credential storage
- Sinric Pro credentials stored in code (rotate if compromised)
- Device is accessible from internet via Sinric Pro cloud
Potential improvements:
- Add physical override button
- Battery voltage monitoring
- Auto-close at sunset (RTC + light sensor)
- Position feedback via limit switches
- OTA (Over-The-Air) firmware updates
- Local web interface (in addition to Google)
- MQTT support for Home Assistant integration
- Multi-blind control (control several windows)
- Alexa support (Sinric Pro supports both)
- Schedule/timer support
- Board: Arduino Nano ESP32-S3 (esp32:esp32:nano_nora)
- Flash Usage: ~400KB program storage
- RAM Usage: ~50KB dynamic memory
- WiFi: 2.4GHz 802.11 b/g/n
- Cloud Service: Sinric Pro (free tier: 3 devices)
- Communication: WebSocket over HTTPS
- Latency: ~1-2 seconds from voice command to movement
This project is open source. Feel free to modify and use for your own projects.
- Based on Neema ESP32 potentiometer-controlled blinds project
- Uses SinricPro library for Google Assistant integration
- AccelStepper library for smooth motor control
Created for the Shed Computer Arduino projects collection.