Final Year Project Report (Emergency Traffic Lights)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 67

DEPARTMENT OF ELECTRICAL ENGINEERING

SOLAR TRACKER WITH UPS SYSTEM FOR


FACTORY AND CLINIC EMERGENCY SUPPLIES

MUHAMMAD AMMAR BIN ADNAN

16DET20F1043

FINAL YEAR PROJECT REPORT ACADEMIC SESSION

SESSION I: 2022/2023
PROJEK PELAJAR (Diploma Politeknik)

DECLARATION OF PLAGIARISM AND RIGHTS

Project Title: SOLAR TRACKER WITH UPS SYSTEM FOR FACTORY AND

CLINIC EMERGENCY SUPPLIES

Academic Session: SESSION 1 2022/2023

1. I am MUHAMMAD AMMAR BIN ADNAN (I/C NO: 020221020637 with


Registration Number 16DET20F1043 is a final semester student of Electrical
Engineering. Department of Electrical Engineering, Politeknik Tuanku Sultanah
Bahiyah, Kulim Hi-Tech Park, 09000 Kulim, Kedah.

2. I am here declaring that the project mentioned above and its intellectual properties in it
was my original work/design without taking or imitating any intellectual property from
any other party.

3. I also agree to give up the intellectual property ownership of the project to the
Polytechnic to meet the requirements for the grant of Diploma in Electrical Engineering
- DET to me.

Here, I acknowledge all the work done by myself.

…………………………..
MUHAMMAD AMMAR BIN ADNAN
16DET20F1043

Witness by,

……………………………………………..
PUAN HARTINI BINTI ABDUL HAMID
As this project supervise on 10/3/2022

i
PROJEK PELAJAR (Diploma Politeknik)

ACKNOWLEDGE

A graceful thanks to my supervisor PUAN HARTINI BINTI ABDUL HAMID for


her guidance and support supporting me the chance to partake under her to complete the
Solar tracker with ups system for factory and clinic emergency supplies project. My
memories of her guidance will always be strong and cherished. Finally, I would like to
apologize if at any time I have done anything that was not to her liking.

Last but not least, I offer a thousand thanks to my beloved family and friends for providing
moral support during my studies and for always beings be there in supporting me in my
conquest to finish my project. May Allah rewards your kindness in abundance in this
world and next.

ii
PROJEK PELAJAR (Diploma Politeknik)

ABSTRACT

The real goal of this project is to provide other alternatives when the electricity supply is cut
off due to unavoidable things. 12v solar panels are used to absorb sunlight as an energy
source to generate electricity or heat. Solar chargers used to charge solar in dry systems
called SCC or Battery Control Unit (BCU) or Battery Control Regulator (BCR) are a fairly
important part of a solar system. The main role of the SCC is to protect and automate battery
charging. This aims to optimize the system and keep battery life to a minimum. In addition,
12v batteries are also used to supply electricity so that the existing electricity supply can be
used to replace the power outage even at night. Next, the inverter is to convert DC to AC
and also converts voltage. In other words,t is a power adapter. This allows a battery-based -
based independent power system to run conventional equipment as opposed to home cables.
Relays are also used in this circuit to run the UPS system. The relay system can convert the
current from the electrical energy connection to the stored energy which is the solar system
that supplies the electrical energy. It works automatically where if the electricity supply from
TNB is cut off, the relay will continue to detect and provide electricity from the solar system.
This system can provide electrical energy to continue to function for example lights and
appliances that use electricity. Arduino Nano is a small developer circuit board that already
has a microcontroller and supports the use of the headboard. Arduino Nano is specially
designed and manufactured by Gravitecthe h using Atmega328 (for Arduino Nano V3) or
Atmega168 (for Arduino Nano V2) microcontroller base.
Finally, this system has many uses and facilities that we can take advantage of if the
electricity supply is cut off.

iii
PROJEK PELAJAR (Diploma Politeknik)

ABSTRAK

Matlamat sebenar projek ini ada untuk memberi alternative lain semasa bekalan tenaga
elektrik terputus disebabkan oleh perkara yang tak dapat dielakkan. Panel solar 12v
digunakan untuk menyerap cahaya matahari sebagai sumber tenaga untuk menghasilkan
elektrik atau haba. Solar charger digunakan untuk mengecas suria dalam sistem kering yang
dipanggil SCC atau Unit Kawalan Bateri (BCU) atau Pengawal Selia Kawalan Bateri (BCR)
adalah bahagian yang agak penting dalam sistem solar. Peranan utama SCC adalah untuk
melindungi dan mengautomasikan pengecasan bateri. Ini bertujuan untuk mengoptimumkan
sistem dan memastikan hayat bateri pada tahap minimum. Selain itu,bateri 12v turut
digunakan untuk membekalkan tenaga elektrik supaya bekalan elektrik sedia ada boleh
digunakan menggantikan bekalan elektrik yang terputus walaupun pada waktu malam.
Seterusnya,inverter adalah untuk menukarkan DC kepada AC dan juga menukar voltan.
Dalam erti kata lain ialah penysuai kuasa. Ini membolehkan sistem kuasa bebas berasaskan
bateri untuk menjalankan peralatan konvensional berbanding kabel rumah. Relay turut
digunakan dalam litar ini untuk menjayakan sistem UPS. Sistem relay dapat menukar arus
dari sambungan tenaga elektrik kepada tenaga simpanan iaitu sistem solar yang
membekalkan tenaga elektrik. Ia berfungsi secara automatik yang dimana sekiranya supply
elektrik dari TNB terputus,relay akan terus mengesan dan memberi arus elektrik dari sistem
solar. Sistem ini dapat memberi tenaga elektrik untuk terus berfungsi contohnya lampu dan
alatan yang menggunakan elektrik. Arduino Nano adalah suatu papan sirkuit pengembang
berukuran kecil yang didalamnya sudah tersedia mikrokontroler serta mendukung
penggunaan breadboard.Arduino Nano khusus dirancang dan diproduksi oleh perusahaan
Gravitechdengan menggunakan basis mikrokontroler Atmega328 (untuk Arduino Nano V3)
atau Atmega168 (untuk Arduino Nano V2).
Akhir sekali, sistem ini banyak kegunaan dan kemudahan yang dapat kita manfaatkan
sekiranya bekalan elektrik terputus.

iv
PROJEK PELAJAR (Diploma Politeknik)

TABLE OF CONTENT

CERTIFICATION OF ORIGINALITY AUTHENTICITY i


ACKNOWLEDGE ii
ABSTRACT iii
ABSTRAK iv
TABLE OF CONTENT v
LIST OF TABLES ix
LIST OF FIGURES x
LIST OF ABBREVIATIONS xi

CHAPTER 1 – INTRODUCTION 1
1.1 INTRODUCTION 1
1.2 PROJECT BACKGROUND 2
1.3 PROJECT STATEMENT 3
1.4 PROJECT OBJECTIVE 3
1.5 SCOPE OF PROJECT 3
1.6 PROJECT SIGNIFICANCE 4
1.7 THESIS LAYOUT 4

CHAPTER 2 – LITERATURE REVIEW 5


2.1 INTRODUCTION 5
2.2 CONCEPT AND THEORY OF THIS PROJECT 5
2.3.1 LITERATURE REVIEW TOPIC 1 6
2.3.2 LITERATURE REVIEW TOPIC 2 6
2.3.3 LITERATURE REVIEW TOPIC 3 6
2.4 SYNOPSIS OF OVERVIEW 7
2.5 CRITICAL COMPONENT 10

2.5.1 SERVO MOTOR 10

v
PROJEK PELAJAR (Diploma Politeknik)

2.5.2 SENSOR LDR MODULE 11


2.5.3 ARDUINO NANO 11
2.6 SUMMARY 13

CHAPTER 3 – METHODOLOGY 14
3.1 INTRODUCTION 14
3.2 PROJECT IMPLEMENTATION PROCEDURES 15
3.2.1 BLOCK DIAGRAM OF THE PROJECT 16
3.2.2 FLOWCHART OF THE PROJECT 18
3.2.3 DESCRIPTION OF PROJECT FLOWCHART 19
3.3 SOFTWARE REQUIREMENT 20
3.3 SOFTWARE USED 20
3.3.1 PROTEUS PROFESIONAL 20
3.3.2 ARDUINO IDE 21
3.4 SCHEMATIC CIRCUIT DIAGRAM 22
3.5 HARDWARE REQUIREMENT 23
3.5.1 SOLAR PANEL 23

3.5.2 SOLAR CHARGER 24


3.5.3 BATTERY 12V 25
3.5.4 INVERTER 25
3.5.5 RELAY MK3P 26
3.5.6 LED LAMP 26
3.5.7 SERVO MOTOR 27
3.5.8 SENSOR LDR MODULE 28
3.5.9 ARDUINO NANO 28

CHAPTER 4 – RESULTS AND DISCUSSION 29


4.1 INTRODUCTION 29

vi
PROJEK PELAJAR (Diploma Politeknik)

4.2 ANALYSIS 29
4.2.1 PROTOTYPE AND MODEL DESIGN 30
4.2.2 CONNECTION OF INPUT/OUTPUT AND GPIO PIN 30
4.3 PROBLEM FACED 31
4.4 RESEARCH AND ANALYSIS PROJECTS 31
4.5 REFORM PROJECT 31
4.6 DISCUSSION AND PROBLEM SOLVING SESSIONS 31
4.7 DIAGRAM 32
4.8 COST ESTIMATION PROJECT 32
4.8.1 RESULT OF WORK 33
4.8.2 DISCUSSION 34
4.8.3 SUMMARY 35

CHAPTER 5 – CONCLUSION AND RECOMMENDATIONS 36


5.2 CONCLUSION 36
5.3 FUTURE RECOMMENDATIONS 37

vii
PROJEK PELAJAR (Diploma Politeknik)

REFERENCES 39
APPENDICES 44
APPENDIX 1: GANTT CHART 40
APPENDIX 2: COST ANALYSIS 42
APPENDIX 3: DATASHEET 43
Datasheet ARDUINO NANO 43
Datasheet LDR MODULE SENSOR 45
DATASHEET SERVO MOTOR 46
DATASHEET SOLAR PANEL 47
APPENDIX 4: CODING PROGRAM 48

viii
PROJEK PELAJAR (Diploma Politeknik)

LIST OF TABLES

Table 2.4 :Synopsis of overview Article 7


Table 2.5.3 :Arduino Nano Technical Specification 12
Table 3.3 : List of Software Requirement 20
Table 3.5 : List of Hardware Requirement 23
Table 4.1 : List connection of input/output and GPIO Pin 30

ix
PROJEK PELAJAR (Diploma Politeknik)

LIST OF FIGURES

Figure 2.5.1: Servo moto SG90 11


Figure 2.5.2 : Sensor LDR module 11
Figure 2.5.3: Arduino Nano Microcontroller 12
Figure 3.1: Block Diagram 16
Figure 3.2: Architecture of Block diagram 17
Figure 3.2.1: Flow chart of the project (solar tracker) 18
Figure 3.2.2 : Fow chart of the project (UPS system) 19
Figure 3.5.1: Solar Panel 24
Figure 3.5.2 : Solar Charger 24
Figure 3.5.3 : Battery 12V 25
Figure 3.5.4 : Inverter 25
Figure 3.5.5 : Relay MK3P 26
Figure 3.5.6 : LED Lamp 27
Figure 3.5.7 :SG90 servo motor 27
Figure 3.5.8 : Sensor LDR module 28
Figure 3.5.9 : Arduino Nano Microcontroller 28
Figure 4.2.1 : Prototype and Model design 30
Figure 4.8.1 : Result of work 33

x
PROJEK PELAJAR (Diploma Politeknik)

LIST OF ABBREVIATIONS

LED Light Emitting Diode

DC Direct Current

GPIO General Purpose Input Output

UPS Uninterruptible Power Supply

AC - Alternating Current

V - Volt

SCC - Solar Charger Controller

BCU - Battery Control Unit

BCR - Battery Control Unit

WWW - World Wide Web

xi
PROJEK PELAJAR (Diploma Politeknik)

CHAPTER 1

INTRODUCTION

1.1 INTRODUCTION

Solar Tracker with UPS System For factory and Clinic emergency Supplies is a project
that intrigued. Although there were various problems encountered throughout the
implementation process, what as able to learn was worth it. This project will try my best to
make this project chosen success. This project is to design the UPS system for the needs of
the clinic or factory to supply electricity if the clinic or factory has a problem with electricity
supply. The project aims to supply electricity to clinics or factories in the event of a power
outage.

This will interfere with the task of nurses and doctors to treat patients if the equipment
used requires electrical energy for its use. In addition, factory workers find it difficult to do
work if the supply is suddenly cut off during extra working hours at night, and also the
machines used require electricity. Thus the work will be affected due to power outage. This
project also uses a solar system to charge the battery and can supply voltage energy for use
in clinics or factories that use this system to supply electricity. With solar tracker can supply
electricity if the battery runs out of energy. using arduino nano. The main control uses an
Arduino nano that gets the input value from the LDR sensor and then processed it into the
output system. With the automatic control system method can be seen the differenin of the
results of fixed solar panel with solar panel with tracker, from the comparison of solar panel
with tracker is more optimal in receiving sunlight compared to fixed solar panel.

1
PROJEK PELAJAR (Diploma Politeknik)

1.2 PROJECT BACKGROUND

This discuss focuses on building a standalone UPS system using solar energy with a
solar tracking system. Solar energy and UPS systems are two rapidly growing technologies
due to the demand for electricity and to reduce the carbon footprint in the atmosphere. The
main reason for this system to be chosen is UPS system can invert and rectify the electricity
that’s the solar power can be delivered to DC part of the system instead of an AC grid which
may avoid the installation of excessive inverters in the system. The solar tracker is used to
improve the energy gained by the panel or payload so that the system produces more power
at high efficiency

1.3 PROBLEM STATEMENT

This UPS system is designed to provide a supply to the clinic or factory to maintain
or supply electricity to the clinic or factory that uses this system if the clinic factory is cut
off from the available electricity supply. In addition, the UPS system can help factory
workers or factory workers to facilitate work and speed up the addition of electricity supply
suddenly cut off at midnight. With the system can save the existing electricity costs and a
company's finances increase. that this system can guarantee for the future of a company in
the future. This system will open the eyes of other companies if this system is successfully
used as well as possible to be able to compete with other systems. Arduino nano reads analog
values of LDRs. LDRs are named by directions north, south, east, west. East- West and Nort-
South are pairs. The seperator between LDRs, makes shadow one of the LDR pair, if panel
doesn't look towards to sun. If one LDR has shadow, measured analog level should be
different from the pair.

If analog levels are bigger then 5 points, Arduino nano gives command to Servo motor
to rotate 1 degree to E-W or N-S direction which LDR has lower level. It rotates until panel
looks towards to sun.

2
PROJEK PELAJAR (Diploma Politeknik)

System finds two value of degrees. One is north-south degree, other is east-west
degree. If pv panels are rotated by servo motor using these E-W and N-S degrees, pv panel
rotates syncronized with solar tracker.

1.4 PROJECT OBJECTIVE

The main purpose of this project is to design and fabricate a prototype of a Solar Tracker
with UPS system for factory and clinic emergency supplies. The main objective is:

i. To design UPS system for factory and clinic .

ii. To development software for UPS system

iii. To generate electricity when cut off suddenly especially in the middle of the night

iv. To save costs because this system uses sunlight energy LDR sensor that charges
when there is bright light

1.5 SCOPE OF PROJECT

i) This project focuses on helping industries that use electricity to operate.

