Feedback Control of LED Brightness
Abstract
This project-based chapter directs the reader to develop a PI feedback controller to control the brightness of an LED using a low-pass-filtered phototransistor light sensor for feedback. This project makes use of PWM to pulse the LED, analog input for the sensor feedback, a counter/timer for the fixed-frequency control loop, the parallel master port to print to an LCD screen, and a UART for communication with the host computer. The project includes a simple interface in MATLAB on the host computer that allows the user to enter PI gains, plot the step response of the controller, and iterate to manually tune the PI gains. This project exercises the reader’s skills in several areas of embedded ...
Get Embedded Computing and Mechatronics with the PIC32 Microcontroller now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.