0% found this document useful (0 votes)
62 views129 pages

Doppler Radar Amplification For Speed Detection System

Report on using the HB100 Doppler radar sensor in combination with a signal amplifier circuit and detection and calculation by Arduino Mega using the FFT algorithm. Additionally, a 7-segment display is designed using the 74HC595 serial-to-parallel shift register, along with a MOSFET and an LDR for surrounding light detection to control the brightness of the LEDs in the 7-segment display.

Uploaded by

Bing Sheng Lim
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)
62 views129 pages

Doppler Radar Amplification For Speed Detection System

Report on using the HB100 Doppler radar sensor in combination with a signal amplifier circuit and detection and calculation by Arduino Mega using the FFT algorithm. Additionally, a 7-segment display is designed using the 74HC595 serial-to-parallel shift register, along with a MOSFET and an LDR for surrounding light detection to control the brightness of the LEDs in the 7-segment display.

Uploaded by

Bing Sheng Lim
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/ 129

UNIVERSITI TEKNIKAL MALAYSIA MELAKA

FACULTY OF ELECTRONICS AND COMPUTER TECHNOLOGY AND


ENGINEERING

BENU3863 INTEGRATED DESIGN PROJECT

TECHNICAL REPORT

TITLE: DOPPLER RADAR AMPLIFICATION FOR SPEED DETECTION SYSTEM

SUPERVISOR: MAZRAN BIN ESRO

PREPARED BY:

NO. NAME MATRIC NO.


1. NICOLAS SII TIING KIE B022120031
2. LIM BING SHENG B022120038
3. NGOI YUK LOONG B022120015

I
A TECHNICAL REPORT FOR DOPPLER RADAR AMPLIFICATION FOR SPEED
DETECTION SYSTEM

NICOLAS SII TIING KIE B022120031

LIM BING SHENG B022120038

NGOI YUK LOONG B022120015

This report is submitted in partial fulfillment of requirements for Integrated Design

Project (IDP) subject code BENU 3863

Faculty of Electronic and Computer Technology and Engineering

Universiti Teknikal Malaysia Melaka (UTeM)

2024

II
Abstract

Nowadays, vehicular accidents have been increasing from day to day. In traffic
management and safety in many countries, the prohibitive costs for advanced speed detection
systems hinders their widespread installation for effectively addressing the issue of speeding.
This project aims to develop a cost-effective and affordable advanced speed detection system
that can be deployed not only on highways but also in sensitive zones such as parking areas,
residential zones, school zones, and university campuses. Integrating Doppler radar technology
and an affordable amplifier, the system addresses the limitations of existing solutions, offering
accuracy and consistency at a lower cost. The primary goal is to design a system that precisely
identifies vehicle speeds, integrates real-time speed display, and remains budget friendly. The
report explores methodologies involving Doppler radar amplification, real-time speed display,
and additional techniques like dealing with analog signals, utilizing antennas for signal
enhancement, and implementing noise reduction filters. Through these innovations, the project
seeks to provide a comprehensive and scalable solution that revolutionizes speed management
in critical zones.

I
Acknoledgement

We would like to express our sincere gratitude to several individuals and organizations
whose unwavering support and guidance have been instrumental in the successful completion
of Integrated Design Project study. First and foremost, we wish to express our sincere thanks to
my supervisor, Mazran bin Esro, for his remarkable patience, enthusiasm, insightful comments,
invaluable suggestions, helpful information, practical advice and unceasing ideas which have
helped u tremendously at all times in our research and writing of this report. His immense
knowledge and profound experience have enabled us to complete this research successfully.
We are thankful to our supervisor for his precious time in guiding us, answering my queries,
correcting and improving the English in my project. Without his guidance and relentless help,
this project would not have reached fruition. We consider ourself fortunate to have had such an
exceptional supervisor.
We also wish to express my sincere thanks to Universiti Teknikal Malaysia Melaka
(UTeM) for accepting us into the Degree program. Additionally, our deepest gratitude goes to
our own parent, whose unwavering support and encouragement have been our pillar of strength.
Their constant care, cheering, and steadfast presence have been a source of inspiration and
motivation. Their belief in our abilities has fueled our determination to excel in this academic
endeavor. Lastly, we extend our gratitude to all our friends and classmates for their camaraderie,
friendship, moral support, and valuable advice. Their company has made this academic journey
more enriching, and we appreciate the shared moments of learning and growth.

II
TABLE OF CONTENTS

TABLE OF CONTENTS Page

ABSTRACT I

ACKNOWLEDGEMENT II

LIST OF CONTENTS III

LIST OF FIGURES VII

LIST OF TABLES XI

ABBREVIATION XII

1 Introduction 1

1.1 Introduction 1

1.2 Problem Statement 2

1.3 Objective 2

1.4 Scope of Project 3

1.5 Important of Study 3

1.6 Chapter Outline 3

2 Project Technical Implementation 5

2.1 History of Doppler Radar 5

2.2 Working Principle of Dopple Radar 5

2.3 Literature Review of HB100 Speed Detection System 5

3 JOB DESCRIPTIONS 10

3.1 Project Overview 10

III
3.2 Arrangement of The Circuit And Component 14

3.2.1 Doppler Radar HB100 14

3.2.1.1 Working Principle 15

3.2.1.2 Specifications 17

3.2.2 Operational Amplifier (LM324) 18

3.2.2.1 Characteristic and Features 19

3.2.2.2 Working Principle and Applications 20

3.2.3 Matrix display panel pxel 32x64 21

3.2.3.2 Types of LED Displays 22

3.2.4 MOSFET ZVN2106A 22

3.2.4.1 Working principle 23

3.2.4.2 Specifications 24

3.2.5 Shift Register 74HC595 25

3.2.5.1 Pin Configuration And Functions 26

3.2.6 Resistor 27

3.2.6.1 Unit of Resistance 28

3.2.6.2 Working Principle 28

3.2.6.3 Color of Coding 29

3.2.7 Capacitor 30

3.2.7.1 Working Principle 30

3.2.8 Light Emitting Diode (LED) 32

3.2.8.1 Working Principle 33

3.2.9 Light Dependent Resistor (LDR) 34

IV
3.2.9.1 Working Principle 34

3.2.9.2 Types of LDR or Photoresistors 35

3.2.10 Arduino Mega 35

3.2.10.1 Working Principle 36

3.2.10.2 Technical Features 37

3.2.10.3 Pin Configuration 37

3.3 PCB Fabrication 40

3.4 GANNTT Chart 44

4 Result And Conclusion 45

4.1 Briefing of the Project 45

4.2 Prototype 45

4.3 Result 49

4.4 Discussion on Development of HB100 Amplification Circuit 51

4.4.1 1st Version of HB100 Amplification Circuit: Datasheet Amplifier 51


Circuit
4.4.1.1 Hardware 52

4.4.1.2 Software 55

4.4.1.3 Antena and Waveguide Design 56

4.4.1.4 Roadside Testing 57

4.4.2 2nd Version of HB100 Amplification Circuit: Self-Designed HB100 58


Amplification Circuit
4.4.2.1 Hardware 58

4.4.2.2 Software 63

4.4.2.3 Antena and Waveguide Design 66

V
4.4.2.4 Lab Testing 66

4.4.2.5 Suceeded in development of 2nd Version Amplification Circuit 68

4.4.2.6 Comparison between 1st Version and 2nd Version 71

4.5 Discussion on 7-segment Display 72

4.5.1 7-segment Design 72

4.6 Discussion on Matrix Display 82

5 Conclusion and Suggestion 83

5.1 Conclusion 83

5.2 Project Management 84

5.2.1 Group Structure 84

5.2.2 Financial Matter 86

5.2.2.1 Project Costing 86

5.2.2.2 Unnecessary Expenses 87

5.3 Fuure Recommendations 87

References 89

Appendix A 91

Appendix B 93

Appendix C 100

Appendix D 106

VI
LIST OF FIGURE

NO TITLE PAGE

1 Doppler effect in 1D illustration 6

2 Doppler effect in 2D illustration 6

3 Block diagram of the system 10

4 Flowchart of the system 10

5 Flowchart for Building Amplifier Circuit 11

6 Flowchart for Building Sensor Programming 12

7 Flowchart for Building 7-Segment 13

8 Flowchart for Setup P5 LED Matrix Display 14

9 Doppler radar sensor HB100 15

10 An example of mixer 15

11 Internal structure of HB100 16

12 Antenna Beam Pattern 17

13 Operational amplifier LM324N 18

14 Operational amplifier LM324N inner structure 19

15 Matrix display panel 21

16 MOSFET structure 23

17 Electrical characteristics of ZVN2106 24

18 On-resistance vs gate-source voltage 25

19 Shift register 74HC595 25

20 Pin Configuration And Function 26

VII
21 Resistor 27

22 Resistor Color Code 29

23 Capacitor 30

24 Capacitor Structure 31

25 Capacitor Working Principle 1 31

26 Capacitor Working Principle 2 32

27 LED 32

28 Structure of LED 28

29 LDR 34

30 Arduino Mega 35

31 Arduino Mega 2560 Pin Configurations 37

32 Flowchart of PCB Fabrication 40

33 Circuit Design in Proteus 41

34 PCB Layout in Proteus 41

35 UV board 42

36 Process Etching PCB 43

37 Process remove photoresist 43

38 Testing the result in lab 44

39 Prototype view 1 45

40 Prototype view 2 46

41 Prototype view 3 46

42 Prototype view 4 47

43 Prototype view 5 48

VIII
44 Display “Limit Speed 30km/h” no car detected 49

45 Display when the detected car without not exceeds the speed limit 50

46 Display “Slow Down”when the detected car exceeds the speed limit 51

47 Datasheet Amplifier Circuit 52

48 Schematic in Multisim 52

49 Low cut-off frequency and its highest gain 53

50 Low and High cut-off frequencies 53

51 Schematic of version 1 drawn in Proteus 54

52 PCB layout of version 1 drawn using Proteus 54

53 Waveform from pin IF when high amplitude signal detected 55

54 Logarithmic companding example 56

55 Roadside Testing 57

56 A warning triangle is put on the roadside 57

57 Result of 1 stage amplifier with better gain and signal to noise ratio 59
(SNR)
58 Testing of higher stage op-amp 59

59 Canstant noise 60

60 A smaller gain op-amp 61

61 Waveform not centered 61

62 Another example of waveform not centered 61

63 Changing voltage divider resistor value 62

64 Calibrate the equation using serial monitor and frequency generator 63

65 Debugging to produce a useful output 64

66 Waveform from computer aux port at 100% volume 64

IX
67 Waveform from computer aux port at 60% volume 65

68 Rectangular waveguide 65

69 Waving a mental piece to check the detection range 66

70 Circuit connections 66

71 Spectrum Analyzer app 67

72 Amplification circuit that succeeded in detecting car speed up to a range 68


of 10 meters

73 Successful circuit schematic built in Multisim 68

74 Low cut-off frequency and its highest gain 69

75 Low and high cut-off frequencies 69

76 Schematic of 2nd version drawn in Proteus 70

77 PCB layout of 2nd version drawn using Proteus 70

78 Prototype of 2nd version amplification circuit 71

