0% found this document useful (0 votes)
55 views8 pages

School of Engineering and Natural Sciences: Introduction To EE/COE

This lab report summarizes an experiment using an Arduino board, ultrasonic sensor, and DC motor. In the first part, the ultrasonic sensor was used to detect distance and control an LED. Next, the motor's direction was controlled over time. Finally, the ultrasonic sensor measured distance to control the motor's speed. The student answered questions about motor control methods and potential smart home applications using Arduino with sensors.

Uploaded by

extazyfox2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views8 pages

School of Engineering and Natural Sciences: Introduction To EE/COE

This lab report summarizes an experiment using an Arduino board, ultrasonic sensor, and DC motor. In the first part, the ultrasonic sensor was used to detect distance and control an LED. Next, the motor's direction was controlled over time. Finally, the ultrasonic sensor measured distance to control the motor's speed. The student answered questions about motor control methods and potential smart home applications using Arduino with sensors.

Uploaded by

extazyfox2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

SCHOOL OF ENGINEERING AND NATURAL

SCIENCES
Introduction to EE\COE

Engineering

Post-Lab Report

Name, Surname: Aleksandr Nevzorov

Department, Student ID: EEE, 61230014

Date: 05.12.2023
Introduction:

The objective of this lab is to show how an Arduino board can read external data that is accessible from sensors
or other circuit components and how its digital outputs may be used to operate a motor. In this instance, we will
observe that interpreting the data from an ultrasonic sensor, utilizing digital output to regulate the motor, and
creating a basic algorithm to manage the motor based on sensor values.

Theoretical Background:

1)Arduino board: Easy-to-use hardware and software form the foundation of the open-source electronics
platform Arduino. With its extensive function library, Arduino makes it simple to create several tiny systems
quickly. Additionally, our mBot libraries are better suited for our board because they are used with nCore, a
customized Arduino Uno version.

2)Software: The Arduino IDE must also be adjusted for the mCore.It goes by the moniker mBlock. Two
interfaces are available for mBlock; the first is appropriate for those lacking sufficient programming
knowledge, while the second is the traditional Arduino IDE.

3)PWM: A method for obtaining analog results using digital methods is called pulse width modulation, or
PWM. A square wave is a signal that can be turned on and off using digital control. With this on-o pattern, you
may mimic voltages between full on (5 V) and o (0 V) by varying the percentage of the signals on time
compared to its off duration. The term "pulse width" refers to the length of "on time". You modify that pulse
width in order to obtain different analog values. With an LED, for instance, if you repeat this on-o sequence
quickly enough, the outcome seems to be a constant voltage between 0 and 5V regulating the LED's brightness.

4)Ultrasonic sensors: Ultrasonic sensors operate on a similar principle to radar or sonar, which assess a
target's attributes by interpreting the echoes from radio or sound waves, respectively. They are also referred to
as transceivers when they can both send and receive, but they are more commonly called transducers. In order
to calculate the distance to an object, active ultrasonic sensors produce high frequency sound waves, measure
the echo that is returned to them, and record the amount of time that elapses between transmitting and receiving
the signal. In essence, passive ultrasonic sensors are microphones that can identify ultrasonic noise when it's
present in specific situations.

4.1) Principles of work: It releases a 40 000 Hz ultrasonic that travels through the atmosphere and returns to
the module when it encounters an item or obstruction. You may compute the distance by taking the sound's
speed and travel time into account. Ground, VCC, Trig, and Echo are the four pins of an ultrasonic module. It
is necessary to connect the module's Ground and VCC pins to the Arduino Board's Ground and 5-volt pins,
respectively, and its trig and echo pins to any DigitalI/O pin on the Arduino Board.

5)Equipment needed for the Lab:

• Arduino Uno Board

• Ultrasonic sensors

• DC Motor

• Arduino IDE (Software)

• A laptop for each group


2
• Motor driver

• Jumper cables

• LED

• Power supply or 9V battery

Experimental Procedure:
Reading data from an Ultrasonic Sensor with Arduino (Closeness Blinker)
Our goal is to estimate the distance between an object and the ultrasonic sensor by connecting it to the Arduino
board in this stage. in order for it to serve as a point of reference for an LED light to blink. The LED blinks
more quickly the closer it gets to the item; once it falls below a threshold of less than 10 cm, the LED remains
on. This helps prevent hitting the robot by acting as an alert when it gets near an item.In the first circuit we
have an ultrasonic sensor and LED, which are connected to the Arduino board via the USB to the laptop. The
sensor reacts differently to the position of an object near or far from it.
Controlling DC Motor with Arduino
In this stage our goal is to use the L298N Motor Driver to control the direction and speed of a hobby
gearmotor. The motor in this code moves for three seconds in each direction before progressively slowing
down in the final second of a loop.So, we should connect the Motor driver and Gear Motor to the Arduino
board to the laptop.
Controlling DC Motor speed using Ultrasonic Sensor and Arduino
The purpose of this part is to use PWM to regulate the speed of a hobby gearmotor by utilizing an ultrasonic
sensor and the L298N motor driver. Depending on how near the item is to the sensor, this code modifies the
motor's speed. The motor driver, ultrasonic sensor, gear motor, power supply, and USB connection to your
laptop should be connected to the Arduino board.

Results and Discussion:


1)In the first case we have the circuit we have the sensor, which reacts differently to the position of an object
near or far from it.

3
2)In the second case we have

the DC Motor, which changes

its direction of rotation over

time.

4
3)In the third case we have the

circuit with the ultrasonic sensor

and DC Motor, which changes

its speed rotation, as the object

approaches or moves away from

the sensor.

5
Questions:

Q1) For the control of the speed

and direction of a Motor we can

use Potentionmeter, Rotary

Encoder, Half Effect

Sensor and Light Sensor.

Q2) In my opinion, one of the

main the main problems, which

we can solve by Arduino, is

creating of smart security

system in the house. Arduino

gathers information from

various sensors and notifies the

homeowner via smartphone

anytime it detects anomalous

behavior or a breach. To

improve security measures,

Arduino may also be used to

control other parts like video

cameras or alarm systems.

Q3) The Ultrasonic Sensor

projects an infrared beam

towards the surface, and the


6
receiver measures the quantity

of light that is reflected back.

The majority of light generated

by the sensor is reflected back to

the receiver when it is

positioned above a bright-

colored surface, signifying a

high reflectivity. In contrast, the

majority of the light that is

emitted is absorbed when the

sensor is above a dark-colored

surface, which results in a low

reflectivity.

Robotics and automation

applications frequently employ

line follower sensors. They

make it possible for robots to

follow a predetermined route or

line without direct supervision

or direction from humans. In

line-following robots, for

instance, the sensor is positioned

in front of or under the robot,


7
and it continually finds the line

beneath it.

References:

1-Lab Manual 4

You might also like