Arduino and Matlab for Voice Analysis | applied electronics engineering

Latest

Arduino and Matlab for Voice Analysis

By Applied Electronics - Monday, May 8, 2017 No Comments
In this tutorial you will learn how you can use Arduino and Matlab for Voice Analysis. The Arduino and extra circuitry will be used for instrumentation and Matlab will be used as the software for plotting the voice input in real time. Because of Arduino it is now easy sense signal by using its ADC(Analog Digital Converter) and send over USB to computer or software running in the computer like Matlab.

The basic idea here is to create circuit which has microphone and amplifier. The output from the amplifier is then connected to the Arduino ADC. When you speak on the microphone, the sound energy is converted to electrical signal. This electrical signal is amplified by an amplifier(LM386 IC). The output is then fed to Arduino ADC. This ADC takes in the amplified analog signal and converts its to digital signal ranging from 0 to 1023. Afterwards, this digital signal is send to Matlab using the USB.

In matlab, we have various option to get the speech digital signal and plot it. For example we can use program code in python or matlab like in the tutorial Plotting audio analog signal in Matlab using Arduino and How to plot analog signal in Matlab using Arduino in real time. Here we will use simulink program. But it is very easy to use simulink to get arduino data(digital speech signal) and plot it in real time. For basic tutorial see How to make Real Time Oscilloscope using Simulink and Arduino.

So what we are doing essentially is depicted in the figure below.


Microphone and Amplifier and Arduino Circuit Diagram


How to make the the microphone/amplifier circuit and connect with Arduino is shown below.


Arduino and Matlab for Voice Analysis

Matlab Simulink Setup for Speech analysis


The next step is to setup simulink for reading the arduino sent signal and plot it in real time. The following picture shows how to make simulink model to work with Arduino UNO.

Arduino and Matlab for Voice Analysis

Running the simulation and Viewing the Voice in real time

After we run the simulink simulation and view the time scope we we see the following.


The higher peaks shows voice signal when spoken into the microphone.

If we increase change the value of 10kOhm potentiometer, we will see increase(decrease) in gain of the amplifier. We effectively are changing the sensitivity of the amplifier of input voice signal from the microphone.

For example by increasing resistance in the potentiometer we get the following real time signal graph.

Arduino and Matlab for Voice Analysis

Further increase in potentiometer value to maximum possible resulted in the following speech signal real time graph.


No Comment to " Arduino and Matlab for Voice Analysis "