0% found this document useful (0 votes)
7 views

Control Engineering Experiment 3

COntrol Engineering notes experience 3 sample for engineering students
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Control Engineering Experiment 3

COntrol Engineering notes experience 3 sample for engineering students
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Lab Experiment 3

in

Control Engineering
ME 20

By:
Justine Dwite Gedalanga
Markjoseph Gallano
Ysi Adonil Gange
Ranz Clarence Aguilar
September 2024

I. Experiment Title: FUNCTIONAL TEST: ULTRASONIC SENSOR

II. Objectives:
 Understanding the Principles of Ultrasonic Sensing:
The first objective is to gain a fundamental understanding of how ultrasonic sensors
operate.
 Practical Application of Measurement Techniques:
Another key objective is to apply theoretical knowledge in a practical setting. By
conducting experiments, participants can learn how to set up ultrasonic sensors,
program them (often using platforms like Arduino), and interpret the data collected.

III. Materials (attached photos)

Arduino Ultrasonic Sensor M-M Dupont Wire

USB Cable Breadboard


Wire
IV. Procedure (step-by-step with photos)
1. Gather Required Materials Collect all necessary components for the experiment:
 Ultrasonic Sensor: Commonly used models include HC-SR04.
 Microcontroller: An Arduino board (e.g., Arduino Uno or Mega).
 Connecting Wires: Jumper wires for connections.
 Power Supply: USB cable or battery pack to power the microcontroller.
 Breadboard (optional): For easier connections if needed.
2. Circuit Assembly Assemble the circuit according to the following steps:
 Connect the VCC pin of the ultrasonic sensor to the 5V pin on the
Arduino.
 Connect the GND pin of the ultrasonic sensor to a GND pin on the
Arduino.
 Connect the Trig pin of the ultrasonic sensor to a digital pin on the
Arduino.
 Connect the Echo pin of the ultrasonic sensor to another digital pin on
the Arduino
3. Code Development: Write and upload code to your microcontroller that will
control how data is read from the ultrasonic sensor. Here’s a simple example
code snippet for an Arduino.
4. Upload Code and Test: Upload your code to the Arduino using an IDE such as
Arduino IDE. Open the serial monitor to observe distance readings as you move
objects closer or further away from the sensor.
V. Schematic:
VI. Code:
#include <Bonezegei_HCSR04.h>

const int TRIGGER_PIN = 11;


const int ECHO_PIN = 12;

Bonezegei_HCSR04 ultrasonic(TRIGGER_PIN, ECHO_PIN);

void setup() {
Serial.begin(115200);
}

void loop() {
int d=ultrasonic.getDistance();
Serial.print("Distance:");
Serial.print(d);
Serial.println(" cm");
delay(100);
VII. Data Analysis:
 When the ultrasonic sensor’s code is already uploaded to the Arduino it will
automatically read the distance where you point the sensor at.

VIII. Conclusion:
 The ultrasonic sensor will automatically detect the accurate distance of an
object once it is placed in front of the sensor. It can be used for certain
applications like in the construction, agriculture and manufacturing, etc.

IX. References
https://iask.ai/?
mode=question&options[detail_level]=detailed&q=data+analysis+in+ultrasonic+arduino
https://www.youtube.com/watch?v=n-gJ00GTsNg

You might also like