梁佩莹 张邦锋 郭泽成 王宇华



摘 要: 描述了一种基于主从式架构,从机基于STM32F107的32位微处理器实现光强度数据采集,主机应用C#编程语言实现数据处理的光强度检测系统。该系统在主机端采用串口通信类库,实现程序对光强板、程控电源、PLC的控制和数据接收。主机程序的核心功能还包括光强标定和二次校准,修正硬件因素和外界条件存在的误差。系统对接收到的数据做优化处理并转换为需要的格式,样品测试的曲线分别在极坐标、直角坐标和数据列表中显示,便于数据分析。该系统可广泛应用于光源与照明领域。
关键词: C#; 光强检测; STM32F107微处理器; 主从式架构
中图分类号: TN15?34; TP274+.2 文献标识码: A 文章编号: 1004?373X(2016)07?0134?04
Abstract: A light?intensity detection system with host?slave architecture is described in this paper. The slave computer is based on 32?bit microprocessor STM32F107 to acquire the light?intensity data, and then the data is processed with C# programming language by means of the host computer. The serial communication class library is adopted by the host?side in the system, so the program can control the light?intensity board, programmable power supply and PLC, and realize data reception. The core functions of the host computer program include light?intensity calibration, secondary calibration, and errors correction caused by hardware and external environments. After that, the received data is optimized and converted to the needed format. The tested curves of the sample are displayed in polar coordinates, rectangular coordinates and data list for further analysis. The system can be widely used in light source and illumination field.
Keywords: C#; light?intensity measurement; STM32F107; host?slave architecture
0 引 言
LED作为21世纪绿色照明新光源,具有亮度高、寿命长、节能环保等优点。目前国内已形成7个国家半导体照明工程产业化基地[1?2],成为世界照明电器的生产大国和出口大国,如何对半导体照明产品进行检测成为检测实验室建设中的一个重要方面。光强是光源的一个基本属性,它考虑了人的视觉因素和光学特点,同时也是光源的属性。光源光强探测是光电企业重点研究的项目之一。在我国能源压力日趋严峻的形势下,加快新光源产业的发展,促进节能减排,保障新光源产品的质量,是可持续发展的必然选择。
1 系统总体设计方案
光强检测系统从机采用单片机STM32F107作为电路系统的核心控制器,并且利用光度探头作为数据采集元器件,A/D转换电路中采用了AD7356芯片进行模数转换和数据传输。……