79 Schematic of 7-segment 1st digit 73

80 Schematic of 7-segment 2nd digit 74

81 Schematic of 7-segment 3rd digit 75

82 Schematic of “km/h” sign 76

83 PCB layout of 7-segment 1st digit 76

84 PCB layout of 7-segment 2nd digit 77

85 PCB layout of 7-segment 3rd digit 78

86 PCB layout of “km/h” sign 79

87 Testing on Breadboard 79

88 Low-side switching vs high-side switching 80

89 Measuring current of the display 81

X
LIST OF TABLES

NO TITLE PAGE
1. HB100 Specifications 17
2. Pin Description 27
3. Specifications of Arduino Mega 2560 37
4. Arduino Mega 2560 Pin Configuration 38
5. GANTT Chart 44
6. Comparison between 1st Version and 2nd Version 71
7. Project Costing 86
8. Unnecessary Expenses 87

XI
ABBREVIATION

PCB - Printed Circuit Board

CMRR - Common-Mode Rejection Ratio

SMD - Surface Mount Device

LED - Light Emitting Diode

LDR - Light Dependent Resistor

OP-AMP - Operational Amplifier

AREF - Analog Reference Voltage

PWM - Pulse Width Modulation

I2C - Integrated Circuit

SPI - Serial Peripheral Interface

IDP - Integrated Design Project

SNR - Signal-to-Noise Ratio

EM - Electromagnetic

XII
CHAPTER 1
INTRODUCTION

1.1 Introduction
In the dynamic landscape of modern technology, the quest for enhanced solutions is
pivotal, especially in addressing critical challenges like vehicle speed management within
sensitive zones such as parking areas, residential zones, school zones, and university campuses.
This project aims to contribute to the realm of smart systems by exploring the integration of
Doppler radar technology and a cost-effective Doppler radar amplifier in the development of
an intelligent speed detection system. The working area of this project intersects with
transportation safety responding to the growing need for effective speed detection systems in
the face of urbanization.

Building upon prior work, this project seeks to address the shortcomings observed in
previous solutions, such as limited accuracy, inconsistent performance under varied conditions,
and mainly for prohibitive costs. The incorporation of Doppler radar amplification, alongside
real-time speed display capabilities, aims to revolutionize speed management by offering an
accurate, reliable, and cost-effective solution.

The primary purpose of this study is to design a speed detection system that not only
identifies vehicle speeds with precision but also leverages real-time speed display and cheaply.
The integration of a Doppler radar amplifier further enhances the range of speed detection,
ensuring a comprehensive solution to address the safety concerns associated with speeding
vehicles.

This report will provide a detailed exploration of the methodologies used to integrate
Doppler radar amplification, real-time speed display technologies, and additional techniques
such as dueling with analog signals from the HB100 sensor, utilizing antennas to increase
signal transmission and reception range, and implementing digital filters for noise reduction.
The goal is to showcase how these innovations result in an advanced speed detection system

1
that overcomes the limitations of existing solutions and provides a scalable and cost-effective
approach to smart speed management in critical zones.

1.2 Problem Statement


In Malaysia, the numbers of road accidents in 2021 was 370,286 accidents but the
numbers increase to 545,588 in 2022 [1]. A significant drawback in the current field of speed
detection systems is their prohibitive cost, making them economically unsuitable for
widespread adoption. This financial barrier limits the deployment and installment of these
systems, particularly in sensitive zones like parking areas, residential zones, school zones, and
university campuses. By recognizing this challenge, the proposed project aims to address the
high costs associated with existing Doppler radar speed detection systems. A pivotal aspect of
the solution involves the self-design of a cost-effective Doppler radar speed detection system,
which encompasses the development of an amplification circuit and a real-time speed display.
By undertaking this innovative approach, the project seeks to democratize access to efficient
speed detection solutions, making them affordable while ensuring its accuracy. This not only
overcomes the financial hurdles but also lays the foundation for a scalable and mass-installable
speed detection system that aligns with the needs of various critical zones.

1.3 Objective
The objectives of this project are:

i. To design an affordable and cost-effective Doppler radar speed detection system that is
economically variable for widespread deployment.
ii. To enhance speed detection accuracy and range by integrating innovative amplification
technology and digital filters to reduce noise interference.
iii. To Integrate a real-time speed display functionality into the system, allowing for
immediate and clear visibility of vehicle speeds.

2
1.4 Scope of the Project
The scopes of this project are:

i. Design and develop a cost-effective Doppler radar amplifier to overcome the financial
constraints associated with existing speed detection systems.
ii. Design and develop real-time speed display to provide instantaneous and accurate
information on vehicle speeds.
iii. Address the limitations observed in previous speed detection systems, including
limited accuracy, inconsistent performance under varied conditions, and high costs.
iv. Devise methods to reduce noise in the analog signals, ensuring cleaner and more
accurate data for speed detection.

1.5 Important of Study


The important of study for this project are:
i. The Doppler radar speed detection system is built using low-cost components, therefore
it shows the possibility to upgrade current existing Doppler radar speed detection
system.
ii. The project directly addresses the safety concerns in critical areas such as parking
zones, residential areas, school zones, and university campuses.
iii. By building upon prior work and addressing the limitations of previous solutions, the
study aims to enhance the accuracy and consistency of speed detection systems.
iv. The study introduces innovative techniques, including dueling with analog signals,
utilizing antennas for signal enhancement, and employing digital filters for noise
reduction.
v. The incorporation of real-time speed display capabilities adds a dynamic element to the
study. This feature allows for instantaneous monitoring and control, enabling timely
interventions in response to speeding incidents.

1.6 Chapter Outline


The Intelligent Speed Detection System uses the HB100 Doppler Radar Sensor to solve
ongoing roadside safety problems, with the primary aim getting hazard reduction. Because of
the potential hazards, it is essential to ensure optimal system functionality and free of errors
operation. According to a planned outline, each chapter thoroughly explains the project details:

3
Chapter 1: This chapter introduces the project by describing the development of the speed
detecting system and emphasizing its significance. It outlines the problem statement,
objectives, scope, and importance of the study.

Chapter 2: This chapter looks into project-related components and materials to give a better
understanding and knowledge foundation.

Chapter 3: This chapter goes through the step-by-step process of developing a roadside speed
detection system, including a project flowchart, methodology utilized, and hardware
description.

Chapter 4: This chapter summarizes the semester's results, including achievement, practice
tests, and completed projects.

Chapter 5: This chapter is a detailed review of the study, summarizing the project, presenting
the findings, and making recommendations for future improvements to roadside speed
detection system.

4
CHAPTER 2
PROJECT TECHNICAL IMPLEMENTATION

2.1 History of Doppler Radar


Doppler radar is a revolutionary innovation named after claimed Austrian physicist
Christian Andreas Doppler's pioneering achievements. His revolutionary work in 1842
established the Doppler effect, a fundamental phenomenon that explains how the perceived
frequency of a wave (whether exhibited as light or sound) is connected to the connection
between the wave source and detector. The relative motions are tightly linked. Doppler's
discoveries established the foundation for comprehending the frequency modulation caused by
object motion. The idea is unquestionably important and serves as the foundation for Doppler
radar technology, demonstrating its ongoing significance.

Doppler radar has a wide range of applications and has an important impact on
industries such as weather prediction and navigation. Doppler radar is a powerful instrument
for determining the speed of dynamic things, such as small precipitation particles or fast
maneuvering aircraft, using the underlying principles of the Doppler effect. The effectiveness
of this technique lies in its ability to detect differences in the frequency of waves recovering
off these moving objects, revealing critical information about their speed and direction vectors.
Doppler radar, in simple terms, is an essential device for predicting dangerous weather
conditions, supplying meteorologists with real-time data critical to successful prediction.
Furthermore, its connection with air traffic control systems increases the precision of aircraft
movement tracking, providing a substantial contribution to aviation safety and efficiency.
Doppler radar became not only a scientific wonder but also a key component in determining
the growth of meteorology and aviation in this enormous area of technical application.

2.2 Working Principle of Doppler Radar


Doppler effects happen to sound wave, water wave and electromagnetic waves (EM
wave). Figure 1 and figure 2 illustrate the doppler effect.

5
Figure 1: Doppler effect in 1D illustration

Figure 2: Doppler effect in 2D illustration

The working principle of Doppler radar is based on the Doppler Effect, which is a
change in the frequency or wavelength of a wave in relation to an observer who is moving
relative to the wave source. In the case of Doppler radar, this effect is applied to radio waves
to determine the velocity of moving objects. Here's an overview of the working principle:

1. Transmission of Radar Waves:


Doppler radar systems emit radio waves at a specific frequency toward a target area.
These waves are transmitted by the radar antenna.
2. Interaction with Moving Objects:
When these radio waves encounter moving objects (such as raindrops, vehicles, or
aircraft), the waves are reflected back to the radar antenna.

6
3. Frequency Shift:
The Doppler Effect comes into play as the moving objects cause a shift in the
frequency of the reflected radio waves. If the object is moving toward the radar
source, the waves are compressed, resulting in a higher frequency (blueshift). If the
object is moving away, the waves are stretched, resulting in a lower frequency
(redshift).
4. Detection and Analysis:
The radar system detects the frequency shift in the reflected waves and analyzes the
change to determine the velocity of the moving objects. The amount of frequency
shift is directly proportional to the speed of the object along the line of sight of the
radar.
5. Velocity Calculation:
By precisely measuring the frequency shift, Doppler radar systems calculate the radial
velocity of the moving objects. The sign of the frequency shift (whether positive or
negative) indicates the direction of the motion (toward or away from the radar).

Applications:

Doppler radar is used in various applications, such as weather monitoring, aviation,


traffic control, and military surveillance, where the measurement of velocity is crucial for
understanding the dynamics of moving targets.

In summary, Doppler radar systems leverage the Doppler Effect to analyse frequency
shifts in reflected radio waves, enabling the calculation of the velocity of moving objects within
the radar's detection range.

2.3 Literature Review of HB100 Speed Detection System