ii) This project can avoid losses to the industry because it can supply electricity to operate
even if the existing electricity supply is cut off.

iii) The main controller of this project is a 12V battery

3
PROJEK PELAJAR (Diploma Politeknik)

iv)This project uses arduino nano functions to control and help the solar tracker to charge the
battery

v)With the solar tracker, this project can charge the battery as a result of the reflected light

1.6 PROJECT SIGNIFICANCE

Importance is known as what is important through research that has been done. The
importance is:

i. To save electricity bill payment for a factory.

ii. Used when there is an emergency such as a sudden power cut.

iii. Using solar panels to detect light and convert it into electricity.

1.7 THESIS LAYOUT

This thesis consists of four main chapters:

Chapter 1: the project contains the background of the project, problem statement, objectives,
scope, importance of the project and finally the layout of the thesis.

Chapter 2: contains a brief introduction to the solar tracker and UPS system as well as a
literature review discussion of the overview article.

Chapter 3: define and design the project, system operation, and description of the
components used.

Chapter 4: a brief discussion covering the results of the project.

Chapter 5: briefly describe the overall conclusion of the project and future recommendations

4
PROJEK PELAJAR (Diploma Politeknik)

CHAPTER 2

LITERATURE REVIEW

2.1 INTRODUCTION

This UPS system is designed to provide a supply to the clinic to maintain or supply electricity
to the clinic that uses this system if the factory or clinic is cut off from the available electricity
supply

