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

Arduino_Solar_Powered_Bluetooth_Controll

This document details the development and evaluation of two prototype RC cars: one solar-powered and Bluetooth-controlled, and the other with autonomous navigation capabilities. The project investigates solar panel efficiency, obstacle detection, and the practical challenges of integrating solar energy into electric vehicles. The findings aim to provide insights into renewable energy use and autonomous driving technology in small-scale applications, with implications for real-world electric vehicles.

Uploaded by

rishavbihari592
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Arduino_Solar_Powered_Bluetooth_Controll

This document details the development and evaluation of two prototype RC cars: one solar-powered and Bluetooth-controlled, and the other with autonomous navigation capabilities. The project investigates solar panel efficiency, obstacle detection, and the practical challenges of integrating solar energy into electric vehicles. The findings aim to provide insights into renewable energy use and autonomous driving technology in small-scale applications, with implications for real-world electric vehicles.

Uploaded by

rishavbihari592
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

Arduino Solar-Powered Bluetooth-Controlled

RC Car and Autonomous Object Avoidance:


Development and Evaluation of Solar Energy
and Autonomous Driving Capabilities
ᐧ Harish Varman Rao ᐧ Jonathan Lee Zhung Han ᐧ

Content
1 Abstract 1
2 Introduction 1
3 Literature Review 2
4 Methodology and System Design 3
4.1 Research Process and Pre-Planning 3
4.2 Components of Design 4
4.3 Working Principles and System Design 7
4.4 Circuit Diagram 18
4.5 Code in Arduino IDE 20
5 Experiments and Investigations 24
5.1 Solar Panel Efficiency Investigation 24
5.2 Investigating the Optimal Detection Range 26
6 Evaluation 29
6.1 Assessing the Feasibility of Solar Energy for Powering Electric Vehicles in Practice 29
6.1.2 Analysis of Solar Panels Area, Efficiency and Output Power 32
6.2 Assessing the Challenges With Autonomous Driving 37
6.2.1 Limitations of sensors 37
6.2.2 Experimental Research and Analysis of Percentage of False Negatives 40
7 Conclusion 45
8 References and Notes 46
9 Supplementary Resources 49
9.1 Code for Solar-Charged Bluetooth RC Car 49
9.2 Code for Autonomous RC Car 56
1 Abstract
This project involves designing, building, and testing two prototype radio-controlled (RC) cars -
one powered by solar energy and controlled via Bluetooth, and another with autonomous
navigation capabilities. The first objective is to develop a solar-charged RC car with an onboard 9V
solar panel that charges a lithium-ion battery pack. This car can be controlled remotely through a
Bluetooth module using an Android app. The second goal is to create an autonomous RC car that
can detect and avoid obstacles using an ultrasonic sensor connected to an Arduino
microcontroller. This car is programmed to navigate a track, make random turns, and stop or
change direction when objects are detected within 20cm. The experiments assess solar panel
efficiency under varying light conditions and determine the optimal ultrasonic sensor detection
range to minimise false negatives. Evaluations examine the practical feasibility and limitations of
solar-powered electric vehicles and the challenges faced in real-world autonomous driving.
Overall, this project provides insights into integrating renewable energy and autonomous
functionality in RC cars, as well as their extrapolated relationships with real world electric
vehicles.

1
2 Introduction
The advent of renewable energy sources and autonomous systems has revolutionised various
sectors, including the automotive industry. This paper presents an in-depth study into the
development, operation, and analysis of two separate prototypes which are a solar-charged
bluetooth controlled RC car and an autonomous model RC car.

The first primary objective of this study is to design and develop a model RC car powered by solar
energy and controlled remotely via a Bluetooth-enabled Android application. This innovative
approach not only promotes the use of renewable energy but also provides a platform for
understanding the intricacies of solar power generation and consumption in small-scale electric
vehicles.

In addition to the development of the solar-charged RC car, this research also delves into the realm
of autonomous navigation. The second primary objective is to equip the RC car with object
detection capabilities, enabling it to execute appropriate manoeuvres to avoid collisions. This
aspect of the research not only enhances the functionality of the model RC car but also provides
insights into the challenges encountered by autonomous systems, including false negatives
detected by the sensors.

Furthermore, this investigation seeks to explore the limitations contributing to the reduced
efficiency of solar panels, a critical aspect of the solar-charged RC car. Lastly, the research
assesses the practicality and feasibility of integrating on-board solar panels in electric vehicles. By
extrapolating the findings from the model RC car, we aim to provide valuable insights into the
potential challenges and benefits of solar integration in real-world electric vehicles.

2
3 Literature Review
This literature review explores the innovative advancements in the field of autonomous systems,
specifically focusing on the development and operation of solar-charged, Bluetooth-controlled RC
cars and autonomous model RC cars through Arduino. The review delves into the integration of
renewable energy sources, such as solar power, in small-scale electric vehicles and the utilisation
of Bluetooth technology for remote control via Android applications. It draws upon studies
conducted by Munauwar and Rosnah Mohd Zin, who developed a Bluetooth-controlled robot car
for food delivery in restaurants, and the work of Md. Mahmud Hasan, Md. Hafizur Rahman Masum,
and Kantish Roy Chowdhury, who successfully built and tested a Bluetooth-controlled autonomous
car.

In the paper, “Autonomous Car using Arduino” by Shambhavi Lalsinge, Yash Mali, Akshit Mahale,
Mrunmayee Kulkarni, Omkar Kurade, Professor. Pramod Patil, a model of a self-driving car using
Arduino components is introduced [30]. The system design uses an Arduino Uno microcontroller,
servo motors, a motor driver circuit, gear motors, and an ultrasonic sensor. The ultrasonic sensor
detects obstacles, while the Arduino processes this data and controls the motors to steer the car.

In the paper, “Arduino-Based Robot Car for Returning Food Orders" by Ahmad Amir Fahmi Ahmad
Munauwar and Rosnah Mohd Zin, the authors designed and built an Arduino-based Bluetooth
controlled robot car that can be used to return food orders in small restaurants [31]. The goal was
to allow the car to be controlled remotely using a smartphone to minimise face-to-face interaction
during the Covid-19 pandemic (p. 205). Based on the measurements, the authors concluded the
car could operate well in small restaurants within a 30 metre range while carrying a typical food
order weighing 350-400 grams (p. 209).

In the paper, "Bluetooth Controlled Arduino Based Autonomous Car" by Md. Mahmud Hasan, Md.
Hafizur Rahman Masum, Kantish Roy Chowdhury, the authors designed and built a prototype for
an autonomous car that can be controlled via a mobile app using Bluetooth communication [32].
The main components used were an Arduino Uno microcontroller, a Bluetooth module (HC-05), a
L298N motor driver, DC motors, and an Android smartphone with a custom control app. The
authors tested the car and were able to successfully control it omnidirectionally using the
smartphone app over Bluetooth. The range achieved was around 4 km with minimal connection
issues. They conclude that Bluetooth is a feasible communication method for such projects and
has many potential applications.

3
4 Methodology and System Design

4.1 Research Process and Pre-Planning

4
4.2 Components of Design

Arduino UNO

A type of microcontroller that utilises the


ATmega328 chip (made by Atmel). It processes
sensor data and provides precise instructions to
actuators based on the input received.

L298N Dual H-Bridge

A type of motor driver capable of handling two DC


motors or a stepper motor with bidirectional
control for precise and smooth motion. It has high
current and voltage rating to efficiently drive
motors, and the H-bridge configuration enables
motor direction reversal. It has PWM capability for
analog-like control through its ENA and ENB pins.

HC-05 Bluetooth Module

A versatile wireless communication device used in


electronics projects. With serial communication
capabilities and support for both master and slave
modes, it enables seamless Bluetooth connectivity
for data transfer, remote control, and IoT
applications.

Servo Motor

A rotary actuator that can accurately control


angular position, making it ideal for robotics,
automation, and other projects requiring precise
motion control.

5
HC-SR04 Ultrasonic Sensor

A distance measuring device that works by


emitting ultrasonic pulses and measures the time
taken for echoes to return, providing accurate
distance measurements for object detection and
proximity sensing.

Breadboard (400 Holes)

A device used in electronics prototyping to create


temporary circuits without the need for soldering.
It consists of a plastic board with a grid of holes,
typically arranged in rows and columns.

9V Solar Panel (2W)

A compact and efficient device designed to


convert sunlight into electrical energy. It consists
of photovoltaic cells that generate a maximum
power output of 2 watts when exposed to optimal
sunlight conditions.

CN-3791 Solar Charge Controller

A compact and efficient device designed to


regulate and optimise the charging process of
solar panels. It is equipped with advanced MPPT
(Maximum Power Point Tracking) technology,
which allows it to extract maximum power from
the solar panels and convert it into usable energy
for charging batteries or powering electrical
devices.

HX-2S-JH20 BMS

A compact electronic module designed to


safeguard and manage the charging and
discharging of a 2-cell lithium-ion battery pack. It
incorporates a Battery Management System (BMS)
that ensures the battery operates within safe
limits, prolonging its lifespan and preventing
potential hazards. Equipped with balanced

6
charging.

XL6009 Step Up Boost Converter with Display

A compact electronic device designed to increase


the voltage of a power source. It utilises the
XL6009 chip, which efficiently converts lower
input voltages to higher output voltages. The boost
converter is equipped with a built-in display that
provides real-time information about the input
and output voltages.

4.3 Working Principles and System Design


4.3.1 Solar Panels

Electricity generation through photovoltaic cells via solar panels

A solar panel utilises a photovoltaic device that converts sunlight directly into electrical energy. It
consists of multiple solar cells made from photovoltaic material, typically crystalline silicon,
connected in series. The basic working principle is the photovoltaic effect whereby sunlight
hitting solar cells generates electricity.

Each of these solar cells consists of two layers of semiconducting material. For the 9V solar panel
used in our research, the material used was silicon. One layer is doped with boron to create holes
while the other layer is doped with phosphorus to create free electrons. This occurs due to the
difference of valence electrons in the shells of these two elements.

Silicon is in group 14 of the periodic table and has 4 valence electrons in its outer shell. In its
natural state, all 4 valence electrons of silicon are used in covalent bonds with neighbouring
silicon atoms. This gives intrinsic silicon with equal numbers of electrons and holes.

When boron from group 13 is doped into silicon, it has only 3 valence electrons. This means 1 hole
is created for every boron atom that replaces a silicon atom in the lattice structure. These holes
become the majority carriers in p-type silicon doped with boron.

On the other hand, phosphorus from group 15 has 5 valence electrons. When phosphorus replaces
a silicon atom, 1 electron is "free" and not bound in a covalent bond. This creates an excess
electron or free electron for every phosphorus atom. These free electrons become the majority
carriers in n-type silicon doped with phosphorus.

When sunlight strikes the solar cell, photons from the sunlight are absorbed by the silicon atoms
along with these two layers. This gives the electrons enough energy to break away from their
atoms, creating free electrons and holes through the photoelectric effect [1].

7
Band gap refers to the energy difference between the valence and conduction bands which
ultimately determines the energy required for electrons to move from the valence to the
conduction band, affecting the material's electrical behaviour. In the silicon 9V solar panel that we
used, photons with energies above the band gap energy of 1.18 eV [2] can liberate electrons from
the silicon valence band and promote them to the conduction band. This leaves behind holes in
the valence band. We did not do an experiment to determine the band gap energy as it is the
standard band gap energy for silicon.

The junction between the two layers of differently doped silicon creates an electric field that
separates the free electrons and holes, pulling the electrons towards the n-type layer and the holes
towards the p-type layer [3]. Metal electrodes are connected to each layer to collect these electrons
and holes.

