
Smart Motion Light
Welcome to Smart Motion Light ENGR 478 Final, a showcase of our engineering project developed at San Francisco State University. Explore our smart motion light, crafted with the STML476-RG board and STM32 IDE, PIR Sensors, Photo-resistors, and a RGB Light Strip using EXTI Interrupts,SysTick Timing, and GPIO Configurations. Join us as we demonstrate our work and commitment to innovative solutions.
Information
Smart Motion Light ENGR 478 Final is the result of designing and building a smart motion-activated lighting system that responds to real-world conditions. The system uses a PIR motion sensor, timers, interrupts, and PWM to automatically control LED brightness based on motion and inactivity. Additional features such as light dimming and optional ambient light sensing were implemented to improve energy efficiency. This report outlines the design process, hardware and software implementation, testing methodology, and overall system performance.
Our project
Our Smart Motion Light project integrates both hardware and software to create an energy-efficient lighting system. Using the STM32L476RG microcontroller and STM32CubeIDE, we developed a system that intelligently responds to motion and environmental conditions. The light activates only when motion is detected and adjusts its behavior over time to reduce unnecessary power usage.
Hardware
The hardware portion of our project consists of the STM32L476RG Nucleo board, a PIR motion sensor, a photoresistor, and an LED strip driven through a MOSFET. These components work together to detect motion, measure ambient light, and safely control LED brightness. The hardware design ensures reliable sensing while allowing the microcontroller to efficiently manage power and output control.
Software
The software was developed using STM32CubeIDE and written in C. It utilizes interrupts, SysTick timing, PWM, and ADC readings to control the system’s behavior. Interrupt-driven motion detection allows the system to respond immediately, while timers and PWM are used to manage brightness levels and smooth fading transitions.
Functionality
When motion is detected by the PIR sensor, the system turns on the LED strip at full brightness. After a period of inactivity, the light gradually dims and eventually turns off to conserve power. An optional photoresistor ensures the system only activates in low-light conditions. This logic allows the system to operate automatically without user input.
Demonstration
The demonstration showcases the system responding to motion in real time. The LED strip turns on when motion is detected, smoothly transitions between brightness levels, and shuts off after inactivity. This demonstration highlights the system’s reliability, responsiveness, and energy-saving features.

About us
Smart Motion Light – is an embedded systems project developed as part of the ENGR 478 course. The goal of this project was to design and implement a smart, motion-activated lighting system using the STM32L476RG microcontroller. The system combines hardware and software components, including motion sensing, timing control, and PWM-based lighting, to create an energy-efficient and automated solution. This project demonstrates our understanding of embedded system design, sensor integration, and real-time system behavior.
Enabling smarter spaces
Our smart motion light project represents a step towards creating more energy-efficient and responsive environments. By integrating motion detection with intelligent lighting control, we aim to reduce energy consumption and enhance user experience. Explore the possibilities with Smart Motion Light ENGR 478 Final.
Create Your Own Website With Webador