2.2 CONCEPT AND THEORY OF THIS


PROJECT

Problems of power outages will occur although this is not always the case. If the electricity
supply is cut off in an industrial area or clinic, this will greatly affect the workers and factory
owners due to the failure of the electricity supply connection. We need to take precautions
such as making more than one input to generate electricity. For example making a solar
supply in preparation in case the existing electricity supply is cut off. This is very useful and
beneficial because all machines or equipment that use electricity can function even if the
electricity supply is cut off. Overall the function of this solar is, sunlight is absorbed by the
solar panel then the solar charger will flow energy to the battery to store electrical energy.
The inverter will output the AC output for the use of electrical goods. If the battery runs out
of supply, the system will continue to function if there is light radiation that can be absorbed
by the solar panel.

5
PROJEK PELAJAR (Diploma Politeknik)

2.3.1 LITERATURE REVIEW TOPIC 1

In our daily life, of course we are no stranger to electricity generators. Usually, this tool is
needed in buildings that require a constant source of electricity, such as sewage treatment
plants, hotels, airports, and hospitals. With the presence of a generator, it is able to prevent
discontinuity and disruption of business operations. An electrical generator is a device that
produces electrical energy from mechanical energy sources, usually by using
electromagnetic induction. Simply put, a generator is a machine with kinetic energy
(mechanical) which is then able to transform into electrical energy (electricity). There are
various sources of motion energy from generators. For example, in a wind power plant, the
generator can move because of the wind that moves the wheel to rotate.

2.3.2 LITERATURE REVIEW TOPIC 2


Solar tracker ESP32 and MicroPython. Energy extracted from solar radiation is an
inexhaustible resource available in large quantities, provided we have the means to exploit
it efficiently. Therefore, solar trackers play a major role in increasing the efficiency of solar
panels. Our goal is to create, design and realize a simple, low-cost dual-axis smart solar
tracking system, using photoresistors (L.D.R.), solar panels and electronic circuits allowing
the system to rotate vertically and horizontally, based on tracking techniques to actively
follow solar radiation and adjust the panels accordingly to maximize energy production and
provide better performance. This project uses an EPS32 microcontroller because of the
ability to connect to the Internet without any additions, as well as the ability to send
information via Bluetooth Low Energy to the phone application, and this facilitates the
collection of information about efficiency. We will be adding applications soon, as well as
the possibility of programming through MicroPython

2.3.3 LITERATURE REVIEW TOPIC 3


A wind turbine is a device that converts kinetic energy from the wind into mechanical energy.
If mechanical energy is converted into electrical energy, this machine will be known as a
wind generator, Wind Power Unit (WPU), or Wind Energy Converter (WEC). If mechanical
energy is used to drive a machine, such as for grinding grain or pumping water, the device
is known as a windmill or windmill. Developed over millennia, today's wind turbines are
produced in a wide variety of vertical and horizontal types. The smallest turbines are used
for purposes such as charging batteries or auxiliary power on sailboats; while larger turbine-

6
PROJEK PELAJAR (Diploma Politeknik)