Thus, for our 9V solar panel, each solar cell is connected in series to produce an output voltage
that sums up to 9V. However, there is a maximum power point where the solar panel produces its
highest power output based on the resistance of the load connected. The voltage and current
values at this point are optimised for the specific load. This is why we used the CN-3791 solar
charge controller that came pre-installed with a maximum power point tracking (MPPT) integrated
circuit to maximise efficiency and power output for charging [4].

4.3.2 Working Principle of MPPT circuits in CN-3791

Like most MPPT circuits, the CN-3791 utilises perturbation and observation to find the maximum
power point of the solar panel. It works by periodically perturbing (changing) the operating
voltage of the panel and observing the resulting power output [5].

In the CN-3791, this is done by applying a small ripple voltage to the DC/DC converter. The
converter's duty cycle is varied, which changes the input voltage seen by the solar panel. It then
measures the current and voltage of the panel to calculate the power output. If power output
increases, it keeps perturbing in that direction. If power decreases, it changes direction.

This process of perturbation, measurement, and adjustment is done continuously by the


controller's microcontroller to track the maximum power point as solar irradiance and
temperature change. Once the maximum power point is located, the CN-3791 uses a DC/DC
buck-boost converter to maintain that operating voltage on the panel. It varies the duty cycle of
the converter to regulate the voltage seen by the panel.

The converter then supplies a stable charging current to the battery at a voltage suitable for
charging. This ensures maximum power is extracted from the panel and efficiently delivered to the
battery. In the case of the CN-3791, it outputs a constant 4.2V with a percentage uncertainty of
only 1% with minimal input of 4.5V [4].

8
4.3.3 Photovoltaic Generation and Transmission System

In our setup, the generation of power only occurs via the solar panels. Under sufficient solar
irradiance, the solar panels we used would produce a nominal voltage of 9V. However, these values
vary depending on the fluctuations of irradiance and temperature as the RC car moves. Thus, to
overcome this issue, we connected the output of the solar panel to a CN-3791 solar charge
controller which regulated output charging voltage to 4.2V provided the solar panel was
generating at least 4.5V.

The regulated 4.2V output would then be transmitted to the BMS system for our 2-series li-ion
18650 battery pack. A BMS is required because the CN-3791 simply regulates output voltage and
current depending on our 2-cell system instead of the individual batteries. Moreover, the CN-3791
only provides over-voltage protection during charging to prevent overcharging the battery but
lacks over-discharge protection [4]. This means it will not prevent the battery from being
discharged below a safe voltage, which can damage lithium-ion batteries. More importantly, the
CN-3791 does not provide short-circuit protection because the battery voltage is simply bridged
over to the output without any protection circuitry [4].

Thus, we used a protection board (HX-2S-JH20) that came equipped with a balance-charging
function to ensure safety and proper operation. This protection board monitors each individual
cell and balances the charge between them to ensure they are at the same voltage. This prevents
overcharging of individual cells. It also comes equipped with short-circuit protection [6].

Figure 1: Shows circuit connection for the HX-2S-JH20 BMS board with two li-ion 18650 batteries.
The P+ and P- indicates the input voltage which will be received from the CN-3791 regulated
output of 4.2V.

9
The CN-3791 has two JST outputs for battery charging and load respectively. We connected the
load output to the L298N motor driver and grounded it together with the Arduino UNO
microcontroller as shown below.

Figure 2: Shows the circuit connection that interlinks both the battery solar-charge system
together with the motor driver and UNO microcontroller.

It is vital to ground the L298N, Arduino UNO and the CN-3791 solar charge controller (effectively
the battery output) to ensure there is a common reference point to establish the potentials and
facilitate current flow throughout the circuit.

4.3.4 L298N Motor Driver and DC Motor Connection

The L298N is a dual H-bridge motor driver integrated circuit (IC). It contains two on-chip
H-bridge drivers that can deliver a continuous current of up to 2 A and peak current of 4 A to each
motor [7]. An H-bridge is an electronic circuit that allows the voltage applied to a load (like a
motor) to be reversed. It consists of four switches arranged in a bridge configuration.

An H-bridge works by connecting the load between two halves of the bridge. Each half contains
two switches. By opening and closing the switches in different combinations, the voltage across
the load can be made positive, negative or zero.

10
Figure 3: Shows a simple H-Bridge circuit diagram. When Switch 1 and Switch 3 are closed,
current flows through the load from left to right. Conversely, when Switch 2 and Switch 4 are
closed, current flows in the opposite direction, that is left to right which reverses polarity of
voltage. We assign arbitrary directions simply to illustrate the working mechanisms of a H-Bridge.
This manipulation of voltage polarity allows the L298N to control the direction of rotation of DC
motors clockwise or anticlockwise.

The L298N consists of two of these H-Bridge circuits to control two motors or two pairs of motors
independently. However, the L298N does not use a switch, instead it utilises a metal-oxide
semiconductor field emitting transistor (MOSFET). MOSFETs are used because they can handle
much higher currents than mechanical switches, up to 2 amps per bridge in the L298N and are
much smaller and practical.

The 4 MOSFETs in each H-bridge are labelled:

1. M1 and M4 refer to the upper transistors.


2. M2 and M3 refer to the lower transistors.

The dual H-Bridges allow L298N to be equipped with pulse-width modulation (PWM) which can
be enabled with the ENA and ENB pins. These pins control whether the H-bridges are enabled or
disabled.

With PWM, instead of simply enabling or disabling the H-bridge constantly, the enable pin is
quickly toggled on and off. This results in the motor receiving power only some of the time, with
varying duty cycles. The duty cycle is the proportion of 'on' time to the total period.

11
Figure 4: Shows varying duty cycles which can be controlled by the ENA and ENB pins [7]. By
varying the duty cycle between 0% and 100%, the average power supplied to the motor can be
finely controlled. This varies the motor's speed.

Higher duty cycles result in more power to the motor and faster speeds, while lower duty cycles
provide less power and slower speeds. The L298N can generate these PWM signals on the enable
pins using an external PWM source such as the Arduino UNO microcontroller. The UNO varies the
duty cycle of the PWM signal to control the motor speed through the designated PWM pins
available on the UNO (denoted by ~).

12
Figure 5: Shows how we connected the 4 DC motors to the L298N. As mentioned earlier, the
L298N has the capability to be linked with PWM to independently regulate two pairs of motors.
Therefore, it is a fitting choice for connecting the motors of our RC car. Specifically, we connected
each of the two H-Bridges of the L298N to the motors powering the left tires and right tires
separately.

4.3.5 Double Shaft BO DC motors

Direct current (DC) refers to the unidirectional flow of electric charge through a conductor or
circuit, where the charges move from the negative terminal to the positive terminal. Our DC
motors used in battery-operated RC cars rely on chemical potential energy to create a potential
difference between the positive and negative terminals, causing electrons to flow in one direction
through an external circuit. These motors are lightweight and deliver good torque and revolutions
per minute (rpm) at lower voltages, typically operating around 150 rpm [8].

Figure 6: Shows the DC motor comprises several essential components, starting with the
armature—a coil of wire wound around a magnet core—which serves as the rotating part
connected to the RC car's wheels [9]. As the armature rotates, it drives the car's movement.
Additionally, there is the commutator, a split ring connected to the armature shaft, playing a vital
role in changing the current direction in the armature coil, thereby determining the motor's
rotation direction. The brushes are stationary conductive contacts that press against the
commutator, maintaining continuous current flow through the armature coil. In RC cars, DC
motors usually utilise permanent magnets to create a fixed magnetic field, situated around the
armature to provide the required magnetic flux [9].

In the DC motors, electrical energy is converted into mechanical energy through the principles of
electromagnetism. Electromagnetic induction plays a crucial role, where an electromotive force
(emf) is induced with relative motion between a conductor and a magnetic field. This can occur
either with a moving conductor in a fixed magnetic field or a fixed conductor in a moving
magnetic field, causing the wire to cut through the magnetic field lines and vice versa. Factors

13
such as increased wire length, speed of wire or magnet, magnet strength, and the number of turns
on coils raises the induced emf.

Figure 7: Shows the internal breakdown of dc motors systems [10].

To create the motor effect, the current-carrying wire needs to experience a force in the magnetic
field. When the motor is powered, an electric current flows through the armature coil due to the
electrical connections provided by the brushes and commutator. According to Ampere's law, this
current generates a magnetic field around the coil. The interaction between this magnetic field
and the fixed magnetic field from the permanent magnets results in a force on the armature,
causing it to rotate. The commutator and brushes play a critical role in this process, as the
commutator segments reverse the direction of the current flowing through the coil every half
rotation, ensuring the torque on the armature remains in the same direction and maintains
rotation.

By adjusting the voltage applied to the motor, the speed of rotation can be controlled. Higher
voltage leads to a stronger magnetic field and faster rotation, while lower voltage reduces the
speed. The electronic circuitry in the RC car's controller interprets the signals from the user's
input and adjusts the voltage and current supplied to the motor accordingly, enabling control of
the car's speed and direction.

In terms of single shaft dc motors, the rotor and the output shaft are directly connected which
means motor’s rotational motion is only transmitted through a single point at a time whereas each
shaft in double shaft motors have their own output, transmitting rotational motion to two separate
points simultaneously or independently. Although the dc motors in our cars are double shaft, we
only use a single shaft for each of them because we only turn our cars by decreasing the velocity of
the front left or right tyres, not bidirectional rotation.

14
4.3.6 HC-SR04 Ultrasonic Sensor

The HC-SR04 Ultrasonic Sensor operates on the principles of acoustic wave propagation and
time-of-flight measurement to ascertain distances to objects in its vicinity. By integrating a buzzer,
the Arduino can emit an audible alert or warning when an obstacle is detected within the sensor's
range.

To set up the system, the HC-SR04 Ultrasonic Sensor and the buzzer are connected to the Arduino
board. The sensor requires four connections: VCC (5V power supply), GND (common ground),
TRIG (trigger pin), and ECHO (echo pin). The buzzer is linked to a digital pin on the Arduino.

The process begins with the Arduino setting the TRIG pin to LOW, ensuring that the sensor is not
emitting ultrasonic waves. To initiate distance measurement, the Arduino sends a brief
10-microsecond pulse to the HC-SR04 sensor's TRIG pin, triggering the emission of ultrasonic
waves.

Figure 8: Shows the HC-SR04 ultrasonic sensor and its individual pins which will be connected
onto the Arduino Uno board [11].

Piezoelectric materials have a non-centrosymmetric crystal structure, which means that their
crystal lattice lacks an inversion centre [12]. This unique arrangement creates an asymmetric
distribution of positive and negative charges within the material at the atomic level, resulting in
the formation of electric dipoles. This leads to the direct piezoelectric effect occurring when a
mechanical force or pressure is applied to the piezoelectric material, causing its crystal lattice to
deform. This deformation leads to the repositioning of the electric dipoles, resulting in the
separation of positive and negative charges and generating an electric voltage across the material
[12].

The HC-SR04 sensor generates ultrasonic sound waves using a piezoelectric transducer [12].
Applying an electrical pulse to the piezoelectric crystal induces mechanical deformation through
the piezoelectric effect. This deformation leads to mechanical vibrations in the crystal, resulting

15
in ultrasonic sound waves at a frequency typically around 40 kHz. Humans can’t hear this as the
highest audible frequency is 20000 Hz [13].

The emitted ultrasonic sound waves propagate through the surrounding medium, in this case air,
radiating spherically in all directions from the sensor. When these sound waves encounter an
object, they interact with its surface. Part of the sound waves is absorbed, converting their
mechanical energy into heat, while the rest is reflected back towards the sensor.

