Bike Light LED Controller/Driver
The GreenPAK SLG46116 IC combines the functionality and versatility of a GreenPAK Programmable Mixed-Signal IC with the power capabilities of the GreenFET technology.
This Instructable demonstrates how to design a simple state machine using a SLG46116. In this application, a simple state machine controls power LED headlights and tail lights for cycling.
Below we described steps needed to understand how the the LED controller/driver has been programmed. However, if you just want to get the result of programming, download GreenPAK Designer software to view the already completed GreenPAK design file. Plug the GreenPAK Development Kit to your computer and hit the program to create the system.
Bike LED Light Circuit Design
As shown in Figure 1 and Figure 2, a four-state machine is implemented using two DFFs (DFF 2 and DFF 3). The first state is off, second state is full LED brightness, third state is 50 percent brightness, and the fourth state is LED’s blinking at 5 Hz.
Button bounce is filtered by CNT/DLY0. The states are decoded by two 2-bit LUTs, two 3-bit LUTs and one 4-bit LUT (2-bit LUT3, 2-bit LUT0, 3-bit LUT2, 3-bit LUT3, 4-bit LUT0). Output of 4-bit LUT0 controls a P-FET Power Switch. The 5 Hz generator is implemented using 2-bit LUT2, CNT/DLY1 and a Pipe Delay. The battery charge is monitored by ACMP0. 2-bit LUT1 inverts the output of ACMP0.
Bike LED Light Circuit Analysis
When this device is powered on it initializes in the first state: the output pins (BAT_LOW, BAT_OK, V_OUT and PWR_SW_ON) are LOW. When the Button (PIN 1) is pushed LOW the device goes to the next state. This device and completed PCB were tested and are shown in Figure 3, Figure 4, Figure 5, Figure 6, Figure 7 and Figure 8.
Conclusion
A simple state machine and power LED driving can be easily implemented using a SLG46116 IC. It has low power consumption, and only a few external components needed to complete this design.