grid connection sequences are an increasingly large source of commercial electric power.
Windmills are also used to draw water to irrigate rice fields. A modern windmill is a machine
used to generate electricity, also called a wind turbine. Wind turbines are mostly found in
Europe and North America

2.4 SYNOPSIS OF OVERVIEW ARTICLE


Table 2.4: Synopsis of Overview Article
DIFFERENT/NAME SOLAR IOT BASED IOT BASED
TRACKING SOLAR PANEL SOLAR
SYSTEM POWER TRACKING
MONITORING SYSTEM FOR
USING ESP32 EFFICIENT
AND THING POWER
SPEAK GENERATION

7
PROJEK PELAJAR (Diploma Politeknik)

MICROCONTROLLER Using ESP32 - For IoT Using Arduino


PIC16F877A, its -enabled Uno, this
function is to applications, it is Arduino Uno
control the speed important to function is made
of the motor, In choose the right to facilitate us in
addition this type of prototyping,
component is development programming
physically small, board that will be microcontrollers,
uses low current, able to process making advanced
convenient data from its tools based on
because it has 35 analog pins and microcontrollers.
sets of send data over The Arduino Uno
instructions any type of is used to control
during the connection the position of the
programming protocol such as DC motor
process, It can Wi -Fi or to a ensuring point to
also be cloud server. We point intermittent
reprogrammed specifically chose motion resulting
the ESP32 from the motor’s
because it is a DC target.
low cost
microcontroller
with many
features. In
addition, it has a
built -in WiFi
radio through
which we can
connect to the
internet very
easily.

8
PROJEK PELAJAR (Diploma Politeknik)

SENSOR Using LDR Using Using LDR


sensor (Light temperature sensor, voltage
Dependent sensor, The sensor, current
Resistor) its power output of sensor, Humidity
function is if the solar panel sensor,
there is light has a direct Temperature
then the electric connection with sensor, Dust
current will flow the temperature sensor Internet of
if the light is of the solar things (IOT)
dark then the panel. why? LDR sensor
electric current Because when module,
will be OFF the temperature temperature
of the solar panel sensor, humidity
starts to increase sensor and
the output current electronic circuit.
from the solar The software part
panel increases represents the
exponentially thinking behavior
while the output of the system, i.e.
voltage starts to how the system
decrease linearly behaves under
certain weather
conditions. The
use of LDR
sensors and high
precision voltage
and current
sensors guarantee
more accurate
and efficient
detection systems

9
PROJEK PELAJAR (Diploma Politeknik)

OPERATION The purpose of Solar energy is at The main goal of


this project is to the forefront this project is to
develop the because design highly
design of a generating accurate solar
prototype Solar energy using trackers and
Tracking System solar power is the share information
which is a solar simplest and via IoT.
panel that can most
move facing commercially
sunlight viable way of
consistently renewable
from east to energy.
west, using a
direct current
motor controlled
by a
microcontroller.

2.5 CRITICAL COMPONENT

2.5.1 Servo Motor


There are several major component use in this project such shown figure 2.5.1.Servo motors
are types of electromechanical actuators that do not rotate continuously such as DC motors or
stepper motors. Servo motors are used to position and hold some objects. This type of motor
is used where continuous rotation is not required and is not used to control the wheels (unless
the servo is modified). Instead, a servo motor is used where something is needed to move to
a certain position and then stop and hold on to that position.

10
PROJEK PELAJAR (Diploma Politeknik)

Figure 2.5.1 SG90 servo motor

2.5.2 Sensor LDR module

There are several major component use in this project such shown figure 2.5.2.LDR module
serves as a light sensor in various electronic circuits such as automatic switches based on light
that if the sensor is exposed to light then electrical current will flow (ON) and vice versa if
the sensor is in minimal light (dark) then electrical flow will be inhibited (OFF). LDRs are
also often used as automatic streetlight sensors, bedroom lights, alarms, automatic laser-based
anti-theft circuits, automatic camera shutters, and much more.

Figure 2.5.2 LDR SENSOR MODULE

2.5.3 Arduino Nano

There are several major component use in this project such shown figure 2.5.3Arduino
Nano is a small developer circuit board that already has a microcontroller and supports the
use of breadboard. Arduino Nano is specially designed and manufactured by
Gravitech company using Atmega328 microcontroller base (for Arduino Nano V3) or

11
PROJEK PELAJAR (Diploma Politeknik)

Atmega168 (for Arduino Nano V2)

Figure 2.5.3 Arduino Nano Microcontroller

Table ARDUINO NANO Technical Specification

Type of microcontroller Atmega328


Operating voltage 5 volt
Recommended voltage 7-12volt
Voltage limit 6-20volt
Pin Input/Output 14
Pin PWM 6
Pin Input Analog 8
Current per pin 40 Ma
Flash memory 32KB (2 KB for bootloader)
SRAM 2 KB
EEPROM 1 KB
Clock Speed 16 MHz
Long 4.3 cm
Width 1.8 cm

12
PROJEK PELAJAR (Diploma Politeknik)

Heavy 5g

2.6 SUMMARY

In this chapter proposed about the literature review related to the project and taken based on
other projects. Then, the concept or theory is basically brief on how it can be related to the
actual project. From the comparison of other projects, this possibility gives us the potential
to improve the system to be more efficient and effective than previous projects. The main
purpose of this project is to design and fabricate a prototype of a Solar Tracker with UPS
system for factory and clinic emergency supplies The main objective is to design UPS system
for factory and clinic and to development software for UPS system.

13
PROJEK PELAJAR (Diploma Politeknik)

CHAPTER 3

METHADOLOGY

3.1 INTRODUCTION

In this chapter we discussed the methodology that was used to complete this project. It has
been properly planned by collecting correct information from various references like article,
World Wide Web (WWW) and others. We also collect information, advice, and guidelines
for completing this proposal report from our supervisor. All useful data and information were
analyzed to get the best result. In general, there are several levels to reach the complete
analysis of the product which are:

1. Design analysis of the available product.

2. Design concept based on schematic diagram and analysis

3. Product concept production4. Real concept production

4. Real concept production

14
PROJEK PELAJAR (Diploma Politeknik)

3.2 PROJECT IMPLEMENTATION PROCEDURES

Get the project title

Obtain materials and components

Component testing

Circuit and project design

Component assembly

Test the continuity of circuits and components as well as projects

3.2.1 BLOCK DIAGRAM OF THE PROJECT

15
PROJEK PELAJAR (Diploma Politeknik)

INPUT PROCESS OUTPUT

SOLAR PANEL

LED LAMP
SENSOR LDR
MODULE ARDUINO
NANO RELAY MK3P
BATTERY
SERVO
MOTOR
INVENTER

Figure 3.2.1 : Block Diagram

16
PROJEK PELAJAR (Diploma Politeknik)

Solar Panel

LED Lamp

Sensor LDR module INPUT OUTPUT