The sensor contains a piezoelectric receiver component. When the reflected sound waves, known
as echoes, reach the receiver, they induce mechanical vibrations in the piezoelectric crystal,
generating a small electrical signal.

Then, the sensor measures the time interval between sending the initial ultrasonic pulse (trigger
signal) and receiving the echo (echo signal). This time interval represents the time taken for the
sound waves to travel from the sensor to the object and back.

By utilising the known speed of sound in air, typically around 343 metres per second at room
temperature and atmospheric pressure [14], the HC-SR04 sensor calculates the distance to the
object. The distance is determined using the formula:

𝑆𝑝𝑒𝑒𝑑 𝑜𝑓 𝑆𝑜𝑢𝑛𝑑 × 𝑇𝑖𝑚𝑒 𝑜𝑓 𝐹𝑙𝑖𝑔ℎ𝑡


𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒 = 2

The division by 2 accounts for the round-trip travel of the sound waves.

The calculated distance is conveyed as a digital value representing the object's distance, often
measured in centimetres or inches. The Arduino compares this distance to a predefined threshold.
If the calculated distance is less than the threshold, it signifies the presence of an obstacle within
the sensor's range. In our experiment, we modify the threshold in order to vary the detection
ranges.

Upon detecting an obstacle, the Arduino triggers the buzzer by setting the corresponding digital
pin to HIGH [12]. This activates the buzzer, generating an audible sound or alarm, serving as a
warning to the user that an obstacle is in close proximity.

4.3.7 Buzzer

16
Figure 9: Shows the shorter pin of the buzzer connected to the ground pin while the longer pin
connected to one of the digital pins [15].

The operation of the Arduino buzzer is founded on the physics principle of piezoelectricity, which
involves the conversion of electrical energy into mechanical vibrations to generate audible sound
waves [16]. This buzzer comprises a piezoelectric material, commonly ceramic or crystal, that
possesses the unique property of generating an electric charge under mechanical stress and
undergoing deformation when subjected to an electric field.

When an external electrical voltage is applied to the piezoelectric material, it induces an electric
field within the material, leading to mechanical deformation or vibration. Consequently, the
piezoelectric material expands or contracts, generating mechanical vibrations within itself [16].

These mechanical vibrations cause pressure variations in the surrounding medium, typically air,
leading to the propagation of sound waves. These sound waves are audible and manifest as
distinct tones or beeps. The frequency of the sound produced by the buzzer is determined by the
rate of mechanical vibration of the piezoelectric material [16]. Higher frequencies result in
higher-pitched sounds, while lower frequencies generate lower-pitched sounds.

The Arduino controls the duration of the sound by utilising its programming logic. By turning the
buzzer on and off at specific intervals, the Arduino can create various sound patterns, such as
short beeps or long tones, enabling versatile and programmable sound output.

4.3.8 Servo Motor

Figure 10: Shows a micro servo that weighs 9g from TowerPro [17].

The servo motor's output shaft is connected to a gear train, which has dual purposes. Firstly, it
reduces the motor's high rotational speed to a lower, more controllable speed at the output shaft.
Secondly, it provides mechanical advantage, enabling the servo motor to exert higher force
(torque) on the connected load.

Incorporated within the servo motor is control circuitry, comprising either a microcontroller or a
dedicated servo controller chip. This circuitry processes incoming control signals, typically
pulse-width modulation (PWM) signals from the Arduino, to determine the desired position or
angle for the motor's shaft [18].

17
To set up, the servo motor's signal wire (usually yellow or white) to any PWM-capable digital pin
on the Arduino. Then, connect the servo motor's VCC (usually red) to the 5V pin on the Arduino
and finally the servo motor's GND (usually black or brown) to the GND pin on the Arduino [18].

A distinctive feature that distinguishes a servo motor from a regular DC motor is its feedback
mechanism. To accomplish this, a potentiometer is affixed to the output shaft of the servo motor.
The potentiometer acts as a position sensor, offering feedback on the motor's current position.

The servo motor functions in a closed-loop control system, leveraging the feedback from the
potentiometer to maintain precise position control.

This process works by a control circuitry that compares the desired position from the incoming
PWM signal to the actual position obtained from the potentiometer's feedback. If there is a
disparity between the desired and actual positions, the control circuitry calculates the error,
signifying the deviation from the desired position. The control circuitry then adjusts the motor's
voltage based on the error. It applies a control signal to the motor, prompting it to move in the
direction that reduces the error and brings the motor's shaft closer to the desired position. The
control circuitry continuously adapts the motor's voltage as the potentiometer's output varies with
the shaft's rotation. This ongoing adjustment ensures that the servo motor accurately follows the
incoming PWM control signal, allowing it to maintain the desired position even in the presence of
external forces or load variations.

Typically, servo motors possess either an operating range of 180 or 360 degrees [18]. The control
signal from the Arduino corresponds to a specific angle within this range, guiding the motor's
shaft to rotate accordingly due to the closed-loop control system.

4.4 Circuit Diagram


In this section, we provide a circuit diagram to illustrate the necessary connections required for
our model RC car to run. The diagrams are separated into two subsections, the solar charged
bluetooth controlled RC car and autonomous RC car with object detection and avoidance.

18
4.4.1 Solar-Charged Bluetooth Controlled RC Car

Figure 11: Shows the circuit diagram we followed to build the solar-charged bluetooth controlled
RC car. It is crucial to acknowledge that the integration of 18650 batteries into the depicted circuit
diagram necessitates their prior connection to the HX-2S-JH20 component before establishing a
connection with the CN-3791 solar charge controller. Regrettably, the absence of the HX-2S-JH20
part within the circuit diagram software we used prevented its inclusion in the aforementioned
diagram. However, the instructions for connecting the HX-2S-JH20 have been previously provided
in section 4.3.3.

19
4.4.2 Autonomous RC Car with Object Detection and Avoidance

Figure 12: Shows the circuit diagram we followed to build the autonomous RC car with object
detection and avoidance. In order to address the issue of excessive current draw by the servo, it is
necessary to employ an additional 18650 battery. This requirement arises from the limited
capacity of the Arduino UNO to supply a maximum of 0.8A through its 5V pin. By utilising a
separate battery, this problem can be effectively resolved.

4.5 Code in Arduino IDE


In this section, we discuss and explain the code implementation for the two distinct RC car
functionalities: the autonomous RC car and the solar-charged Bluetooth RC car. The
comprehensive code is provided in its entirety at the end of this paper.

4.5.1 Solar-Charged Bluetooth Controlled RC Car

#include <SoftwareSerial.h> : This line includes the SoftwareSerial library, which allows serial
communication on other digital pins of the Arduino.

SoftwareSerial bluetooth(13, 12); : This line creates a new SoftwareSerial instance called bluetooth
on pins 13 (RX) and 12 (TX).

20
int ENA = 9;
int IN1 = 11;
int IN2 = 6;
int ENB = 10;
int IN3 = 5;
int IN4 = 3;

These lines declare and initialise the pins that will be used to control the motors of the robot car.

void setup() : This function runs once when you press reset or power the board. It's used to
initialise the digital pins as outputs and to set the baud rate for serial data transmission.

void moveForward(): This function is used to move the robot car forward. It does this by setting the
appropriate motor control pins to HIGH or LOW and then writing a PWM signal to the enable pins
of the motor driver.

void moveBackward() {...}: This function is used to move the robot car backward. It works similarly
to the moveForward() function but reverses the direction of the motors.

void turnLeft() and void turnRight() : These functions are used to make the robot car turn left or
right. They do this by reversing the direction of one of the motors.

void moveBackwardLeft(), void moveBackwardRight(), void moveForwardRight(), void


moveForwardLeft() : These functions are used to move the robot car in a specific diagonal
direction. They do this by controlling the direction of one motor while the other motor is stopped.

void stopMoving() : This function is used to stop the robot car. It does this by setting all the motor
control pins to LOW.

void loop() : This function runs continuously after setup() finishes. It checks if there is any
available data from the Bluetooth module. If there is, it reads the incoming command and calls the
appropriate function based on the command received.

The commands are single characters sent from a Bluetooth device, such as a smartphone. For
example, sending 'F' will make the robot car move forward, 'B' will make it move backward, 'L' and
'R' will make it turn left or right, 'H', 'J', 'I', 'G' will make it move in a specific diagonal direction,
and 'S' will make it stop.

21
4.5.2 Autonomous RC Car with Object Detection and Avoidance

1. Library inclusions

This code includes two libraries: ‘Servo.h’ for controlling servo motors and ‘NewPing.h’ for using
the ultrasonic distance sensor.

A library refers to a compilation of pre-existing code snippets and functions designed to enhance
the functionalities of the Arduino platform. Libraries offer a convenient means to recycle code and
sidestep the need to recreate fundamental solutions for frequently encountered tasks. They bundle
intricate operations within user-friendly functions, facilitating seamless integration into
individual Arduino projects.

2. Constant definitions

#define MAX_DISTANCE 200

This defines the maximum distance (in centimetres) that the ultrasonic sensor will be used to
detect. The actual maximum distance of the sensor is often around 400-500 cm.

3. Pin definitions

int ENA = 3;

int IN1 = 11;

int IN2 = 6;

int ENB = 5;

int IN3 = 4;

int IN4 = 2;

int trigPin = 7;

int echoPin = 8;

int buzzer = 10;

These lines define the Arduino pins that are connected to various components on the robot car:
motor driver (ENA, IN1, IN2, ENB, IN3, IN4), ultrasonic sensor (trigPin, echoPin), and a buzzer.

4. Global variables

volatile unsigned int distance = 0;

22
NewPing sonar(trigPin, echoPin, MAX_DISTANCE);

Servo myservo;

The volatile variable ‘distance’ holds the distance measured by the ultrasonic sensor. ‘sonar’ is a
NewPing object configured with the ultrasonic sensor pins and maximum distance. ‘myservo’ is a
Servo object used to control a servo motor.

5. Setup function

In the ‘setup()’ function, pin modes are configured for various pins (output or input). The servo is
attached to pin 9, and serial communication is initialised at a baud rate of 9600.

6. Loop function

In the ‘loop()’ function, the ultrasonic sensor is pinged to measure the distance to an obstacle. The
distance is then printed to the serial monitor. If an obstacle is detected within a certain range (1
cm to 20 cm), the car stops, the buzzer beeps, the car turns randomly, and there's a delay. If no
obstacle is detected, the car moves forward, the servo rotates, and there's a delay.

7. Helper Functions

‘rotateServo(): Gradually changes the position of the servo to sweep it back and forth.

‘randomTurn()’: Initiates a random turn for the robot car.

‘beepBuzzer()’: Produces a 1000 Hz beep for 1 second using the buzzer.

Overall, this code controls the RC car to move forward, avoid obstacles, and make random turns
using an ultrasonic distance sensor and a servo motor. It demonstrates basic obstacle avoidance
behaviour and servo control.

23
5 Experiments and Investigations

5.1 Solar Panel Efficiency Investigation


This section of the research paper focuses on examining the efficacy of our 9V solar panel and
conducting a comprehensive analysis of its power generation capabilities under varying light
intensities, which are quantified in lux units.

Area of Solar Local Solar Average Output Average Output Max Power
Panel, 𝐴𝑐 (m²) Irradiance, E Voltage, Vₒᵤ฀ / 3 Current, Aₒᵤ฀ / 3 Output, 𝑃𝑚𝑎𝑥
(kWh/m²) readings readings

0.0132 1571 8.98 0.221 1.98

Due to a lack of necessary measurement equipment, local solar irradiance data could not be
directly obtained. Instead, meteorological records for the study area were utilised to estimate
irradiance values based on location-specific climatic conditions. The following were the source of
data we used for our study area, Kuala Lumpur.

