ghaytweyhtoo

#The7thLiChuangElectronicContest#Smart speaker based on ESP32

 
Overview
* 1. Introduction to project functions
The power amplifier at home is not intelligent. Every time I want to listen to music, I have to turn it on manually, which is very troublesome. There is also a Xiaodu speaker, which is very convenient for listening to music and has powerful functions. The only drawback is that the speaker effect is average and it is mono. Therefore, I suddenly had the idea of ​​making a smart speaker, which integrates the power amplifier and the music playback circuit of offline voice control. It can play MP3 and mobile phone Bluetooth songs, control the infrared remote control appliances at home, broadcast the temperature and humidity in the room, and control the music rhythm light, so that I can feel more when listening to music. The circuit
adopts an upper and lower two-layer board design, the lower power amplifier board, the upper main control board, the power amplifier with two 15W full-range speakers, an external music rhythm light and infrared emission and temperature and humidity module circuit.
 
Main functions:
1. Voice infrared remote control, control air conditioners, fans, TV set-top boxes and other equipment;
2. Collect indoor temperature and humidity, voice broadcast;
3. Voice control amplifier power, amplifier mute;
4. Voice control MP3 module, play, pause, stop, previous song, next song, switch play mode, switch sound effects, change volume, etc.;
5. Voice control Bluetooth module, turn on and off Bluetooth, play, pause, previous song, next song, music sound +, music sound -;
6. Audio output automatic switching, manual switching;
7. Voice control music rhythm light power, lighting mode and other functions;
8. Connect to blinker, mobile phone remote control all the above functions;
9. Other functions will be added later.
 
 
Note: The theme is not limited, it can be a solution to a problem in life/work, a solution designed for a certain group of people/scene, a graduation project/course design/DIY project/purely cool project, etc. Mainly talk about what problem you solved by what means.
 
*2. Project attributes
The first version of the design still has many problems, mainly because of my limited level and poorly written program. It is all borrowed from other big guys on the Internet and pieced together. However, the expected functions were finally achieved, and I will slowly improve it later;
there will be a problem in actual use. If the music is too loud, the voice is difficult to be recognized. At this time, you can use a mobile phone to control it.
 
Note: Please indicate whether the project is publicly disclosed for the first time; whether the project is original; whether the project has won awards in other competitions, and if so, describe the details of the awards; whether the project has participated in the defense at school.
 
* 3.
Please enter the content of the open source agreement...
 
Note: Altruism is self-interest, please read the following content carefully.
Embrace open source and give unlimited value to the project. It is recommended that more than 80% of the core functions of the project be open source;
if a part of the function is irreplaceable and the project cannot solve the corresponding problem after deleting it, then the function implemented by this part is the core function of the project; for example, if an electronic load is designed and a host computer software is designed to monitor power changes, the electronic load is the core function and the host computer software is an auxiliary function; for example, an isolated 485 module is used in the electronic load to communicate with the host computer, then the communication function implemented by this 485 module is an auxiliary function;
the project should choose an open source protocol that suits it. If the project references other open source projects, the source should be indicated and the open source protocol of the original author should be followed; the original project is recommended to use the GPL3.0 open source protocol;
the functions directly referenced from the original circuit or original code of the open source project cannot be used as the core functions of your own project, and the functions directly implemented using the general modules on the market cannot be used as the core functions of your own project.
 
Please fill in the following information during the competition stage↓
 
*4. Hardware part
Main control board: mainly includes ESP32S, MP3 music module, M18 Bluetooth audio module, VCT1 offline voice module. The audio of MP3 music module and M18 Bluetooth audio module is connected to CD4052BM multiplexing chip, and the common output is connected to the internal audio input interface of the power amplifier board through audio plug or connection. The audio of MP3 music module or M18 Bluetooth audio module is output by controlling the high and low levels of AB pins of CD4052BM.
The power supply part uses LM2596S-5.0, with input voltage of 18V, output of 5V, and output current of up to 3A (some people may ask why LDO is not used, because the output current is not enough and the heat is serious). There is a problem with using DC-DC, which will affect the audio circuit. The only solution is to add more filter capacitors. The design was not well considered at the beginning, and the filtering was not done enough.
 
The high and low levels of PWM4 and PWM5 outputs of VCT1 offline voice module are used to control the power supply and mute of the power amplifier. Voice commands communicate with ESP32 through serial port 1 of the module. The microphone is directly soldered on the board, and the module uses an 8 ohm 2 watt speaker for voice broadcasting.
 
 
There are some problems with the circuit design of the MP3 audio module. The actual circuit cancels the power control circuit and directly shorts the 5V power supply to the 5V positive pole of the module power supply.
 
 
The M18 Bluetooth audio module needs to be controlled by a button or a mobile phone. Here I use a set of triode circuits to simulate the button and control it through the ESP32 four-way IO.
 
CD4052BM can actually input 4 channels, but only two are used here.
 
The SPI screen interface is reserved, but it is not used yet. The screen can be added later.
 
 
The infrared emission circuit and the temperature and humidity sensor are led out to facilitate installation on the shell, and at the same time prevent the circuit from heating and affecting the temperature and humidity sensor.
 
 
Amplifier board: The audio power amplifier uses TPA3116D2DAD, and the pre-stage uses NE5532 amplification circuit. The audio input of the amplifier can be external input (external audio plug) or internal input (audio output line of the main control board), which is specifically controlled by a double-row two-speed switch.
The power supply of the amplifier is controlled by MOS tube, and the power supply control and mute control interfaces of the amplifier are led out
 
 
 
 
*5. The software part
of the ESP32 program is in the attachment.
The program of the offline voice module needs to use the PWM4 and PWM5 pins as ordinary IO ports to output high and low levels .
 
 
In the main program, the semantic ID of the command word is used to determine which IO port controls what and whether to output high or low levels.
*6.
Please enter the content
 
of the BOM list... Note: The BOM list involved in the project. Please upload a screenshot of the BOM in this location. Please upload the list details in the attachment in PDF format. It is recommended to include model, brand, name, package, procurement channel, purpose, etc. The specific content and form should be based on the clear expression of the project composition.
 
*7. For the verification of the competition logo
 
, please upload a project picture containing the competition logo, and the logo is printed on the PCB in the form of silk screen.
Click zip to download the competition logo! (Competition logo).zip
 
* 8. Demonstrate your project and record it into a video. Upload
 
video requirements: Please shoot horizontally, with a resolution of not less than 1280×720, in the format of Mp4/Mov, and the size of a single video is limited to 100M;
video title: Lichuang Electric Competition: {Project Name}-{Video Module Name}; such as Lichuang Electric Competition: "Autonomous Driving"-Team Introduction.
 
More details: https://diy.szlcsc.com/posts/d76d9cb41705430e9a54e7a5feed07a5
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-15 16:35:45
  • Multi-channel RF transceiver clocking for radar and wireless 5G testers
  • Anyone familiar with cell phone components?
  • A very simple question for help
  • The circuit board is hot, and the power chip LT1085 is hot
  • Socket establishment
  • A Problem with Flyback Converters

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

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号