Smart bulbs have been increasing in popularity recently and are steadily becoming a key part of the smart home toolkit. Smart bulbs enable the user to control their light via a special application on the user’s smart phone; the bulb can be turned on and off and the color can be changed from the application interface. In this project, we built a smart bulb controller that can be controlled from a manual button or a mobile application via Bluetooth. To add some flair to this project we have added some features which allow the user to choose a lighting color from the list of colors included in the application interface. It can also activate an “auto mix” to generate color effects and change the lighting every half second. The user can create their own color mix using a PWM feature which can also be used as a dimmer for the three basic colors (red, green, blue). We also added external buttons to the circuit so that the user can switch to manual mode and change the light color from an external button. 

This application is comprised of two sections; the GreenPAK™ design and Android app design. The GreenPAK design is based on using a UART interface for communication. UART is chosen because it is supported by most Bluetooth modules, as well as most other peripherals, such as WIFI modules. Consequently, the GreenPAK design can be used in many connection types. 

To build this project, we are going to use the SLG46620 IC, a Bluetooth module, and a RGB LED. The GreenPAK IC is going to be the control core of this project; it receives data from a Bluetooth module and/or external buttons, then begins the required procedure to display the correct lighting. It also generates the PWM signal and outputs it to the LED. Figure 1 below shows the block diagram.

The GreenPAK device used in this project contains an SPI connection interface, PWM blocks, FSM and a lot of other useful additional blocks in one IC. It is also characterized by its small size and low energy consumption. This will enable manufacturers to build a small practical circuit using a single IC, thus the production costs will be minimized when compared to similar systems. 

In this project, we control one RGB LED. To make the project commercially viable, a system would likely need to increase the luminosity level by connecting many LEDs in parallel and using the appropriate transistors; the power circuit needs to be taken into consideration as well. 

This project was implemented and examined; you can watch the video of the project that shows the in-depth behavior of the circuit.

Below we described steps needed to understand how the RGB LED color control has been programmed. However, if you just want to get the result of programming, download GreenPAK software to view the already completed GreenPAK Design File. Plug the GreenPAK Development Kit to your computer and hit the program to design the control.

GreenPAK Design

The GreenPAK design consists of the UART receiver, PWM unit, and control unit.

UART Receiver

First, we need to set up the Bluetooth module. Most Bluetooth ICs support the UART protocol for communication. UART stands for Universal Asynchronous Receiver / Transmitter. UART can convert data back and forth between parallel and serial formats. It includes a serial to parallel receiver and a parallel to serial converter which are both clocked separately.   

The data received in the Bluetooth module will be transmitted to our GreenPAK device. The idle state for Pin10 is HIGH. Every character sent begins with a logic LOW start bit, followed by a configurable number of data bits and one or more logic HIGH stop bits. 

The UART transmitter sends 1 START bit, 8 data bits, and one STOP bit. Usually, the default baud rate for a UART Bluetooth module is 9600. We will send the data byte from the Bluetooth IC to the GreenPAK SLG46620’s SPI block. 

Since the GreenPAK SPI block does not have...

Read more »