G. Viswanath et al. (2023) demonstrated a versatile and powerful system that made use
of the HB100 Doppler radar sensor and an Arduino microcontroller. The system is intended to
detect motion, measure speed, and compute distance in real time, with more precision than
existing motion detection systems. The microwave signal emitted by the HB100 Doppler radar
sensor is reflected off objects and returned to the sensor. Radar can identify an object's speed
and direction by analyzing frequency variations in the reflected signal. The sensor is seamlessly
connected with an Arduino microcontroller, which is in charge of processing the sensor's digital
7
data to identify the presence, speed, and distance of the detected object. Because of the device's
adaptability, it may be used in a wide range of applications, including security systems, traffic
monitoring, and industrial automation. Because of its capacity to detect motion, measure speed,
and compute distance, it is an efficient tool for data monitoring and analysis, creating the way
for possible applications in a wide range of industries. [2]
Nguyen, G. L. (2021) is the first to publish a study on the critical matter of speeding in
an environment of an ever-increasing number of cars, an everyday problem that offers hazards
and problems to drivers and law enforcement. The project is the product of a collaborative
effort by FPT Software's Radar-SDK team, primarily targeting car safety features in Vietnam.
The primary goal of this work is to explain the development of a high-precision velocity
measuring device with practical applications. The team successfully created a system capable
of recording and collecting speed data from a variety of vehicles, from high speeds to low
speeds, using a particular circuits, Doppler radar sensors (HB100), and microcontrollers (KIT
Arduino ESP32). The data is deeply analyzed before being displayed on the vehicle's monitor,
giving real-time feedback. It's worth mentioning that the system's capabilities extend beyond
speed tracking, as it can also take images of cars and their speeds. This complete approach is
intended to give significant insights while also serving as an important case study for future
developments in the field of vehicle safety functions. [3]
Su, M. P., et al. (2016) focused on solving the main causes of road accidents,
particularly those caused by speeding. Researchers emphasize the need of good speed detection
systems to improve road safety by emphasizing that faster cars are more likely to be involved
in accidents. They propose in their study the use of radar-based object detection systems, a
technology that has been employed in a variety of applications for over a century. The particular
solution they discussed is an adaptive vehicle activation sign system that depends on precise
vehicle speed data. The vehicle's speed is determined using continuous wave Doppler radar,
which works on the principle of the Doppler effect. The device uses very little power, is
incredibly efficient, and is meant to function only on batteries. The Doppler shift of
microwaves reflected from moving objects (vehicles) is detected by continuous wave Doppler
radar. The sensor's output is a sine wave with a small amplitude that must be increased by an
amplifier before further processing. The microcontroller is responsible for calculating the
vehicle speed and displaying it on the LCD. [4]
Aloysius, A.P., et al. (2020) carried out an important effort to advance the area of
gesture-based human-computer interactions using Doppler response feature extraction. Their
method, which is based on the combination of time- and frequency-domain analysis, stands out
8
for its unique approach to reading the specific data stored in gestures. Cross-correlation is used
in the time domain to obtain Doppler response properties. The peak value of the cross-
correlation result and its associated time shift indicate the significant time-domain properties.
In the meanwhile, they use a discriminator filter in the frequency domain to extract
corresponding characteristics led by Doppler response spectrum measurements. This approach
is used as a preprocessing step for continuous wave (CW) radar output data, reducing the
difficulties associated with categorizing the Doppler response patterns associated with each
movement. The researchers used simulations and laboratory tests with the HB 100 Doppler
radar to carefully test their technique. Convincing results show that combined characteristics
are effective at precisely recognizing different kinds of gesture motions. [5]

9
CHAPTER 3
METHODOLOGY

This chapter will look over each stage and process that was used to complete the project.
Furthermore, the materials and components used during the project will be thoroughly analyzed
with an emphasis on their usefulness, benefits, and drawbacks in aiding effective project its
operation. This part will also give an overview of the procedural components involved in
designing the prototype, as well as insights into the project system development.

3.1 Project Overview

Figure 3: Block diagram of the system

Figure 4: Flow chart of the system

10
3.1.2 Methodology Flow Chart

Figure 5: Flow chart for Building Amplifier Circuit

11
Figure 6: Flowchart for Building Sensor Programming

12
Figure 7: Flowchart for Building 7-segment

13
Figure 8: Flowchart for Setup P5 LED Matrix Display

3.2 Arrangement of the Circuit and the Component


The right components must be applied to build the circuit for this project. Furthermore,
an in-depth knowledge of each component's operation and installation methods is essential to
project success.

3.2.1 Doppler Radar HB100


The HB100 tiny microwave motion sensor is an X-band (10.525GHz) dual-static
Doppler transceiver module with an integrated dielectric resonator oscillator (DRO) and two
microstrip patch antennas. The structure makes it perfect for motion-detecting device
applications. Alarms, motion detectors, lighting control, vehicle speed monitoring, and
automated doors are all possible applications for the module. [7]

14
Figure 9: Doppler radar sensor HB100

The HB100 module's working is based on the Doppler effect, which is time dependent.
Radio waves are reflected when they come into contact with moving objects, causing the
frequency of the reflected waves to shift. When a radio wave clashes with a stationary object,
the frequency of the reflected wave equals the frequency of the transmitted wave. However,
when the item approaches closer to the source, the reflected waves compress, increasing the
frequency. The frequency of the reflected wave drops as the item moves away from the source.
The HB100 module's motion detection capabilities is based on the Doppler principle.

3.2.1.1 Working Principle


The Dielectric Resonator Oscillator (DRO) generates voltage which oscillates at
10.525Hz. The voltage is transmitted to Tx antenna and mixer. The Rx antenna receives the
reflected wave and sends it to the mixer. The mixer mixes the received frequency and frequency
generated from DRO. The mixed frequency is output to pin IF. [7]

Figure 10: An example of mixer

15
Doppler shift output from IF terminal when movement is detected. The magnitude of
the Doppler Shift is proportional to reflection of transmitted energy and is in the range of
microvolts (μV). A high gain low frequency amplifier is usually connected to the IF terminal
in order to amplify the Doppler shift to a processable level. Frequency of Doppler shift is
proportional to velocity of motion. Typical human walking generates Doppler shift below 100
Hz while for a street car is 400Hz to 1kHz.

Figure 11: Internal structure of HB100

Doppler frequency can be calculated by Doppler equation in equation 1.

Ft (1)
Fd = 2V � � Cos θ
c
Where:
Fd = Doppler frequency
V = Velocity of the target
Ft = Transmit frequency
c = Speed of light (3 × 108 m/sec)
θ = 𝑇𝑇ℎ𝑒𝑒 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏 𝑡𝑡ℎ𝑒𝑒 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑎𝑎𝑎𝑎𝑎𝑎 𝑡𝑡ℎ𝑒𝑒 axis of the module

If a target is moving straight toward or away from HB100 (Ft = 10.525 GHz) The formula is
simplified to:

Fd = 19.49V (Velocity in km/hour) or 31.36V (V in mile per hour) (2)

16
3.2.1.1 Specifications
The Received Signal Strength (RSS) is the voltage measured of the Doppler shift at the
IF output. The RSS figure 12 specified in the technical data sheet is level of a 25 Hz Doppler
shift, generate from the modulated microwave signal received at the received antenna, The
received microwave signal is attenuated to 93 dB below the transmit microwave signal from
the transmit antenna of the same unit. The 93dB loss is the total losses combining two ways
free space loss (82.4 dB for 30 meters at 10.525 GHz), reflection less and absorption loss of
the target, as well as other losses. Reflection of a human body is varied with the size of the
body, clothing, apparels and other environmental factors; RSS measured for two human bodies
may vary by 50%. [7]

Figure 12: Antenna Beam Pattern

Table 1: HB100 Specifications

17
Microwave radiation from the module is well below established safety standards for
general public environment, like ANSI C95.1-1991 of USA and NRPB-G11 of United
Kingdom.

3.2.2 Operational Amplifier (LM324N)

Figure 13: Operational amplifier LM324N

The LM324-N-MIL device consists of four independent, high-gain, internally


frequency compensated operational amplifiers designed to operate across a wide voltage range
from a single power source. It is also possible to operate with split power supplies, and the low-
power supply current drain is not influenced by the power supply voltage. Application areas
include all of the usual op amp circuits, DC gain blocks, and transducer amplifiers, which are
now easier to build in single power supply systems. For example, the LM324-NMIL device
can operate directly off of the common 5-V power supply voltage used in digital systems and
easily delivers the necessary interface electronics without the need for external ±15 V power
supplies. [8]

18
3.2.2.1 Characteristics and Features

Figure 14: Operational amplifier LM324N Inner Structure

i. Number of Op-Amps: The LM324 contains four operational amplifiers in a single IC


package. Each op-amp can be used independently.
ii. Power Supply Voltage Range: The LM324 typically operates over a wide range of
power supply voltages, making it suitable for both single and dual supply applications.
The recommended operating voltage is typically between 3V and 32V.
iii. Input Offset Voltage: The input offset voltage is the voltage difference between the
inverting and non-inverting inputs required to nullify the output voltage. For the
LM324, this parameter is relatively low, but specific values can vary between different
manufacturing batches.
iv. Input Common-Mode Voltage Range: The common-mode voltage range is the range
of voltages that can be applied to both the inverting and non-inverting inputs without
causing distortion. The LM324 typically has a wide common-mode voltage range.
v. Open-Loop Voltage Gain: The open-loop voltage gain of an op-amp is the
amplification factor when no feedback is applied. The LM324 has a high open-loop
voltage gain, typically around 100,000.
vi. Input Bias Current: The input bias current is the average of the currents flowing into
the inverting and non-inverting inputs. The LM324 has low input bias currents.
vii. Output Voltage Swing: The output voltage swing is the range of output voltages that
the op-amp can provide. The LM324 has a limited output voltage swing, especially
when operating with a lower supply voltage.

19
viii. Slew Rate: The slew rate is a measure of how fast the op-amp can respond to
changes in the input signal. The LM324 has a moderate slew rate.
ix. Common-Mode Rejection Ratio (CMRR): CMRR is a measure of how well the op-
amp rejects common-mode signals. The LM324 has a reasonable CMRR.
x. Package: The LM324 is available in various packages, including dual in-line packages
(DIP) and surface-mount device (SMD) packages.[8]

3.2.2.2 Working Principle and Application


The LM324 is indeed a versatile operational amplifier (op-amp) and can be used in various
circuit configurations, including as a comparator. Here are the working principle of an LM324
in a comparator circuit:

1) Comparator Configuration: The LM324 can be configured as a comparator by using


one of its op-amps. In this configuration, the op-amp operates in an open-loop
configuration, where there is no feedback.
2) Input Terminals: The LM324 has two input terminals: the inverting (-) and non-
inverting (+) terminals. In a comparator circuit, the input signal is usually applied to the
non-inverting terminal (+)
3) Voltage Comparison: The op-amp compares the voltage at the non-inverting input with
the voltage at the inverting input. If the voltage at the non-inverting input is higher than
the voltage at the inverting input, the output goes high. If the voltage at the non-
inverting input is lower, the output goes low.
4) Output States: When the non-inverting input voltage is lower than the inverting input
voltage, the output is typically close to the negative supply voltage (ground in single-
supply configurations). When the non-inverting input voltage is higher than the
inverting input voltage, the output swings toward the positive supply voltage.
5) Internal Pull-Up: The LM324 includes an internal pull-up resistor, which helps to pull
the output voltage high when the conditions for a high output are met.
6) External Resistor (Optional): While the internal pull-up is often sufficient for many
applications, external resistors can be added to the circuit to adjust hysteresis or to tailor
the response of the comparator.
7) No Feedback: Unlike an operational amplifier used in an amplifier configuration, a
comparator does not use feedback. It operates in an open-loop configuration, and the

20
output state depends solely on the voltage difference between the inverting and non-
inverting inputs.
8) Applications: Comparator circuits using the LM324 can be employed in applications
such as voltage level detection, window comparators, and other situations where the
relationship between two input voltages needs to be determined.

3.2.3 P5 Matrix Display Panel Pixel 32x64

Figure 15: Matrix display panel

LED matrix displays have become an essential component of visual communications


