Automated blinds system controlled by the Micro:bit’s built‑in light sensor and user‑selected operating modes.
Smart Blinds Controller is a Micro:bit‑powered automation system that opens or closes window blinds based on ambient light levels and the mode selected by the user.
The device supports two operating modes:
- OUT Mode (Button A) — reacts to outdoor light
- IN Mode (Button B) — reacts to indoor light
Once a mode is selected, the system enters automatic mode, continuously reading the built‑in light sensor and adjusting the blinds using a servo motor.
- Two operating modes: OUT and IN
- Uses the built‑in Micro:bit light sensor (no external LDR required)
- Automatic open/close logic based on thresholds
- Servo‑based blind movement
- LED display mode indication
- Lightweight, simple wiring
- Easy to expand with additional sensors or modules
| Component | Quantity | Notes |
|---|---|---|
| BBC Micro:bit | 1 | v1 or v2 |
| SG90 Servo Motor | 1 | Requires external 5V power |
| Jumper wires | – | |
| External 5V power supply | 1 | For servo motor |
| Blind mechanism | 1 | Fabric or slat blinds |
No LDR or resistors are required — the project uses the Micro:bit’s built‑in light sensor.
| Micro:bit Pin | Component |
|---|---|
| P0 | Servo signal |
| GND | Shared ground with servo |
| 5V external | Servo power (+) |
| External GND | Must connect to Micro:bit GND |
The servo motor must share a common ground with the Micro:bit.
Without this, the servo may jitter or fail to move.
Automatic mode activates when the user presses Button A or Button B.
Your code uses:
- openThreshold = 5
- closeThreshold = 15
These values are tuned for the built‑in light sensor.
Interprets light as outdoor brightness:
- Light > 15 → Close blinds
- Light < 5 → Open blinds
This simulates:
Bright outside → close blinds
Dark outside → open blinds
Interprets light as indoor brightness:
- Light > 15 → Open blinds
- Light < 5 → Close blinds
This simulates:
Bright inside → open blinds
Dark inside → close blinds
- Open Microsoft MakeCode
- Create a new project
- Switch to JavaScript mode
- Paste your program code
- Flash the
.hexfile to the Micro:bit - Connect the servo to the blind mechanism
- Select a mode:
- A → OUT
- B → IN
- The system now runs automatically based on light levels
- Adjustable thresholds via buttons or menu
- OLED display for real‑time light readings
- Wi‑Fi module (ESP8266/ESP32) for remote control
- Morning/evening timers
- Manual override mode
- Home Assistant integration
| Issue | Possible Cause | Solution |
|---|---|---|
| Servo not moving | Missing common ground | Connect servo GND to Micro:bit GND |
| Servo jittering | Weak power supply | Use stable external 5V |
| Light readings inaccurate | Thresholds too low/high | Adjust open/close thresholds |
| Mode not switching | Button issue | Check Micro:bit buttons |
This project is released under a custom attribution license:
You are free to use, modify, and redistribute this project for any purpose,
as long as you credit the original creator: Boris.
No additional restrictions apply.