Arduino Nano Relay MK3P

Battery

Servo Motor SG90

Inventer

17
PROJEK PELAJAR (Diploma Politeknik)

Figure 3.2.2 Architecture of Block Diagram

Figure 3.2.2 a brief description of how the project system works. This project is divided into
two which are input and output which are controlled using Arduino Nano as the main
microcontroller. A sensor and battery as controlled input and LED light and relay as output

18
PROJEK PELAJAR (Diploma Politeknik)

3.2.3 FLOWCHART OF THE PROJECT

Figure 3.2.3: Flowchart of The Project

19
PROJEK PELAJAR (Diploma Politeknik)

3.2.4 Project Flow Chart Description

Before managing the Solar Tracker project with a UPS system for the emergency supply of
this factory and clinic, the first process is to attend a project-related briefing. Also, do research
and discussion about the project you want to do. Then, plan the project production process.
Next, the process produces a project report and continues by recording in the logbook. Next
process, make project review to supervisor. Also, make corrections if there are any errors
related to the project until it is completed without any errors. Finally, the project presentation
process will be carried out with the panel as an evaluation of the project carried out.

3.3 SOFTWARE REQUIREMENT


Table 3.3: List of Software Requirement

Software Function

Proteus 8 To design schematic circuit

Arduino IDE Used for writing, compiling and uploading the code
in almost all Arduino modules/boards.

3.3 SOFTWARE USED

Proteus is software used for electronic design automation; used primarily to prepare
schemas and design PCBs. It has many tools that are not only easy to use but help in
designing PCBs and learning about designing PCBs. IT uses an integrated automatic router,
and allows full schematic capture, configurable design rules, supports power planes, has

20
PROJEK PELAJAR (Diploma Politeknik)

interactive circuit stimulators, follows industry standard CADCAM and ODB ++ outputs,
and allows 3D viewing.

3.3.1 PROTEUS 8 PROFESIONAL

3.3.2 ARDUINO IDE

The Arduino Integrated Development Environment - or Arduino Software (IDE) - contains


a text editor for writing code, a message area, a text console, a toolbar with buttons for
common functions and a series of menus. It connects to Arduino hardware to upload
programs and communicate with them. In this application, the program that will be used is
C+ programming.

21
PROJEK PELAJAR (Diploma Politeknik)

3.4 SCHEMATIC CIRCUIT DIAGRAM

Figure 3.4 Schematic circuit

The Figure 3.4 shows the schematic circuit for this project. This circuit was drawn using the
Proteus application. The main microcontroller used is the Arduino Nano. Then there is a
sensor in this circuit that is controlled by the microcontroller. This sensor can read and detect
the light of the lamp to produce energy. The power supply used is 5V. This Solar the output
power is 2W, Output voltage is 12V and output current is 167mA. At the connection of the
servo motor, the red wire is connected to VIN/5V while the brown wire is connected to GND
and the orange wire is connected to D9/D7. The LDR sensor is connected to the 5v leg
together with a 10ohm resistor connected to GND.The sensor LDR module connect the wire
to pin A1 and pin A3.

22
PROJEK PELAJAR (Diploma Politeknik)

3.4.1 FLOW CHART OF THE SYSTEM

Figure 3.4.1 : Flow Chart of the project (Solar Tracker)

23
PROJEK PELAJAR (Diploma Politeknik)

Figure 3.4.2. Flowchart UPS system

3.4.3 PROJECT DESCRIPTION

To produce this Solar Tracker project with UPS System for factory and clinic emergency
supplies, there are several methods that need to be done before starting this project. of high
quality.In addition if the project is successful in construction it is certain that this product
can compete in the world market.

24
PROJEK PELAJAR (Diploma Politeknik)

3.5 HARDWARE REQUIREMENT

Table 3.5: List of Hardware Requirement

Hardware Function

Arduino Nano A microcontroller to controller circuit

LDR Sensor Module To detect light

Servo Motor To move solar panel

Inveter To convert current voltage to direct current


voltage to charge the battery
Relay MK3P Normally Open or Normally Close

Solar Charger To charge the (avoid over discharge)

Solar Panel To capture the energy of sunlight and convert it


into electricity

There are several major component use in this project such shown figure 3.5.1

3.5.1 Solar Panel


Solar panels (also known as modules or photovoltaic panels) absorb sunlight as an energy
source to produce electricity or heat as shown in figure 3.5.1. It is used as a component in a
larger photovoltaic system to generate electricity for commercial and residential use. The
solar input comprises of the solar panel and two modules of photosensors, each of which is
joined to the solar panel along its length on either side of the panel. The solar panel is
supported by the wooden base by the mechanical structure. The photo sensors are hence,
connected to the controlling circuit. The solar input comprises of the solar panel and two
modules of photosensors, each of which is joined to the solar panel along its length on either
side of the panel. The solar panel is supported by the wooden base by the mechanical
structure. The photo sensors are hence, connected to the controlling circuit.

25
PROJEK PELAJAR (Diploma Politeknik)

Figure 3.5.1: Solar panel


.

3.5.2 Solar Charge Controller


There are several major component ususedn this project such shown in figure 3.5.2.Solar
Charge Controller in solar panel systems (or often called SCC or Battery Control Unit (BCU)
or Battery Control Regulator (BCR)) is a fairly important part.The main role of the SCC is
to protect and automate battery charging. This aims to optimize the system and keep battery
life to a minimum.

Figure 3.5.2 Solar charger

26
PROJEK PELAJAR (Diploma Politeknik)

3.5.3 Battery 12V


There are several major component use in this project such shown figure 3.5.3.When a
battery supplies electrical energy, its positive terminal acts as the cathode while its negative
terminal acts as the anode. This “anode” is a source of electrons that will flow and transmit
energy to an external device connected to it. When a battery is connected to an external
circuit, the electrolyte can move like ions in it and allow a chemical reaction to be completed
at a separate terminal which in turn sends energy to the external circuit. It is the movement
of ions in the battery that allows current to move out of the battery and provide its function.
The term "battery" originally referred to a device made up of several cells,

Figure 3.5.3: Battery 12V


3.5.4 Inverter
There are several major component use in this project such shown figure 3.5.4.A common
component of such a system is a storage battery, which absorbs and releases force in the
form of ocean current (DC). Instead, utility networks supply customers with alternating
current (AC) power. AC is the standard form of electricity for everything “connected” to an
electrical source (more practical for long-distance transmission).

The inverter converts DC to AC and also converts voltage. In other words, this is a power
adapter. This can allow a battery -based independent power system to run conventional
equipment over conventional home cables.

27
PROJEK PELAJAR (Diploma Politeknik)

Figure 3.5.4:Inverter
3.5.5 Relay MK3P
There are several major component use in this project such shown in figure 3.5.5.A Wide
Variation of Octal Pin Power Relays

