aytwartoofyoroo

[Electronic Comprehensive Design] Offline Voice Controller

 
Overview

1 Introduction

      Using a dedicated speech recognition chip, we designed an offline voice-controlled socket that gets rid of network restrictions and can control the on and off of home devices through voice even when there is no network. This project provides a special shell that can be used in daily life after successful testing and has practical value.

2 knowledge points

(1) Learn the design ideas and methods of smart home products;

(2) Learn how to use offline speech recognition chips;

(3) Learn the principles of relay driving and understand the rules of high-voltage isolation wiring;

(4) Understand the design ideas of isolated power supply 220 to 5V;

(5) Understand the selection and use of electret microphones;

(6) Understand how to design a suitable PCB shape according to the shell;

(7) Learn to use Lichuang EDA to design schematic diagrams and PCB diagrams;

(8) Learn the composition of PCB boards and factory production processes;

(9) Practice welding skills and master the use of multimeters, soldering irons and other tools;

3 Introduction to onboard resources

(1) Onboard 220V to 5V/1A isolated power module, which can be directly connected to the mains power;

(2) Onboard relay, which can be connected to external electrical equipment;

(3) Using a dedicated speech recognition chip, the firmware has been burned and can be used without code development;

(4) In addition to voice control, it also provides a button to manually control the on and off status of the device;

4 Circuit Function Analysis

      The circuit design is simple and is mainly composed of: 220V to 5V isolated power module interface circuit, SNR3512 voice recognition circuit, relay control circuit, LED indication circuit and button control circuit.

4.1 220V to 5V isolated power supply circuit

     Since designing an isolated power supply is a little troublesome, in order to ensure the safety and success rate of the design, this case uses a 220V to 5V isolated power supply module. The input and output use a 4P terminal block or two 2P terminal blocks. The 3rd and 4th pins of the terminal marked CN1 in the picture are connected to the U1 power module, and 220V AC is used for input (you can find some two-wire plugs for modification). The isolated power module outputs 5V to power the voice chip. Pins 1 and 2 of the terminal block are connected to the power supply device and can be used with a light bulb. Pay attention to electrical safety during installation. The live and neutral wires cannot be connected to pins 2 and 3 at the same time to prevent short circuit! ! There are many similar modules, so I won’t recommend them for now. The next version will use 5V power supply directly.

YHXaLleQFuLfNpEkdmw2dWLSgtL2LVNcgbzbblyZ.png

SE9TzEPqOZxFTG4i3DW1PiQxHjEdiDRdlRPg1Yz6.png

                 220V to 5V isolated power module

4.2 Speech recognition circuit

     This circuit uses Zinajie's SNR3512VR enhanced speech recognition microcontroller. This chip is based on a 32-bit high-quality speech recognition processor, with simple peripheral circuit design and rich functions. The main functions are as follows:
  • 3 sets of 16-bit timers (Timer);
  • Single-channel hardware PWM-IO output provides complementary output and has external signal capture function;
  • 3-channel, 12-bit SAR analog-to-digital converter (ADC), equipped with MIC preamplifier, AGC/PGA, supports differential MIC input, and various analog sensing element inputs;
  • A 14-bit digital converter (DAC) paired with a 1.5- watt push-pull amplifier can directly drive the speaker;
  • Each I/O pin is independently controlled and can be used as a multi-purpose GPIO;
  • UART TX/RX can be used as serial communication interface

    bAHUqQLRde4ycg1ZxZUgVVOpJCf1p3SPIsnPuCZy.png

    UaemrS1ZvKo7WKVafrY7QLVeShyT3JabSwN8JdPz.png

       When customizing the function, the 8-pin PA3 button input control, the 9-pin PA4 external relay controls the electrical equipment, and the 13-pin PA15 external LED input

  • The button function is: without voice recognition, press the button and the relay will close; press the button again and the relay will close, realizing the function of manual switch;
  • The function of the LED light is: when the voice command is recognized, the LED light lights up. When the LED goes out, turn off voice recognition;
  • MIC electret microphone: collects voice information. The test uses a low impedance -36db direct plug model.
  • U2 speaker: A small 8Ω 1W speaker is used. You can also design a power amplifier circuit yourself to make the sound louder.

4.3 Relay control circuit

      This part uses an NPN tube to design a switching circuit to control the on-off of the relay. The D1 diode protects the driving transistor from being broken down by the back electromotive force of the inductor in the relay. It is also called a freewheeling diode. The R3 input is connected to the PA4 pin of the voice chip. When the voice signal gives a high-level signal, the transistor is turned on, the relay is closed, and 220V_L is connected to 220V_OUT.
eKaarQGD6PbOhJDecEStffjUdfcbfWlpgyFcmB1d.png

5Application examples

0BEMG96gAE6kQMndEVGghIEp3DuOr7I1iOAWdWu2.png

                                  

 

              Night light transformation

h8YmPJV5cgJ7gTTK1Ww3YqhhRo5UedDKKjedqRxT.png

                  

              Night light transformation

bRyXVjQPoVWBXGATqeCQzAv65CdTTFWh2Zu6Xa9W.png

   Desk lamp modification

6 things to note
  1. This circuit works at 220V. You can omit the isolated power module and work directly with 5V. Buy a small 5V desk lamp and transform it into a voice control work;
  2. The voice chip is a customized chip. If you need to use it, you can contact the original manufacturer or use some other chips. Lichuang EDA does not provide any purchase requirements.
  3. This program is a practical application program and is only used for learning reference. All commercial activities for profit are strictly prohibited;
  4. This circuit matches the housing and can be designed according to the overall dimensions and layout in the reference picture, or you can find some public molds for use;
  5. Pay attention to the power consumption. This power module cannot be connected to high-power appliances such as electric fans. The power module can be changed to be used in more situations;
  6. If you have teaching or other needs for bulk purchasing, you can contact Lichuang EDA to recommend relevant manufacturers to purchase related materials.

 

       What is written at the back: The speech recognition chip manufacturer has discontinued production, and this solution is only for schematic and PCB learning. If you are interested in speech recognition, please click to view the smart AI offline voice night light case: https://oshwhub.com/course-examples/zhi-neng-jia-ju-zhi-nengai-yu-yin-xiao-ye- deng

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2024-11-22 18:39:31

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号