摘要:随着微电子技术的发展,城市景观照明及室内外装饰照明的霓虹灯和部分传统光源 已经逐步被具有节能、环保、寿命长、可靠性高及可实现全彩变化的 LED 光源所取代。目 前,在装饰照明领域中用 LED 制作的各类灯具正被逐步推广,而 LED 色彩控制器的设计自 然成为了至关重要的环节,根据这种需要,本课题针对 LED 色彩控制器进行设计,利用 RGB-LED 与飞思卡尔 STM32 芯片作为系统主架构,研究 PWM 与 RGB-LED 的精确颜色对应关 系,实现 LED 的颜色转换与渐变,并根据需求添加各类传感器与相应的控制程序设计多模 式的色彩控制器及其外围电路,而后进行仿真并完成硬件模型的搭建、对其进行误差测试, 最终初步达成了设计要求。
关键词:RGB-LED;PWM;STM32;色彩控制器;飞思卡尔
Design of LED color controller based on Freescale Carle chip
Abstract:With the development of microelectronics technology, neon lights and some traditional light sources of urban landscape lighting and indoor and outdoor decorative lighting have been gradually replaced by LED light sources that have energy saving, environmental protection, long life, high reliability, and full color change. At present, all kinds of lamps made with LEDs in the field of decorative lighting are being gradually promoted, and the design of LED color controllers has naturally become a crucial link. Based on this need, the subject is designed for LED color controllers. Using RGB-LED and Freescale STM32 chips as the main architecture of the system, research the precise color correspondence relationship between PWM and RGB-LED, realize LED color conversion and gradual change, and add various sensors and corresponding control programs to design multi-mode according to requirements. The color controller and its peripheral circuits were then simulated to complete the construction of the hardware model, and error tests were performed on it. Finally, the design requirements were initially achieved.
Keywords:RGB-LED;PWM;STM32;Color Controller;Freescale
目录
1 绪论 . 1
1.1 项目研究背景及意义 .. 1
1.1.1 研究背景 ... 1
1.1.2 项目意义 ... 1
1.2 研究目的与内容 . 1
1.2.1 研究目的 ... 1
1.2.2 研究内容 ... 1
1.3 研究途径与价值 . 2
1.3.1 研究途径 ... 2
1.3.2 研究价值 ... 2
2 项目可行性及技术分析 3
2.1 可行性分析 .... 3
2.1.1 技术可行性 . 3
2.1.2 经济可行性 . 3
2.1.3 环境可行性 . 3
2.1.4 时间可行性 . 3
2.2 实用性分析 4
2.3 现实意义分析 ... 4
2.4 技术方案分析 ... 4
2.5 相关技术分析 ... 4
2.5.1 STM32 介绍 .. 4
2.5.2 TRK-KEA64 开发板介绍 .. 5
2.5.3 Altium Designer 介绍 .. 6
2.5.4 Kinetis Design Studio 3 IDE 介绍 .... 6
2.6 系统需求性分析 . 7
2.6.1 系统功能要求 .... 7
2.6.2 硬件设计要求 .... 7
2.6.3 设计技术要求 .... 7
2.6.4 控制器接口规划 .. 8
3 系统设计与实现 . 9
3.1 总体设计 .. 9
3.2 核心硬件选型 ... 9
3.3 控制系统设计 .. 10
3.3.1 硬件设计 .. 10
3.3.2 软件设计 .. 11
3.4 LIN 总线协议与控制 . 12
3.5 LED 颜色研究 .. 13