MCU design: based on stm32 intelligent voice recognition Bluetooth audio (ld3320 voice recognition module + mp3 module + speaker + dot matrix screen + OLED + Bluetooth + mobile app)

MCU design: based on stm32 intelligent voice recognition Bluetooth audio (ld3320 voice recognition module + mp3 module + speaker + dot matrix screen + OLED + Bluetooth + mobile app)

1. Main functions:

1. The mobile app plays the music from the memory card, and the dot matrix screen jumps with the music at the same time

2.0 LED, mobile app display current volume and current status

3. The mobile app can remotely adjust the volume threshold, you can switch to the previous song and the next song, and the next song will be automatically played after the music is played

4. The voice module controls the status of the Bluetooth speaker by recognizing human voices (previous song, next song, pause, play, volume up, volume down)

Of course, other functions can also be added~

Customized gift materials:

1. Object

2. Source code and mobile app

3. Schematic

4. After-sales online service (code explanation)

Second, the physical map:

3. Part of the source code:

Main function part:

while (1)
  {
        

        key = RX;//Mobile phone button value
        MP3(key);
         
        if(flag_song==1)//The value of the button is not equal to 1, 1 means pause (dot matrix screen)
        {             for(i=1;i<9;i++ )             {                 num = rand()%10;//random value                 MAX7219_WRITE(i,disp1[num][0]);             }              HAL_Delay(200);                 }         if(led_flag==1)         {             HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,GPIO_PIN_RESET) ;             HAL_Delay(1000);             HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,GPIO_PIN_SET);             led_flag = 0;         }













        
    
        
  }

Speech recognition part:

void USART3_IRQHandler(void)
{     if(__HAL_UART_GET_FLAG(&huart3, UART_FLAG_IDLE) != RESET) // idle interrupt flag is set     {         __HAL_UART_CLEAR_IDLEFLAG(&huart3); // clear interrupt flag         HAL_UART_DMAStop(&huart3); // stop DMA receiving         UART_RX_STA3 = UART_RX_LEN3 - __HAL_DMA_GET_COUNTER(huart3.hdmarx); // The total data amount minus the unreceived data amount is the received data amount         UART_RX_BUF3[UART_RX_STA3] = 0; // Add terminator         UART_RX_STA3 |= 0X8000; // Mark the end of receiving // if(strcmp((char *)UART_RX_BUF3,"1111")==0){RX=2;led_flag=1;HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,GPIO_PIN_RESET);}//play // if(strcmp(( char *)UART_RX_BUF3,"2222")==0){RX=1;led_flag=1;HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,GPIO_PIN_RESET);}//Pause







        


//        if(strcmp((char *)UART_RX_BUF3,"3333")==0){RX=4;led_flag=1;HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,GPIO_PIN_RESET);}//上一首
//        if(strcmp((char *)UART_RX_BUF3,"4444")==0){RX=3;led_flag=1;HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,GPIO_PIN_RESET);}//下一首
//        if(strcmp((char *)UART_RX_BUF3,"5555")==0){RX=5;led_flag=1;HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,GPIO_PIN_RESET);}//音量加
//        if(strcmp((char *)UART_RX_BUF3,"6666")==0){RX=6;led_flag=1;HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,GPIO_PIN_RESET);}//音量减
        if(strcmp((char *)UART_RX_BUF3,"1111")==0){RX=2;led_flag=1;}//播放
        if(strcmp((char *)UART_RX_BUF3,"2222")==0){RX=1;led_flag=1;}//暂停
        if(strcmp((char *)UART_RX_BUF3,"3333")==0){RX=4;led_flag=1;}//Previous song
        if(strcmp((char *)UART_RX_BUF3,"4444")==0){RX=3;led_flag=1;}//next song
        if(strcmp((char *)UART_RX_BUF3,"5555")==0 ){RX=5;led_flag=1;}//Volume plus
        if(strcmp((char *)UART_RX_BUF3,"6666")==0){RX=6;led_flag=1;}//Volume minus
        UART_RX_STA3=0 ;
        
        HAL_UART_Receive_DMA(&huart3, UART_RX_BUF3, UART_RX_LEN3); // restart DMA reception
        
    }
    
    HAL_UART_IRQHandler(&huart3);
}

4. Schematic diagram:

        The following is the schematic diagram of each module of the whole project:

 

Five, more:

If you want to understand the whole project in more detail, you can go to station b to watch this video demonstration, the following is the video link:

MCU design: based on stm32 intelligent voice recognition Bluetooth audio (ld3320 voice recognition module + mp3 module + speaker + dot matrix screen + OLED + Bluetooth + mobile app)_哔哩哔哩_bilibili

Give a free triple! ! !

Guess you like

Origin blog.csdn.net/qq_51243202/article/details/130227675