This project describes how to build a smart digital dimmer. A dimmer is a common light switch that is used in houses, hotels, and many other buildings. Older versions of dimmer switches were manual, and would typically incorporate a rotary switch (potentiometer) or buttons to control the light level. This project describes how to build a digital dimmer that has two ways of controlling light intensity; a smartphone and physical buttons. The two modes can work seamlessly together so that the user can increase or decrease luminosity from both a button and a smartphone. The project is implemented using an SLG46620V CMIC, HC-06 Bluetooth module, pushbuttons, and LEDs.

We are going to use the SLG46620V CMIC as it helps minimize discrete project components. GreenPAK IC’s are small and have multi-use components, which allows a designer to decrease components and to add new features. Additionally, the project cost is subsequently reduced. 

The SLG46620V also contains an SPI connection interface, PWM blocks, FSM, and a lot of useful additional blocks in one tiny chip. These components allow a user to build a practical smart dimmer that can be controlled via a Bluetooth device or wall buttons, support extended-time dimming, and addition of selectable features without using a microcontroller or expensive components.

Below we described steps needed to understand how the smart LED dimmer 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 device.

Project features:

1. Two methods of control; mobile app and real buttons.

2. Smooth on-off transition for the light. This is healthier for a consumer’s eyes. It also gives a more luxurious feeling, which is appealing to hotels and other service industries.

3. Sleep mode feature. This will be an added value for this application. When the user activates this mode, light brightness decreases gradually in 10 minutes. This helps people who suffer from insomnia. It is also useful for kid’s bedrooms and retail shops (closing time).

Project Interface

The project interface has four pushbuttons, which are used as GreenPAK inputs:

ON\OFF: turn the light ON\OFF (soft-start\stop).

UP: increase light level.

Down: decrease light level.

Sleep Mode: by activating sleep mode, light brightness decreases gradually over a period of 10 minutes. This gives the user time before sleeping and guarantees that the light will not stay ON all night.

The system will output a PWM signal, which will be passed to an external LED and sleep mode LED indicator.

The GreenPAK design is comprised of 4 main blocks. The first is a UART receiver, which receives data from the Bluetooth module, extracts orders, and sends them to a control unit. A second block is a control unit, which receives orders coming from the UART receiver or from the external buttons. The control unit decides the required action (Turn ON/OFF, increase, decrease, enable sleep mode). This unit is implemented using LUTs.

The third block supplies the CLK generators. In this project, an FSM counter is used to control the PWM. The FSM's value will change (up, down) according to the orders given by 3 frequencies (high, medium, and low). In this section, the three frequencies will be generated and the required CLK passes to FSM according to the required order; In turning on/off operation, high frequency passes to FSM to soft start/stop. During dimming, the medium frequency passes. The low frequency passes in sleep mode to reduce the FSM value more slowly. Then, light brightness decreases slowly too. The fourth block is the PWM unit, which generates pulses to external LEDs.

GreenPAK Design

The best way to build a dimmer using GreenPAK is by using the 8-bit FSM and a PWM. In the SLG46620, FSM1 contains 8 bits and can be used with PWM1...

Read more »