WT voice chip design in intelligent voice sensing hand sanitizer machine——WT588F02B-8S

Publisher:Jinyu521Latest update time:2024-03-29 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

With the progress of human civilization, people pay more and more attention to health and hygiene, especially in the current COVID-19 situation. It is particularly important to wear masks when going out and disinfect and wash hands when returning home. Hand washing has become an indispensable part of people's daily life. This has given rise to many products related to hand washing. Here we mainly analyze a product that automatically dispenses liquid with proximity sensing - the smart voice sensing hand sanitizer.

Compared with traditional press-type hand sanitizers, smart voice-sensing hand sanitizers have several advantages:

1. Non-contact, more hygienic;

2. Automatic liquid discharge, more convenient;

3. The liquid output is adjustable, and the lack of liquid reminder is more intelligent;

4. Voice prompts, more user-friendly. Based on the above advantages, it has been widely recognized by the market, and can be seen on major online shopping platforms, with considerable sales.

So how does it work?

The intelligent voice-sensing hand sanitizer is mainly composed of several functional components: 1. Main control MCU; 2. Infrared proximity sensor; 3. Gear motor; 4. Button and LED light; 5. Voice IC and speaker. The working principle is that the infrared proximity sensor detects an object approaching, and then transmits the signal to the main control MCU. After receiving the signal, the main control MCU controls the motor to rotate, thereby driving the liquid to flow out of the liquid outlet. There will be voice prompts during the whole process and button operation. It is the main control MCU that sends instructions to control the voice IC to play the sound.

If you want to develop such a product, how do you choose a development plan under the premise of quantity, speed, quality and economy?

Here we recommend a solution: main control MCU + WT588F02B voice IC (with infrared proximity sensor function code). The reason is that WT588F02B voice IC solves the function of infrared proximity sensor, reducing the development workload of the main control MCU and the time for early verification and debugging. Moreover, the transmission of proximity signals and the control of sound playback instructions are unified using the standard UART interface, which facilitates the selection of the main control MCU and reduces the difficulty of code writing, greatly reducing the failure rate of product development.

What kind of IC is WT588F02B?

First of all, the WT588F02B chip is a multifunctional voice chip with a 16-bit PWM output, which can directly drive an 8-ohm 0.25W speaker. Secondly, it is also a powerful data processing chip (DSP) with its own multiplier-accumulator, which can quickly process compression and decoding algorithms. Furthermore, it has a rich number of pins and is compatible with many communication protocols, such as one-line communication, UART, IIC, SPI, etc. Finally, the WT588F02B is also a FLASH chip, which can be repeatedly erased and written, supports power-off memory function, and can also implement voltage detection function without using multiple IO pins.

Let’s take a closer look at this plan:

Design of intelligent voice sensing hand sanitizer

1. Overview of the design of intelligent voice-sensing hand sanitizer

92fd5bd0d1e6411394d89e4b1be2d613

1.1 Application framework diagram

661a704b0a22442c8689e685cc7bfc4b

1.2 Framework diagram introduction:

1. The main control MCU sends instructions through Uart to control WT588F0B to play sound and stop playing;

2. The main control MCU obtains the infrared sensor signal through Uart (or actively sends a proximity signal);

3. The main control MCU controls the motor to discharge liquid;

4. Set the liquid output by pressing the button;

1.3 Voice prompt content:

1. Voice prompt for lack of liquid;

2. Low battery voice prompt;

3. Voice prompts for key operation;

4. Slogans on civility and hygiene (mainly used in public places)

How to wash hands scientifically teaching voice (mainly suitable for children, to help them develop the correct hand washing habits)

WT588F02B basic functions and features

(1) 16-bit DSP voice chip, 32Mhz internal oscillation;

(2) Working voltage 2.0~5.5V;

(3) 16-bit PWM/DAC output, can directly drive 8R 0.5W speakers;

(4) Support 6K~32Khz WAV files;

(5) Customers can replace the internal voice content of the chip online by downloading the supporting test board;

(6) Support 32768 segments of addresses, and can be expanded if more requirements are met;