Figure 13: Shows the local solar irradiance at different locations across Malaysia [19].

From the data we obtained, we calculated the efficiency of our 9V solar panel using the solar
efficiency formula. We obtained an approximate of about 9.55%.

𝑃𝑚𝑎𝑥
η𝑚𝑎𝑥 = 𝐴𝑐𝐸
× 100

1.98
= 0.0132 × 1571
× 100

= 9. 55%

24
The efficiency of this solar panel, as determined through our experimental testing, proved to be
satisfactory for powering the Bluetooth car prototype. In our circuit design, the solar panel
functioned primarily as a means to provide a charging voltage to the battery, while the primary
power source for the car remained the lithium-ion batteries. Consequently, the solar panels were
employed to replenish the battery charge, concurrently with the utilisation of the batteries to
propel the car.

Analysis

In this section, we present the outcomes of our investigation concerning the net-gain or loss of
power and the requisite lux values for achieving a surplus in power. The primary objective of our
study was to assess the impact of varying light intensities, measured in lux, on the performance of
a solar panel. To achieve this, we conducted a series of experiments wherein we manipulated the
intensity of light incident on the solar panel at different lux values. Subsequently, we measured
the corresponding output voltage and power generated by the solar panel.

However, a crucial challenge we encountered during our investigation was the need to convert the
lux values obtained from the light sensors in our mobile devices into watts per square metre
(W/m2) to accurately quantify the irradiance. This conversion was imperative as it allowed us to
precisely measure the output solar power using the well-established formula as shown below.

𝑂𝑢𝑡𝑝𝑢𝑡 𝑃𝑜𝑤𝑒𝑟 = 𝐼𝑟𝑟𝑎𝑑𝑖𝑎𝑛𝑐𝑒 × 𝑆𝑢𝑟𝑓𝑎𝑐𝑒 𝐴𝑟𝑒𝑎 × 𝑃𝑎𝑛𝑒𝑙 𝐸𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑐𝑦

To overcome this challenge of conversion, we used Peter Michael’s approximation as derived from
his research paper which concludes that 1 solar (1000 W/m2) is approximately 120,000 lux [20].
We then plotted a graph which illustrates both the output voltage and output power to lux value.

10 (A) 10 (B)

Figure 14: (A) presents the observed output voltage, as gauged via a voltmeter, under varying light
intensities. The graphical representation reveals an ascending trend, culminating at 9V, a result
that aligns with the specifications of the employed 9V solar panel.

25
Figure 14: (B) illustrates the relationship between output power and diverse light intensities. The
graph suggests a direct proportionality; however, this inference is potentially skewed by near-zero
inaccuracies. This is due to the fact that we did not employ a physical measuring instrument to
ascertain the power, but rather relied on a mathematical approximation. Consequently, we cannot
definitively assert its direct proportionality, but we can affirm that the power escalates in
conjunction with light intensity.

It is noteworthy to mention that the power output persisted in its upward trajectory even when the
solar panel was registering the nominal solar panel voltage of 9V, reaching a peak at 1.98W.
Further analysis of this subject is presented in the evaluations.

5.2 Investigating the Optimal Detection Range


Here, we investigate the optimal detection range of our autonomous RC car model, specifically
focusing on the performance of its ultrasonic sensors. The primary objective is to determine the
detection range that minimises the number of false negatives, thereby enhancing the car's ability
to manoeuvre through obstacles while navigating a predefined track.

In the context of this experiment, a false negative refers to an instance where the autonomous RC
car's ultrasonic sensors fail to detect an obstacle in its path, resulting in the car colliding with the
object. This is a critical metric in our study as it directly impacts the car's ability to navigate the
predefined track successfully.

The independent variable in this study is the detection range of the ultrasonic sensors, which is
manipulated in the code that governs the car's navigation system. The dependent variable is the
number of false negatives, which are measured as the car navigates a predefined track with
curves, turns, and obstacles.

To ensure the validity of the results, several variables are controlled. The speed of the car is kept
constant across different detection ranges to isolate the effect of the sensor's detection range on
the number of false negatives. The course and the obstacles are also kept the same to ensure that
any changes in the number of false negatives can be attributed solely to changes in the detection
range.

The outcomes of our investigative procedures have produced the following empirical data:

26
Programmed Detection
Range of Ultrasonic Average number of false
Sensor (cm) Number of false negatives (2mins x3) negatives
10 5 4 5 5
15 4 4 4 4
20 2 3 3 3
25 3 3 2 3
30 2 3 3 3
35 3 3 3 3
40 2 2 3 2

Analysis

The detection ranges investigated in our experiment ranges from 10 cm up to 30 cm. Through
analysing the trend, the average frequency of false negatives decreases down to an optimal
number of 3 and gets even lower when detection range further increases.

As detection range increases, the likelihood of false negatives generally decreases. A wider
detection range allows sensors to capture objects that are farther away, reducing the chances of
missing relevant objects. However, false negatives can still occur due to factors like sensor
limitations, occlusions or insufficient sensor accuracy at longer distances.

On the other hand, the probability of false positives may increase as detection range expands. This
is because the sensors might interpret noise, shadows, reflections, or distant objects as potential
obstacles, leading to erroneous detections. False positives can be managed by refining sensor

27
calibration, data fusion techniques, and advanced algorithms that differentiate between true
objects and false signals.

There exists an optimal detection range that balances the trade-off between false negatives and
false positives. This range is determined by factors such as sensor capabilities, environmental
conditions, and the quality of data interpretation algorithms.

Straying too far beyond this optimal range could result in decreased accuracy and an increase in
false errors. In this case, ours would be approximately 30 cm.

Further investigation and analysis is provided in the evaluation section.

28
6 Evaluation

6.1 Assessing the Feasibility of Solar Energy for Powering Electric


Vehicles in Practice
Here, we assess the feasibility of solar energy for powering EVs in practical applications. By
examining the current state of solar-powered EV technology, evaluating the challenges and
opportunities as well as re-evaluating the results we obtained previously from our solar-charged
bluetooth RC car, this evaluation seeks to provide valuable insights into the viability and potential
benefits of solar energy integration in the EV ecosystem.

6.1.1 Limitations of Solar Panels

Theoretical Efficiency

The maximum theoretical efficiency of solar photovoltaic panels is limited by fundamental


thermodynamic constraints. This section discusses how the Carnot efficiency limit provides an
upper bound for the maximum attainable efficiency of solar panels [21].

Solar photovoltaic panels convert sunlight into electrical energy through the photovoltaic effect.
However, their efficiency is limited by various losses during the conversion process.
Understanding these fundamental limits provides insight into the potential for further efficiency
improvements.

The Carnot efficiency limit, derived from the second law of thermodynamics, states that the
maximum possible efficiency of a heat engine depends on the temperatures of the hot and cold
reservoirs. A solar panel can be viewed as a type of heat engine that converts thermal energy from
sunlight into electrical energy.

For a solar panel, the "hot reservoir" is the temperature of the incident sunlight (around 6000 K)
and the "cold reservoir" is the ambient temperature around the solar panel (around 300 K). Using
the Carnot limit formula, the maximum theoretical efficiency for a solar panel can be calculated
as:

𝑇𝑐𝑜𝑙𝑑
η𝑚𝑎𝑥 (%) = (1 − ( 𝑇ℎ𝑜𝑡
)) * 100

= 95%

This indicates that, in principle, solar panels could achieve an efficiency up to 95% if all losses
could be eliminated [21]. In reality, practical solar panels have significantly lower efficiencies due
to non-idealities such as reflection losses, resistance losses, and imperfect light absorption.

29
Practical Efficiency

Solar photovoltaic panels have seen rapid improvements in efficiency in recent decades. However,
there remains a large gap between their maximum theoretical efficiency and what is achievable in
real-world applications.

1. Reflection Losses

Reflection losses occur at the interface between the front surface of solar panels and air due to the
difference in refractive indices [22]. This subsection discusses how Fresnel reflection arises from
refractive index mismatch and how anti-reflective coatings aim to reduce these losses.

Reflection losses occur due to the difference in refractive index between air (n = 1) and the
material of the solar panel, typically silicon (n ~ 3.5). This refractive index mismatch causes
Fresnel reflection at the interface as described by the Fresnel equations. The larger the refractive
index difference, the greater the reflection.

This is explained by Fresnel's equations that describe the amount of reflection and transmission of
light when it passes from one medium to another with a different refractive index. They show how
the refractive index mismatch leads to reflection losses at the interface. To showcase the maximum
efficiency, we will use Fresnel equations for normal incidence (zero s and p polarisation) which
are:

2
| (𝑛 −𝑛 ) |
𝑅 = | (𝑛1+𝑛2) |
| 1 2 |

𝑇 =1−𝑅

Where R is the reflectance (fraction of light reflected), T is the transmittance (fraction


transmitted), n1 is the refractive index of the first medium and n2 is the refractive index of the
second medium. For a solar panel, the goal is to maximise T, which means having to minimise R.

These equations show that the reflectance R, and thus the reflection loss, increases as the
difference between n1 and n2 gets larger. This is why reflection losses are higher when there is a
large refractive index mismatch, as is the case for solar panels.

Thus, for a solar panel made of silicon such as the one we used on our car, (n1 = 3.5) and air (n2 =
1):

2
(3.5−1)
𝑅 = 2 = 0. 309
(3.5+1)

30
As shown by the Fresnel equations, the refractive index mismatch between air and silicon results
in 30.9% reflection loss for a solar panel at ideal normal incidence. Anti-reflective coatings aim to
reduce these reflection losses through two mechanisms: index matching and thin film
interference.

Index matching is achieved by using a coating material with a refractive index intermediate
between air and silicon [22]. This provides a more gradual transition in refractive index, lowering
the refractive index difference and thus lowering reflectance according to Fresnel equations.

The coating also functions as a thin film interference filter when its thickness is around a quarter
of the wavelength of sunlight. This creates destructive interference for reflected light waves,
reducing the amplitude of reflected light and lowering reflectance [22].

While these mechanisms are effective at lowering reflection losses for both normal and oblique
incidence sunlight, they are not perfect solutions. The coating's refractive index is never exactly
halfway between air and silicon, leaving some refractive index mismatch. Additionally, the optimal
coating thickness for interference varies with the angle and wavelength of incident light, limiting
its effectiveness for oblique incidence [22].

As a result, anti-reflective coatings can only reduce - not eliminate - reflection losses in solar
panels. There is always some residual reflectance due to imperfect index matching and non-ideal
interference effects. Even the best anti-reflective coatings still exhibit non-zero reflection losses.

2. Temperature

As solar panel materials warm up, especially when exposed to excess thermal energy from
sunlight, their electrical resistance increases. This is due to increased electron scattering which
causes more collisions and scattering of the electrons that carry electrical current. The more the
electrons are scattered, the harder it is for them to move through the material, resulting in higher
resistance. This leads to more resistance losses, where electrical energy is converted to heat
instead of usable power. This wastes potential energy and reduces efficiency [23].

The increase in band gap with temperature in semiconductor materials can be attributed to
thermal expansion of the crystal lattice. As temperature rises, the atoms in the lattice vibrate more
vigorously, expanding the lattice structure. This expansion results in an increase in the average
interatomic distance, leading to a wider band gap [24].

With the widened band gap, fewer high-energy photons possess sufficient energy to promote
electrons from the valence band to the conduction band. Consequently, the absorption of
high-energy photons is reduced because of the higher discrete minimum threshold required to
promote the electron to the conduction band. This decrease in absorption of high-energy photons
translates to a decline in both the short circuit current and the fill factor of the solar cell [24].