• Encased Relays unified to an AC4 rating (100/110 VAC at 50/60Hz and 200/220 VAC at
50/60 Hz).

• Easy to install, wire, and use.

• Highly durable with a life of over 5,000,000 mechanical operations. • Extensive product
lineup: Standard models, encased
models, special contact models, bifurcated contact models, double-winding latching models,
and more.

Figure 3.5.5: Relay MK3P


3.5.6 LED Lamp
There are several major component use in this project such shown figure 3.5.6.The LED
lamp is the output for this project. The result of electricity can produce LED lamp light. The

28
PROJEK PELAJAR (Diploma Politeknik)

size of the LED lamp is 18cm. The color of the LED lamp light is white. The LED lamp is
plugged from the output of the Inverter for lamp light.The LED lamp 2 W

Figure 3.5.6 LED Lamp

3.5.7 Servo Motor


There are several major component use in this project such shown figure 3.5.7.Servo motors
are types of electromechanical actuators that do not rotate continuously such as DC motors or
stepper motors. Servo motors are used to position and hold some objects. This type of motor
is used where continuous rotation is not required and is not used to control the wheels (unless
the servo is modified). Instead, a servo motor is used where something is needed to move to
a certain position and then stop and hold on to that position.

Figure 3.5.7 SG90 servo motor

3.5.8 Sensor LDR module


There are several major component use in this project such shown figure 3.5.8.LDR module
serves as a light sensor in various electronic circuits such as automatic switches based on

29
PROJEK PELAJAR (Diploma Politeknik)

light that if the sensor is exposed to light then electrical current will flow (ON) and vice versa
if the sensor is in minimal light (dark) then electrical flow will be inhibited (OFF). LDRs are
also often used as automatic streetlight sensors, bedroom lights, alarms, automatic laser-
based anti-theft circuits, automatic camera shutters, and much more.

Figure 3.5.8 LDR SENSOR MODULE

3.5.9 Arduino Nano

There are several major component used this project such shown figure 3.5.9.Arduino Nano
is a small developer circuit board that already has a microcontroller and supports the use of
breadboard. Arduino Nano is specially designed and manufactured by
Gravitech company using Atmega328 microcontroller base (for Arduino Nano V3) or
Atmega168 (for Arduino Nano V2)

Figure 3.5.9 Arduino Nano Microcontroller

30
PROJEK PELAJAR (Diploma Politeknik)

CHAPTER 4

RESULT AND DISCUSSION

4.1 INTRODUCTION

This project facilitates emergency work in the event of a power outage. Therefore, this Project
will increase the reliability many times. Furthermore, this project is important for the safety
system at the clinic according to my goals. This is because the equipment in the clinic needs
electricity to function. If there is no electricity supply it will have a bad effect on the patient
to check the patient's health level. If the existing electricity supply is cut off it will affect the
data and information recorded on the computer if the electricity supply is cut off suddenly. By
using arduino this project can charge the battery if the battery power runs out. The Solar
tracker function can convert AC to DC and will produce a supply electricity .To get a clear
perspective about this project, this Project has simulated some test results below

4.2 ANALYSIS

Analysis is a content simulation program that has been run to test the functional output of this
project. The program went through some line-by-line analysis to get the correct output. In
some cases, even if the circuit has been successfully built by, the output may not light as
recommended. Also, there is an error problem in the coding during the run. This causes the
arduino nano to not be able to send messages to the solar tracker. The solar tracker will move
when it receives bright light. The movement of the solar panel depends on the sensor that
detects the light above and below. When the sensor can detect the light, the servo motor starts
moving 180 degrees. The solar panel can be charged from 8.00 a.m to 8.00 p.m. When the
battery is fully charged, the UPS system can operate fully. When the battery is fully charged,

31
PROJEK PELAJAR (Diploma Politeknik)

then DC converts to AC. The negative and positive cable wires of the inverter must be
connected to the negative and positive of the battery. When the inverter is ON and the relay
starts operating, the LED lights up. If the inverter is OFF, the lights stay on.

4.2.1 PROTOTYPE AND MODEL DESIGN

Arduino Nano Microcontroller

Sensor LDR Module Servo Motor


Solar Panel
Figure 4.2.1

On figure 4.2.1 shows the prototype and model design.The main microcontroller used is the
Arduino Nano. Then there is a sensor in this circuit that is controlled by the microcontroller.
This sensor can read and detect the light of the lamp to produce energy. The power supply
used is 5V. This Solar the output power is 2W, Output voltage is 12V and output current is
167mA. At the connection of the servo motor, the red wire is connected to VIN/5V while
the brown wire is connected to GND and the orange wire is connected to D9/D7. The LDR
sensor is connected to the 5v leg together with a 10ohm resistor connected to GND.The
sensor LDR module connect the wire to pin A1 and pin A3. The movement of the solar panel

32
PROJEK PELAJAR (Diploma Politeknik)

depends on the sensor that detects the light above and below. When the sensor can detect the
light, the servo motor starts moving 180 degrees. The solar panel can be charged from 8.00
a.m to 8.00 p.m. When the battery is fully charged, the UPS system can operate fully.

4.2.2 CONNECTION OF INPUT/OUTPUT AND GPIO PIN


The Table 4.1 below shows the list of Input/Output mode pin connection determination and
GPIO pin.
Table 4.1: List Connection of Input/Output and GPIO Pin

Number Input/Output Arduino Pin Mode Notes


Nano Pin
-ldrW Pin A1 To detect Light
1 Sensor LDR module Input
-ldrE Pin A3
Servo Motor -NS Pin 9 To move the solar
2 Output
-EW Pin 7

4.3 PROBLEM FACED

1. The relay cannot identify the presence of electric current


2. The inverter has a short circuit because it has an AC current from a relay that cannot
work
3. The AC ouput inverter cannot flow current because of a short circuit in the inverter
4. The V reading on the inverter does not show the reading that will be channeled
5. The servo motor does not turn fast and lacks power
6. The LDR sensor module cannot detect low light

4.4 RESEARCH AND ANALYSIS PROJECTS

Research is important to ensure that an ongoing project can have a good start so that It will
not pose any problems during the project making process. So, important information such as
circuits, component usage, commercial requirements and many more are indeed important to
make a project. It is as a circuit, ensuring the understanding will be clarified further about
how important the project is. Its resources can be obtained from lectures, books and the
internet.

33
PROJEK PELAJAR (Diploma Politeknik)

4.5 REFORM PROJECT

To make this project it is necessary to read and understand all the available data. Data and
information need to be organized and all the information I get needs to be organized
systematically for progress. From time to time, all information and data must be updated to
obtain information and follow the progress of the project so that when the connection is
completed

4.6 DISCUSSION AND PROBLEM SOLVING SESSIONS

