Measuring Voice Speed With Arduino Mega 2560


  • In this article I will explain about measuring Voice Speed with Arduino Mega 2560.
  • It can be used to identify the voice of the speed.
  • This works in the same way a bat uses high pitched tones to navigate in the dark.
  • Arduino Mega 2560
  • Ultrasonic Transreciever
  • Hookup wires
Ultrasonic Sensor (HC-SR04):
Figure 1: Ultrasonic Sensor
  • It is used to produce the high-frequency sound effect.
  • It can measure the signal from the sender to the receiver.
  • The echo to be determined from the object.
We can fix the Ultrasonic Sensor (HC-SR04):
  • Hospital for medicine,
  • Industry,
  • Home etc.
  • Connection from Sensor to Arduino Board:
  • Connect the Trigger pin to digital pin 03 of the board.
  • Connect the Echo pin to the digital pin 04 of the board.
  • Connect the Vcc pin to the 5V of the board.
  • Connect the GND pin to the Gnd of the board.
  1. int trigPin=03; //Sensor Trip pin connected to Arduino pin 13  
  2. int echoPin=04;  //Sensor Echo pin connected to Arduino pin 11  
  3. float pingTime;  
  4. float speedOfSound;  
  5. int targetDistance=6; //Distance to Target in inches  
  6. void setup() {  
  7.   // put your setup code here, to run once:  
  8.   Serial.begin(9600);  
  9.   pinMode(trigPin, OUTPUT);  
  10.   pinMode(echoPin, INPUT);  
  12. }  
  14. void loop() {  
  15.   // put your main code here, to run repeatedly:   
  17.   digitalWrite(trigPin, LOW); //Set trigger pin low  
  18.   delayMicroseconds(2000); //Let signal settle  
  19.   digitalWrite(trigPin, HIGH); //Set trigPin high  
  20.   delayMicroseconds(10); //Delay in high state  
  21.   digitalWrite(trigPin, LOW); //ping has now been sent  
  23.   pingTime = pulseIn(echoPin, HIGH);  //pingTime is presented in microceconds  
  25.   speedOfSound = (targetDistance*2)/pingTime*(1000000)*3600/63360;        //converts to miles per hour  
  26.   Serial.print("The Speed of Sound is: ");  
  27.   Serial.print(speedOfSound);  
  28.   Serial.println(" miles per hour");  
  29.   delay(1000);  
  30.   }  
  • In this article I have explained about measuring voice speed.
  • It can work under the trig condition side.
  • When the distance is in the over level it can measure the distance in the target inches.
  • If the target is 6 inches they need 12 inches.
  • The target place is 6 and return place is 06.
  • The speed of the range is displayed in the serial monitor.
Figure 2 : Output
Read more articles on Arduino: