Note: * is required
Please fill it out during the registration stage↓
This project is based on ESP32 as the core, trying to squeeze out the capabilities of its MCU as much as possible to create a multi-functional collection of highly comprehensive small modules. The functions include:
1. Voice recognition. Connect the digital microphone to ESP32 through I2S, and through esp-skainet offline speech recognition, the maximum number of custom voice command words is 100
2. Object recognition, text recognition (license plate recognition). Based on Baidu Smart Cloud, the RGB image obtained by the camera is converted into JPG, and the recognition result is obtained and displayed after being uploaded to Baidu Cloud through base64 and urlcode encoding.
3. Color recognition. The image acquired by the camera can be converted from RGB to HSL to determine each pixel, identify the color block, and obtain the coordinates of the color block.
4. Home appliance control. The air conditioner type can be set by voice, or the air conditioner type can be set in the setting interface. Currently, Gree, Midea, and Haier air conditioners are supported. The air conditioner code library is provided by IREXT, and the code library is stored in the spiffs partition of flash.
5.LVGL. Based on LVGL 7.6.0, more than 10 interface switches.
6. ADC button. When the ESP32 pins are extremely insufficient, an IO port is used, and the status of the three buttons can be read through resistor voltage division.
7. FFT spectrum, connect the digital microphone to ESP32 through I2S, and obtain the spectrum through software FFT and display it through lvgl img.
8. Mini games. Port of 2048 and Snake games.
9. Chicken soup every day. After entering the Daily Chicken Soup interface, HTTP randomly obtains a sentence and displays it.
Publicly available for the first time, both hardware and software are original.
Note: Please indicate whether the project has been made public for the first time; whether the project is original; whether the project has won awards in other competitions; if so, describe the details of the award; whether the project has participated in a defense in school.
CC-BY-NC-SA 3.0
It is prohibited to sell this item on Taobao or Xianyu! !
Note: Altruism means self-interest, please read the following content carefully.
Please fill in during the competition stage↓
The hardware part uses the ESP32-WROVER module with built-in 16Mb Flash + 4Mb PSRAM.
Two 3528 infrared tubes
four buttons
A digital microphone MSM261S4030H0 high-sensitivity digital silicon microphone chip
A display screen can be 1.3-inch ST7789 240*240 or 1.54-inch ST7789 240*240
The power supply uses AP3410 which can provide 1.2A current
24P FPC camera socket can use OV7725 OV2640 OV5640
Serial to TTL using CP2104
A gyroscope MPU6050
Schematic:
1.3 inch PCB:
1.5 inch PCB:
Note: It is recommended to use Lichuang EDA . If you choose other EDA tools, please upload schematics in PDF format, PCB drawings in PDF format, and PCB files in Gerber format in the attachments. Here you can explain in detail your project implementation principles and mechanisms, precautions, debugging methods, testing methods, etc. It is recommended to introduce your ideas to others in the form of pictures and texts.
The software part is developed using IDF 4.4
The main interface displays time, weather, temperature, date, astronaut animation, Bilibili fans and wifi connection status.
Long press the middle button to enter the menu selection button. The menus are
The software block diagram is as follows:
Speech recognition and face recognition use Espressif’s open source libraries
How to display LVGL external flash font on ESP32
Use LvglFontTool to generate font files . Select XBF font as the generation type and external BIN file.
Two files will be generated, a myFont.c and a bin file
Then put the bin file into the spiffs partition and it will be automatically burned into flash during compilation.
Modify myFont.c to obtain the bin file data and initialize the external font when entering it for the first time. Read the spiffs file into memory.
#include "lvgl.h"
#include "stdio.h"
#include <stdlib.h>
#include <string.h>
#include "esp_system.h"
#include "esp_vfs.h"
#include "esp_spiffs.h"
typedef struct
{
uint16_t min;
uint16_t max; uint8_t
bpp;
uint8_t reserved[3];
} x_header_t;
typedef struct
{
uint32_t pos;
} x_table_t;
typedef struct
{
uint8_t
adv_w ; int8_t r ; } glyph_dsc_t;
static x_header_t __g_xbf_hd = {
.min = 0x0020,
.max = 0xff1a,
.bpp = 4,
};
char *Font_buff = NULL;
// static uint8_t __g_font_buf[240]; //如bin文件存在SPI FLASH可使用此buff
static void init_font(void)
{
FILE *ff = fopen("/spiffs/myFont.bin", "r");
if (ff == NULL)
{
printf("Failed to open file for reading");
return;
}
fseek(ff, 0, SEEK_END);
long lSize = ftell(ff);
rewind(ff);
printf("Lsize %ld", lSize);
static uint8_t first_in = 1;
if (first_in == 1)
{
first_in = 0;
Font_buff = (char *)malloc(sizeof(char) * lSize);
}
int br = fread(Font_buff, 1, lSize, ff);
printf("Bytes read %d", br);
fclose(ff);
}
static uint8_t *__user_font_getdata(int offset, int size)
{
//如字模保存在SPI FLASH, SPIFLASH_Read(__g_font_buf,offset,size);
//如字模已加载到SDRAM,直接返回偏移地址即可如:return (uint8_t*)(sdram_fontddr+offset);
static uint8_t first_in = 1;
if (first_in == 1)//第一次进入的时候初始化外部字体
{
first_in = 0;
init_font();
}
return (uint8_t*)(Font_buff+offset);
// return __g_font_buf;
}
static const uint8_t *__user_font_get_bitmap(const lv_font_t *font, uint32_t unicode_letter)
{
if (unicode_letter > __g_xbf_hd.max || unicode_letter < __g_xbf_hd.min)
{
return NULL;
}
uint32_t unicode_offset = sizeof(x_header_t) + (unicode_letter - __g_xbf_hd.min) * 4;
uint32_t *p_pos = (uint32_t *)__user_font_getdata(unicode_offset, 4);
if (p_pos[0] != 0)
{
uint32_t pos = p_pos[0];
glyph_dsc_t *gdsc = (glyph_dsc_t *)__user_font_getdata(pos, sizeof(glyph_dsc_t));
return __user_font_getdata(pos + sizeof(glyph_dsc_t), gdsc->box_w * gdsc->box_h * __g_xbf_hd.bpp / 8);
}
return NULL;
}
static bool __user_font_get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t unicode_letter, uint32_t unicode_letter_next)
{
if (unicode_letter > __g_xbf_hd.max || unicode_letter < __g_xbf_hd.min)
{
return NULL;
}
uint32_t unicode_offset = sizeof(x_header_t) + (unicode_letter - __g_xbf_hd.min) * 4;
uint32_t *p_pos = (uint32_t *)__user_font_getdata(unicode_offset, 4);
if (p_pos[0] != 0)
{
glyph_dsc_t *gdsc = (glyph_dsc_t *)__user_font_getdata(p_pos[0], sizeof (glyph_dsc_t));
dsc_out->adv_w = gdsc->adv_w;
dsc_out->box_h = gdsc->box_h;
dsc_out->box_w = gdsc->box_w;
dsc_out->ofs_x = gdsc->ofs_x;
dsc_out->ofs_y = gdsc->ofs_y;
dsc_out->bpp = __g_xbf_hd.bpp;
return true;
}
return false;
}
//AliHYAiHei-Beta,,-1
//Font height: 24
//XBF font, external bin file
lv_font_t myFont = {
.get_glyph_bitmap = __user_font_get_bitmap,
.get_glyph_dsc = __user_font_get_glyph_dsc,
.line_height = 24,
.base_line = 0,
};
LV_FONT_DECLARE(myFont);
lv_obj_t *label = lv_label_create(obj, NULL);
lv_obj_set_style_local_text_font(label, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &myFont);
For object and text recognition:
First, you need to obtain the token on Baidu Smart Cloud, then convert the obtained image into JPG format, and then upload the data obtained through base64 encoding and urlcode encoding to Baidu in the form of post for identification. After the result is identified, the json data is obtained for analysis. and display.
For color recognition:
Convert each pixel of the acquired image to HSL and corrode it, search for the corrosion center, and then corrode outward from the corrosion center to obtain a new corrosion center.
Note: If your project involves software development, please upload the corresponding project source code in the attachment. Here you can describe in detail your software flow chart, functional module block diagram, explanation or popular science of related algorithms, source code structure, construction and configuration of compilation environment, source code compilation method, program burning method, etc. It is recommended to introduce your ideas to others in the form of pictures and texts.
Note: BOM list involved in the project. Please upload a screenshot of the BOM at this location. Please upload the list details in PDF format to the attachment. Suggestions include model, brand, name, packaging, procurement channels, usage, etc. The specific content and form should be based on clearly expressing the project composition.
Please upload a project picture containing the competition logo. The logo will be printed on the PCB in the form of silk screen printing.
Click the zip to download the competition logo! (Contest logo).zip
Video requirements: Please shoot horizontally, with a resolution of no less than 1280×720, in Mp4/Mov format, 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/06c94d90c2c447dfbd9ed7339ff4a5b1
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet