机电工程技术2025,Vol.54Issue(22):17-22,6.DOI:10.3969/j.issn.1009-9492.2025.22.004
基于STC15单片机的汽车灯光系统设计与仿真
Design and Simulation of an Automotive Lighting System Based on STC15 Microcontroller
摘要
Abstract
To address the issues of high cost and limited functionality in current automotive intelligent lighting systems,a low-cost vehicle lighting system using the STC15W4K32S4 microcontroller as the core controller is designed and simulated.The system incorporates three key functions:automatic light adaptation,ultrasonic obstacle avoidance,and manual mode switching.Besides using buttons to simulate manual control of light modes and turn signals,in automatic mode,a photoresistor collects ambient light intensity.After conversion by the ADC(Analog-to-Digital Converter)module,the system automatically switches between high and low beams.An ultrasonic module detects forward distance to trigger obstacle avoidance warnings.A multi-task scheduling and state machine management algorithm is employed by the overall control process to effectively coordinate the concurrent operation and mode switching of various functional modules.Software programming is completed using Keil C51,and the hardware simulation environment is built with Proteus to achieve system function simulation.Test results show that the system stably achieves light switching triggered at an illumination threshold(100 lux)in automatic mode,obstacle avoidance responses triggered at a specific distance threshold(100 cm),and basic control in manual mode.It meets the basic functional requirements of a vehicle lighting system while providing relatively intelligent auxiliary control,offering technical reference for developing low-cost intelligent vehicle auxiliary devices and retrofitting traditional lighting systems.关键词
单片机控制/车辆灯光控制系统/虚拟仿真/传感器应用/低成本集成电路Key words
microcontroller control/automotive lighting control system/virtual simulation/sensor application/low-cost intergrated circuits分类
交通工程引用本文复制引用
林伊婷,卢旭锦,陈麒,曾曦琳..基于STC15单片机的汽车灯光系统设计与仿真[J].机电工程技术,2025,54(22):17-22,6.基金项目
广东省普通高校创新人才项目(2022KQNCX238) (2022KQNCX238)