(7) The chip has 200K bytes of storage space (excluding the main control program);

(8) Low voltage detection function;

WT588F02B-8S design schematic:

6de3e57a0e6340afbbdf6b763dd9037a

Interface introduction:

2b73b6be27ea4f2abe71217a1905378b

3.1 Protocol Command Format

WT588F02B-8S has a built-in standard UART asynchronous serial port interface, which is a 3.3V TTL level interface. The communication data format is: start bit: 1 bit; data bit: 8 bits; parity bit: none; stop bit: 1 bit. To use the computer serial port debugging assistant, you need to correctly set the serial port parameters, as shown in the figure:

2239f7e4e17748029d9c2f3d4fdb21e8

3.2 Voice playback instructions:

0fc79d0d8f054462be5d5510eb5c732c

3.3 Infrared detection instructions:

8dc50c776a6f4d1a82a87e3dbb3c4950

4. Program Examples

Take the STC15 microcontroller as an example:

Serial port/timer initialization Init()

/****************************************************** ************************/

void Init(void)

{

/* *************Serial port 1 initialization****************/

SCON = 0x50; //8-bit variable UART

TMOD = 0x20; //Set Timer1 as 8-bit auto reload mode

TH1 = TL1 = -(FOSC/12/32/BAUD); //Set auto-reload vaule

TR1 = 1; //Timer1 start running

ES = 1; //Enable UART interrupt

/**************IO power supply clock chip initialization****************/

P2M0|=0X02;

P21=1; //Push-pull output high level, can provide more than ten mA current to the clock chip

/* *************Timer 0 initialization****************/

AUXR &= 0x7F; //Timer clock 12T mode

TMOD &= 0xF0; //Set timer mode

TL0 = 0x00; //Set the initial value of the timing

TH0 = 0xA8; //Set the initial value of the timing

TF0 = 0; // Clear TF0 flag

ET0 = 1; // Enable timer interrupt

TR0 = 1; //Timer 0 starts timing

/* *************Door start****************/

WDT_CONTR = 0x04; // //18.432M : 0.68s

WDT_CONTR|=0x20;

EA = 1; //Open master interrupt switch

}

/****************************************************** ************************/

Serial port sending function SendData(byte dat)

/*---------------------------

Send a byte data to UART

Input: dat (data to be sent)

Output:None

----------------------------*/

void SendData(BYTE dat)

{

//Wait for the completion of the previous data is sent

while (busy1);

busy1 = 1;

SBUF = dat; //Send data to UART buffer

}

/****************************************************** ************************/

Voice playback function send_uart_play()

void send_uart_play(unsigned char len) // 7E 05 A0 00 01 A6 EF

{

unsigned char i,j,sum=0;

j=len+2;

send2_buf[0]=0x7e;//

send2_buf[1]=len+2;

for(i=0;i

for(i=1;i

send2_buf[len+2]=sum;

send2_buf[len+3]=0xEF;

SendData(0x00); //Low level wake up the serial port

for(i=0;i<(len+4);i++)SendData(send2_buf[i]);

}

The WT588F02B series voice chips currently have three packaging forms: SOP8, SOP16, and SSOP24. As a high-tech enterprise focusing on voice technology research, Weichuang Zhiyin has always adhered to the goal of "serving engineers well" and the standardization of industry voice interaction devices. It is committed to making complexity simple and providing fast voice chips and smart IoT application solutions. The WT588F series application design solution has mature application cases in the consumer electronics industry, such as smart alarm clocks, smart water cups, and atomizing humidifiers. The application of consumer electronics products is an important development area for the company. In the future, Weichuang Zhiyin will launch standardized voice chips in more industries to further enhance the design experience of engineers and empower the standardization of the consumer electronics industry.


Reference address:WT voice chip design in intelligent voice sensing hand sanitizer machine——WT588F02B-8S

Previous article:PS5PS4 game console Bluetooth 5.2 transmitter QCC3040 solution
Next article:Voice Control Tea Bar Machine Module Selection

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号