and digital electronics, revolutionizing information presentation. These displays are made up
of light-emitting diodes (LEDs) arranged in a grid or matrix format, making them an adaptable
platform for a wide range of applications. LED matrix displays provide a dynamic and
entertaining method to present information, from basic data visualization to complicated high-
resolution video displays. Their adaptability enables them to be easily integrated into a variety
of situations, including public signs, advertising, information boards, and innovative art
projects. LED matrix displays continue to change as technology progresses, expanding the
limits of visual expression in the digital domain. [9]

3.2.3.1 Working Principle


The basic operation of LED matrix displays is based on the usage of multiplexing. This
method allows for the individualized administration of a large number of LEDs with a small

21
number of microcontroller pins, allowing for the building of complex and detailed visual
representations.

1. Row-column scanning: This is a common approach in LED matrix displays that includes
sequential scanning of rows or columns, lighting corresponding LEDs in quick succession.
Because of the quick alternation, the human eye perceives the entire display to be lighted
at the same time.

2. Charlieplexing: Charlieplexing is an expansion of the multiplexing idea that takes


advantage of microcontrollers' typical tri-state logic capabilities. This new technique
enables controlling a higher number of LEDs with fewer pins.

3.2.3.2 Types of LED Matrix Displays


LED matrix displays are classified into two kinds that have a wide range of uses in visual
communications and digital electronics: [9]

1. Monochrome LED Matrix Displays: These displays make use of a single color LED,
often red, green, or blue. Electronic advertisements, digital clocks, and other devices
requiring direct data representation can all benefit from monochrome displays.

2. RGB LED Matrix Display: An RGB display, on the other hand, combines red, green,
and blue LEDs to provide a wide range of colors. This sort of display is suitable in
situations requiring high-definition and vivid presentation, such as digital signs,
enormous advertisements, and large video walls.

3.2.4 MOSFET ZVN2106A


A MOSFET (Metal Oxide Semiconductor Field Effect Transistor) is a four-terminal
electrical device that has terminals for the source (S), gate (G), drain (D), and body (B). A
MOSFET's body is often linked to the source terminal, transforming it into a three-terminal
device similar to a field-effect transistor. MOSFETs, which serve as multipurpose transistors,
are widely used in both analog and digital circuits. A MOSFET's overall structure is defined
by its essential components and their placement inside the device. Understanding the

22
fundamental structure of a MOSFET is important to understanding its operation and the wide
variety of uses it has in electronic circuits. [10]

Figure 16: MOSFET structure

The electrical changes that occur in the channel width and the flow of charge carriers
(which can be holes or electrons) are strongly connected to the operational function of a
MOSFET. These charge carriers enter the channel through the source terminal and depart
through the drain terminal of a MOSFET construction. The capacity of the MOSFET to
modulate and amplify electronic signals is based on the movement of carriers inside the
channel, which is controlled by the electric field supplied to the gate terminal. MOSFETs may
operate as switches or amplifiers in electronic circuits due to the manipulation of these carriers,
and they play a significant role in the operation of devices that include integrated circuits to
power amplifiers.
The voltage given to an electrode known as the gate, which is strategically located
between the source and drain terminals, controls the channel width in a MOSFET. An
extremely thin layer of metal oxide separates the gate from the channel. The MOS capacitance
produced in this location is essential to the overall operation of the MOSFET. The electric field
produced by the gate's voltage changes the conductivity of the channel, allowing precise control
of the flow of charge carriers and helping operations such as signal amplification or functioning
as a switch in electronic circuits. Because of the complexity of this MOS capacity, it is an
important component of MOSFET performance characteristics.

3.2.4.1 Working Principle


The capacity of a MOSFET to regulate the voltage and current between its source and
drain terminals is the fundamental concept that controls its operation. A MOSFET functions
like a switch, with its functionality focused on the MOS capacitor, which is an important part

23
of the device. By providing a positive or negative gate voltage to the semiconductor surface
under the oxide layer between the source and drain terminals, the surface can be inverted from
p-type to n-type.
When a positive gate voltage is applied, it produces a repulsive force that forces holes
beneath the oxide layer down into the substrate. The following depletion zone has negative
charges connected to the acceptor atoms, causing a channel to develop when electrons are
attracted. In response to the positive gate voltage, the channel is later filled with electrons from
the n+ source and drain regions. When a voltage is applied between the drain and source,
current flows across the channel, and the gate voltage controls the behavior of the electrons in
that channel. Applying a negative voltage, on the other hand, supplies a channel of holes
beneath the oxide layer, allowing a diverse technique of adjusting MOSFET conductivity. [10]

3.2.4.2 Specifications
ZVN2106A is an N-channel enhancement mode vertical DMOS FET. It supports 60
Volt VDS and offers an RDS(on) of 2Ω. Below figures are the important data extracted from the
datasheet which used in this project.

Figure 17: Electrical characteristics of ZVN2106

24
Figure 18: On-resistance vs gate-source voltage

3.2.5 Shift Register 74HC595

Figure 19: Shift register 74HC595

