B.E Cse Batchno 232
B.E Cse Batchno 232
by
SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
(DEEMED TO BE UNIVERSITY)
Accredited with Grade “A” by NAAC
JEPPIAAR NAGAR, RAJIV GANDHI SALAI,
CHENNAI – 600 119
MARCH - 2021
SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
(DEEMED TO BE UNIVERSITY)
Accredited with “A” grade by NAAC
Jeppiaar Nagar, Rajiv Gandhi Salai, Chennai – 600 119
www.sathyabama.ac.in
BONAFIDE CERTIFICATE
This is to certify that this project report is the bonafide work of J.D.VIN RONALD
(Reg. No. 37110839) who carried out the project entitled “MOTOR SPEED
CONTROLLING IN RF USING ARDUINO” under my supervision from August 2020
to March 2021.
Internal Guide
Ms. T. Anandhi, M.E., CSE
ii
DECLARATION
I J.D.VIN RONALD hereby declare that the Project Report entitled “MOTOR
SPEED CONTROLLING IN RF USING ARDUINO” is done by me under the
guidance of Ms.T. Anandhi, M.E., CSE Department of Computer Science and
Engineering at Sathyabama Institute of Science and Technology is submitted in
partial fulfillment of the requirements for the award of Bachelor of Engineering
degree in Computer Science and Engineering.
iii
ACKNOWLEDGEMENT
iv
ABSTRACT
The aim of this project is to limit the speed of vehicles automatically in speed-restricted
areas such as the school and hospital zone, U-turn, etc., and to avoid accidents using an
ultrasonic sensor. Special type of transmitters which are tuned at a frequency of 433MHZ
are placed in a particular region. These transmitters radiate RF signals continuously. The
receiver in the vehicle is enabled when the vehicle comes within this radiation. Whenever
the vehicle is within the zone, the speed of the vehicle is controlled by the received signals.
That is, each time the speed of the vehicle is decreased to some cut-off and kept constant
until the vehicle moves out of the zone and the vehicle can accelerate itself. The ultrasonic
sensor device continuously sends signals to any vehicle or other obstacles in front of the
car and detects them. The distance which can be reached by the ultrasonic sensor is not
more than 4 meters. After receiving this signal, when any obstacle or vehicle detected by
the ultrasonic sensor device sends a signal to the arduino, the arduino sends a signal to
the motor and the vehicle stops immediately.
v
TABLE OF CONTENTS
ABSTRACT v
LIST OF FIGURES vii
1. INTRODUCTION 1
1.1 INTRODUCTION 1
1.2 AUTOMATED SPEED CONTROL(ASC) 2
2. BACKGROUND OF PROJECT 4
2.1 BACKGROUND OF PROJECT 4
2.2 PROBLEM STATEMENT 4
2.3 OBJECTIVE 4
3. HARDWARE DETAILS 5
3.1 HARDWARE DETAILS 5
3.2 ARDUINO UNO 5
3.3 HW WATT BATTERY 9
3.4 RELAYS 11
3.5 DC MOTOR 13
3.6 RF MODULE 15
3.7 JUMP WIRE 17
4. SOFTWARE DETAILS 19
4.1 RADIO FREQUENCY TECHNOLOGY 19
4.2 OVER SPEED CONTROL SYSTEM 21
vi
5. ARCHITECTURE AND WORKING MODEL 23
REFERENCES 26
APPENDIX 27
A. SCREENSHOTS 27
B. SOURCE CODE 28
LIST OF FIGURES
vii
CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION
1
million people die each year and 50 million are injured on the world's roads. For
example, carelessness when turning a radio on/off, searching for temperature
control, searching for light control, etc. There are several reasons why vehicle
accidents can occur.
A Jordan Vehicle Accident Accordance Report. Traffic incidents are a big social
problem in many parts of the world (i.e., in Jordan). They are considered the
second leading cause of death statistically. Many car manufacturers and
automotive machinery suppliers have attempted to build speed control systems to
maintain a reasonable distance from the vehicle in order to solve these problems.
Causes of car accidents in Jordan Two approaches have commonly been used;
one is the laser-based approach, the other is the radar-based approach. The
systems do not track vehicles in adverse weather conditions in the Laser-based
form, nor do they track extremely dirty vehicles reliably. Another implication
implied is that it is necessary to expose the sensors. The system can be hidden
behind plastic fascias in the Radar-based kind. In 1995, Mitsubishi Inc.[3] was the
first automaker to offer a laser-based ASC system marketed as "Preview Distance
Control" on the Japanese Mitsubishi Diamante. Such features as BMW, Mercedes-
Benz, Audi, Honda, and Hyundai were then used by more manufacturers. The
implementation of additional goals in automated vehicle control, such as fuel
economy and speed control required by the driver, has recently begun to be
explored by researchers. Shengbo et al.[4,5] proposed the use of automatic speed
control to minimize vehicle fuel consumption and considered the difficulties of the
driver's desired answer, suggesting the need to adjust to the specific driving
requirements of drivers.The key difference between the transistor and the receiver
is the sensing range, i.e. the transistor range is narrower, which in the ASC
systems is a big problem.
The general architecture is implemented for every ASC framework . The Arduino
Mega is used in this paper to provide all the necessary functions for the vehicle
safety control proposed. The Arduino Mega device is a board based on the
ATmega2560 microcontroller. It has 54 digital input/output pins, 16 analogue
inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator along with
2
other required connections (of which 14 can be used as PWM outputs). It contains
all the parts required to support the microcontroller and is operated by a USB-
cable computer[9]. Although the Arduino device is an educational tool for testing
new concepts, it can be easily converted using an ATmega2560 microcontroller
(used on the Arduino mega board) with the necessary connections for real
implementation.
The ASC is carried out in the proposed work using the Arduino map function that,
in a way, is similar to a fuzzy controller. "The structure of the map function is: "map
(value, from Low, from High, to Low, to High)". From one set to another, the
function remaps a given number. For example, a given value of "from Low" would
be mapped to "to Low"; a value of "from High" would be mapped to "to High"; an
in-between value would be mapped to a different value [9]. "However, the value
"from High" from above would be mapped to "to High" from above and thus
another "constrain" function is used to hold the value in the correct range[9]. The
map function's value reflects the distance measured by the ultra sonic sensor as it
falls within a certain range. If the value drop into a lower range, it is appropriate to
stop the car. As normal, a command is sent to activate the ultra sonic signal,
measuring the time needed for the return of the echo signal. Using the following
sound equation, the distance is calculated: (/ 2) Scale T V h = (1) where the high
level time is V = 340 m/s and Th. In the next step, the speed of the vehicle is
measured using a suitable sensor, such as an accelerometer. The distance and
speed values are inserted into the controller algorithm, where a test algorithm is
used to test whether the distance needed is greater than the current distance. If
the distance needed is less than the current distance, the speed of the vehicle
should be maintained; otherwise, the speed should be decreased to less than the
maximum speed required.
3
CHAPTER 2
BACKGROUND OF PROJECT
A large amount of road accidents take place every year only because of reckless
driving of the drivers and because of this, people get injured and killed. For those
who get seriously injured and become physically impaired people, the tale is more
hideous. It must come to an end here. Restless driving needs to be monitored. So
we were thinking about implementing unique safe zones across the country in
which vehicles are automatically forced to hold their speed at some safe level and
are unable to speed up their vehicle while they are in that area. These zones are
created by concentrating on public areas such as schools, hospitals, busy roads,
U-Turns, etc.
In any state or country that deals with high traffic during the year, there are certain
highways. In order to operate comfortable cars, there must be a certain speed limit
on those highways. Roads in front of schools, colleges, universities, official
government offices, Uturns, etc. are also at high risk of road accidents in busy
areas. So our community wanted to make these vital areas a special safe zone for
both adults and children. This safe zone would ensure that the vehicles have a
certain speed limit so that, if they are within that range.
2.3 OBJECTIVE
4
CHAPTER 3
5
Programming) header.
"Uno" means one in Italian and is called to mark the upcoming Arduino 1.0.0
update. Uno and version 1.0 will be Arduino's reference models, going forward.
The Uno is the newest in a series of Arduino USB boards and the reference model
for the Arduino platform; see the index of Arduino boards for comparison with
previous models.
3.2.2 Programming
With Arduino tools, the Arduino Uno can be programmed (download). From the
Tools > Board menu, pick 'Arduino Uno (according to the microcontroller on your
board). See the sources and tutorials for information.
The ATmega328 comes pre-burned with a bootloader on the Arduino Uno that
6
allows you to upload new code to it without using an external hardware
programmer. It communicates using the original protocol of STK500 (reference, C
header files).
You can also bypass the bootloader via the ICSP (In-Circuit Serial Programming)
header and programme the microcontroller; see these instructions for details.
The source code of the ATmega16U2 (or 8U2 on the rev1 and rev2 boards)
firmware is available. The DFU boot loader is loaded with the ATmega16U2/8U2,
which can be triggered by:
• On Rev1 boards: attach the solder jumper (near the map of Italy) to the
back of the board and then reset the 8U2.
• There is a resistor on Rev2 or later boards that pulls the 8U2/16U2 HWB
line to the ground, making it easier to bring into DFU mode.
You can then load a new firmware using Atmel's FLIP software (Windows) or a
DFU programmer (Mac OS X and Linux). Or, with an external programmer, you
can use the ISP header (overwriting the ==++DFU boot loader). For more
information, see this user-contributed tutorial.
3.2.3 Communication
There are a range of facilities available for the Arduino Uno to connect with a
computer, another Arduino, or other microcontrollers. UART TTL (5V) serial
communication is provided by the ATmega328 and is accessible on digital pins 0
(RX) and 1 (TX). This serial contact over USB is channelled by an ATmega16U2
on the board and appears on the device as a virtual com port to applications. The
standard USB COM drivers are used by the '16U2 firmware, and no external driver
is required. An .inf file is needed on Windows, however. A serial monitor is
included in the Arduino programme, which enables simple textual data to be sent
to and from the Arduino board. As data is transmitted via the USB-to-serial chip
and the USB link to the device, the RX and TX LEDs on the board will flash.
A serial library of applications enables serial communication on any of the digital
pins of the Uno. The ATmega328 facilitates communication between I2C (TWI)
and SPI as well. To simplify the use of the I2C bus, the Arduino programme
provides a Wire library; see the documentation for details. Using the SPI library for
7
SPI communication.
8
voltage through the 5V or 3.3V pins bypasses the regulator, and your board
can be impaired. We're not suggesting it.
• 3V3. A supply of 3.3 volts provided by the on-board regulator. The
maximum draw current is 50mA.
• GND. Ground pins.
Features:
• Model Number: 9V 6F 22
• Battery Type: Zinc Carbon
9
• Size: 6F22 006P
• Jacket: Metal
• Single Battery Dimensions (mm): L- 26. 5, H - 48. 5, W - 17. 5 (Max)
• Nominal Voltage(V) :9V
• Discharge Resistance(Ω): 620
• Cut-off Voltage(V): 5.4
This is a common battery size introduced for early transistor radios. With rounded
edges and a polarised snap connector at the tip, it has a rectangular prism form. In
walkie-talkies, clocks and smoke alarms, this type is widely used.In primary
carbon-zinc and alkaline chemistry, in primary lithium iron disulfide, and in
rechargeable form in nickel-cadmium, nickel-metal hydride and lithium-ion, the
nine volt battery format is widely available. Due to their mercury content, mercury-
oxide batteries of this format, once popular, have not been produced in many
years. NEDA 1604 and IEC 6F22 (for zinc-carbon) or MN1604 6LR611 are
included in the designations for this format (for alkaline). The size is commonly
referred to as PP3, regardless of chemistry, a designation originally reserved for
carbon-zinc alone, or in some countries, Most nine-volt alkaline batteries are
constructed from a wrapper of six individual 1.5 V LR61 cells. [2] The These cells
are slightly smaller than the LR8D425 AAAA cells and, although they are 3.5 mm
shorter, may be used for some devices in their place. In order to prevent drying,
carbon-zinc types are produced with six flat cells in a stack, enclosed in a
moisture-resistant wrapper.
10
3.3.2 Connectors
On one end, the battery has both terminals in a snap connector. The smaller
circular (male) terminal is positive, with the negative touch being the larger
hexagonal or octagonal (female) terminal. The battery connections are the same
as those on the charging device; the smaller one attaches to the larger one, and
vice versa. On other battery types in the Power Pack (PP) series, the same snap-
style connector is used. Polarization of the battery is generally apparent, as
mechanical connection is usually only possible in one configuration.
3.3.3 Lithium
3.4 RELAYS
A relay is a switch that is electrically operated. Relays allow one circuit to modify a
2nd circuit that can also fully tear the first one apart. By attracting the relays, the
current in the relay coil changes the contact.
Relays have two changing locations and are double throw (changeover) switches,
so the coil current can either be on or off. Inside the relay between the 2 circuits,
there is no electrical connection; the hyperlink is magnetic and mechanical.
Relays are instruments that are very basic. In any relay, there are four major
components.
• Electromagnet
• Armature that can be attracted to the electromagnet
• Spring
• Set of electrical contact
11
3.4.1 Working
A relay's coil passes a fairly big reward, more commonly 30mA for a 12V relay, but
it may be as much as 100mA for relays Built to operate from slash voltages. As a
result, the incentive rating of the relay is obtained using a CB amplifier.
Transistors and ICs have to be blanketed when a relay coil is switched off from the
transiently immoderate voltage emitted. The use of a relay coil produces a
magnetic field that immediately collapses when the current is turned off. The
unexpected way of supplying the magnetic subject causes a short immoderate
voltage through the relay coil that is almost clearly intended to disrupt transistors
and ICs.
8 channel relay module illustration Look at the photo of the relay on the right
below. Note the 3 terminals that are screw-type. "NO", "COM", "NC" are
numbered. Such labels mean: NO: Normally open NO: Normally open COM:
Common Link: Common Connection NC: Normally Locked On the right, look at the
diagram. This indicates the turn in the relay that is inside. By the electromagnet
inside, this switch is "thrown". The diagram indicates that the usually closed
contact is connected to the COM. When the relay is off, that is the case. The
switch flips up when the relay is triggered on the electromagnet and COM is then
connected to Normally Open. So, if we want to put a lamp on while the relay is on,
12
we're going to link our circuit from COM to NO. Let's give that a shot. We use 8
channel relay boards operated by the ULN 2803A IC in this suggested framework.
10A/250V DC, 10A/30V DC, 15A/120VAC or 7A/250VAC are the highest power
ratings that the board can accommodate. Status of Relay Showing LEDs. Next to
each relay, the relay board features an onboard relay status indicator LED.
3.5 DC MOTOR
A is one of the classes of rotary electric motors that transform electric energy from
direct current into mechanical energy. The forces generated by magnetic fields
depend on the most common forms. Almost all types of DC motors have some
internal function, either electromechanical or electronic, in order to change the
current path of part of the motor periodically. As they could be powered from
existing direct-current lighting power distribution systems, DC motors were the first
type of motor commonly used. The speed of a DC motor can be regulated over a
wide range, either using a variable supply voltage or by adjusting the current
intensity of its field windings. In instruments, toys, and appliances, small DC
motors are used. The universal motor is a lightweight brushed motor used for
portable power tools and appliances, but can work on direct current. Currently,
larger DC motors are used in electric vehicle propulsion, elevator and hoist
propulsion, and in steel rolling mill drives. In many applications, the advent of
power electronics has made replacement of DC motors with AC motors possible.
DC motors display high performance and are lightweight, and their speed is simple
13
to monitor. They can be powered by a battery or any other power source and are
easy to use as well. Improper power supply, however, can lead to burnout or
irregular brush wear. Problems with the supply of fuel, installation, general
precautions and problems with an in-circuit mounted engine will be identified.
During overloaded driving or when locked up, an excessive amount of load torque
is applied, causing the motor to incur an excessive current flow with heat damage.
Overloaded or locked-up use is, therefore, to be avoided. (Locking up for 5 or
more seconds results in a motor being impaired. Do not lock the motor for 5
seconds or more.)
At its rated voltage (+IUVI), make sure to use a motor, and stop any surge voltage.
We can produce motors specifically built with an electrical path that protects the
motor from surges and reversed polarity.
Applying a voltage higher than the engine rating results in a rise in temperature,
resulting in damage to heat or shortened service life. There may also be scoring of
the commutator surface by sparks and mechanical wear of the brush resulting
from vibration. Ultimately, the application of a voltage lower than the engine rating
can result in the engine failing to start. This is due to the carbon powder piling up
on the commutator. Motors are manufactured to use their rated requirements
within + IOVo . If you need to use engines outside of their scores, please contact
us.
Brush wear can be mechanical wear due to abrasion of the brush and commutator
or electrical wear due to sparking between the brush and commutator, the most
common of which is the latter. Therefore, brush wear is greatly affected by ripples
14
in the voltage of the power supply, and the use of general regulated DC is
recommended. However, be sure to use full-wave rectification with a capacitor or
similar element in a smoothing circuit when rectifying AC for use by a motor.
In general, the brushes are set in place in such a way that both clockwise and
counter-clockwise directions retain rotational speed and current characteristics
equal. Based on the position of the magnetic poles, these are basically
determined. The misalignment of the brushes and magnets results from rotating
the engine after not properly relocating parts such as the brush holder (for
repairing the brushes) or the rear cover. This will cause changes in the above
features in the rotational direction or cause poor rectification, resulting in irregular
wear of the brush. Changes in the placement of the brush must also be avoided.
3.6 RF MODULE
15
complex. Moreover, a stable RF communication circuit requires close monitoring
of the production process in order to ensure that the output of the RF is not
adversely affected. Finally, radio circuits are normally subject to radiated emission
standards and require a standardisation body such as ETSI or the U.S. Federal
Communications Commission to test and certify compliance (FCC). Tech
engineers will also design a circuit for an application that involves radio
communication for these purposes, and then 'drop in' a pre-made radio module
rather than attempt a discrete design, saving development time and resources. For
consumer applications such as garage door openers, wireless alarm or monitoring
systems, industrial remote controls, smart sensor applications, and wireless home
automation systems, RF modules are used most commonly in medium and low
volume goods. As they have the benefit of not needing line-of-sight service, they
are often used to replace older infrared communication designs. Several carrier
frequencies, including those in the industrial, science and medical (ISM) radio
bands, such as 433.92 MHz, 915 MHz and 2400 MHz, are widely used in
commercially available RF modules. Due to national and international laws
restricting the use of radio for communication, these frequencies are used.
Unlicensed frequencies, such as 315 MHz and 868 MHz, can also be used by
Short Range Devices.
Types of RF modules
• 3.6.1 Transmitter module
• 3.6.2 Receiver module
16
3.6.2 Receiver modules
A jump wire is a short electrical wire with a solid tip at each end (or only "tinned"
often without it), typically used to interconnect the components in a breadboard. A
jump wire (also referred to as a jumper wire or jumper) is an electrical wire, or
group of wire, with a connector or pin at each end (or often without, simply
"tinned") that is usually used without soldering to interconnect the components of a
breadboard or other prototype or test circuit, internally or with other devices or
components. In the slots given in a breadboard, the header connector of a circuit
board, or a piece of test equipment, individual jump wires are fitted by inserting
their "end connectors." Disclosed is an enhanced arrangement of jump wire for a
printed circuit board. The arrangement requires at least one jump wire with its
opposite ends bent in the same direction to face each other, and at least one slot
given on the printed circuit board's upper surface. The slot has holes created at its
opposite ends to permit the opposite ends of the jump wire to be inserted. By
inserting the opposite ends into the reverse through holes, bending the opposite
ends, and then welding these bent ends to a printed circuit pattern shaped on the
lower or rear surface of the printed circuit board, the jump wire can be mounted
17
and installed in the slot. This arrangement allows the mounting density of
components and devices to be increased without fear of short-circuiting on the
printed circuit board.
In your ventures, ZipWire offers a simple way to connect the signals. For individual
wires, the wires can be unzipped as needed. To keep the circuit structured, the
color-coding can be used to arrange power, ground and other types of signal. The
10 regular electrical colours are provided by the rainbow coloured ribbon cable. 40
wires, four of each colour, are formed by each ZipWire ribbon. A group of
connected ZipWires may be used when connecting to a group of signals (such as
UART or SPI signals) to hold the signals together to help control your wiring. For
shorter links, the male-male wires are available in 10cm lengths. Inside a
solderless breadboard, they work well for signalling (such as the BB400 and
BB830). The male-female ZipWires may be used to make longer links as
extension wires.
ZipWires have a pitch of 0.1 Female links (0.025" square posts on 0.1" centres)
work well on regular square post headers. With solderless breadboards or 0.1"
pitch sockets, male pins can be used.
18
CHAPTER 4
SOFTWARE DETAILS
Wireless Communication
The flow of information between two or more points that are not linked by an electrical
conductor is wireless communication. Radio is being used in the majority of wireless
technologies. Distances can be short for radio waves, such as a few metres for Television,
or as big as thousands or even millions of kilometres for deep-space radio.
Radio frequency (RF) is among the frequencies of electromagnetic waves in the range to
around 3 kHz to 300 GHz, which involves some frequencies used for radar or
communication signals.
4.1.1 Description:
High frequency alternating current (AC) signals formed of electromagnetic energy are RF
signals. RF movement travels at the speed of light and does not need the use of such a
medium such as air. Sun flares, lightning, and stars in space that generate RF waves as
they age are all examples of RF waves. People communicate using radio waves which
have already been artificially produced and oscillate at various frequencies. In many
fields, RF communication is used, including Television, radar systems, networks for
computers and mobile platforms, remote control, remote metering/monitoring, and many
more.
4.1.2 Properties of RF
The following properties apply to all radio frequency signals:
➢ Amplitude: The “Amplitude” of a signal is the shift in RF energy. The most
basic quality of an RF signal is amplitude. The higher the strength of an RF
signal, the further it can travel to the point of becoming unreceivable before
being weakened.
➢ Frequency: Since the most fundamental quality of an RF signal is
amplitude, information is conveyed by altering the amplitude of the RF
signal over time. When the signal oscillates with a more or less normal
pattern, transmission and reception become simpler. The time between one
19
amplitude peak and the next is constant from one peak to the next. The
frequency of the signal is the number of times a second that the signal's
amplitude peaks.
➢ Wavelength: An RF signal's wavelength is a function of the frequency of
the signal and its speed across space. If a wave front signal progresses at a
certain speed through space, and we know the amount of time between
each peak, then we can approximate how far the signal moves from one
peak to the next. The wavelength of a signal is the ratio of two.
➢ Phase: Phase is a way to describe the relationship between two RF signal
amplitudes that have the same frequency. The phase is expressed in
degrees (like the degrees of a compass). Phase is important to the Wireless
Lan Engineer because two signals in phase blend their energy, resulting in
a stronger signal. Two signals that are 180 degrees out of phase cancel
each other out totally.
➢ Polarity: A radio wave is actually made of up of two fields:- One electric,
One magnetic, The sum of these two field is called the “electromagnetic
field”, when energy is transferred back and forth from one field to the other
it is called “Oscillation”.
➢ Reflection: Reflection happens when an object that has a very huge size
similar to the wavelength of the propagating wave is hit by a propagating
electromagnetic wave.
➢ Refraction: Refraction describes a radio wave's bending as it passes
through a medium of varying density.
➢ Diffraction: Diffraction arises when a surface containing sharp defects or
another rough surface interrupts the radio path between the transmitter
and receiver.
➢ Absorption: When an RF signal hits an object, it is absorbed into the
material, blocking it from pushing through, bouncing off, or bending around
the object.
20
Disadvantages: From 3 KHz to 300 GHz RF or Microwave works
By modifying the speed of the DC motor, we can adjust the speed of the vehicle.
There are effectively three ways of varying the speed of DC motors. The following
are some examples of these techniques:
➢ Mechanical Gears: To achieve the desired speed, mechanical gears
are being used.
➢ Series Resistor: Use the series resistor to decrease the motor voltage.
This is inefficient, however, as energy in the resistors is lost and torque
is decreased. As the load on the motor increases, the current drawn by
the motor increases. More current implies a greater voltage drop around
the series resistor, leading to lower voltage to the motor. The motor now
tries to draw even more current, that causes it to "stall."
➢ Pulse Width Modulation (PWM): By applying full voltage to the motor
in bursts or pulses, the series drop effect is eliminated. Pulse width
modulation is the technical term for this (PWM). The shorter pulses
indicate that the motor runs slowly, the better the motor runs with longer
pulses.
For a very long time, DC motors have been used in variable speed devices.
The flexibility of dc motors encourages them to provide high starting torques,
which are essential for traction drives. Control can be very easily achieved over a
large velocity range, both below and above the rated speed. The dc motor speed
control methods are easier and less expensive than those for alternating current
motors. Speed demand is fulfilled using PWM technique in this project and PWM
generation is carried out using microcontrollers.
21
loads including motors. Furthermore, one of the two key algorithms used in
photovoltaic solar battery chargers is PWM. As a result, we use radio frequency
technology (RF) to send the signal in pulses, as stated in the previous chapter. All
we need to do to monitor the speed of the engine is replace the digitalWrite feature
on L293D to permit analogWrite pins. The engine speed is proportional to the
value passed to the analogWrite function. .We can pass between 0 and 255 only.
The motor will stop if we pass 0, and it will run at full speed if we pass 255. If we
pass a value between 1 and 254, the motor's speed will adjust accordingly.
Pulse width modulation (PWM) is a binary signal generation method that has high
and low signal periods of 2. Each pulse's width (W) varies between 0 and time (T).
The core principle is to vary the service cycle to regulate capacity. The time of
conduction to the load is regulated here. Allow the input voltage to appear across
the load for time t1. i.e., the voltage across the load is zero for t2 time.
• The average voltage at output is given by
Va = Vmax × Ia
Here,
TON =Time period for Pulse ON,
TOFF =Time period for Pulse OFF
• The average load current Ia = Va/R = kVs/R
Total time period, T =t1 + t2,
Duty cycle, k = t1/T
You might switch the duty cycle from 0 to 1 by varying t1, T or f. Therefore, by
adjusting k, the V0 output voltage can be varied from 0 to Vs, and the power flow
can be controlled.
The width of the pulse differs as time t1 changes, and this method of control is
defined as pulse width modulation (PWM).
These diagrammatic representations can be used to better understand PWM. The
waveforms obtained as output at various voltage requirements are defined by
these figures.
22
CHAPTER 5
23
Software (IDE) 1.0. The reference versions of Arduino were the Uno board and
version 1.0 of Arduino Software (IDE), which have now developed into newer
updates. The Arduino Uno board is the first in a series of USB Arduino boards and
acts as the platform's reference model. The ATmega328 on the Arduino Uno is pre
programmed with a bootloader that allows you to upload new code without using
an external hardware programmer. [3] The It communicates using the original
protocol of the STK500. Also, the Uno differs from all previous boards in that the
FTDI USB-to-serial driver chip is not included. Instead, it uses the Atmega16U2
configured as a USB-to-serial converter (Atmega8U2 up to version R2).
Microcontrollers are usually designed using a dialect of C and C++ programming
features. The Arduino project offers an integrated development environment (IDE)
based on the Processing language project, in addition to using conventional
compiler tool chains.
By linking it to the battery pack, you can check the motor polarity. The relation is
right if it rotates in the forward direction (red wire with positive and black wire with
negative terminal of the battery). As a consequence, each side has two terminals.
MOTORA is in charge of two right-side motors, while MOTORB is in charge of two
left-side motors. To link all, follow the steps below.
Motors Connection:
Out1 -> Left Side Motor Red Wire (+ )
Out2 -> Left Side Motor Black Wire ( - )
Out3 -> Right Side Motor Red Wire ( + )
Out4 -> Right Side Motor Black Wire ( - )
Arduino
IN1 -> D5
IN2-> D6
IN2 ->D9
IN2-> D10
Power :
12V - > Connect Battery Red Wire
GND -> Connect Battery Black wire and Arduino GND pin
5V -> Connect to Arduino 5V pin
24
CHAPTER 6
CONCLUSION
Future Recommendations:
We are doing this project with the opening of doors for more modifications and
more advanced study of vehicle speed regulation. As a consequence, the
following are some possible future scopes for this project:
➢ We want to create a vehicle that can locate its location from the city map
available and decide for itself on the highest speed limit for any specific
road or highway. An autonomous vehicle is the ultimate goal of this project
that can run without the help of a driver and retain the choice of the vehicle
operator whether he or she wants to run the vehicle.
➢ We would like to suggest the installation of a monitoring device with GPS
data and the speed of that vehicle from remote locations inside the car and
vehicle tracker in the future.
➢ We'd like to work on a vehicle that can sense speed limits on roads and
highways from signboards along the way in the future.
25
REFERENCES
3) Alansari, Zainab, Nor Badrul Anuar, Amirrudin Kamsin, and Mahdi H. Miraz.
"Internet of Things: Infrastructure, Architecture, Security and Privacy.“
International Conference on Computing, IEEE, 2018.
26
Venkataraman R1.et.al./MAR 2019/International Research Journal of
Engineering and Technology (IRJET)
APPENDIX
A. Screenshots
This is the device. It is used in vehicles to reduce the speed of it. It automatically
controls the speed of the vehicles using ultrasonic sensor. These transmitters
continuously radiate RF signal. When the vehicle comes within this radiation the
receiver in the vehicle gets activated.
The ultrasonic sensor system continuously sends signals and monitors any
car or other obstacles which are in front of car. When any obstacle or
vehicle detected by ultrasonic sensor system it will send signal to the Arduino.
After receiving this signal Arduino sends a signal to the vehicle to stop or
reduce the speed of the car immediately.
27
B. Source Code
pinMode(buttonPin, INPUT_PULLUP);
pinMode (forward1, OUTPUT);
pinMode (forward2, OUTPUT);
pinMode (backward1, OUTPUT);
pinMode (backward2, OUTPUT);
}
void loop()
{
potValue = analogRead(potPin);
motorValue = map(potValue, 0, 1023, 0, 255);
buttonState = digitalRead(buttonPin);
if (buttonState == LOW)
{
a=!a;
}
28
if(a)
{
analogWrite(backward1, motorValue);
digitalWrite (backward2, HIGH);
digitalWrite (forward1, LOW);
digitalWrite (forward2, LOW);
else
{
analogWrite(forward1, motorValue);
digitalWrite (forward2, HIGH);
digitalWrite (backward1, LOW);
digitalWrite (backward2, LOW);
29