31
Furthermore, increased temperature shifts the Fermi level back towards the centre of the
forbidden gap irrespective of the doping of the material. In intrinsic semiconductors like pure
silicon, the Fermi level is in the middle of the band gap which means that the probability of
charge-carrier occupancy at a specific energy level between the conduction band and valence
band is exactly 50%. In a doped semiconductor, the Fermi level is closer to the conduction band in
n-type material and closer to the valence band in p-type material [24].

In a solar panel, when sunlight (composed of photons) hits the semiconductor, it can provide
enough energy to promote electrons from the valence band to the conduction band, creating
electron-hole pairs. These pairs are then separated by the electric field at the p-n junction,
creating a flow of current.

As temperature increases, the Fermi level tends to move towards the centre of the band gap [24].
This is because at high temperatures, the semiconductor behaves more like an intrinsic
semiconductor due to the thermal generation of electron-hole pairs. This means that the effect of
doping becomes less pronounced as the number of thermally generated electron-hole pairs can
become comparable to or even exceed the number of doped carriers.

This shift in the Fermi level with temperature can affect the efficiency of solar panels. At higher
temperatures, the increased thermal generation of electron-hole pairs can lead to a higher rate of
recombination. This means that fewer of the electron-hole pairs contribute to the current,
reducing the efficiency of the solar panel.

These losses, when taken together, mean that real-world solar panel systems achieve efficiencies
in the 20-25% range, well below the theoretical Carnot limit of 95%. As presented previously, our
analysis on the 9V solar panel used during the course of this research was only 9.55% efficient.

6.1.2 Analysis of Solar Panels Area, Efficiency and Output Power

In order to conduct a comprehensive assessment of the solar panels integrated into our RC car, we
undertook an investigation into the proportion of the solar panel area relative to the total surface
area exposed to solar radiation. We propose the term "solar panel coverage ratio" (SPCR) to denote
this ratio. The SPCR assumes significance as it enables us to quantify the practical implications of
incorporating solar panels onto electric and hybrid vehicles, thereby facilitating a deeper
comprehension of the extent to which a car must be equipped with solar panels to ensure
practical functionality and effective utilisation.

In our research, we developed an SPCR threshold not to be exceeded in construction of our RC car,
to ensure the final model would remain viable in the real world. This threshold was an SPCR below
0.2, as our analysis of current solar-roofed vehicles on the market fell within this range.

32
For the solar-charged model radio-controlled car we constructed, we calculated an SPCR of 0.139
indicating 13.9% of the solar-exposed exterior area was covered by photovoltaic panels. At
maximum solar irradiance, we calculated a power output of 1.98W, representing an overall net
power loss as the battery supplied approximately 5W when the car was in motion. However, when
stationary, there was a power surplus because the battery only supplied about 1W presumably for
the Bluetooth module and microcontroller.

This finding suggests that in order to achieve a net-zero power loss while operating the car, a solar
panel with a minimum efficiency of 35.1% would be necessary. However, this requirement is not
currently feasible as the highest efficiency commercially available solar panels currently reach
only up to 23.8% efficiency [25]. However, it is important to note that our RC car achieves surplus
when the car is stopped and the motors are not rotating.

6.1.3 Relationship of Our Solar Charged Model Car to Real-World EV Cars

In this section, our focus is to investigate the relationship between our prototype model of a
solar-charged bluetooth RC car and full-scale electric vehicles (EVs). We aim to investigate
whether it is feasible for on-board solar panels to power an EV car and if not, is the added power
from the solar panels sufficient to at least make a noticeable impact for the EV’s range. This focus
is predicated on the premise that the RC model provides a more accurate representation of our
research parameters. However, it is crucial to acknowledge that the extrapolation of findings from
the RC model to real-world EVs is not a straightforward process due to the complexity and
multifaceted nature of full-scale EVs.

In the context of real-world EVs, a myriad of factors contribute to power consumption. These
factors encompass, but are not limited to, the air conditioning system, heating system, and the
vehicle's software. Each of these elements plays a significant role in the overall power usage of the
vehicle, thereby adding layers of complexity to the energy consumption model. For instance, the
air conditioning and heating systems can significantly impact the power usage, especially under
extreme weather conditions. Similarly, the vehicle's software, which controls various aspects of the
vehicle's operation, can also influence the power consumption.

Moreover, real-world EVs necessitate a substantial buffer zone of power usage. This buffer zone is
essential to ensure the vehicle's operability under the most severe conditions, including extreme
weather, rough terrains, and when the vehicle is loaded beyond its safe threshold. This
requirement for a buffer zone further complicates the power usage model of real-world EVs.

In contrast, our RC model operates on a more simplified power usage model. It has a distinct
power usage at a given time, which is approximately 5W. This power usage is relatively constant
and does not fluctuate significantly with changes in external conditions when it is driving.
Therefore, while our RC model provides a useful tool for studying the basic principles of EV

33
operation, it is important to bear in mind the limitations when extrapolating these findings to
full-scale EVs.

6.1.4 Analysis on On-Board Solar Panels and Their Implications on EV Range

In light of the aforementioned considerations, we will proceed under the premise that an EV
exhibits distinct power consumption patterns during operation. For the purpose of this study, we
will utilise the average power consumption of the Tesla Model 3 as our benchmark. This choice is
predicated on the fact that this particular model is the most widely sold EV globally, thereby
accruing the highest cumulative mileage [26]. This extensive mileage enhances the precision of
the average power consumption figure that we derive, thereby bolstering the reliability of our
research.

According to available data, the average power consumption of a Tesla Model 3 during driving,
specifically under challenging conditions such as cold weather (-10 °C) with heating, is estimated
to be around 198 Wh per kilometre (Wh/km) [27]. This figure serves as an indicator of the energy
required to propel the vehicle over a given distance, taking into account the additional power
demand for heating purposes in sub-zero temperatures.

It is important to note that power consumption can vary based on several factors, including
driving style, terrain, weather conditions, and the use of auxiliary systems such as air
conditioning or heating. However, the aforementioned value provides a reasonable estimate for
worst-case scenarios in cold weather conditions. By considering the highest power usage, our
calculations aim to provide a more accurate representation of solar power to power consumption
in such conditions.

In the context of solar energy utilisation, it is crucial to accurately estimate the solar-exposed
surface area of the Model 3 in order to determine its SCPR accurately. However, in certain cases,
such as when assessing the solar panel coverage on a Tesla Model 3, obtaining precise
measurements of the vehicle's surface area may pose challenges. In this study, we employed an
alternative approach by utilising the available online dimensions of the Model 3 to calculate the
total solar-exposed surface area of a rectangular envelope that encompasses the vehicle. We
calculated a total solar-exposed surface area of 28.2 m2 [28]. This is open to further evaluation
and fine-tuning for better accuracy.

In this investigation, we conducted a comprehensive analysis of the potential power generation


from solar panels integrated into a Tesla Model 3 electric vehicle. Our investigation encompassed
two distinct scenarios: a worst-case scenario, where all conditions were optimised to minimise
solar power generation, and a best-case scenario, where all conditions were optimised to
maximise solar power generation.

34
The variables manipulated in this study included the efficiency of the solar panels and the Solar
Panel Coverage Ratio (SPCR). The responding variables, on the other hand, encompassed the area
covered by the solar panel, solar irradiance, power output, and the additional range provided by
the solar panels.

We maintained the power usage by the Tesla Model 3 as a constant variable, set at 0.198 kWh, as
previously stated. This value represents the energy required to propel the vehicle over a given
distance, taking into account the additional power demand for heating purposes in sub-zero
temperatures.

The results of our investigation are presented in the following table.

Solar Panel Solar Panel Area Covered Solar Power Output Additional
Efficiency (%) Coverage by Solar Panel Irradiance (kWh) Range
Ratio (SPCR) (m2) (kWh/m2) Powered by
Solar Panels
per Hour of
Driving (km)

9.55% 0.139 3.92 1571 0.588 2.97

23.00% 0.139 3.92 1571 1.41 7.12

23.00% 0.200 5.64 1571 2.04 10.3

In the initial row, we establish the baseline values, which correspond to the performance metrics
achieved by our model RC car. The subsequent row represents an adjustment of the solar panel
efficiency to 23%, a figure that corresponds to the peak efficiency achievable with commercially
available solar panels [25]. Finally, the third row illustrates a modification of the SCPR value to
0.200. This value represents a practical threshold that we have determined should not be
exceeded, as further increases would significantly impact the aerodynamics and weight of the
model, thereby compromising its performance.

As delineated in the tabulated data, the projected energy output ranges from 0.588 to 2.04
kilowatt-hours (kWh). This output is markedly inferior to the power demand of the Tesla Model 3
during operation.

For instance, under optimal conditions, assuming a solar panel efficiency of 23.00% and a SCPR of
0.200, the calculations suggest that one hour of solar charging would only provide sufficient
energy for the Tesla Model 3 to cover a distance of approximately 10.3 kilometres. This implies
that a net-zero energy exchange, using the current solar panels, is only feasible if the Tesla Model

35
3 maintains a speed of 10.3 km/h. This speed, however, is not practically viable for most driving
scenarios.

6.1.5 Conclusion

In light of the current state of photovoltaic technology, it is evident that it does not offer a
sustainable solution for the energy requirements of electric vehicles, exemplified by the Tesla
Model 3, under typical driving conditions. The efficiency of solar panels, as they stand today,
necessitates further investigation and development to elevate their potential as a viable energy
source for electric vehicles.

The concept of integrating solar panels directly onto electric vehicles, while theoretically
appealing, presents a multitude of challenges that, in their current state, significantly overshadow
the potential benefits. The practicality of such an approach is thus called into question.

The efficiency of solar panels is a critical factor in their potential application in electric vehicles.
Presently, the energy conversion rate of the most advanced solar panels is only 23%. This figure,
while impressive in the context of renewable energy technologies, is insufficient to meet the
energy demands of electric vehicles under normal driving conditions. The Tesla Model 3, for
instance, requires a substantial amount of energy for its operation, which cannot be met by the
current solar panel technology.

Moreover, the physical constraints of an electric vehicle limit the surface area available for solar
panel installation. This further reduces the potential energy that can be harnessed from the sun.
Additionally, factors such as temperature, geographical location, weather conditions, and the time
of day significantly influence the amount of solar energy that can be captured, adding another
layer of complexity to the practical implementation of on-board solar panels.

Furthermore, the integration of solar panels onto electric vehicles introduces additional weight
and aerodynamic drag, which can negatively impact the vehicle's performance and energy
efficiency. The added complexity in design and maintenance also raises concerns about the
cost-effectiveness and longevity of such systems.

In conclusion, while the idea of powering electric vehicles with on-board solar panels is an
intriguing proposition, the current state of solar panel technology, coupled with the practical
challenges of such an integration, makes it an impractical solution. It is therefore imperative that
further research and development be undertaken to enhance the efficiency and practicality of solar
panels as a potential energy source for electric vehicles.

36
6.2 Assessing the Challenges With Autonomous Driving
6.2.1 Limitations of sensors

1. Operating reliably in inclement weather conditions

Inclement weather conditions such as heavy rain, fog, snow, or dust storms can significantly
reduce visibility for autonomous vehicle sensors. Raindrops, snowflakes, or dust particles can
scatter and absorb the sensor's emitted signals, leading to reduced range and accuracy. This
limitation affects sensors like LiDAR (Light Detection and Ranging) and radar, which rely on the
reflection of signals to detect objects. Additionally, it can cause interference with sensor signals,
causing false positives and false negatives in sensor readings which results in incorrect object
detection or missed detections. This interference can be particularly problematic for sensors like
cameras, which rely on visual cues to identify objects and navigate the environment. Moreover,
the results of reduced visibility can impact the resolution of camera-based sensors as well as
environmental variations such as snow-covered roads which alters the appearance of lane
markings, making it challenging to accurately identify objects and track roads.