The 74HC595, a widely embraced 8-bit shift register IC, serves as a linchpin in the
realm of digital electronics, frequently harnessed to augment the digital outputs on
microcontrollers or analogous digital devices. Boasting an elementary yet powerful
functionality, this IC operates as an 8-bit serial-in, parallel-out shift register, adeptly enabling
control over eight output pins while judiciously utilizing only three pins from the
microcontroller or other digital sources. Its serial-in, parallel-out operation orchestrates a
meticulous dance as data gracefully waltzes into the shift register, one bit at a time, via the
Serial Input (SER) pin, subsequently culminating in a parallel display at the eight output pins
(Q0 to Q7). Beyond its standalone prowess, the 74HC595 showcases its collaborative spirit
through cascade connections, where the Serial Out (Q7') of one shift register pirouettes
seamlessly into the Serial Input (SER) of the next, extending the ensemble of output pins. The

25
symphony of control finds its rhythm in the Clock (SRCLK) and Latch/Storage Register Clock
(RCLK or LATCH) pins, conducting the precise and synchronized shifting of data, akin to a
conductor leading a well-rehearsed orchestra. For those desiring a clean slate, a Clear (CLR or
MR) pin is at their disposal, facilitating the resetting of the internal register. The IC's reliability
is underscored by standard power supply pins, VCC for positive power supply and GND for
the grounding connection. Its versatility shines through applications spanning from
illuminating LEDs to orchestrating sequential displays in LED matrix displays or seven-
segment displays. As the curtain rises, timing considerations take center stage, with
meticulously crafted diagrams in the datasheet providing a visual score for the harmonious
clocking and latching of data to the output pins. In essence, the 74HC595 is not just an IC; it is
a conductor orchestrating a symphony of efficiency, versatility, and precision in the grand
theater of digital electronics. [11]

3.2.5.1 Pin Configuration and Function

Figure 20: Pin Configuration and Function

26
Table 2: Pin Description

3.2.6 Resistor

Figure 21: Resistor

Resistors are fundamental electrical circuit components. Their primary function in a


circuit is to keep specific voltage and current the amount constant. Resistors function according
to Ohm's law, which states that the voltage between the resistor terminals is precisely

27
proportional to the current flowing through the resistor, hence resistors play an important part
in electrical parameter regulation. The resistance in a circuit is measured in ohms, which is
symbolized by the Greek letter omega (Ω). The term "Ohm" refers to the German physicist
Georg Simon Ohm, who established the idea of resistance. [12]

3.2.6.1 Unit of Resistance


In the International System of Units (SI), the ohm (Ω) is considered the standard unit
of resistance. It is the fundamental unit used to measure resistance in electrical circuits.
Furthermore, in actual applications, numerous higher multiples and sub-values of ohms are
used. Resistance values that are orders of magnitude larger or less than the base ohm unit, for
example, are represented by kiloohms (KΩ), megaohms (MΩ), milliohms (mΩ), and other
prefixes. These multiples and divisors give an easy and practical way to represent resistance
over different size ranges.

3.2.6.2 Working Principle


A resistor's function may be compared to water flowing through a tube. Consider a
passageway that allows water to flow; as the diameter of the pipe reduces, so does the flow of
water. When the water pressure is increased to produce more flow, the energy is lost as heat,
resulting in a significant pressure differential between the head and tail ends of the tube. The
force imparted to the water corresponds to the current flowing through the resistor in this case,
and the pressure matches the voltage.
Resistors, which are frequently used in electrical circuits, have a consistent look that is
similar of small worms with multicolored bands on their sides. There are several forms of
resistors, one of which is a ceramic rod with copper wire twisted within. The amount of copper
turns and copper thickness influence the resistance of this component. Higher resistance results
from more twists and thinner material. There are also carbon spiral design resistors, wirewound
resistors, carbon composite resistors, carbon film resistors, thin and thick film resistors, metal
film resistors, and ammeter shunt resistors available. Metal film resistors were used in my
experiments.

28
3.2.6.3 Color of Coding

Figure 22: Resistor Color Code

Color coding is used to identify the resistance value of a resistor with a color band
pattern on its exterior coating. The conventional layout is three consecutive ribbons, followed
by a gap, and then a fourth ribbon. Brown, red, gold, or silver can be used for the fourth color
band. Consider the three continuous bands on the left, followed by the space and the remaining
colors, to understand the colors. The first two colors on the left reflect the value's first two
digits, while the third color serves as a multiplier, signifying the amount by which the first two
values are multiplied. If the first three colors are brown, black, and red, then the resistor value
is 10 * 100 = 1000 ohms, or 1K. The last band following the space refers to the resistor's
tolerance, with colors like gold representing a tolerance of +/- 5%, allowing actual resistor
values to range from 950 Ohms to 1K.
You'll also discover across five different resistor colors, with the first three digits
representing the multiplier, the fourth digit representing the tolerance percentage, and the fifth
digit representing the temperature coefficient. The additional information provided by the fifth
color enhances the precision with which the resistor value is determined. [13]

29
3.2.7 Capacitor

Figure 23: Capacitor

A capacitor is a device that stores electrical energy and is made up of two conductors
that are near to each other and separated by an insulator. A basic example of such a memory
device is a parallel plate capacitor. A capacitor is said to have a charge Q in this arrangement
if a total positive charge +Q is placed on one conductor and an equivalent negative charge -Q
is deposited on the second conductor. This fundamental charge storage idea is important to how
capacitors function (see Electricity: Capacitor Principles).
Capacitors have numerous and essential uses in a variety of industries. Capacitors, for
example, are employed in digital circuits to prevent the loss of information held in mainframe
computer memory during brief power outages. The electrical energy stored in these capacitors
guarantees that information is retained even if there is a temporary power loss. Capacitors also
serve as filters, diverting undesired electrical impulses and insulating sensitive components and
circuits from possible harm caused by power surges. [14]

3.2.7.1 Working Principle

30
Figure 24: Capacitor Structure

Consider the simplest capacitor form - the parallel plate capacitor - to demonstrate how
a capacitor operates. A dielectric separates two parallel conducting plates in the capacitor.
When a battery (DC voltage source) is connected across the capacitor, one plate (Plate-I)
connects to the battery's positive terminal, while the other plate (Plate-II) is connected to the
battery's negative terminal. The potential of the battery is applied across the capacitor in this
setup. As a result, plate I gains a positive potential in relation to plate II. Under steady-state
circumstances, current flows from the battery through the capacitor, from the positive plate
(Plate-I) to the negative plate (Plate-II). This flow, however, is hampered by the insulating
substance of the dividing panel.

Figure 25: Capacitor Working Principle 1

An electric field forms on the plates of a capacitor when a battery is connected to it.
The positive plate (Plate I) collects the positive charge of the battery over time, while the
negative plate (Plate II) accumulates the battery's corresponding negative charge. Based on its
capacitance and applied voltage, the capacitor achieves its maximum charge capacity after a

31
given period of time. Charging time refers to the precise length of time during which the
capacitor reaches its maximum charge.
Following that, when the battery is unplugged from the capacitor, the two plates retain
their positive and negative charges for a length of time. During this period, the capacitor
effectively functions as a source of electrical energy, storing the stored charge until it is
discharged or used in a circuit. [15]

Figure 26: Capacitor Working Principle 2

3.2.8 Light Emitting Diode (LED)

Figure 27: LED

Light-emitting diodes (LEDs) are a breakthrough discovery with several uses in


nowadays. LED lighting has significant benefits over previous light sources, allowing for new
ways to use light. Constant technical advancements in the lighting sector have emphasized the
numerous applications of these appealing light bulbs, which can be found in daily things
ranging from smartphones to enormous advertising display boards. LEDs' increasing

32
popularity can be due to their better functionality, particularly their small size and low power
consumption when compared with other technologies.
LEDs, as compared to standard general-purpose diodes, are "active" semiconductor
electrical components. What characterizes it is its capacity to emit frequency colors. This little
yet powerful product may create a variety of colors light by connecting the anode and cathode
terminals of an LED to the proper polarity of a voltage source. LEDs have had a profound
influence on the lighting situation, bringing in an evolution in how we see and apply light. [16]

3.2.8.1 Working Principle

Figure 28: Structure of LED

Light emitting diodes (LEDs) are two-lead semiconductor light sources that operate on
the p-n junction diode concept. When set up, the LED emits light. When a suitable voltage is
applied to the lead, the electrons in the device can recombine with the electron holes, releasing
energy in the form of photons. This interesting phenomenon, known as electroluminescence,
happens because different materials release photons of different wavelengths, resulting in
different colors of light.
LEDs' different colors are a direct result of the various wavelengths involved in the
electroluminescence process. The type of semiconductor material employed plays an important
role in determining light color. Gallium arsenide (GaAs), for example, is utilized as a
semiconductor to generate infrared light. Another semiconductor that produces light in the red
or yellow spectrum is gallium arsenide phosphorus (GaAsP). Similarly, gallium phosphorus
(GaP) as a semiconductor emits light in the red or green spectrum, adding to LED lighting's
varied and brilliant color pallet. [16]

33
3.2.9 Light Dependent Resistor (LDR)

Figure 29: LDR

The LDR (photoresistor) works on the photoconductivity principle, and its resistance
is continuously changed in response to differences in light intensity. The resistance of an LDR
reduces as the intensity of the ambient light increases. Because of this specific value, LDRs are
perfect for applications such as light sensors, light meters, automated street lights, and any
situation requiring light sensitivity.
LDRs, also known as light sensors, come in a number of diameters, including 5 mm, 8
mm, 12 mm, and 25 mm, allowing for flexible application in a wide range of electronic and
electrical equipment. LDRs are important components for building systems that require
adaptive responses to ambient lighting conditions due to their adaptability and sensitivity to
light changes. [17]

3.2.9.1 Working Principle


The LDR function is based on the photoconductivity concept. When light achieves the
photoconductive substance of an LDR, its energy is absorbed. This absorption stimulates
electrons in the photoconductive material's valence band, prompting them to flow to the
conduction band. With increased incoming light intensity, this process creates an increase in
electrical conductivity.
The incident light's energy must be greater than the band gap energy for this process to
work. Only in this way can electrons in the valence band completely energized and able to
jump to the conduction band. LDRs have the largest resistance in the absence of light, typically
about 1012 ohms, and this resistance lowers proportionately with increasing light intensity.

34
3.2.9.2 Types of LDR or Photoresistors
Based on their semiconductor composition, photoresistors or light-dependent resistors (LDRs)
are classified into two types:

1. Intrinsic photoresistor: A photoresistor of this sort is built of pure semiconductor without


any deliberate doping. In their basic forms, materials like silicon and germanium are used.
Electrons absorb energy and are activated when incident light with sufficient energy strikes the
photoresistor. Some of these excited electrons transition to the conduction band.

2. External photoresistor: Unlike the intrinsic type, the extrinsic type photoresistor uses a doped
semiconductor, in which impurities such as phosphorus are purposefully introduced to the
semiconductor material. This intentional doping increases the photoresistor's sensitivity to
longer wavelengths of light, which often extends into the infrared (IR) spectrum.

External photoresistors are particularly created to respond to infrared light, making


them useful for applications that need longer wavelength light detection.

3.2.10 Arduino Mega

Figure 30: Arduino Mega

The electronics industry is one of the fastest growing in the world, with new ideas,
technologies, and projects appearing all the time. Open source platforms such as Arduino,
which allow users to create new, inventive products, have made it easier to start projects. The
ever-evolving technology of Arduino enables it to provide exciting new features that inspire
innovation. The evolution of ARDUINO MEGA is a great example of this trend. [18]

35
The Atmega2560-based ARDUINO MEGA microcontroller board breathes fresh life
into the automation market. The platform is well-known for its simplicity and user-friendly
layout, as well as its outstanding functionality. The ARDUINO MEGA 2560 not only
simplifies project creation, but it also has unique characteristics that make it the first choice for
both individuals and experts.

3.2.10.1 Working Principle


The Arduino Mega 2560 is a development board based on the Atmega2560 AVR
microprocessor. Particularly, the microcontroller employs an 8-bit architecture and the
ATmega16U2 from Microchip Technology. The Arduino Mega 2560 is programmed with a
wiring/processing language, making it an adaptable platform for developing projects. This
board's key features include:

1. 54 Digital Input/Output Pins: 14 of these pins may be used as PWM outputs, allowing
enabling flexibility in a wide range of applications.
2. 16 Analog Pins: Allows the board to handle analog signals, enhancing sensor interface
capability.
3. 4 UARTs (Hardware Serial Ports): These ports allow for serial connection with other
devices or modules.
4. Crystal Oscillator at 16 MHz: Provides a reliable clock for microcontroller operation.
5. USB connection: Allows for easy programming and data exchange.
6. Power Jack: Allows the board to be powered from an external source for stand-alone
operation.
7. ICSP header: Enables microcontroller in-circuit serial programming.
8. Reset Button: When necessary, the reset button is utilized to restart or re-initialize the
microcontroller.

These capabilities combine to make the Arduino Mega 2560 a strong and flexible tool for
electronics and embedded systems applications.

36
3.2.10.2 Technical Features

Table 3: Specifications of Arduino Mega 2560

3.2.10.3 Pin Configuration

Figure 31: Arduino Mega 2560 Pin Configurations

The Arduino Mega 2560 board's main power and communication pins are as follows:

37
• 3.3V and 5V power supply pins: These pins supply regulated power to the Mega 2560
board.
• GND pin: The Mega 2560 board has 5 ground pins that serve as a common ground
reference.
• Reset (RST) pin: used to reset the board's functionality.
• Vin: This pin supports input voltages ranging from 7V to 12V. The board will
automatically adjust the voltage to 5V if used as an output.
• Serial Communication (TXD and RXD): These pins enable serial communication, with
TXD used to send serial data and RXD used to receive serial data.

Table 4: Arduino Mega2560 Pin Configuration

• External Interrupts: Six pins (2, 3, 18, 19, 20, 21) that can be used to activate interrupts
in a variety of methods, such as supplying a LOW value, responding to rising or falling
edges, or modifying the value of the interrupt pins.

Table 4: Arduino Mega2560 Pin Configuration

38
• AREF (Analog Reference Voltage): This pin functions as the analog input's reference
voltage.
• Analog Pins: There are 16 analog pins consisted of A0 until A15. The AREF pin can
be used to modify the high values of these pins.
• Digital Input/Output Pins: The board includes 54 digital input/output pins numbered 0
to 53. PWM (Pulse Width Modulation) pins D2 to D13 and D44 to D46 are among
them.
• I2C (Inter-Integrated Circuit): Pins 20 and 21 are used for communication.
• SPI (Serial Peripheral Interface) Communication: SPI communication allows the
microcontroller to interface with one or more peripheral devices.
Table 4: Arduino Mega2560 Pin Configuration

• LED: An LED is connected to pin 13 (digital pin 13) on the Mega 2560 board.

39
3.3 PCB Fabrication

Figure 32: Flow Chart of PCB Fabrication

PCB fabrication flow chart outlines the sequential steps, from circuit design and layout
to UV exposure, etching, hole drilling, component assembly, and final testing. Each step plays
a crucial role in producing a reliable and functional printed circuit board. The step of PCB
fabrication as shown in below:

40
Figure 33: Circuit Design in Proteus

1) Circuit Design: Utilize PCB design software (Proteus) to create a detailed circuit layout.
Place electronic components strategically on the design and establish necessary
connections.

Figure 34: PCB Layout in Proteus

41
2) PCB Layout: Transfer the circuit design to a PCB layout, specifying dimensions and
optimizing component placements. Ensure proper spacing and routing for optimal
signal integrity and manufacturability.

3) Print the Design on Transparency: Use a laser printer or inkjet printer with appropriate
transparency film to reproduce the PCB layout. Print the design onto a transparent film
or acetate sheet.

Figure 35: UV Board

4) Prepare the Substrate: Select a suitable substrate material, typically a fibre glass.
Thoroughly clean the copper surface to eliminate contaminants.

5) Apply Photoresist: Apply a thin layer of photosensitive photoresist material onto the
clean copper surface.

6) Expose the PCB to UV Light: Place the printed transparency onto the photoresist-
coated copper. Expose the assembly to UV light, hardening the photoresist in areas
corresponding to the transparent regions of the design.

7) Develop the PCB: Immerse the exposed board in a developer solution to remove
unhardened photoresist. This reveals the underlying copper in areas not exposed to UV
light.

42
Figure 36: Process Etching PCB

8) Etch the PCB: Immerse the developed PCB in an etching solution (e.g., ferric chloride
or ammonium persulfate) to remove unprotected copper. The hardened photoresist
protects traces and pads during the etching process.

Figure 37: Process remove photoresist

9) Remove Photoresist: Eliminate the remaining photoresist using a suitable solvent,


leaving only the copper traces and pads.

10) Drill Holes: Use precision drilling to create holes in the PCB for component mounting
and through-hole connections.

43
11) Component Assembly: Mount electronic components onto the PCB according to the
finalized circuit design. Solder components in place for secure connections.

Figure 38: Testing the result in lab

12) Testing: Perform rigorous testing of the completed PCB to ensure functionality.
Identify and troubleshoot any issues that may arise during testing.

3.4 GANTT Chart

Table 5: GANTT Chart