Discussion sessions are held weekly to discuss project development. All problems are
discussed so that they can be resolved quickly. Unresolved issues were also quickly addressed
to the project supervisor. To make the project completed perfectly (proper planning). This can
ensure a smooth project flow without any interruptions.

4.7 DIAGRAM

OUTPUT

Relay MK3P Solar Charger

DC Inverter Battery 12V

Solar Tracker

34
PROJEK PELAJAR (Diploma Politeknik)

4.8 COST ESTIMATION OF PROJECT

NO COMPONENT QUANTITY PRICE TOTAL

1. SOLAR PANEL 1 RM 23.00 RM 23.00

2. BATTERY 12V 1 RM 27.55 RM 27.55

3. SOLAR CHARGER 1 RM 30.00 RM 30.00


CONTROLLER
4. ARDUINO NANO 1 RM 30.00 RM 30.00

5. LDR MODULE SENSOR 2 RM 6.90 RM 13.80

6. RELAY MK3P 1 RM 13.00 RM 13.00

7. SERVO MOTOR SG90 2 RM 10.00 RM 20.00

8. INVERTER 1 RM 90.00 RM90.00

9. LED LAMP 1 RM 18.99 RM 18.99

10. SMALL BOARD 4 RM 5.00 RM 20.00

4.8.1 RESULT

SUPPLY ON AND INVERTER OFF

35
PROJEK PELAJAR (Diploma Politeknik)

INVERTER ON AND SUPPLY OFF

Figure 4.8.1 Result of work

RESULT BATTERY CONNECT TO SOLAR CHARGER

RESULT SOLAR PANEL AND BATTERY CONNECT TO SOLAR CHARGER

36
PROJEK PELAJAR (Diploma Politeknik)

4.8.2 DISCUSSION
Discussion sessions are held every week to review project development. In addition, the
problem encountered is related to the sensor that cannot be integrated with the arduino nano
microcontroller. So, it is necessary to change and use other types of sensors such as LDR
module sensors which detect light that can solve the problem so that the flow of the project
runs smoothly. Next, all problems will be discussed if there are problems that cannot be
solved so that the problem can be solved quickly either with the supervisor or with friends.
This can ensure the smooth flow of the project without any interruption.

4.8.3 SUMMARY

In this chapter, through the results obtained how this project works and operates in addition
to the method used to produce electricity when the supply is ON and the inverter is OFF or
the inverter is ON and the supply is OFF. With the presence of the solar tracker it can function
to charge the battery. The solar tracker receives light and convert to electricity.

37
PROJEK PELAJAR (Diploma Politeknik)

CHAPTER 5

CONCLUSION AND RECOMMENDATIONS

5.2 CONCLUSION

The purpose of this project must be to achieve each established objective. Overall, this
project uses the same two sensors that will be operated with a microcontroller, the Arduino
Nano. The objective of this project is achieved by generating electricity when there is a
sudden cut especially in the middle of the night. In addition, this system can save costs
because this system uses solar panels that can turn it into electric current. This system
does not use gasoline or diesel oil to produce electric current. This system uses batteries,
batteries are not able to last for a long time. By that with the solar tracker model can
charge the battery if the battery power runs out. This system does not require a network
connection to work. In addition, devices that use this system are suitable to be placed on
the roof of the house and places exposed to sunlight to supply energy to the battery to use.
In addition, this solar tracker is able to detect the area where the sun shines and is able to
supply solar energy to the user. This solar tracker is also easy for everyone to operate
because it is easy to install. This solar tracker helps a lot in supplying electricity for daily
use

38
PROJEK PELAJAR (Diploma Politeknik)

5.3 FUTURE RECOMMENDATIONS

Proposed future work into it should be done like . Therefore, it is also recommended to
upgrade a better and suitable microcontroller such as ESP32 which can work using simple
networking methods on smartphones.Also, using arduino uno microcontroller, arduino has
the same functions but arduino uno has a smaller size compared to nano , the price is
cheaper than nano and more suitable. In addition, the appropriate suggestion to refer to
this project is the use in residential, industrial and medical areas. This is an area that
requires electricity to operate.

TABLE OF CHARGER

Time State of charge


BATTERY
(Charger Volt 12V)

8.00 a.m. 7.5 0%

9.00 a.m. 8.0 10%

10.00 a.m. 8.5 35%

11.00 a.m. 9.50 50%

12.00 p.m. 10.55 65%

1.00 p.m. 10.95 75%

2.00 p.m. 11.50 90%

39
PROJEK PELAJAR (Diploma Politeknik)

3.00 p.m. 12.6 100%

4.00 p.m. 12.6 100%

5.00 p.m. 12.6 100%

6.00 p.m. 12.6 100%

7.00 p.m. 12.6 100%

8.00 p.m. 12.6 100%

TABLE OF USE

Time (Hours) Lamp Battery percentage

1 HOURS 100%
Lit up brightly
2 HOURS. 90%
Lit up brightly
3 HOURS 80%
Lit up brightly
4 HOURS 70%
Lit up brightly
5 HOURS 60%
Lit up
6 HOURS 50%
Lit up
7 HOURS. 40%
Lit up
8 HOURS 30%
Dimly lit
9 HOURS 20%
Dimly lit
10 HOURS 10%
Dimly lit
11 HOURS. 0%
Not lit
12 HOURS 0%
Not lit

40
PROJEK PELAJAR (Diploma Politeknik)

REFERENCE

[1] https://youtu.be/r-A0k4lj-gg
[2] https://www.edata.omron.com.au/eData/Relays/MK_DS.pdf
[3]https://www.buysolar.my/marketing-residential-mobile?gclid=Cj0KCQiA-
qGNBhD3ARIsAO_o7ylhlSEqsszdmQKVT0luS0Xle5A1uymS9M6xdI6pUxe_Z
i23Y0PdVu4aArbZEALw_wcB
[4]https://ers.my/?gclid=Cj0KCQiA-
qGNBhD3ARIsAO_o7ykxHhn4YwsdWVmiWdCZxyCsndDfmZKMIsKBZKFVv
R3Y78ZHGQ3tScAaAifzEALw_wcB
[5] https://www.researchgate.net/figure/Schematic-diagram-of-a-typical-Solar-
HomeSystem_fig1_338362382
[6] https://en.m.wikipedia.org/wiki/Fuse_(electrical)
[7]https://www.panasonic.com/my/consumer/battery-
torchlight/battery/rechargeablebattery/bk-3mcce-aa-
size.html?utm_source=SEM&utm_campaign=BATTERY&utm_id=1457
[8]https://www.googleadservices.com/pagead/aclk?sa=L&ai=DChcSEwjHtceR
y8X0AhWSfisKHavAAToYABACGgJ
[9]https://youtu.be/dP6gO19t2pk
[10]https://www.circuitstoday.com/arduino-solar-tracker
[11] https://youtu.be/-VYnC3NDRFs
[12] https://youtu.be/YD-4H4nyzeM
[13] https://youtu.be/dP6gO19t2pk
[14] https://youtu.be/8BSJV13u-l4
[15] https://youtu.be/CTmSh5_Zrc4