To address this issue, developing advanced signal processing techniques can help mitigate the
impact of sensor interference caused by adverse weather. By filtering out noise and optimising
sensor readings, the accuracy and reliability of sensor data can be improved. Leveraging machine
learning and AI algorithms can also enable autonomous vehicles to learn from real-time data and
adapt their perception systems to inclement weather conditions. Through continuous effort in
updating and refining their models, autonomous vehicles can improve their ability to navigate
safely in challenging weather scenarios.

2. Machine learning challenges

Subsequent to the signal processing phase, the following critical component comprises the
deployment of algorithms. Machine learning algorithms constitute a cornerstone of this phase,
relying extensively on training data for predictive capabilities. While these algorithms excel in
discerning patterns within the training dataset, their efficacy hinges fundamentally on the quality
and comprehensiveness of the data they are exposed to. However, their adeptness at generalising
to unfamiliar scenarios, notably exemplified by scenarios where human-operated vehicles and
autonomous counterparts coexist on roadways, remains a challenge. A conspicuous manifestation
of this challenge emerges in the form of the machines' inability to accurately interpret human
gestures, underscoring their limitations in comprehending nuanced and unanticipated real-world
behaviours.

The occurrence of unforeseen behaviours in real-world contexts amplifies the deficiency of


explainability in machine learning models. This lack of transparency poses a pronounced hurdle,
especially in safety-critical applications where the capacity to rationalise the decision-making

37
process is imperative. Moreover, the constraints imposed by the evolving distribution of
real-world data over time further exacerbate this challenge.

To effectively address this intrinsic limitation, it becomes paramount to curate a diverse and
comprehensive corpus of training data. This compilation should encapsulate a broad spectrum of
scenarios to empower the machine learning algorithms with a robust capability to extrapolate to
novel scenarios. Augmenting the efficacy of these algorithms necessitates the integration of
advanced techniques such as data augmentation, transfer learning, and domain adaptation. These
methodologies are designed to bolster the algorithms' prowess in generalising across distinct
domains and conditions, ultimately enhancing their capacity to deliver reliable predictions in
real-world scenarios marked by variability.

However, the pinnacle solution to surmount these challenges emerges through the integration of
zero-shot learning into the embedded systems of autonomous vehicles. By imbuing vehicles with
the capability to glean insights from entirely new scenarios without explicit training, zero-shot
learning addresses the perennial challenge of data limitations and the need for constant model
retraining. This approach holds the promise of elevating the performance, adaptability, and safety
of autonomous vehicles in the complex and dynamic environments they navigate.

3. Zero Shot learning

In ZSL, the objective is to classify a distinct set of classes (referred to as unseen classes) without
requiring additional training data. ZSL's fundamental aim is to leverage the existing knowledge
embedded within the model for the purpose of accurately categorising these previously unseen
classes. ZSL operates within the realm of transfer learning, a domain concerned with adapting a
model to undertake new tasks or handle novel classes. [34]

Transfer learning can be categorised into two primary types: homogenous transfer learning,
characterised by identical feature and label spaces, and heterogeneous transfer learning, where
the feature and label spaces are different. ZSL firmly belongs to the latter category, involving
adaptation to dissimilar feature and label spaces.

In the context of Zero-Shot Learning, the data is stratified into three distinct categories: seen
classes, which encompass the classes employed for training the model; unseen classes, which
necessitate classification without specific training; and auxiliary information, which encompasses
descriptions, semantic data, or word embeddings related to all unseen classes.

The predominant approach employed to address the zero-shot recognition challenge involves the
classifier-based method, comprising three successive stages. The initial step entails
correspondence methods, which seek to establish a mechanism for recognizing and categorising
new, unseen classes. This is achieved through linking each class's binary one-versus-rest
classifier (a class’s special classifier), used to differentiate it from other classes, with its

38
corresponding prototype in a semantic space (a conceptual representation where classes or
categories are organised based on their attributes or meanings rather than their physical
characteristics). This prototype can be envisaged as a specialised representation of the class. In
this semantic space, each class is associated with a prototype that encapsulates the essence or
significance of the class. Simultaneously, within the feature space, where tangible data is
represented, each class is equipped with a binary classifier that aids in determining its identity.
The core objective of correspondence methods is to establish a correlation or mapping between
these two representation types – prototypes in the semantic space and classifiers in the feature
space.

Subsequently, the framework shifts to relationship methods, which are predominantly concerned
with the connections within and between classes. Leveraging existing data, binary classifiers are
crafted for the known (seen) classes within the feature space. These methods then construct a
classifier for new (unseen) classes by considering the interdependencies amongst known and
unknown classes. The foundation of these interdependencies lies in evaluating the similarities or
associations between their respective prototypes. The intent is to integrate both established class
relationships and acquired binary classifiers from the known classes to yield accurate predictions
for the unseen classes.

The culminating phase involves combination methods, which centre on developing a classifier for
new classes by amalgamating classifiers for the fundamental components constituting these
classes. This approach becomes popular when confronted with semantic spaces, where the
intrinsic meaning or interrelations among elements play a pivotal role. Within the semantic space,
each dimension corresponds to a fundamental element. Each class's prototype embodies the
integration of these elements, specific to that class. The dimensions of these prototypes can adopt
values of 1 or 0, signifying the presence or absence of a particular element within that class.

𝐶−1
1 # 𝑐𝑜𝑟𝑟𝑒𝑐𝑡 𝑝𝑟𝑒𝑑𝑖𝑐𝑡𝑖𝑜𝑛𝑠 𝑖𝑛 𝑖
𝐴𝑐𝑐𝑢𝑟𝑎𝑐𝑦 = 𝐶
∑ # 𝑜𝑓𝑠𝑎𝑚𝑝𝑙𝑒𝑠 𝑖𝑛 𝑖
𝑖=0

To evaluate the efficacy of a classifier in the realm of zero-shot recognition, a specialised metric
known as the "average per category top-k accuracy" is employed [29]. This metric provides
valuable insights into the classifier's ability to accurately identify the actual class of a test sample
among a subset of k classes that possess the highest anticipated probabilities.

In the variable "k" embodies the count of classes holding the highest anticipated probabilities
under consideration. Simultaneously, "C" denotes the comprehensive count of the unseen classes
under examination. “i” is a variable that takes on values from 0 to C-1, representing each class. “#
correct predictions in i” refers to the number of samples from class i that the model correctly
predicted. “# of samples in i” is the total number of samples belonging to class i.

39
This metric essentially quantifies how adeptly the classifier aligns with the top-k classes it believes
a sample might be associated with. The aggregation of this evaluation across all unseen classes
furnishes a holistic assessment of the classifier's proficiency in the domain of recognizing novel
categories.

However, akin to any conceptual framework, ZSL is accompanied by certain limitations. Notably,
when a model exclusively trains on data from classes it has previously encountered, there's an
increased probability of erroneously categorising samples from unseen classes as belonging to
known ones during testing. This challenge becomes more pronounced when the model is
subjected to a mixture of samples spanning both familiar and unfamiliar classes during testing.

Further exacerbating the scenario is the phenomenon termed "domain shift," which transpires
when the data distribution within the training set (comprising the known classes) significantly
diverges from the distribution encountered within the testing set. This disparity adversely affects
the efficacy of Zero-Shot Learning, particularly when handling images that starkly differ from the
data on which the model was initially trained.

Lastly, the concept of "semantic losses" emerges as a concern. This pertains to the inadvertent loss
of valuable information during the process of training the model on established classes. Even
attributes of known classes that might not play a pivotal role in distinguishing them could prove
essential for the accurate classification of new, unseen classes during testing. This scenario
highlights the nuanced complexity of learning models, where certain seemingly secondary
attributes could hold critical relevance when faced with unforeseen classification tasks.

6.2.2 Experimental Research and Analysis of Percentage of False Negatives

Physics of Detection Range:

Signal Power and Intensity: The power of a signal is the amount of energy it carries per unit time.
When this power is spread out over a spherical wavefront (as it would be for a radar signal), the
intensity I of the signal at a distance R from the source is given by the power divided by the
surface area of the sphere:

𝑃𝑒𝑚𝑖𝑡
𝐼= 2
4π𝑅

Beam Divergence: The beam divergence θ is a measure of how much the beam spreads out as it
propagates. For a beam with a small divergence angle, the power is concentrated in a smaller area,
so the intensity is higher. The factor of 1/θ^2 in the equation accounts for this: a smaller
divergence angle leads to a higher intensity, and thus a longer detection range.

40
Receiver Sensitivity: The sensitivity 𝑆𝑟𝑒𝑐𝑣 of the receiver is a measure of the minimum signal
intensity it can detect. If the intensity of the signal falls below this threshold, the receiver won't be
able to detect it. Therefore, the detection range R is the maximum distance at which the signal
intensity is equal to the receiver sensitivity:

𝑃𝑒𝑚𝑖𝑡 1
𝑆𝑟𝑒𝑐𝑣 = 2 ( 2 )
4π𝑅 θ

Solving this equation for R gives the detection range equation:

𝑃𝑒𝑚𝑖𝑡 1
𝑅 = 4π𝑆𝑟𝑒𝑐𝑣
× 2
θ

This equation tells us that the detection range increases with the power of the emitted signal and
decreases with the sensitivity of the receiver and the square of the beam divergence. [37]

Probability of Detection

In radar systems, the probability of detection (𝑃𝑑) is often modelled as a function of the
signal-to-noise ratio (SNR), which is the ratio of the signal power to the noise power. The SNR is
typically proportional to the cross-sectional area (A) of the target (since a larger target reflects
more of the signal), and the received signal power (𝑃𝑟𝑒𝑐𝑣).

A commonly used model for the probability of detection in radar systems is the following [38]:

𝑃𝑑 = 𝑄 2 × 𝑆𝑁𝑅

Here, Q is the Q-function, which is a standard function in statistics related to the normal
distribution. The Q-function is defined as the tail probability (the probability of an event occurring
in the tail or extreme values of a probability distribution) of the standard normal distribution:

∞ 2
𝑡
1 − 2
𝑄(𝑥) = ( × ∫𝑒 𝑑𝑡)

𝑥

The Q-function is a mathematical function that often appears in the analysis of communication
systems, including radar systems. It's related to the Gaussian distribution, which is a common
model for random noise in these systems.

The Q-function is defined as the tail probability of the standard normal distribution, which is the
distribution that has a mean of 0 and a standard deviation of 1. In other words, for any given value

41
x, Q(x) gives the probability that a random variable from a standard normal distribution will be
greater than x.

This is an integral from x to infinity of the standard normal probability density function. The
standard normal probability density function (PDF) is a symmetric bell-shaped curve that
describes the distribution of a random variable with mean 0 and standard deviation 1. The integral
calculates the area under the curve of the probability density function from x to infinity, which
gives the probability of the random variable being greater than x.

In the context of the radar detection problem, the Q-function appears in the formula for the
probability of detection because the detection decision is often based on a threshold. If the
received signal power (plus noise) is above the threshold, the radar system decides that a target is
present; if it's below the threshold, the system decides that no target is present. The Q-function
gives the probability of a false alarm, which is the event that the noise alone causes the received
power to exceed the threshold.

The argument we make is that the Q-function in the probability of detection formula is the square
root of twice the signal-to-noise ratio (SNR). This is because the SNR is a measure of the strength
of the signal relative to the noise. A higher SNR means the signal is stronger relative to the noise,
which makes it easier to detect and reduces the probability of a false alarm. The square root and
the factor of 2 are due to the properties of the Gaussian distribution and the definition of the
Q-function.