44
CHAPTER 4
RESULT AND DISCUSSION

4.1 Briefing of the Project


The design of hardware involved Arduino Mega as microcontroller that processes the
amplified signal which received from HB100 Doppler radar microwave sensor and transmits
the information to the 7-segment display and Matrix display panel. Self-design amplifier circuit
built with combination of LM324N operational amplifiers, resistors and capacitors to amplify
the received signal from HB100 Doppler radar microwave sensor. Self-design 7-segment
display circuit built with combination of 74HC595 shift register, LED, LDR and MOSFET to
display the real-time speed of the vehicle. Besides, Matrix display panel used to alert road users
to slow down when exceeding the speed limit.

4.2 Prototype

Figure 39: Prototype view 1

45
Figure 40: Prototype view 2

Figure 41: Prototype view 3

46
Figure 42: Prototype view 4

47
Figure 43: Prototype view 5

Labeling Component/Material/System
1 Speed Display System
2 Doppler Radar Speed Detection System
3 Tripod Stand
4 Aluminium Funnel
5 HB100 Microwave Doppler radar sensor with self-design
amplification system
6 Arduino Mega
7 Self-design 7-segment display
8 Display of km/h
9 Matrix Display Panel
10 Shift register 74HC595

48
4.3 Result
This result was obtained in Taman Muzaffar Height. As the speed limit in residential areas is
30 km/h, the display will be different according to the vehicle speed detected.

Figure 44: Displaying “Speed Limit 30km/h” when no car detected

When no car is passing through or detected by the Doppler radar speed detection system, the
"speed limit 30km/h" is displayed on the matrix display panel as shown in Figure 44.

49
Figure 45: Display when the detected car without exceeds the speed limit

When the detected car speed was below the speed limit, both car’s speed and "speed limit
30km/h" were displayed as shown in Figure 45.

50
Figure 46: Display “Slow Down” when the detected car exceeds the speed limit

When the detected car speed was exceeding the speed limit, the car’s speed and "slow down"
were displayed as shown in Figure 46.

4.4 Discussion on Development of HB100 Amplification Circuit


HB100 outputs a maximum 50mV analog signal which needs amplification to reach the
detection level of the microcontroller. In this case the microcontroller is the Arduino mega.
Here involves several revolutions in realizing the successful final version.

4.4.1 1st Version of HB100 Amplification Circuit: Datasheet Amplifier Circuit


In version 1, we attempted to use the amplification circuit provided from the datasheet.
However, it comes to a failure as the HB100 sensor can only detect motion within a range of 2
meters.

51
4.4.1.1 Hardware

Figure 47: Datasheet Amplifier Circuit

The amplifier circuit was constructed and simulated using Multisim software to
observe its Bode plot. The result was shown in figure below:

Figure 48: Schematic in Multisim

52
Figure 49: Low cut-off frequency and its highest gain

Figure 50: Low and high cut-off frequencies

The maximum gain was only 81dB or 11220 in magnitude and the cut-off frequencies
range is between 3.5Hz and 78Hz. When converted to speed using frequency-to-speed
conversion formular provided from datasheet, speed in km/h = frequency/19.49, this amplifier
circuit only allows the detection of speeds in the range of 0.18 km/h to 4 km/h. Any other
speeds will be filtered out. Consequently, it can be concluded that it is not suitable for detecting
car speed or even human walking speed.

53
Some effort has been made to bring the datasheet amplifier to the testing phase. Firstly,
the circuit is built on a breadboard before fabrication to test its functionality. If everything
functions properly, the circuit will proceed to the fabrication stage and solder on PCB.

Figure 51: Schematic of version 1 drawn in proteus

Figure 52: PCB layout of version 1 drawn using proteus

54
4.4.1.2 Software
After the circuit was done, the program was written using Arduino IDE software. The
program for HB100 sensor from online source mainly uses FreqPeriod.h library which uses
digital signal, but the output signal generated from the HB100 was analog signal. This causes
the obtained result to be inaccurate. After that, the 2 stages amplifier was designed to amplify
to 12317 or 82dB of gain according to the resistor value in the amplifier circuit. The gain value
can be simply calculated by using formulas.

Rf (3)
AV = −
R in
Rf (4)
AV = 1 +
R in
In the first stage, the op-amp was designed in non-inverting. The gain is AV = 1 +
1M
10k
= 101 calculated using equation 3. In the second stage, the op-amp was designed in
1M
inverting and the gain is AV = − 8.2k = 121.95 calculated using equation 4. Then, total gain

of this amplifier will be multiplied of both which equals to 12317 or 20 log 12317 = 82dB.
For an ideal case, after the output signal from HB100 has been amplified by 82dB voltage gain,
the high amplitude sinewave signal will experience clamping and clipping to become square
wave signal. The code from online source by using FreqPeriod.h library only works when
detecting this square wave. But practically, the output signal from the amplifier only produces
such high amplitude when the moving object is within 1 meter.

55
Figure 53: Waveform from pin IF when high amplitude signal detected

Deliberately this kind of code is unusable. Following that, adjustments are made to
include an analog pin capable of sensing values ranging from 0 to 1023 on a 5V scale. If the
level exceeds 512, it represents a high value; anything less than 512 indicates a low value. This
modification might efficiently separate lower amplitude waveforms. A logarithmic
companding is also tried to amplify low amplitude part of the waveform. Logarithmic
companding maintaining detail in lower amplitudes while compressing higher ones as shown
in figure below.

Figure 54: Logarithmic companding example

In the absence of such a waveform, the HB100 IF pin's normal frequency may be
accompanied by undesired noise. Hence, the simplest way to accurately determine frequency
is to use Fast Fourier Transform (FFT) coding with an Arduino's analog interface.

4.4.1.3 Antenna and Waveguide Design


HB100 is a module using patch antenna for transmission and reception of microwave.
In order to increase the range of the signal for both transmission and reception, a 65cm diameter
dish antenna is used. In addition, an aluminium funnel is used as feedhorn and installed at the
dish antenna's focus point and facing towards the cars to be detected.

56
4.4.1.4 Roadside Testing
When testing, it is found that the detection range is only around 5 meters and not able
to detect car speed above 30km/h. Speaker is also used to hear and observe the output wave
frequency as the signal received is in the range of human ear detection range and amplitude is
between 0 to 5 volts. With the help of the speaker, can hear the received signal when a car is
in a range of 20 meters, but the sound is very low. This means the amplitude for the received
signal was very weak cause that the Arduino cannot detect it the cars or cover by noise.
Whereas this means that hb100 sensor is still able to detect the car speed in a range of 20 meters
as stated in datasheet. Besides, safety precautions were very important especially when project
testing at roadside. A reflective warning triangle is placed on the roadside to remind vehicles
to pay attention to testing personnel.

Figure 55: Roadside Testing

Figure 56: A warning triangle is put on the roadside

57
4.4.2 2nd Version of HB100 Amplification Circuit: Self-Designed HB100 Amplification
Circuit
4.4.2.1 Hardware
After the failure of the 1st version, the amplification circuit had been modified by adding
MOSFET ZVN2106 to the 1st version amplification circuit to amplify the output. It was
observed that the signal gained significant amplification, resulting in a very loud output sound
when testing with speaker. This means that the signal was successfully amplified but at the
same time, the noise also been amplified cause the high frequency signal received by the sensor
totally covered by the noise. As a conclude, modifying the amplification circuit by adding
MOSFET does not solve the problem.
After that, considered by involving an audio modules such as PAM8406 and
TDA2030A were used to address the issue, given that the received signal frequency falls within
the audible range and can be heard using speaker. Unfortunately, this approach also proved
unsuccessful to amplify the received signal, as the audio amplifier module was designed as
high-power speaker driver amplifiers and not suitable for signal amplification.

After that, the 3rd stage of LM324 op-amp was added to replace the MOSFET to
amplify the received signal. The high frequency sounds can be heard apparently when
connected the sensor directly to the higher gain LM324 op-amp. By changing the resistor value
to get a higher gain of the amplifier, it was found that keep increasing the gain is not the best
solution because the noise has also been amplified and causing high frequencies received
attenuated. After multiple testing times, the suitable gain for 1st stage of op-amp was found
R 40k
which is AV = − R f = − 2k
= −20. The inverting op-amp was chosen to be used which is
in

because the non-inverting op-amp result of high interferences and less signal received. So, an
inverting op-amp is proceeded onwards.

When a specific value is confirmed, a second stage of amplifier circuit was built to
achieve a sharper cut-off frequency to accurately filter noise and amplify signal. The limitation
and lack of capacitors and resistors become the main challenge when building the required
amplifier. Combination of series or parallel of the capacitor and resistor connected when trying
to build the best amplifier circuit. Without observing the output signal using an oscilloscope,
attempts to analyze through a speaker only was inaccurate, as what could be heard was not
representative of the microcontroller's interpretation. Recognizing the need for more precise

58
testing, it became evident that a laboratory setting was essential for further experimentation
and analysis.

Figure 57: Result of 1 stage amplifier with better gain and signal to noise ratio (SNR)

59
Figure 58: Testing of higher stage op-amp

In the lab, after observing amplified results by using an oscilloscope. It can be


discovered that there is a constant noise of 50Hz as shown in the figure below. The frequency
can be calculated as seen from the oscilloscope.

Figure 59: Constant noise

By the help of oscilloscope, it proved that keep increasing the gain of amplification
circuit only will lead to noise dominance.

Figure 60: A smaller gain op-amp

The highlighted part in the figure above indicates the constant noise. The yellow signal
represented the unamplified signal while the green signal was amplified with a smaller gain.
The fuzzy texture in the unamplified signal shows the high frequency noise.
60
The tricky problem was found out when testing in lab, the output signal from the
amplification circuit was excluded from the clamping and clipping range. This led to the
important part of the waveform being lost after clamping and clipping process, which means
that the microprocessor will never receive the signal from the sensor.

Figure 61: Waveform not centered

Figure 62: Another example of waveform not centered

After doing some research, the solution for this case was to change the voltage divider
resistor value as highlighted in figure below to adjust the offset voltage.

61
Figure 63: Changing voltage divider resistor value

After testing, 7.3k ohm was used in amplifier circuit to adjust the amplified signal to be
at the center. A potentiometer is greatly recommended to replace the R2 10k ohm resistor to
adjust it while the waveform not at center.

4.4.2.2 Software
Eliminating the noise has always been the toughest challenge while dueling with analog
signal. While amplifying signal, the noise gets amplified as well. Developing a good digital
filter program which can filter out the noise in analog signal was not an easy work. A noise
frequency bins exclusive programming is used. When starting the system, the sensor needs to
calibrate to exclude the noise frequency bins. A frequency domain is better than time domain
in analyzing an analog signal. So, the arduinoFFT.h library in Arduino IDE software was used.
FFT highly needs computation and memory, this was the reason Arduino Mega had been used
in this project. Serial print in the code can cause a significant delay in the FFT processing. A
sample size of 256 frequencies bins occupies 35% of the Arduino mega memory and a sample
size of 512 frequencies bins can occupy 52% of Arduino mega memory. When it comes to
sample size of 1024 frequencies bins, it needs 106% of Arduino mega memory. Hence, the
maximum sample size that can be used is 512. Although larger sample sizes may slow down
microprocessor processing, at the same this they enhance frequency accuracy. Increasing
sample size will give more accurate results. For example, using 256 sample size gives margin
error in +/- 1.7 km/h after frequency to speed conversion. While using sample size of 512, it
decreases the margin error to +/- 0.9 km/h which is enough for speed detection system accuracy.

