Smart Speaker LED Indication with GreenPAK™

By Rostyslav Marushchak

Applications Engineer

Renesas Electronics Corporation

June 06, 2023

Blog

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 Indicator

In this article, 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.

(Figure 1: Application Circuit)

    D1…D8- White LEDs

    D9…D16- Blue LEDs

    D17- Green LED

    D18- Red LED

(Figure 2: States of ASM of LED Indicator)

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 (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 (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 Description

Idle

The device is idle and waiting for the user's command. White LEDs are on.

Listening

In this mode, the device is woken up through a wake word and is listening to the user command. All blue LEDs are breathing.

Thinking

In 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.

Responding

In 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 Mode

In 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 Indicator

The operation of the LED indicator is determined by the state of the I2C virtual inputs (Table 1. I2C register control data).

Address Byte

Register Bit

Block

Function

0x1DB

reg<3800>

Virtual Input <0>

Mics muted (1)/Mics unmuted (0). Default is 0.

reg<3801>

Virtual Input <1>

Meeting on (1)/Meeting off (0). Default is 0.

reg<3802>

Virtual Input <2>

Listening (1)/Responding (0). Default is 0.

reg<3803>

Virtual Input <3>

Thinking on (1)/ Thinking off (0). Default is 0.

reg<3804>

Virtual Input <4>

Not used

reg<3805>

Virtual Input <5>

Not used

reg<3806>

Virtual Input <6>

Stop PWM (1)/Start PWM (0). Default is 1.

reg<3807>

Virtual Input <7>

Timeout (ASM Reset) by changing the state of the register. Default is 0.

(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 (Figures 3 and 4).

Figure 3: ASM OUTPUT0

(Figure 4: ASM OUTPUT1)

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 WS7 and 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).

(Figure 5: Timeout State)

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 (Figures 3, 4, and 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).

(Figure 6: Idle White State)

Blue State (Figure 7)

In this state, all blue LEDs are on. Blue state is used to implement Listening mode and Resonding 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 (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).

(Figure 7: Blue State)

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)

(Figure 8: The Transition from the Idle Mode to the Listening Mode after Receiving I2C Command “Listening”)

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 (Figure 9).

(Figure 9: The Transition from the Thinking Mode to the Responding Mode after Receiving I2C Command “Responding”)

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. The 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" (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 (Figure 11).

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.

 

(Figure 10: WS0 State)

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)

 

(Figure 11: The transition from the Listening mode to the Thinking mode after receiving I2C Command “Responding”)

Meeting Green State (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 state occurs 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).

(Figure 12: Meeting Green State) 

4. Development of a Test Sample of the LED Indicator

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.

(Figure 13: Top Side of PCB)

(Figure 14: Bottom Side of PCB)     

On the Bottom side of the PCB there are placed eigth 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 (Figures 15 and 16).

The operation of the smart speaker LED indicator in all modes can be viewed on a video VID_Smart_speaker_LED_indicator.

(Figure 15: View on Top Side of a Soldering PCB)

(Figure 16: View on Bottom Side of a Soldering PCB)

Conclusion

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.

Smart Speaker LED Indication with GreenPAK™ | Renesas