We propose that the SNR in a radar system be calculated as:

2 2
𝑃𝑟𝑒𝑐𝑣× 𝐺 × λ × σ
𝑆𝑁𝑅 = 3 4
(4π) × 𝑘 × 𝑇 × 𝐹 × 𝐿 × 𝑅

where the variables are defined as follows:

𝑃𝑟𝑒𝑐𝑣 (Received Signal Power): This is the power of the signal that the radar system receives from
the target. It's measured in Watts (W). The received power depends on the power of the
transmitted signal, the distance to the target, and the radar cross-section of the target.

G (Antenna Gain): This is a measure of how effectively the antenna converts input power into radio
waves in a specified direction, and vice versa. It's a dimensionless quantity. A higher gain means
the antenna can transmit or receive more power in its preferred directions.

λ (Wavelength of the Signal): This is the distance between corresponding points of two consecutive
waves. It's measured in metres (m). The wavelength depends on the frequency of the signal:
higher frequency signals have shorter wavelengths.

42
σ (Radar Cross-Section of the Target): This is a measure of how detectable an object is with a radar.
It's proportional to the size of the target and its reflectivity, and it's measured in square meters
(m²). A larger radar cross-section means the target reflects more of the radar signal back to the
receiver.

k (Boltzmann's Constant): This is a physical constant that relates the average kinetic energy of
particles in a gas to the temperature of the gas. Its value is approximately 1.38 x 10^-23 Joules per
Kelvin (J/K).

T (System Temperature): This is a measure of the total noise power in the radar receiver,
expressed in terms of an equivalent temperature in Kelvin (K). It includes contributions from
thermal noise, shot noise, and other sources of noise in the receiver.

F (Noise Figure of the Receiver): This is a measure of the degradation of the SNR caused by
components in a signal chain. It's a dimensionless quantity. A lower noise figure indicates a more
efficient receiver.

L (System Losses): This accounts for any losses in the radar system, such as losses in the antenna,
transmission lines, or other components. It's a dimensionless quantity. Higher losses mean less of
the transmitted power is actually radiated by the antenna, and less of the received signal power is
delivered to the receiver.

R (Range to the Target): This is the distance from the radar system to the target. It's measured in
meters (m). The received signal power decreases with the square of the range to the target, due to
the spreading of the radar beam over a larger area.

The SNR equation shows that the SNR increases with the received signal power, antenna gain,
square of the wavelength, and radar cross-section, and decreases with the system temperature,
noise figure, system losses, and fourth power of the range to the target. The SNR is a crucial factor
in determining the probability of detection in radar systems.

False Positives and Negatives

False positives and negatives are influenced by the detection threshold set by the system. If the
threshold is too low, more objects might be detected, but it can lead to an increased likelihood of
false positives due to noise. Conversely, a high threshold might result in missed detections (false
negatives).

The trade-off between false positives and false negatives can be described using statistical
concepts such as Receiver Operating Characteristic (ROC) curves. Mathematically, this involves
calculating metrics like True Positive Rate (TPR) and False Positive Rate (FPR).

43
𝑇𝑟𝑢𝑒 𝑃𝑜𝑠𝑖𝑡𝑖𝑣𝑒𝑠
𝑇𝑃𝑅 = 𝑇𝑟𝑢𝑒 𝑃𝑜𝑠𝑖𝑡𝑖𝑣𝑒𝑠 + 𝐹𝑎𝑙𝑠𝑒 𝑁𝑒𝑔𝑎𝑡𝑖𝑣𝑒𝑠

𝐹𝑎𝑙𝑠𝑒 𝑃𝑜𝑠𝑖𝑡𝑖𝑣𝑒𝑠
𝐹𝑃𝑅 = 𝐹𝑎𝑙𝑠𝑒 𝑃𝑜𝑠𝑖𝑡𝑖𝑣𝑒𝑠 + 𝑇𝑟𝑢𝑒 𝑁𝑒𝑔𝑎𝑡𝑖𝑣𝑒𝑠

Adjusting the detection threshold affects the TPR and FPR, which in turn impacts the overall
frequency of false positives and negatives. [36]

The physics and mathematics behind detection ranges and false errors in autonomous vehicles
are fundamental to understanding the system's behaviour. Striking the right balance between
extending detection ranges for better perception and managing false positives/negatives requires
a comprehensive approach that involves optimising sensor parameters, calibration, and advanced
statistical techniques. This balance ensures optimal decision-making in complex real-world
scenarios.

Real Autonomous Vehicles

In Tesla, Q4 of 2022, one crash was recorded for every 4.85 million miles driven in which drivers
were using Autopilot technology. For drivers who were not using Autopilot technology, they
recorded one crash for every 1.40 million miles driven. Their cameras can detect up to a
maximum range of 250 metres. [33]

The efficiency of detection ranges in autonomous vehicles is of paramount significance as it


directly impacts the vehicle's ability to perceive its environment accurately, make informed
decisions, and ensure the safety of passengers, pedestrians, and other road users. Optimal
detection ranges are essential to strike a balance between maximising the range for timely hazard
detection and minimising unnecessary computational load, energy consumption, and false
positives/negatives.

Calculations also consider the speed of the autonomous vehicle. The time required to detect,
classify, and react to an object is crucial. If the vehicle is travelling at a higher speed, the detection
range needs to be adjusted accordingly to provide sufficient time for decision-making and
execution of manoeuvres.

To illustrate, let's consider a scenario where an autonomous vehicle is travelling on a highway at


100 km/h (approximately 27.8 m/s). To ensure a safe following distance, the detection range for
the vehicle's forward-facing radar sensor needs to be calculated. If the sensor has a maximum
range of 200 metres and the vehicle requires at least 2 seconds of reaction time, the detection
range calculation can be as follows:

𝐷𝑒𝑡𝑒𝑐𝑡𝑖𝑜𝑛 𝑅𝑎𝑛𝑔𝑒 = 𝑉𝑒ℎ𝑖𝑐𝑙𝑒 𝑆𝑝𝑒𝑒𝑑 × 𝑅𝑒𝑎𝑐𝑡𝑖𝑜𝑛 𝑇𝑖𝑚𝑒

= 27. 8 𝑚/𝑠 × 2𝑠

44
= 55. 6 𝑚

In this case, the optimal detection range for the forward-facing radar sensor should be set to
around 55.6 metres to allow the vehicle sufficient time to react to potential obstacles or vehicles
ahead.

Future Improvements

Initially, the ultimate goal was to implement the ESP32-CAM to integrate line following
functionality in the car. However, due to limited time, we were not able to carry out the task. [35]

Compared to other sensor technologies like LiDAR or radar, cameras are relatively inexpensive.
This cost advantage makes them an attractive option for mass-market adoption of autonomous
vehicles. Furthermore, the high-resolution imaging provides detailed visual information, allowing
for accurate perception of the surrounding environment. Cameras also capture visual data in
real-time, providing up-to-date information about the vehicle's surroundings. This real-time data
is essential for making immediate decisions and reacting to dynamic traffic situations. Companies
like Tesla had recently transitioned to only cameras and ditched sensors like LIDAR because they
believe their advanced algorithms paired with the cameras are sufficient for the highest level of
accuracy.

On the contrary, cameras have a limited range compared to LiDAR or radar sensors, making them
less suitable for long-range perception. Additionally, cameras have a limited field of view,
requiring multiple cameras or sophisticated algorithms to cover a wide area effectively. Sensitivity
to lighting conditions including variations in brightness, shadows, and reflections remains one of
the biggest challenges. FInally, cameras generate large amounts of data that need to be processed
in real-time. This places a significant computational burden on the vehicle's onboard processing
system. Efficient algorithms and powerful hardware are required to handle the data processing
requirements of camera-based perception systems.

45
7 Conclusion
The research conducted herein provides a comprehensive exploration into the integration of solar
power and autonomous functionality in model RC cars using arduino components. The findings,
while primarily applicable to the prototypes under study, offer valuable insights that can be
extrapolated to full-scale electric vehicles, thereby contributing to the broader discourse on these
emerging technologies.

The study reveals that while solar power, in its current state of development, may not be sufficient
to fully sustain an electric vehicle, it can still contribute to a slight range extension. This is
exemplified by the projected range increase of 2.97 to 10.3 km for a Tesla Model 3 under optimal
conditions. However, as concluded previously, this is far below the threshold of practicality where
on-board solar panels are justified. Further improvements in solar panel efficiency must be made
before any progress is made into this course of action.

Additionally, the analyses of detection ranges and false negatives offered perspectives into the
intricacies of sensors and algorithms underpinning autonomous navigation. An optimal balance
must be attained between maximising detection range and minimising false errors. Our research
indicated a range of approximately 30 cm minimised false negatives for the ultrasonic sensor on
our autonomous RC car model.

In conclusion, this project served as an informative case study into the integration of solar power
and autonomous functionality in arduino RC cars. Furthermore, this research underscores the
potential of solar power and autonomous functionality in the realm of electric vehicles, while also
highlighting the challenges that need to be addressed. It is evident that further research and
development are essential to enhance the practicality and capabilities of solar-powered and
autonomous vehicles, thereby paving the way for a more sustainable and autonomous future in
transportation.

46
8 References and Notes
[1] Holmes, A. and Fletcher, N. (eds.) (2017) From sunlight to electricity, Curious. Available
at: https://www.science.org.au/curious/technology-future/solar-pv .
[2] Low, J.J. et al. (2008) Band Gap Energy in Silicon , ResearchGate. Available at:
https://www.researchgate.net/publication/241884255_Band_Gap_Energy_in_Silicon.
[3] (1982) Basic photovoltaic principles and methods. Golden, CO: National Renewable
Energy Laboratory (U.S.).
[4] CN3791 Datasheet(PDF) - shanghai consonance electronics incorporated (no date)
ALLDATASHEET.COM - Electronic Parts Datasheet Search. Available at:
https://www.alldatasheet.com/datasheet-pdf/pdf/1132685/CONSONANCE/CN3791.html.
[5] Posch, M. (2022) Maximum Power Point Tracking: Optimizing solar panels, Hackaday.
Available at:
https://hackaday.com/2022/08/03/maximum-power-point-tracking-optimizing-solar-pane
ls/ .
[6] Megasaturnv (2019) HX-2S-JH20 reverse-engineered
(2S-10A-Balance-Li-ion-Protection-PCB), GitHub. Available at:
https://github.com/megasaturnv/HX-2S-JH20-JH10-reverse-engineered_aka-2S-10A-Bala
nce-Li-ion-Protection-PCB.
[7] In-depth: Interface L298n DC Motor driver module with Arduino (2022) Last Minute
Engineers. Available at:
https://lastminuteengineers.com/l298n-dc-stepper-driver-arduino-tutorial/.
[8] 150 rpm dual shaft bo motor - straight: Sharvielectronics: Best Online Electronic Products
bangalore (2022) Sharvielectronics. Available at:
https://sharvielectronics.com/product/150-rpm-dual-shaft-bo-motor-straight/.
[9] DC Motor Basics, working principle, &amp; Interfacing with Arduino: .. (no date)
ElectronicWings. Available at:
https://www.electronicwings.com/sensors-modules/dc-motor.
[10] DC Motors Explained: Advantages of Brushed &amp; Brushless Motors (2018) YouTube.
GalcoTV. Available at:
https://www.youtube.com/watch?v=JU08mR_isaw&amp;ab_channel=GalcoTV.
[11] How HC-SR04 ultrasonic sensor works &amp; how to interface it with Arduino (2023) Last
Minute Engineers. Available at:
https://lastminuteengineers.com/arduino-sr04-ultrasonic-sensor-tutorial/.
[12] Piezoelectric material (no date) Science Direct . Available at:
https://www.sciencedirect.com/topics/materials-science/piezoelectric-material.
[13] The audible spectrum - neuroscience - NCBI bookshelf (2001) National Library of
Medicine. Available at: https://www.ncbi.nlm.nih.gov/books/NBK10924/.

47
[14] Helmenstine, A. (2023) Speed of sound in physics, Science Notes . Available at:
https://sciencenotes.org/speed-of-sound-in-physics/.
[15] Team, T.A. (no date) Play a melody using the tone() function, Arduino. Available at:
https://www.arduino.cc/en/Tutorial/BuiltInExamples/toneMelody.
[16] What is the working principle of the buzzer? (2013) Quisure. Available at:
https://www.quisure.com/blog/faq/what-is-the-working-principle-of-the-buzzer .
[17] TowerPro SG90 Micro Servo (no date) Perintang. Available at:
https://www.perintang.com/product/servo-motor/.
[18] Mikegrusin and Byron J. (no date) Hobby servo tutorial, sparkfun. Available at:
https://learn.sparkfun.com/tutorials/hobby-servo-tutorial/all.
[19] Petinrin, J.O. and Shaaban, M. (2015) Renewable energy for continuous energy
sustainability in Malaysia. tech. Johor Bahru, Johor: ScienceDirect, pp. 11.
[20] Peter Michael, September 20, 2019, "A Conversion Guide: Solar Irradiance and Lux
Illuminance ", IEEE Dataport, doi: https://dx.doi.org/10.21227/mxr7-p365.
[21] Belghachi A (2015) Theoretical Calculation of the Efficiency Limit for Solar Cells. Solar
Cells - New Approaches and Reviews. InTech. DOI: 10.5772/58914.
[22] Shanmugam, N. et al. (2020) Anti-Reflective Coating Materials: A Holistic Review from PV
Perspective. tech. Basel, Switzerland: Multidisciplinary Digital Publishing (MDPI)
Institute, pp. 8–10.
[23] Scattering of conduction electron (no date) ScienceDirect . Available at:
https://www.sciencedirect.com/topics/chemistry/scattering-of-conduction-electron.
[24] Torres, M. (no date) Carriers - temperature dependence explained, University of Texas at
El Paso. Available at:
http://www.ece.utep.edu/courses/ee3329/ee3329/Studyguide/ToC/Fundamentals/Carrier
s/explain.html.
[25] Svarc, J. (2023) Most efficient solar panels 2023, CLEAN ENERGY REVIEWS. Available at:
https://www.cleanenergyreviews.info/blog/most-efficient-solar-panels.
[26] Shahan, Z. (2021) Tesla Model 3 has passed 1 million sales, CleanTechnica. Available at:
https://cleantechnica.com/2021/08/26/tesla-model-3-has-passed-1-million-sales/.
[27] Tesla Model 3 (2021) EV Database. Available at:
https://ev-database.org/car/1555/Tesla-Model-3.
[28] Tesla Model 3 dimensions 2021 - length, width, height, turning circle, ground clearance,
wheelbase &amp; size (2023) CarsGuide. Available at:
https://www.carsguide.com.au/tesla/model-3/car-dimensions/2023.
[29] Kundu, R. (2022) What is zero shot learning in image classification? ZSL prediction
accuracy equation [examples], V7 Labs. Available at:
https://www.v7labs.com/blog/zero-shot-learning-guide.

48
[30] Lalsinge, S., Mali, Y., Mahale, A., Kulkarni, M., Kurade, O., & Patil, P. (2022). Autonomous
Car using Arduino. International Research Journal of Engineering and Technology, 9(1),
1653-1655.
[31] Ahmad Munauwar, A.F., Mohd Zin, R. (2022). Arduino-Based Robot Car for Returning
Food Orders. Evolution in Electrical and Electronic Engineering, 3(2), 205-210.
https://doi.org/10.30880/eeee.2022.03.02.024
[32] Hasan, M.M., Masum, M.H.R. and Chowdhury, K.R., 2022. Bluetooth Controlled Arduino
Based Autonomous Car. [online] ResearchGate. Available at:
https://www.researchgate.net/publication/359415478_Bluetooth_Controlled_Arduino_Bas
ed_Autonomous_Car
[33] Tesla Vehicle Safety Report (no date) Tesla. Available at:
https://www.tesla.com/en_my/VehicleSafetyReport
[34] Potrimba, P. (2023) What is zero shot learning in Computer Vision?, Roboflow Blog.
Available at: https://blog.roboflow.com/zero-shot-learning-computer-vision
[35] Camera Integration for Line following robot. (2020) YouTube. YouTube. Available at:
https://www.youtube.com/watch?v=4C2c0xs6eFg
[36] Lador, S.M. (2017) What metrics should be used for evaluating a model on an imbalanced
data set?, Medium. Available at:
https://towardsdatascience.com/what-metrics-should-we-use-on-imbalanced-data-set-pre
cision-recall-roc-e2e79252aeba
[37] Take online courses. earn college credit. Research Schools, Degrees &amp; Careers (no
date) Study.com | Take Online Courses. Earn College Credit. Research Schools, Degrees
&amp; Careers. Available at:
https://study.com/skill/learn/how-to-calculate-the-intensity-of-a-sound-wave-in-2d-expla
nation.html
[38] D. W. J. Stein, "Detection of random signals in Gaussian mixture noise," in IEEE
Transactions on Information Theory, vol. 41, no. 6, pp. 1788-1801, Nov. 1995, doi:
10.1109/18.476307.

49
9 Supplementary Resources

9.1 Code for Solar-Charged Bluetooth RC Car


#include <SoftwareSerial.h>

SoftwareSerial bluetooth(13, 12);

int ENA = 9;

int IN1 = 11;

int IN2 = 6;

int ENB = 10;

int IN3 = 5;

int IN4 = 3;

void setup()

pinMode(ENA, OUTPUT);

pinMode(ENB, OUTPUT);

pinMode(IN1, OUTPUT);

pinMode(IN2, OUTPUT);

pinMode(IN3, OUTPUT);

pinMode(IN4, OUTPUT);

Serial.begin(9600);

bluetooth.begin(9600);

50
}