62
Finally sample size of 512 is used. In FFT, it has terms sample size and sampling rate. For
explanation, the sampling rate is set at 1000Hz. Hence, the largest frequency that can be
detected is 500Hz according to Nyquist theorem. While sample size determines the number of
frequency bins. For instance, 64 sample size is used. So, 500Hz is divided into 64 bins. The
frequency bin width is 500/64 Hz or 7.8125Hz frequencies. In the first bin, it contains 0Hz to
7.8125Hz. While in the second bin, it contains 7.8125Hz to 15.625Hz (7.8125Hz to 23.4375Hz
(7.8125Hz×3). It continues until bin 64, 492.1875Hz to 500Hz.

When testing the functionality of the code with an Arduino mega, a technique used was
connecting the Arduino’s analog pin to computer’s aux audio pin to receive the frequency
generated from computer. In the laptop, open a sound frequency generator to tune the frequency
and observe whether the frequency shown in serial monitor matches with the generated
frequency to ensure its linearity. Modify the code by adding equation in the code to calibrate it
until linear. The equation used is y=mx+c.

Figure 64: Calibrate the equation using serial monitor and frequency generator.

Besides, the frequency signal received by HB100 Doppler radar microwave sensor from an
actual car was also used for debugging the code. A sample of frequency signal that already
covered to audio source is taken from Youtube for debug reference as shown in figure below.

63
Figure 65: Debugging to produce a useful output

From the figure 65, the constant velocity (green line underscored), reveals the speed of
the car. On this stage, the code was able to use for detecting the car speed. When the computer’s
volume is smaller than 60%, the Arduino cannot detect the car speed. When 60% and above, it
is able to detect it. The larger the volume, the higher the accuracy. Now, the next step is to see
how the waveform looks which was produced by the computer using oscilloscope. This step is
required for determining targeted wave amplitude for our amplification circuit.

Figure 66: Waveform from computer aux port at 100% volume

64
Figure 67: Waveform from computer aux port at 60% volume

The minimal waveform amplitude that Arduino can detect is at 0.5Vp-p. So, the
targeted amplified waveform is at least 0.5Vp-p for car’s frequency range which normally falls
between 400Hz to 1kHz. The above waveform has frequency of around 600Hz as seen and
calculated from the oscilloscope scale. The final code can be viewed in appendix C.

4.4.2.3 Antenna and Waveguide Design


A rectangular waveguide, enhanced with an aluminum foil coating, is constructed to
achieve a more precise and directional transmission and reception of waves.

Figure 68: Rectangular waveguide

65
4.4.2.4 Lab Testing
A metal piece is used to check the detection of range and frequency.

Figure 69: Waving a metal piece to check the detection range

The sound of the waveform is heard by the speaker. Simultaneously, the oscilloscope
is connected to the output as well. It is crucial to notice if the high frequencies disappeared
during waving the metal piece, the amplifier circuit had to redesign as the amplification circuit
will filter out the high frequency. The high frequency needs to be retained as the car’s frequency
is a higher frequency.

Figure 70: Circuit connections

Video and sound from speaker are recorded during testing. Another analogy that can
be used to interpret the noise present is using spectrogram.
66
Figure 71: Spectrum Analyzer app

Using phone’s app spectrum analyzer to interpret the video and sound that have
recorded. The circle part is the result of waving metal piece. The brighter the color, the larger
the frequency's amplitude. It has few peaks there which have larger amplitude than the waving
frequency. It is considered as noise. Since the SNR ratio (signal to noise ratio) is less than 1, if
the signal gets amplified, the noise will have a higher gain than the signal, hence it is prohibited
to over amplify the received signal to prevent the noise totally covered the information signal.
Also, the code needed to be modified to eliminate those noise peaks, which is called calibration.
In calibration, the specific frequency bin where the noise is located will be eliminated. For
example, if the noise is around 1kHz, the frequency bin where the noise was located would be
filtered out and eliminated. On the contrary, if digital filter was used in this case, it would
directly ignore all the signal at 1kHz. According to the formula from the datasheet, speed in
km/h = frequency/19.49. 1kHz equals 51 km/h. Which means when the car is at 51 km/h, it
cannot be detected. So, it is better to eliminate the noise instead of doing digital filter. Although
digital filter can recover that eliminated portion according to order and pattern of the signal’s
behaviors, it is hard as well to fully recover it or may have some loss still.

67
4.4.2.5 Succeeded in development of 2nd Version amplification circuit
It was successful with a detection range of 10 to 15 meters and detectable by the
microcontroller. Below is the sketch of the circuit.

Figure 72: Amplification circuit that succeeded in detecting car speed up to a range of 10
meters

Figure 73: Successful circuit schematic built in Multisim

68
Figure 74: Low cut-off frequency and its highest gain

Figure 75: Low and high cut-off frequencies

The maximum gain was 66dB or 1995 in magnitude and the cut-off frequencies range
is between 18Hz and 12kHz. When converted to speed using frequency-to-speed conversion
formular provided from datasheet, speed in km/h = frequency/19.49, this amplifier circuit can
allow the detection of speeds in the range of 0.9 km/h to 615.7 km/h. It can be concluded that
it is suitable for detecting car speed.

Firstly, the circuit is built on a breadboard before fabrication to test and develop. The
circuit will proceed to the fabrication and solder on PCB.

69
Figure 76: Schematic of 2nd version drawn in proteus

Figure 77: PCB layout of 2nd version drawn using proteus

70
Figure 78: Prototype of 2nd version amplification circuit

4.4.2.6 Comparison between 1st version and 2nd version


Table 6 shows the comparison of some specification value between 1st version and 2nd
version.
Table 6: Comparison between 1st version and 2nd version

Specifications 1st Version 2nd Version Unit

Maximum gain 81 66 dB

Low cut-off frequency 3.5 15 Hz

High cut-off frequency 78 12.7k Hz

Bandwidth 74.5 12.685k Hz

Lower roll-off rate +42.00 +39.86 dB/decade

Upper roll-off rate -38.64 -38.42 dB/decade

Lowest speed 0.18 0.8 km/h

Highest speed 4 651.6 km/h

Speed suitability Human walking Car speed -

71
4.5 Discussion on 7-segment Display
The 7-segment display contains an abundance of LEDs that were used to display digits.
A high power is supplied to the 7-segment display. Since a low power microcontroller is needed
to control a high-power circuit, MOSFET is needed in this case. ZVN2106 N-channel
enhancement switching MOSFET is used in this project. Display needs an abundance of pins
to control each segment in the 7-segment. The 74HC595 serial to parallel IC is used to reduce
the use of Arduino pins. Connectors are used to connect between 7-segment PCB boards and
Arduino microcontroller. Two LDR is used to detect ambient light. It has the functionality of
displaying numbers and brightness adjustments depending on ambient lights.

4.5.1 7-segment Design


There are 3 digits of 7-segment and 1 “km/h” sign produced. The difference in 3 digits
of the 7-segment is only at the part of gate pins of lowest side MOSFET (the 3 MOSFET in
parallel) to the connectors. In figures 79, 80, 81 and 82 shows the designed circuit built in
proteus.

72
Figure 79: Schematic of 7-segment 1st digit

73
Figure 80: Schematic of 7-segment 2nd digit

74
Figure 81: Schematic of 7-segment 3rd digit

75
Figure 82: Schematic of “km/h” sign

PCB is printed as design in figure 83, 84, 85 and 86.

Figure 83: PCB layout of 7-segment 1st digit

76
The copper on the right side of figure 83 is used as back reflector and shield for the
hb100 sensor.

Figure 84: PCB layout of 7-segment 2nd digit

77
Figure 85: PCB layout of 7-segment 3rd digit

78
Figure 86: PCB layout of “km/h” sign

During the designing, the desired circuit is built on a bread board to observe its
functionality and debug the circuit if there is any issues.

Figure 87: Testing on breadboard

The design consists of three 74HC595 serial to parallel IC to reduce the pins needed
from Arduino from 21 pins to 3 pins. Each 74HC595 has 4 input and 8 output, one output from
74HC595 connected to input of another 74HC595 and other seven outputs connected to gate
pin of MOSFET which open and close the supply for each segment of LEDs. The MOSFET is

79
connected below LEDs segment which is called low side switching. N-channel enhancement
MOSFET is suitable for connecting using low-side switching configuration. An enhancement
MOSFET is “OFF” when there is no gate voltage, or when VGS is 0. In contrast, a depletion
mode MOSFET is “ON” when there is no gate voltage. If an N-channel enhancement MOSFET
is connected using high-side switching configuration, it will have the problem with MOSFET
not being fully opened. Figure 88 illustrates difference between low-side switching and high-
side switching.

Figure 88: Low-side switching vs high-side switching

Three MOSFET used to do pulse width modulation (PWM) are constructed under the
low-side switching which means there are two low-side switches. This kind of configuration
will have a drawback of the upper MOSFET cannot be fully opened. But since the upper
MOSFET is switching between 0 and 5V, there is no severe impact on the whole circuit except
for the higher drain-source on resistance, RDS(ON) of the upper MOSFET. The PWM signal from
Arduino is connected directly to the gate pins of the 3 MOSFET. It is used for changing the
resistance of the whole 7-segment. The necessity of doing this is to limit the current as
maximum current of each LED is 20mA as stated in the datasheet. Secondly, each digit uses
different numbers of segments. For example, display the number “1” uses 2 segments, number
“0” uses 6 segments, number “8” uses all segments and so on. Hence, when displaying each
digit, the resistance of the whole circuit needs to be changed accordingly. Thirdly, it is used to
adjust brightness of the 7-segment. A concern of flowback current from the ground up to LEDs
and controllers will be an issue for this kind of design. But normally this is not going to occur
since the MOSFET of each segment will be closed while it is not supposed to be lit up. It is the
optimum way to realize such functions with minimal bugs. Or else, the design will be very

80
complex and need large amounts of hardware. This kind of design is hardly dependent on
programming such as PWM tunning.

Besides, two LDRs are used in this circuit to reduce the car’s light influence. The LDR
detected ambient light and changed the brightness of the LEDs accordingly. The ambient light
detected by LDRs will be converted into value and contributes to the PWM tuning to adjust
brightness. A digital low pass filter is added to the code to smoothen the brightness adjustment
to overcome the voltage value changing too fast causing the brightness adjustment to seem
unsmooth.

In the design, 7 LEDs are in one segment. Each LED can draw a maximum of 20mA
current. There are 7 segments in each digit. There are 3 digits in total. The total maximum
current drawn can be 3×7×7×20mA which equals to 2.94A.

Figure 89: Measuring current of the display

The supply is a 5V. It is impossible to get such high current using 5V. There is
resistance in the copper trace and wires, soldering connections, connectors and MOSFET drain-
source on resistance, RDS(ON). Each red LEDs also consumed up to 2V when connected in
parallel. So, the resultant voltage left to counter the above resistances is 3V. To reach the
maximum current with a 5V supply, the total resistance, including these components, should
be around 1 ohm. This design also serves as a safeguard in case of accidental higher voltage
input, as the MOSFET cannot fully open with a drain voltage exceeding 5V. While a MOSFET
driver could address this issue, it adds complexity to the circuit and is omitted, as the 5V gate
voltage from the controller sufficiently controls the MOSFET.

The circuit faces an issue which is insufficient current. It can be addressed by


connecting 3 in parallel can reduce the RDS(ON) resulting in a double of current. This is because
RDS(ON) contributes most of the resistance. Then, 1A can be reached by this enhancement.

In total, 3 digits and 1 “km/h” sign used 3 pins for digit data, 4 pins for PWM of
MOSFET from Arduino. To conclude that, this display system is optimized critically to
81
provide brightness adjustments according to ambient light and reduction of complexity of
circuit by transitioning certain functions from hardware to software. Furthermore, power
consumption and circuit protection are also concerned while in the design.

4.6 Discussion on Matrix Display


Matrix display is used to display speed limit and display warning sign for traffic users
to slow down if they exceed speed limit. It is also installed with LDR which can detect
ambient brightness and adjust its display brightness to a suitable level for better visualization.

82
CHAPTER 5
CONCLUSION AND SUGGESTION

5.1 Conclusion
The project includes a variety of components, including the HB100 Doppler radar

sensor, Arduino Mega, amplifier circuit, matrix display, 7-segment display. These components

work together to create an innovative speed detection system that not only accurately

recognizes vehicle speeds, but also uses display for real-time monitoring. The debate expands

on the practicalities and benefits of such a system, which offers a scalable and cost-effective

method to smart speed management in important areas. The demand for improved speed

detection systems in today's traffic management and safety industry is increasing. This project

report not only summarizes the process of constructing a Doppler radar speed detection system,

but it also expands its scope to investigate larger implications and applications. The project's

use of strict refining methods, and thorough testing demonstrates a desire to push the limits of

speed detecting technology. The combination of transportation safety, smart system technology

meets the growing demand for accurate and reliable speed detection in a variety of

environments. The disadvantages of previous systems, such as limited precision and

inconsistent performance, become the main focus for creative upgrades, with the addition of

Doppler radar amplification and real-time monitoring capabilities. Recognizing the

significance of this study, it is clear that speed detection systems play a critical role in

increasing road safety. The project's contribution is its capacity to reduce speeding incidents

and accidents by accurately monitoring and showing vehicle speed. The use of matrix and 7-

segment displays for real-time speed information improves driver awareness and promotes

responsible driving behavior. The project's aims are perfectly linked with tackling these

83
difficulties, with the goal of developing an economical Doppler radar speed detection system

that combines cutting-edge technology with cost effectiveness. The thorough examination of

approaches for merging Doppler radar amplification, real-time monitoring display system, and

smart system technologies emphasizes the depth and breadth of this research. In essence, the

"Doppler Radar Amplification for Speed Detection System" IDP stands as a testament to a

disciplined and systematic approach to research, development, and testing. The project not only

meets the initial objectives of enhancing speed detection capabilities but also extends its impact

into broader realms of smart systems and transportation safety. The synthesis of Doppler radar

technology, and innovative amplification techniques positions this project at the forefront of

advancements in speed detection technology, promising a safer and more efficient future for

road transportation.

5.2 Project management


5.2.1 Group Structure
This part focuses on the team's organizational complexity, demonstrating the strict
protocols that manage operations. In addition, project proposals are analyzed to give a road
map for success.

84
Supervisor
Supervisor guide students through program rules and regulations, provide advice and
supervise projects within their subject of study. They assist from project inception to
completion, providing guidance and support in data collection and analysis.

Student 1
Student 1 is tasked with defining the project scope, organizing the sequence of activities
and ensuring timely completion of tasks, and overseeing hardware implementation. This
includes assembling components, conducting system testing, and analyzing the resulting data
output. Student 1 must find out the most effective way to complete every task.

Student 2
As coordinator of software development tasks, Student 2 specializes in microcontroller
software like Arduino IDE. He is responsible for programming the entire system and ensuring
correct program flow, designing hardware and software components to achieve the required
output.

85
Student 3
Student 3 is responsible for the entire production process of a specific system, planning
the functionality of the system from the outset. Student 3 is responsible for meeting specified
requirements and carefully tracking the project budget, including direct and indirect costs
associated with procuring necessary components.

5.2.2 Financial matter


5.2.2.1 Project Costing
No. Component Quantity Price per Total Price
quantity (RM)
(RM)
1. P5 Matrix display panel pixel 32x64 1 20.00 20.00
2. HB100 microwave Doppler radar sensor 3 8.083 24.25
3. Breadboard 6 3.80 22.80
4. Serial-in Parallel-out shift register 74HC595 10 1.09 10.9
5. Tripod Stand 1 31.225 62.45
6. 3M High Speed USP Extension Cable 2 6.75 13.50
7. Corrugated Board 2 8.30 16.60
8. Tape 2 2.25 4.50
Total: 175

Table 7: Project Costing

86
5.2.2.2 Unnecessary expenses
There are also some items purchased to increase detection range and improve accuracy.
However, after testing, it was found that they did not provide any improvement. For example,
items such as disc antenna, buck converter, audio amplifier, and so on.
No. Component Quantity Price per Total
quantity Price
(RM) (RM)
1. Piring Satelit Dish Mytv 2 32.25 64.50
2. Step Down Buck Convertor 1 11.70 11.70
3. DC-DC Step Up XL6009 1 20.89 20.89
4. TDA2030A Audio Amplifier Module 1 11.88 11.88
5. TDA2030A Power Audio Amplifier 1 10.28 10.28
Module
Total: 119.25

Table 8: Unnecessary expenses

5.3 Future recommendations

1. High-resolution image sensor:

Integrated high-resolution image sensors improve object identification and recognition,

particularly in settings with several lanes and varied traffic participants.

2. Expand detection range:

Investigate and develop technologies that can extend Doppler radar detection range and

improve system coverage.

3. Enhanced signal processing unit:

Improve the signal processing unit to handle more complicated algorithms, as well as

increase the system's radar data analysis and interpretation capabilities.

4. Advanced filtering mechanism:

87
Advanced filtering processes are used to decrease noise and interference, resulting in more

precise speed detection and fewer incorrect readings.

5. Customizable LED display:

Customizable LED displays may show speed restrictions and warnings in various visual

formats to improve visibility and user awareness.

6. Components with longer service life:

Choose extended-life components to improve the overall durability and lifespan of your

components or equipments, eliminating the need for frequent repairs.

88
REFFERENCES

[1] Bellis, M. (2019, July 3). The men who helped Invent Radar. ThoughtCo.
https://www.thoughtco.com/radar-and-doppler-history-
4070020#:~:text=Doppler%20radar%20gets%20its%20name,and%20the%20detector%20in
%201842.

[2] Gimino, G. et al. (2023) 915,874 road accidents recorded throughout 2021 and
2022, says Transport Ministry, The Star. Available at:
https://www.thestar.com.my/news/nation/2023/06/13/915874-road-accidents-
recorded-in-2021-and-2022-says-transport-
ministry#:~:text=Of%20the%20number%2C%20Minister%20Anthony,with%204%2C5
39%20deaths%20(1.23%25). (Accessed: 14 January 2024).

[3] G. Viswanath, A. Mounika, P. Naga Lakshmi, & E. Ramesh. (2023). Automatic


Motion Detection and Distance Measure Using Doppler Radar, 17.

[4] Nguyen Giang Lam (2021) Vehicle speed measurement using Doppler effect -
theseus. Available at:
https://www.theseus.fi/bitstream/handle/10024/496044/Thesis.pdf?sequence=2
(Accessed: 15 January 2024).

[5] Su Myat Paing, Su Su Yi Mon and Hla Myo Tun (2016) Design And Analysis Of
Doppler Radar-Based Vehicle Speed Detection, 5(06).

[6] Aloysius Adya Pramudita, Lukas, & Edwar. (2019). Time and Frequency Domain
Feature Extraction Method of Doppler Radar for Hand Gesture Based Human to
Machine Interface, 98.

[7] Stelian SaracutStelian Saracut 15311 silver badge1111 bronze badges (1963)
Noisy amplifier for HB100 Doppler module, Electrical Engineering Stack Exchange.
Available at: https://electronics.stackexchange.com/questions/321352/noisy-
amplifier-for-hb100-doppler-module (Accessed: 15 January 2024).

89
[8] Admin (2021) LM324 comparator IC circuit working and its applications,
WatElectronics.com. Available at: https://www.watelectronics.com/lm324-
comparator-ic-working-applications/ (Accessed: 15 January 2024).

[9] Matan. (2023, October 26). Led matrix displays: How it works, application &
advantages. Electricity. https://www.electricity-magnetism.org/led-matrix-displays/

[10] Www.facebook.com/elprocus. (2023, September 27). What is the MOSFET:


Basics, working principle and applications. ElProCus.
https://www.elprocus.com/mosfet-as-a-switch-circuit-diagram-free-circuits/

[11] DroneBot Workshop (2023) Shift registers - 74HC595 & 74hc165 with Arduino,
DroneBot Workshop. Available at: https://dronebotworkshop.com/shift-
registers/#:~:text=The%2074HC595%20has%20a%20%E2%80%9C3,be%20at%20th
ree%20different%20states.&text=The%20OFF%20state%20is%20a,the%20output%2
0of%20the%20chip (Accessed: 15 January 2024).

[12] J. (2014, March 4). Working of Resistors. Electronic Circuits and Diagrams-
Electronic Projects and Design. https://www.circuitstoday.com/working-of-resistors
[13] Atlearner. (2023, October 1). What is resistor color code? Beginner’s Guide.
https://www.atlearner.com/2019/07/Resistor-color-code.html
[14] Encyclopædia Britannica, inc. (2024, January 5). Capacitor. Encyclopædia
Britannica. https://www.britannica.com/technology/capacitor

[15] Electrical4U. (2020, October 28). Working principle of a capacitor.


https://www.electrical4u.com/working-principle-of-a-capacitor/

[16] Electrical4U (2020) Working Principle of Light Emitting Diode, Electrical4U.


Available at: https://www.electrical4u.com/working-principle-of-light-emitting-diode/
(Accessed: 15 January 2024).

[17] LDR - light dependent resistor: Working, types, application. Electronics For You.
(2023, August 29). https://www.electronicsforu.com/technology-trends/learn-
electronics/ldr-light-dependent-resistors-basics

[18] Macfos. (2021, February 3). What is Arduino Mega?. Robu.in | Indian Online Store
| RC Hobby | Robotics. https://robu.in/what-is-arduino-mega/

90
APPENDIX A

91
92
APPENDIX B

93
94
95
96
97
98
99
APPENDIX C

100
101
102
103
104
105
APPENDIX D

106
107
108
109
110
111
112
113
114
115

You might also like