41
PROJEK PELAJAR (Diploma Politeknik)

APPENDIX 1 : GANTT CHANT

PROJECT 1

YEAR 2022

NO MONTH 3 4 5 6

WEEK 1 2 3 4 5 6 7 8 9 10 11 12 13 14
1 LITERATURE REVIEW
Do a research related to the
project.
Search for information from the
internet, journals, books and etc.
Study about components want to
use; servo motor, LDR module.

Study about the use of the


Arduino nano microcontroller.
Study and understand the circuit
of mini project.
2 DESIGN AND SIMULATION
PROCESS
Design and simulate the project.
Design and simulate the project
with sensor.
3 FABRICATION,
MEASUREMENT AND
ANALYSIS
Measurement by using
measuring equipment
4 WRITING
Report Writing

42
PROJEK PELAJAR (Diploma Politeknik)

PROJECT 2

YEAR 2023

NO MONTH 9 10 11 12

WEEK 1 2 3 4 5 6 7 8 9 10 11 12 13 14
1 METODOLOGY
Buy components.
Do a schematic circuit and PCB
layout.
Do an etching and soldering
process.
Make a testing on the board.
2 DESIGN PROTOTYPE AND
ANALYSIS
Design interface and simulate the
project.
Design the project
3 TESTING AND ANALYSIS
Testing the project model.
Make an analysis on the model
of project.
4 WRITING
Report writing

43
PROJEK PELAJAR (Diploma Politeknik)

APPENDIX 2: COST ANALYSIS

NO COMPONENT QUANTITY PRICE TOTAL

1. SOLAR PANEL 1 RM 23.00 RM 23.00

2. BATTERY 12V 1 RM 27.55 RM 27.55

3. SOLAR CHARGER 1 RM 30.00 RM 30.00


CONTROLLER
4. ARDUINO NANO 1 RM 30.00 RM 30.00

5. LDR MODULE SENSOR 2 RM 6.90 RM 13.80

6. RELAY MK3P 1 RM 13.00 RM 13.00

7. SERVO MOTOR SG90 2 RM 10.00 RM 20.00

8. INVERTER 1 RM 90.00 RM90.00

9. LED LAMP 1 RM 18.99 RM 18.99

10. SMALL BOARD 4 RM 5.00 RM 20.00

44
PROJEK PELAJAR (Diploma Politeknik)

APPENDIX 3: DATASHEET ELECTRICAL COMPONENT


ARDUINO NANO

45
PROJEK PELAJAR (Diploma Politeknik)

46
PROJEK PELAJAR (Diploma Politeknik)

LDR MODULE SENSOR

47
PROJEK PELAJAR (Diploma Politeknik)

SERVO MOTOR

48
PROJEK PELAJAR (Diploma Politeknik)

SOLAR PANEL

Solar Panel』
Output Voltage: 12V
Output Current: 167mA
Output Power: 2W
Dimensions: 110mm x 136mm

Photo-voltaic panels work best under full sunlight.

『Motor』
Working Voltage: 1.5 ~ 12V
RPM (Round per Minute): 3000RPM (6V), 5400RPM (12V)

『Package』
1x 12V 167mA Solar Panel
OR
1x 12V Moto

49
PROJEK PELAJAR (Diploma Politeknik)

SOLAR CHARGE CONTROLLER

50
PROJEK PELAJAR (Diploma Politeknik)

BATTERY 12V

51
PROJEK PELAJAR (Diploma Politeknik)

INVERTER

Specifications:
Model: SP4000
Name: Car power inverter 4000W.
Input voltage: DC 10.5V~15V,
(When the battery voltage is lower than 10.5V, the
inverter is low voltage protection, when the battery
voltage is higher than 15V, the inverter high voltage
protection)

Output voltage : AC 220V


Output frequency is: 50Hz for 220V
Peaks Power : 4000W
Rated power :300W
Output waveform: Modified sine wave
Product Size: 16.5X11.2X5.6cm
Weight: 0.6 kg

52
PROJEK PELAJAR (Diploma Politeknik)

APPENDIX 4: CODING PROGRAM

#include <Servo.h>

//Servo Tanımları
Servo myServoEW;
Servo myServoNS;

//Değişken Tanımları
int farkNS;
int farkEW;

//Servo Motor Derece Değişkenleri


int degNS;
int degEW;

//LDRlerin ışık değerleri


int ldrN;
int ldrW;
int ldrS;
int ldrE;

void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
//Servo motorları bağla
myServoNS.attach(9);
myServoEW.attach(7);
delay(500);

//Başlangıç pozisyonu al
degNS=90;
degEW=90;
myServoNS.write(degNS);
myServoEW.write(degEW);

53
PROJEK PELAJAR (Diploma Politeknik)

void loop() {
//LDR leri oku
ldrN=analogRead(A0);
ldrW=analogRead(A1);
ldrS=analogRead(A2);
ldrE=analogRead(A3);

//Bildirim yap
Serial.print("ldrN:");
Serial.print(ldrN);
Serial.print(" ldrW:");
Serial.print(ldrW);
Serial.print(" ldrS:");
Serial.print(ldrS);
Serial.print(" ldrE:");
Serial.print(ldrE);
//Bulunan açı değerlerini yazdır
Serial.print(" degEW");
Serial.print(degEW);
Serial.print(" degNS");
Serial.println(degNS);

delay(100);

/* Ldrlerin ışık değerlerini karşılaştırarak


yeniden pozisyon almak için karşılaştırma yap*/

if (ldrN>ldrS) //ldrN değeri ldrS değerinden büyükse


{
farkNS=ldrN-ldrS;
if (farkNS>5)
{
degNS++;
myServoNS.write(degNS);

}
}
if (ldrS>ldrN) //ldrN değeri ldrS değerinden büyükse
{
farkNS=ldrS-ldrN;
if (farkNS>5)
{
degNS--;
myServoNS.write(degNS);

54
PROJEK PELAJAR (Diploma Politeknik)

}
}

/* Ldrlerin ışık değerlerini karşılaştırarak


yeniden pozisyon almak için karşılaştırma yap*/

if (ldrW>ldrE) //ldrW değeri ldrE değerinden büyükse


{
farkEW=ldrW-ldrE;
if (farkEW>5)
{
degEW++;
myServoEW.write(degEW);

}
}
if (ldrE>ldrW) //ldrE değeri ldrW değerinden büyükse
{
farkEW=ldrE-ldrW;
if (farkEW>5)
{
degEW--;
myServoEW.write(degEW);

}
}
}

55

You might also like