void moveForward()

digitalWrite(IN1, HIGH);

digitalWrite(IN2, LOW);

analogWrite(ENA, 200);

digitalWrite(IN3, HIGH);

digitalWrite(IN4, LOW);

analogWrite(ENB, 200);

Serial.println("Moving forward");

void moveBackward()

digitalWrite(IN1, LOW);

digitalWrite(IN2, HIGH);

analogWrite(ENA, 200);

digitalWrite(IN3, LOW);

digitalWrite(IN4, HIGH);

analogWrite(ENB, 200);

51
Serial.println("Moving backward");

void turnLeft()

digitalWrite(IN1, LOW);

digitalWrite(IN2, HIGH);

analogWrite(ENA, 200);

digitalWrite(IN3, HIGH);

digitalWrite(IN4, LOW);

analogWrite(ENB, 200);

Serial.println("Turning left");

void turnRight()

digitalWrite(IN1, HIGH);

digitalWrite(IN2, LOW);

analogWrite(ENA, 200);

digitalWrite(IN3, LOW);

digitalWrite(IN4, HIGH);

analogWrite(ENB, 200);

52
Serial.println("Turning right");

void moveBackwardLeft()

digitalWrite(IN1, LOW);

digitalWrite(IN2, LOW);

digitalWrite(IN3, HIGH);

digitalWrite(IN4, LOW);

analogWrite(ENB, 200);

Serial.println("Moving backward left");

void moveBackwardRight()

digitalWrite(IN1, LOW);

digitalWrite(IN2, HIGH);

analogWrite(ENA, 200);

digitalWrite(IN3, LOW);

digitalWrite(IN4, LOW);

53
Serial.println("Moving backward right");

void moveForwardRight()

digitalWrite(IN1, HIGH);

digitalWrite(IN2, LOW);

analogWrite(ENA, 200);

digitalWrite(IN3, LOW);

digitalWrite(IN4, LOW);

Serial.println("Moving forward right");

void moveForwardLeft()

digitalWrite(IN1, LOW);

digitalWrite(IN2, LOW);

digitalWrite(IN3, HIGH);

digitalWrite(IN4, LOW);

analogWrite(ENB, 200);

Serial.println("Moving forward left");

54
}

void stopMoving()

digitalWrite(IN1, LOW);

digitalWrite(IN2, LOW);

digitalWrite(IN3, LOW);

digitalWrite(IN4, LOW);

Serial.println("Stopped");

void loop()

if (bluetooth.available()) {

char command = bluetooth.read();

switch (command) {

case 'F':

moveForward();

break;

case 'B':

moveBackward();

break;

55
case 'L':

turnLeft();

break;

case 'R':

turnRight();

break;

case 'H':

moveBackwardLeft();

break;

case 'J':

moveBackwardRight();

break;

case 'I':

moveForwardRight();

break;

case 'G':

moveForwardLeft();

break;

56
case 'S':

stopMoving();

break;

9.2 Code for Autonomous RC Car


#include <Servo.h>

#include <NewPing.h>

#define MAX_DISTANCE 200

int ENA = 9;

int IN1 = 11;

int IN2 = 6;

int ENB = 10;

int IN3 = 5;

int IN4 = 3;

int trigPin = 7;

int echoPin = 8;

int buzzer = 4;

57
volatile unsigned int distance = 0;

NewPing sonar(trigPin, echoPin, MAX_DISTANCE);

Servo myservo;

void setup() {

pinMode(ENA, OUTPUT);

pinMode(IN1, OUTPUT);

pinMode(IN2, OUTPUT);

pinMode(ENB, OUTPUT);

pinMode(IN3, OUTPUT);

pinMode(IN4, OUTPUT);

pinMode(buzzer, OUTPUT);

myservo.attach(2);

Serial.begin(9600);

void loop() {

delay(10);

unsigned int uS = sonar.ping();

unsigned int distance = uS / US_ROUNDTRIP_CM;

Serial.print("Distance: ");

Serial.print(distance); //

58
Serial.println(" cm"); //

if (distance >= 1 && distance <= 20) {

digitalWrite(ENA, LOW); //

digitalWrite(ENB, LOW);

beepBuzzer(); //

delay(1000);

randomTurn();

delay(500);

} else {

digitalWrite(ENA, HIGH);

digitalWrite(IN1, HIGH);

digitalWrite(IN2, LOW);

digitalWrite(ENB, HIGH);

digitalWrite(IN3, HIGH);

digitalWrite(IN4, LOW);

rotateServo();

void rotateServo() {

static int pos = 60;

static int dir = 1;

59
myservo.write(pos);

pos += dir;

if (pos >= 120) dir = -1;

else if (pos <= 60) dir = 1;

void randomTurn() {

int direction = random(2);

if (direction == 0) {

digitalWrite(IN1, LOW);

digitalWrite(IN2, HIGH);

analogWrite(ENA, 200);

digitalWrite(IN3, HIGH);

digitalWrite(IN4, LOW);

analogWrite(ENB, 200);

} else {

digitalWrite(IN1, HIGH);

digitalWrite(IN2, LOW);

analogWrite(ENA, 200);

digitalWrite(IN3, LOW);

digitalWrite(IN4, HIGH);

analogWrite(ENB, 200);

delay(1000);

60
}

void beepBuzzer() {

for (long i = 0; i < 1000 * 1000L; i += 1000) {

digitalWrite(buzzer, HIGH);

delayMicroseconds(500);

digitalWrite(buzzer, LOW);

delayMicroseconds(500);

digitalWrite(buzzer, LOW);

61

You might also like