Lighting controller, as the most critical parts in lighting system, can impact the quality ofthe images and application effect in the field of machine vision. With the rapid developmentof machine vision in the field of industrial automation, the demand for lighting controller isalso growing. At present, most of the lighting controller adjusts the voltage by the way ofanalog which comes into being outstanding problems, such as low accuracy, less function,inflexible and power consumption. It is a major bottleneck when the traditional lightingcontroller is applied in the industrial production process.In response of these issues, this paper designed a distributed digital LED lightingcontroller which is based on the real-time operating system FreeRTOS and takes STM32asthe core after researching technologies such as distributed control, embed system,communication, software architecture and LED driver. Firstly, according to the requirementsof the machine vision, the design scheme which takes STM32as the MCU and determines thePWM constant current LED driver was present. Circuits of hardware schematic and PCB aredesigned. Secondly, the embedded real-time operating system FreeRTOS was ported to theSTM32platform to build the firmware of Modular multi-tasking software architecture.Carrying out three modes of illumination (common mode, strobe mode and trigger mode), thedigital lighting controller can interact with PC by USB, CAN, RS232and Ethernet which aresupported by porting the LWIP protocol stack. This distributed network system of multi-nodelighting controller was developed based on CAN bus topological and Ethernet star topology.Fourthly, a reliable and efficient data communication protocol and SDK applied in windowswere developed to provide better openness, adaptability and accessibility.At last, the lighting controller was applied to the dry battery cover quality detect systemafter a serious of debugging experiment in function and performance. Result of the testing andeffect of the application experiment turn out to be correct and the performance meetsapplication requirements. |