As smart devices are becoming more popular and their demand will only grow in the coming years, we developed a LED display smart speaker with I2C control using a typical GreenPAK design. This design allows the switching of dynamic LED indicator in the smart device depending on its modes: Standby (idle) mode, Listening mode, Thinking mode, Responding mode, Meeting Mode, and an indication of on/off mics of the device. Mode switching is implemented by I2C commands, by overwriting only one register.
The design is created in Go Configure™ Software Hub | Renesas. The complete design file can be found at AN-CM-361 Smart speaker LED Indication with GreenPAK.gp.
1. Operation of the Smart Speaker LED IndicatorIn this project, the GreenPAK SLG46880 with eight white LEDs, eight blue LEDs, one green LED, one red LED and 12 states ASM (Figures 1 and 2) was used.
D1…D8 - White LEDs
D9…D16 - Blue LEDs
D17 - Green LED
D18 - Red LED
The condition of output PINs #32(W0), #1(W1), #12(W2), #13(W3), #16(W4), #17(W5), #28(W6), #29(W7) is determined by the state of ASM outputs ASM OUTPUT1 (see Figure 4), the condition of output PINs #10(B0), #11(B1), #18(B2), #19(B3) is determined by the state of ASM outputs ASM OUTPUT0 (see Figure 3). The condition of output PINs #20(B4), #25(B5), #26(B6), #27(B7), and #4(Red) is determined by the State Dependent Items - the DM (Dynamic Memory) macrocells and the F(1) Computation Macrocell. The condition of the PIN#3 (Green) is determined by the I2C Virtual OUT1.
Each DM macrocell can use up to 6 configurations, and each F(1) Computation Macrocell can use up to 4 configurations.
The following was used for the design work:
- DM0_0 - 4 configurations (Worm 0, Zero, BB, Red);
- DM0_1 - 2 configurations (S7_B7, 0);
- DM1_0 - 4 configurations (To a miting, To idle, Blue, White);
- DM1_1 - 1 configuration (WBB);
- F(1) - 4 configurations (000_111, S5_B5, S6_B6, S4_B4, None);
For more details about DM (Dynamic Memory) macrocells work and the F(1) Computation Macrocell work see section 3.
2. Smart Speaker Modes DescriptionIdleThe device is idle and waiting for the user's command. White LEDs are on.
ListeningIn this mode, the device is woken up through a wake word and is listening to the user command. All blue LEDs are breathing.
ThinkingIn this mode smart speaker is thinking about the command given by a user. Halfway filled out LEDs like a worm chasing its tail and rotating in circles. The head of the worm is blue, and tail is white.
RespondingIn this mode the device is talking to the user. All LEDs lit up alternating between blue and white, fading in and out to appear breathing.
Meeting ModeIn this mode, the user can use the device for conducting audio/video conferences and meetings. The green LED lights up. When the mics are turned off, the red LED lights up additionally.
3. Description of the ASM states of LED IndicatorThe operation of the LED indicator is determined by the state of the I2C virtual inputs (Table 1. I2C register control data).
Mode switching is implemented by I2C commands, by overwriting of [0x1DB] register (I2C virtual inputs).
I2C Mode Commands:
1. [start] [0x09] [w] [0xDB] [0x84] [stop] // Listening
2. [start] [0x09] [w] [0xDB] [0x48] [stop] // Thinking (or the next command)
3. [start] [0x09] [w] [0xDB] [0x40] [stop] // Timeout to Idle
4. [start] [0x09] [w] [0xDB] [0x80] [stop] // Responding
5. [start] [0x09] [w] [0xDB] [0x40] [stop] // Timeout to Idle
6. [start] [0x09] [w] [0xDB] [0x41] [stop] // Idle (Mics muted)
7. [start] [0x09] [w] [0xDB] [0x43] [stop] // Meeting (Mics muted)
8. [start] [0x09] [w] [0xDB] [0x42] [stop] // Meeting
Each mode of operation of the LED indicator can use one or several ASM states (Figure 2).
The condition of the output PINs is determined by the ASM OUTPUT0 and ASM OUTPUT1 accordingly to each state of ASM (Figure 3, Figure 4).
Timeout state (Figure 5)
This state used the State Dependent Items with the next configurations: DM0_0 (Zero), DM0_1 (0), DM1_0 (Blue), and F(1) (000_111).
The DM0_0 (Zero) configuration is used only in the Timeout state for the timeout counting and transition to the Idle White state after that.
The DM0_1 (0) configuration is used for holding on LOW level signal on PIN#27 (B7). This configuration is used in all ASM states except WS7and Blue states. In these states, the DM0_1 (S7_B7) configuration is used.
The DM1_0 (Blue) configuration is used in the Timeout state for realizing the Listening mode with breathing blue LEDs.
The F(1) (000_111) configuration sends inverted PWM signal to the output PINs #20(B4), #25(B5), and #26(B6).
After the chip initialization and POR signal, the ASM is in the initial Timeout state until the end of the Timeout rising delay (121 ms) DM0_0 (Zero). No one LED lights up, PWM is stopped. After that, if the ASM does not receives any I2C command, it goes into the Idle White state.
The Timeout state is also used in the Listening mode with breathing blue LEDs. Within Listening mode, PWM by using DM1_0 (Blue) in the Timeout state, and by using DM0_0 (BB) in the Blue state, alternately switches ASM from the Timeout state to the Blue state and back.
Idle White state (Figure 6)
In the Idle White state, all white LEDs are on (see Figure 3 and Figure 4, and Figure 6), PWM is stopped, and the ASM waiting for the next I2C command.
This state used the State Dependent Items with the next configurations: DM0_0 (Red), DM0_1 (0), DM1_0 (To a miting), DM1_1 (WBB), and F(1) (000_111).
Blue State (Figure 7)
In this state, all blue LEDs are on. Blue state is used to implement Listening mode and Responding mode.
For the operation of the LED indicator in Listening mode, use the I2C command "Listening", the PWM module is turned on, which alternately switches the Blue state and the Timeout state. In this way, we achieve the Blue Breathing effect (See Figure 8).
This state used the State Dependent Items with the next configurations: DM0_0 (BB), DM0_1 (S7_B7), DM1_0 (White), and F(1) (000_111).
Channel 1 (yellow) à PIN#7 (SDA) with external 10kΩ pull up resistor
Channel 2 (light blue) à PIN#8 (SCL) with external 10kΩ pull up resistor
Channel 3 (magenta/3rd line) à PIN#32 (W0)
Channel 4 (blue/bottom line) à PIN# 10 (B0)
For the operation of the LED indicator in Responding mode, use the I2C command "Responding". This turns ON the PWM module, which alternately switches between the Blue state and the Idle White state. In this way, we achieve the White - Blue breathing effect (See Figure 9).
Worm states WS0 – WS7 (Figure 10)
In the Thinking mode, the LEDs are filled halfway like a worm chasing its tail and rotating in circles. Head of the worm is blue, and tail is white. This is implemented by the cycled sequential switching of states from WS0 to WS7 with the I2C command "Thinking" (See Figure 11).
For the transition from the Thinking mode to the Responding mode, need to use the I2C command "Responding" which reset the ASM to the initial condition and, after the Timeout state, starts the White-Blue breathing (See Figure 9).
This state used the State Dependent Items with the next configurations: DM0_0 (Worm 0), DM0_1 (0) in the states WS0 – WS 6 and DM0_1 (S7_B7) in the state WS 7, F(1) (000_111) in the states WS 0 – WS 3, WS 7 and F(1) (S4_B4) in the state WS 4, F(1) (S5_B5) in the state WS 5, F(1) (S6_B6) in the state WS 6.
D0 – PIN#32 (W0)
D1 – PIN#1 (W1)
D2 – PIN#12 (W2)
D3 – PIN#13 (W3)
D4 – PIN#16 (W4)
D5 – PIN#17 (W5)
D6 – PIN#28 (W6)
D7 – PIN#29 (W7)
Channel 1 (yellow) – PIN#7 (SDA) with external 10kΩ pull up resistor
D8 – PIN# 10 (B0)
Channel 2 (light blue) – PIN#8 (SCL) with external 10kΩ pull up resistor
D9 – PIN#11 (B1)
D10 – PIN#18 (B2)
D11 – PIN#19 (B3)
D12 – PIN#20 (B4)
D13 – PIN#25 (B5)
D14 – PIN#26 (B6)
D15 – PIN#27 (B7)
Meeting Green State (See Figure 12).
For Meeting mode, we use only one Meeting Green state. In this state the green LED lights up. When the mics are turned off, the red LED lights up additionally. Transition from Idle White state to the Meeting stateoccurs on I2C command "Meeting" or "Meeting (Mics muted)" when user needs mics off.
In this state used the State Dependent Items with the next configurations: DM0_0 (Red), DM0_1 (0), DM1_0 (To idle), and F(1) (None).
To verify the possibility of practical application, a test sample was developed, manufactured and tested. When developing the printed circuit board, it was decided to make it double-sided in the form of a circle with a diameter of 35 mm (Figures 13 and 14).
On the Top side, there is a GreenPAK SLG46880V and a 4-pin connector for power supply (VDD, GND) and transmission of I2C commands (SCL, SDA). The rest of the elements of the scheme are placed on the Bottom side.
On the Bottom side of the PCB there are placed eight white LEDs KT-2835W-01, eight blue LEDs KT-3528, one green LED KT-3528, and one red LED KT-3528. To limit the current, a 1 kΩ resistor is included in series with each LED (Figure 15, Figure 16).
The operation of the Smart speaker LED indicator in all modes can be viewed on a video VID_Smart_speaker_LED_indicator.
Due to its small size and low power consumption (for the presented design, the quiescent current is 1 μA) the use of GreenPAK SLG46880V will greatly simplify the manufacture and use of the smart speaker LED indicator. This will reduce the load on the microcontroller of the smart speaker, and the change of operating modes can be done by rewriting only one 8-bit register using I2C commands. In addition, the use of different sizes, types, and placement of SMD elements (resistors and LEDs) allows you to produce a LED indicator of any shape and appearance at the request of the customer.
Comments