Ulltrasonic Spectrum Analyzer - Free Web App

Below you can watch the video and read what it is about.

At the beginning of the video tutorial, I open the DFT spectrum analyzer. Then I show the Arduino live DFT analyzer page. 

arduino real time ultrasonic spectrum analyzer

Next, I open my phone camera mirror application so I can record the Arduino and the ultrasonic sensor during the experiment. Here I am connecting the phone to the PC and mirroring the phone camera onto the computer screen. Now you can see the Arduino board and the ultrasonic sensor clearly. I am adjusting and aligning the camera for a better view. I built this phone camera mirror application myself, and you can use it for free. 

Now let's upload the Arduino code which you can get  at Arduino Real-time Ultrasonic Spectrum Analyzer page. In this setup I am using the Arduino Due. As you can see in the code, pin 9 is connected to the trigger pin of the ultrasonic sensor and pin 10 is connected to the echo pin. First, we upload the program to the Arduino Due. This program measures the distance of an object using the ultrasonic sensor and sends the distance data to the computer. We will then analyze this sensor signal using the DFT spectrum analyzer. The upload is now finished, so I will restart and reset the board. 

Now we go back to the Arduino DFT analyzer application. Next, I click the Connect button. As you can see, the COM port data is already appearing in the window. Now I click the Record button, and the DFT analyzer starts running. The top graph shows the ultrasonic sensor sampled distance signal in the time domain. Below that you can see the magnitude spectrum and the phase spectrum calculated using the Discrete Fourier Transform. Let me switch to full screen and resize the window so the graphs are clearer. Now, when I move an object closer to the ultrasonic sensor, you can see the rise and fall in the time-domain signal. At the same time, the magnitude and phase plots update in real time. From the spectrum plot, you can observe the peak frequencies of the signal. Here you can also see the average value and the current distance measured by the sensor. You can also see the peak frequency displayed on the analyzer. Now I will stop the analyzer and disconnect the USB COM port. So this is the real-time auto spectrum analyzer that I built for Arduino sensor signals. 

I hope you like it. 

Post a Comment

Previous Post Next Post