SOLAR PV CONTROL SYSTEM.pdf
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Solar <strong>PV</strong> Control System using an<br />
Arduino and Zigbee Communication<br />
Module for Street Light, Household &<br />
Off-Grid Applications<br />
FACULTY OF ENGINEERING<br />
B.Sc. TELECOMMUNICATION &<br />
INFORMATION ENGINEERING<br />
DAVID IRUNGU<br />
(E020-0140/07)<br />
5 th Year Project Report<br />
Project Report Submitted To:<br />
The Department of Electrical, Electronic Engineering (EEE) in<br />
Partial Fulfilment for the Award of a Bachelors of Science<br />
Degree in Telecommunication & Information Engineering<br />
SUPERVISOR: MR. HARRISON T. NGETHA<br />
CO-SUPERVISOR: ISAAC WARUTUMO<br />
2012
Declaration<br />
I do hereby solemnly and sincerely declare to the best of my knowledge and belief<br />
that this document truly corresponds to entire activities I was involved in this<br />
project. I affirm that the work in this report has never been submitted for awarding<br />
of degree at Kimathi University College of Technology or any other higher<br />
institution of learning.<br />
I make this solemn declaration, conscientiously believing that statements contained<br />
in this entire proposal are true in every particular manner.<br />
Signed<br />
…………………………………….<br />
DAVID IRUNGU: E020-0140/07<br />
This project, which has been submitted by the above named student, was under my<br />
supervision.<br />
Supervisor Name: MR: T NGETHA<br />
Signature: Date:<br />
Email: david.irungu@stu.kuct.ac.ke<br />
1<br />
2012
Acknowledgement<br />
I must acknowledge and express my sincere gratitude and deep appreciation to Mr<br />
Stephen Karekezi the Director AFREPREN (Africa Energy Policy Research Network)<br />
whose company’s training, hospitality, knowledge, and wisdom has supported and<br />
enlightened on the core foundation of this project over the short but prosperous<br />
attachment period. Mr. Karekezi is also the Executive Secretary of the Foundation<br />
for Woodstove Dissemination (FWD) in Nairobi and also was a member of the<br />
Scientific and Technical Advisory Panel (STAP, 1995-2002) of the Global<br />
Environment Facility (GEF), co-managed by the World Bank, UNDP and UNEP.<br />
I am genuinely thankful to Mr. Aschalew Demeke Tigabu who is a PhD student in the<br />
department of Environmental Economics of IVM Institute for Environmental Studies<br />
at the VU University Amsterdam (Netherlands). He was working on the Innovation<br />
Systems of Renewable Energy Technologies in East Africa, part of RENEW project<br />
funded by the DGIS (Dutch Ministry of Foreign Affairs). His research experiences<br />
and program concentration in Renewable Energy helped cultivate this project which<br />
can be adapted in rural households, metropolitan towns (street lighting) as well as<br />
in off grid system as a whole. I adapted the Renewable energy concept which is the<br />
backbone of this project.<br />
Also my sincere gratitude goes to my supervisor; Mr. Harrison T. Ngetha, my Co-<br />
supervisor Mr. Isaac Warutumo for coordinating and guiding to the development of<br />
this project; and not forgetting all the staff members i.e. Mr. Asaph Mbugua, Mr.<br />
Mathenge, Mr. Luke Otieno; among others of KIMATHI UNIVERSITY COLLEGE OF<br />
TECHNOLOGY (Dept. EEE) who have willingly, taken the time to support towards<br />
our project process while we worked patiently alongside with them in finalising this<br />
report.<br />
Lastly I thank my Family and Friends and give everything to God the almighty<br />
because He is the source of my inspiration to the above personalities that made<br />
them stand firm for me at all the times I consulted, inquired and asked for support.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
2<br />
2012
Abstract<br />
Solar <strong>PV</strong> (photovoltaic) control System with Zigbee module is an Intelligent Energy<br />
Solar tracking System which can be used in places of high altitudes or receive less<br />
light intensity such as Nyeri. The solar panel will be well illuminated with a lamp to<br />
show clearly how the solar tracking takes place. Also the temperature, position and<br />
energy generated can be read and data sent through the Zigbee module to the<br />
control centre and stored in database format for analysis. The system can monitor<br />
solar <strong>PV</strong> generation and grid export. This allows the calculation of how much of<br />
power is generated and how much is exported to the grid. The data can be logged to<br />
a remote server and also shown in real-time on a display. All these can be done<br />
through by Arduino microcontroller and Xbee Modules.<br />
As the sun (light source) moves, the system automatically moves the panel by use of<br />
the light sensor and activates the Arduino to move the motors. The temperature<br />
readings will be read by the Arduino with the help of temperature sensor. Also the<br />
light sensor detects the light intensity of the monitored area and data sent by<br />
Arduino to the Zigbee module. In this case also the energy generated can be read by<br />
the Arduino from the storage batteries and data sent in the same Zigbee module.<br />
By using this system I can promote the dissemination of green energy which is<br />
readily available as renewable energy and also improve efficiency as well as<br />
provision of data read from different nodes of the system be available globally for<br />
research, analysis and system monitoring.<br />
To display the readings, I require a P.C. at the control centre for analysing the data<br />
taken and an LCD display at the actual plant (system). This would be enabled via<br />
data communication and synchronization of the whole system thus improving the<br />
control systems using advanced communication (Zigbee Protocol) and information<br />
technologies via programming to manage and monitor energy usage more<br />
intelligently.<br />
Intelligent control can allow energy systems to respond to their environment and<br />
make operating decisions based upon achieving specific energy goals.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
3<br />
2012
Contents<br />
Declaration ............................................................................................................... 1<br />
Acknowledgement .................................................................................................... 2<br />
Abstract ..................................................................................................................... 3<br />
List of Tables ............................................................................................................. 5<br />
List of Figures ........................................................................................................... 5<br />
Abbreviations ........................................................................................................... 6<br />
CHAPTER 1 ................................................................................................................ 8<br />
Introduction ....................................................................................................................8<br />
Statement of Problem .....................................................................................................8<br />
Justification .....................................................................................................................9<br />
The Innovation ................................................................................................................9<br />
Up-to-date scholarly knowledge ....................................................................................9<br />
Objectives ...................................................................................................................... 10<br />
CHAPTER 2 .............................................................................................................. 12<br />
LITERATURE REVIEW ................................................................................................... 12<br />
A. TRACKING <strong>CONTROL</strong>: MPPT (Max Peak Power Tracker) .................................... 13<br />
B. CHARGER <strong>CONTROL</strong> ............................................................................................... 27<br />
C. Street Light Review ................................................................................................ 28<br />
D. COMMUNICATION ............................................................................................... 32<br />
CHAPTER 3 .............................................................................................................. 52<br />
Methodology of Implementation ................................................................................. 52<br />
Operation of the Tracking System: .............................................................................. 52<br />
Block Diagram of Improved solar tracking system (STS) .......................................... 54<br />
Arduino as a Charger Controller .................................................................................. 55<br />
Street Light Implementation ........................................................................................ 56<br />
Communication System Methodology ......................................................................... 57<br />
Results & Analysis ......................................................................................................... 59<br />
Conclusion: - Possible Errors ............................................................................................. 64<br />
References ..................................................................................................................... 65<br />
APPENDIX: ................................................................................................................ 66<br />
Plan of Action ................................................................................................................ 66<br />
GANTT CHART ............................................................................................................... 66<br />
LM35 DATASHEET ........................................................................................................ 67<br />
COMBINED SOURCE CODE ............................................................................................ 67<br />
Email: david.irungu@stu.kuct.ac.ke<br />
4<br />
2012
List of Tables<br />
Table 1: Specifications of street lighting system .......................................................... 29<br />
Table 2: Specification of IEEE 802.15.4 .......................................................................... 44<br />
Table 3: Zigbee Comparison ........................................................................................... 51<br />
Table 4: Plan of action ...................................................................................................... 66<br />
Table 5: Gantt chart ......................................................................................................... 66<br />
List of Figures<br />
Figure 1: Arduino Microcontroller Board......................................................................... 14<br />
Figure 2: A DC Motor....................................................................................................... 16<br />
Figure 3: A Dismantled Servo Motor ............................................................................... 18<br />
Figure 4: A servo motor’s positioning pulses ................................................................... 19<br />
Figure 5: Stepper motors ................................................................................................... 20<br />
Figure 6: A unipolar stepper motor coils .......................................................................... 21<br />
Figure 7: H-Bridge driving a unipolar motor .................................................................... 21<br />
Figure 8: LED used as light sensor for a Robot ............................................................. 24<br />
Figure 9: Variation of LDR resistance as a function of Incident Light (Picture shows<br />
an example of LDR) ......................................................................................................... 26<br />
Figure 10: Variation of temperature of the NTC as a function of temperature. (Thermistor<br />
Picture) .............................................................................................................................. 27<br />
Figure 11: Solar Security light at Kimathi University with one solar panel ..................... 29<br />
Figure 12: Stand-alone system of Solar lighting at Kimathi University. .......................... 31<br />
Figure 13: Wi-Fi Operation .............................................................................................. 36<br />
Figure 14: Piconet Configuration...................................................................................... 39<br />
Figure 15: IEEE 802.15.4 protocol stack .......................................................................... 46<br />
Figure 16: IEEE 802.15.4 star and peer-to-peer ............................................................... 47<br />
Figure 17: ZigBee Network Model ................................................................................... 48<br />
Figure 18: Xbee Modules (One to act as a Coordinator and the other as the Router) ...... 49<br />
Figure 19: Principle Structure of the X-Bee System ........................................................ 49<br />
Figure 20: Reference Pin out (Xbee) ................................................................................ 50<br />
Email: david.irungu@stu.kuct.ac.ke<br />
5<br />
2012
Figure 21: Block Diagram ................................................................................................ 54<br />
Figure 22: Signal Flow diagram ....................................................................................... 55<br />
Figure 23: LM35, LCD connections to Arduino .............................................................. 58<br />
Figure 24: X-CTU Software ............................................................................................. 58<br />
Figure 25: XBee Connection - Coordinator and Router ................................................... 59<br />
Figure 26: LDRs connection on solar plate ...................................................................... 60<br />
Figure 27: XBee readings on the control Terminal .......................................................... 61<br />
Figure 28: HyperTerminal ................................................................................................ 62<br />
Figure 29: XBee Database - Mozilla & Spread sheet formats .......................................... 62<br />
Figure 31: Lux-LDR readings in Spread sheet ................................................................. 63<br />
Figure 30: LDR ................................................................................................................. 63<br />
Figure 32: Lux Analysis for the system ............................................................................ 64<br />
Abbreviations<br />
AM – Active Mode<br />
AP – Access Point<br />
ATIM – Announcement Traffic Indication Message<br />
AFH – Adaptive Frequency Hopping<br />
ACL–Asynchronous Connectionless Link<br />
C<strong>PV</strong> – Concentrated <strong>PV</strong><br />
CSP – Concentrated Solar Power<br />
CSMA/CA – Carrier Sense Multiple Access / Collision Avoidance<br />
CCA–Clear Channel Assessment<br />
DCF – Digitally Controlled Filter<br />
ED – Energy Detection<br />
EEE – Electrical & Electronic Engineering<br />
FFD- Full Function Device<br />
GPS – Global Positioning Satellite<br />
GFSK – Gaussian Frequency shifting Key<br />
Email: david.irungu@stu.kuct.ac.ke<br />
6<br />
2012
ISM – Industrial Scientific and Medical<br />
IEEE – Institute of Electrical and Electronic Engineers<br />
LDR – Light Dependent Resistor<br />
LED – Light Emitting Diode<br />
MAC – Medium Access Control<br />
MPPT – Maximum Peak Power Tracking<br />
OSI – Open System Interconnection<br />
PHY – Physical Layer<br />
PAN – Personal Area Network<br />
PWM – Pulse Width Modulation<br />
PDA – Personal Digital Assistance<br />
Wi-Fi – Wireless Fidelity<br />
WSN – Wireless Sensor Network<br />
WLAN – Wireless Local Area Network<br />
Email: david.irungu@stu.kuct.ac.ke<br />
7<br />
2012
CHAPTER 1<br />
Introduction<br />
The Solar <strong>PV</strong> (photovoltaic) control System with Zigbee module, aim of the project is<br />
to utilize the solar energy, monitor the energy generated and incorporate its usage<br />
in the grid system. In this project I shall be using various sensors, controlling and<br />
display.<br />
However, in this project work the basic signal processing of various<br />
parameters are temperature, lux readings, panel position, and energy produced<br />
which are the key elements for the grid implementation. For measuring various<br />
parameters values, various sensors are used and the outputs of these sensors are<br />
converted to control the parameters of the panel and data analysis. The control<br />
circuit is designed using micro-controller (Arduino). The outputs of all the three<br />
parameters are fed to micro-controller. The output of the micro-controller is used to<br />
drive the <strong>PV</strong> panel.<br />
I shall be developing new control systems using advanced communication and<br />
information technologies to manage and use energy more intelligently. Intelligent<br />
control can allow energy systems to respond to their environment and make<br />
operating decisions based upon achieving specific energy goals.<br />
Statement of Problem<br />
Solar P.V systems are widely used in the world. In high altitudes (like Nyeri), receive<br />
minimal sunlight thus resulting to underutilization of P.V capabilities. It’s also hard<br />
to monitor the usage of the energy stored and its use in a household or institution<br />
thus reducing its efficiency.<br />
Reliable electricity in Kenya is an oxymoron. Blackouts have been a norm in Kenya<br />
due to inconsistent supply of energy (electricity) and high demands. Due to this,<br />
solar power can be implemented in the grid system for constant supply and energy<br />
efficiency. It is also a cheaper way to produce energy as solar energy is renewable.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
8<br />
2012
Justification<br />
While solar energy use in Arctic and Antarctic countries has been stagnating for<br />
years, use of solar energy in Kenya has exploded. Why? Because solar energy<br />
delivers cheap, reliable energy and Kenya is located on the equator. Solar energy<br />
devices are cheap to produce, easy to use and require little maintenance. It is only<br />
during the rainy season (mainly March to September) that there may not always be<br />
enough sunlight to operate solar devices. The penetration of the Grid System in<br />
Kenya is 15% i.e. 85% don’t have access to electricity.<br />
A 2007 World Bank report said Kenya has annual solar energy resources equivalent<br />
to the discovery of roughly 70 million tons of oil. About 30 000 solar photovoltaic<br />
(<strong>PV</strong>) systems are sold annually. The industry is thriving, making the country one of<br />
the best examples of where solar energy technology has taken off in sub-Saharan<br />
Africa. But further investment is required especially in manufacturing of <strong>PV</strong> panels.<br />
Access to regular supplies of electricity has increased in Kenya: 44% of the<br />
population now have access, versus 23% in 1970. However, many rural<br />
communities may never get access as this is very expensive and requires heavy<br />
government subsidies. Fewer than 2% of Kenyans in rural areas are served by the<br />
national grid. In such a situation, solar energy in Kenya can be of help. [1]<br />
The Innovation<br />
Replacing the charge controller with the Arduino<br />
Introducing the Zigbee communication module<br />
Introducing the dimmer circuit<br />
Introducing a temperature and lux reading circuit<br />
Up-to-date scholarly knowledge<br />
A solar tracker is a generic term used to describe devices that orient various<br />
payloads toward the sun. Payloads can be photovoltaic panels, reflectors, lenses or<br />
other optical devices. In flat-panel photovoltaic (<strong>PV</strong>) applications trackers are used<br />
to minimize the angle of incidence between the incoming light and a photovoltaic<br />
Email: david.irungu@stu.kuct.ac.ke<br />
9<br />
2012
panel. This increases the amount of energy produced from a fixed amount of<br />
installed power generating capacity. In standard photovoltaic applications, it is<br />
estimated that trackers are used in at least 85% of commercial installations greater<br />
than 1MW from 2009 to 2012.<br />
In concentrated photovoltaic (C<strong>PV</strong>) and concentrated solar thermal<br />
(CSP) applications trackers are used to enable the optical components in the C<strong>PV</strong><br />
and CSP systems. The optics in concentrated solar applications accepts the direct<br />
component of sunlight light and therefore must be oriented appropriately to collect<br />
energy. Tracking systems are found in all concentrator applications because such<br />
systems do not produce energy unless oriented closely toward the sun. [2]<br />
The greatest modification of this project is the addition of the Zigbee<br />
Communication Technology and the addition of the Arduino micro-controller<br />
functions with respect to tracking ability.<br />
Objectives<br />
Main Objective<br />
Improving solar <strong>PV</strong> efficiency (Automation & Intelligence)<br />
Specific-Objectives<br />
Figure: Block Diagram showing a Typical Solar Harvesting System<br />
To come up with the control tracking system<br />
Email: david.irungu@stu.kuct.ac.ke<br />
10<br />
2012
To come up with digital charger control system<br />
To implement an efficient street lighting control system – dimmer circuit<br />
Realisation of the Zigbee module communication – Temp, Lumens & Energy<br />
By introducing intelligence into the ways that our energy is generated, transmitted<br />
and consumed we can also achieve higher level goals – such as making energy from<br />
renewable sources more reliable and cost-effective.<br />
By making renewable energy more reliable we hope to encourage their use in the<br />
marketplace. Technologies under development are aimed for use in the home, in<br />
commercial buildings and in the energy distribution system to both make energy<br />
use more efficient and increase Kenya’s use of renewable generation.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
11<br />
2012
CHAPTER 2<br />
LITERATURE REVIEW<br />
Renewable energy is any energy produced using methods that are considered to<br />
have little or no impact on the earth’s ability to renew the supply. Otherwise<br />
referred to as sustainable energy, renewable energy includes solar photovoltaic<br />
(<strong>PV</strong>) panels and wind turbines which are both considered as having the ability to<br />
produce energy without negatively affecting the environment. Harnessing of the sun<br />
and wind cannot exhaust their supply and running solar panel systems are literally<br />
maintenance free. Solar power generally refers to electricity generated by<br />
photovoltaic (<strong>PV</strong>) solar panels that utilize materials displaying the photovoltaic<br />
effect. [3]<br />
Photovoltaic (<strong>PV</strong>)<br />
Photovoltaic <strong>PV</strong> Energy or <strong>PV</strong> for short is technology that uses semiconductors to<br />
convert sunlight into direct current (DC) electricity. Photovoltaics can provide tiny<br />
amounts of power for watches, large amounts for the electric grid, and everything in<br />
between. Groups of <strong>PV</strong> cells can be combined to make a module, and groups of<br />
modules are configured to become an array.<br />
Photovoltaic (<strong>PV</strong>) systems are used for powering telecommunications networks;<br />
applied in small scale remote stand-alone power supplies for domestic use, game<br />
farms and household and community water pumping schemes. The installed <strong>PV</strong><br />
capacity is estimated at 12 MW (DME, 2003). Off-grid systems include a wide range<br />
of applications and sizes. The majority of off-grid systems are small solar home<br />
systems. [4]<br />
Solar Panels can either be fixed in place or designed to track the movement of the<br />
sun. The simplest <strong>PV</strong> array consists of flat plate <strong>PV</strong> panels in a fixed position.<br />
Most solar lights use a small panel to keep the lights operating throughout the hours<br />
of darkness.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
12<br />
2012
The advantages of fixed arrays are that they lack moving parts, so there is<br />
virtually no need for extra equipment, and they are relatively lightweight. These<br />
features make them suitable for many locations, including most residential roofs.<br />
Because the panels are fixed in place, their orientation to the sun is usually at an<br />
angle that practically speaking is less than optimal. Therefore, less energy per unit<br />
area of array is collected compared with that from a tracking array. However, this<br />
drawback must be balanced against the higher cost of the tracking system.<br />
<strong>PV</strong> technologies:<br />
The solar module is a number of solar cells connected together and encapsulated to<br />
give an electrical output. For larger systems, the modules can be connected in series<br />
and parallel to form a solar array.<br />
Monocrystalline: Made from cells cut from single silicon crystals. The energy<br />
conversion rate efficiency is 16% (Ideal Case)<br />
Multi-crystalline (also called Polycrystalline): Made from cells cut from<br />
several silicon crystals. . The energy conversion rate efficiency is between<br />
9%-13% (Ideal Case) [5]<br />
Amorphous: The energy conversion rate efficiency is less than 6% (Ideal<br />
Case)<br />
A. TRACKING <strong>CONTROL</strong>: MPPT (Max Peak Power Tracker)<br />
It has an operating point at which the power produced is at its maximum and<br />
any movement away from this point will progressively decrease the<br />
efficiency of the panel.<br />
In order to extract all the energy that a solar panel is capable of delivering, a<br />
fully electronic system called the Max Peak Power Tracker (MPPT) is<br />
required.<br />
The MPPT is a DC-to-DC converter that poses as an optimum load, allowing<br />
the panel to operate at its peak-power state.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
13<br />
2012
Since the Max Peak Power Point (MPP) is dependent on the amount of<br />
radiant sunlight and temperature of the panel, the MPPT must constantly<br />
adapt to maximize the energy conversion.<br />
The DC-DC conversion topology used by the MPPT depends on the difference<br />
in operating voltage between <strong>PV</strong> panel and battery.<br />
Under normal charging conditions, if the panel voltage is greater than the<br />
battery, a buck topology is used. Conversely, if the panel voltage is lesser, a<br />
boost topology increases the charging voltage with a reduced current<br />
In either case, the goal of the MPPT is to maintain the current extracted from<br />
the <strong>PV</strong> panel at the peak point. [7]<br />
Arduino Microcontroller<br />
Arduino is an open-source electronics prototyping platform based on flexible, easy-<br />
to-use hardware and software. It’s intended for artists, designers, hobbyists, and<br />
anyone interested in creating interactive objects or environments. The<br />
microcontroller on the board is programmed using the Arduino programming<br />
language (based on Wiring) and the Arduino development environment (based<br />
on Processing). Arduino projects can be stand-alone or they can communicate with<br />
software on running on a computer. The Arduino, matched with a couple of photo-<br />
sensors and a gear motor, makes an inexpensive solar tracking system: [6]<br />
Email: david.irungu@stu.kuct.ac.ke<br />
Figure 1: Arduino Microcontroller Board<br />
14<br />
2012
Main points:<br />
Sensing energy in external environment<br />
Analysis and visualization of energy over periods of time to increase our<br />
understanding of energy flow<br />
Actuators respond to environment and also act as inputs via feedback loop<br />
Remote interaction also possible via internet or wireless links<br />
Software in micro-controller allows a wide range of adaptability in behaviour<br />
Open source hardware and software allows changes to be made easily<br />
MOTORS:<br />
without the reliance on closed proprietary systems. This allows<br />
maintainability and flexible integration in the long term.<br />
A motor is an actuator. An actuator is a mechanical device for moving or controlling<br />
a mechanism or system. It takes energy, usually transported by air, electric current,<br />
or liquid, and converts that into some kind of motion. A motor is a device that<br />
converts other forms of energy into mechanical energy hence imparting motion. An<br />
electric motor converts electrical energy into mechanical energy.<br />
An electric motor can be a direct current (d.c) or alternating current (a.c) motor.<br />
The reference to d.c or a.c refers to how current is transferred through and from the<br />
motor. D.C motors use a constant single current<br />
D.C MOTORS<br />
D.C motors are best used where<br />
1. Speed needs to be controlled or varied. Speed is directly proportional to<br />
armature voltage; the higher the armature voltage the faster the speed of<br />
rotation.<br />
2. Torque needs to be controlled. Output torque is proportional to current; if<br />
the current is limited, then the amount of torque that can be achieved by that<br />
motor is also limited.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
15<br />
2012
3. Simple circuitry is desired. A very basic drive for controlling speed and<br />
torque would require a little more than a large enough potentiometer.<br />
4. D.C motors provide continuous current and would be appropriate for<br />
application like driving wheels.<br />
From the start, DC motors are quite simple, apply a voltage to both terminals, and it<br />
spins. If you want to control which direction the motor spins just reverse the wires.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
Figure 2: A DC Motor<br />
If you want the motor to spin at half that speed; then use less voltage. Some<br />
considerations when using D.C motors are:<br />
• Voltage: DC motors are non-polarized - meaning that one can reverse voltage<br />
without any damage. Typical DC motors are rated from about 6V-12V. The larger<br />
ones are often 24V or more. But for the purposes of a robot, you probably will stay<br />
in the 6V-12V range. Voltage is directly related to motor speed as current is related<br />
to motor torque i.e. the more the voltage, the higher the torque. A DC motor is rated<br />
at the voltage it is most efficient at running. If you apply too few volts, it just won’t<br />
work. If you apply too much, it will overheat and the coils will melt. So the general<br />
rule is, try to apply as close to the rated voltage of the motor as you can. Also,<br />
although a 24V motor might be stronger, consider that it will need a 24v battery<br />
which increases the initial load. Unless really high torque needs to be overcome it’s<br />
better to stick to the 6-12V motors.<br />
• Current: As with all circuitry, attention must be paid to current. Too little won’t<br />
work and too much, meltdown occurs. When buying a motor, there are two current<br />
ratings you should pay attention to. The first is operating current. This is the<br />
16<br />
2012
average amount of current the motor is expected to draw under a typical torque. If<br />
multiplied by the rated voltage then one will get the average power draw required<br />
to run the motor. The other current rating to pay attention to is the stall current.<br />
This is when the motor is powered up, but enough torque is put on it to force it to<br />
stop rotating. This is the maximum amount of current the motor will ever draw, and<br />
hence the maximum power that will ever be drawn.<br />
• Torque: When buying a DC motor, there are two torque value ratings which must<br />
paid attention to. The first is operating torque. This is the torque the motor was<br />
designed to give. Usually it is the listed torque value. The other rated value is stall<br />
torque. This is the torque required to stop the motor from rotating. Normally design<br />
is done using only the operating torque value. If you are designing a wheeled robot,<br />
good torque means good acceleration. A good idea would be if there are two motors<br />
on the robot, to ensure the stall torque on each is enough to lift the weight of the<br />
entire robot times your wheel radius.<br />
• Velocity: Velocity is very complex when it comes to DC motors. The general rule is,<br />
motors run the most efficient when run at the highest possible speeds. Obviously<br />
however this is not possible as it greatly compromises torque plus there are times<br />
when it would be wished that the robot to run slowly. So one may consider gearing -<br />
this way the motor can run fast, yet you can still get good torque out of it however<br />
gearing automatically reduces efficiency.<br />
• Control methods: The most important of DC motor control techniques is the H-<br />
Bridge. The H-Bridge is the link between digital circuitry and mechanical action.<br />
The computer sends out binary commands, and high powered actuators do the<br />
actual work. Most often H-bridges are used to control rotational direction of DC<br />
motors. Unless one buys a potentially expensive motor-driver, a H-bridge is needed<br />
to control any robot with a motor. After you have your H-Bridge hooked up to your<br />
motor, to determine your wheel velocity/position you must use an encoder.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
17<br />
2012
SERVO MOTORS<br />
Servos are DC motors with built in gearing and feedback control loop circuitry and<br />
no motor drivers required. Servos are extremely popular with robots. Most servo<br />
motors can rotate about 90 to 180 degrees while some rotate through a full 360<br />
degrees or more. However, servos are unable to continually rotate, meaning they<br />
can’t be used for driving wheels (unless modified), but their precision positioning<br />
makes them ideal for robot arms and legs, rack and pinion steering, and sensor<br />
scanners to name a few. Since servos are fully self-contained, the velocity and angle<br />
control loops are very easy to implement and affordable.<br />
Since servos contain DC motors, dc motors stall current and torque characteristics<br />
apply. A Servo has an output shaft that can be positioned to specific angular<br />
positions by sending the servo a coded signal. As long as the coded signal exists on<br />
the input line, the servo will maintain the angular position of the shaft. As the coded<br />
signal changes, the angular position of the shaft changes.<br />
Figure 3: A Dismantled Servo Motor<br />
Servo motors are small, have built in control circuitry, and are extremely powerful<br />
for their size and draw power proportional to the mechanical load. The servo motor<br />
has some control circuits and a potentiometer (a variable resistor, aka pot) that is<br />
connected to the output shaft. This pot allows the control circuitry to monitor the<br />
current angle of the servo motor. If the shaft is at the correct angle, then the motor<br />
shuts off. If the circuit finds that the angle is not correct, it will turn the motor the<br />
correct direction until the angle is correct. The output shaft of the servo is capable of<br />
Email: david.irungu@stu.kuct.ac.ke<br />
18<br />
2012
traveling somewhere around 180 degrees. A normal servo is used to control an<br />
angular motion of between 0 and 180 degrees. A normal servo is mechanically not<br />
capable of turning any farther due to a mechanical stop built on to the main output<br />
gear. The amount of power applied to the motor is proportional to the distance it<br />
needs to travel. So, if the shaft needs to turn a large distance, the motor will run at<br />
full speed. If it needs to turn only a small amount, the motor will run at a slower<br />
speed. This is called proportional control. The control wire is used to communicate<br />
the angle. The angle is determined by the duration of a pulse that is applied to the<br />
control wire. This is called Pulse Coded Modulation.<br />
The servo expects to see a pulse every 20 milliseconds (.02 seconds). The length of<br />
the pulse will determine how far the motor turns. A 1.5 millisecond pulse, for<br />
example, will make the motor turn to the 90 degree position (often called the<br />
neutral position). If the pulse is shorter than 1.5 ms, then the motor will turn the<br />
shaft to closer to 0 degrees. If the pulse is longer than 1.5ms, the shaft turns closer to<br />
180 degrees.<br />
Therefore, where somewhat continuous medium distances and positional and/or<br />
velocity accuracy is important servo motors would be highly appropriate for<br />
example moving the robot from one station to another when the distance between<br />
them is fixed and known.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
Figure 4: A servo motor’s positioning pulses<br />
19<br />
2012
STEPPER MOTORS<br />
A stepper motor is a permanent magnet or variable reluctance dc motor that has the<br />
following performance characteristics:<br />
i. Rotation in both directions,<br />
ii. Precision angular incremental changes,<br />
iii. Repetition of accurate motion or velocity profiles,<br />
iv. A holding torque at zero speed<br />
v. Capability for digital control.<br />
A stepper motor can move in accurate angular increments known as steps in<br />
response to the application of digital pulses to an electric drive circuit from a digital<br />
controller. The number and rate of the pulses control the position and speed of the<br />
motor shaft. Generally, stepper motors are manufactured with steps per revolution<br />
of 12, 24, 72, 144, 180, and 200, resulting in shaft increments of 30, 15, 5, 2.5, 2, and<br />
1.8 degrees per step.<br />
Stepper motors are either unipolar or bipolar. The unipolar stepper motor has five<br />
or six wires and four coils (actually two coils divided by centre connections on each<br />
coil). The centre connections of the coils are tied together and used as the power<br />
connection. They are called unipolar steppers because power always comes in on<br />
this one pole.<br />
Figure 5: Stepper motors<br />
Stepper motors that are bipolar require two power sources or a switchable polarity<br />
power source. The bipolar stepper motor usually has four wires coming out of it.<br />
Unlike unipolar steppers, bipolar steppers have no common centre connection. They<br />
Email: david.irungu@stu.kuct.ac.ke<br />
20<br />
2012
have two independent sets of coils instead. They can be distinguished from unipolar<br />
steppers by measuring the resistance between the wires. You should find two pairs<br />
of wires with equal resistance. If you’ve got the leads of your meter connected to<br />
two wires that are not connected (i.e. not attached to the same coil), you should see<br />
infinite resistance (or no continuity).<br />
Feedback is not always required for control, but the use of an encoder or other<br />
position sensor can ensure accuracy when it is essential. The advantage of operating<br />
without feedback is that a closed loop control system is not required. Generally,<br />
stepper motors produce less than 1 horsepower (746 W) and are therefore<br />
frequently used in low-power position control applications.<br />
Like other motors, stepper motors require more power than a micro controller can<br />
give them, so a separate power supply is required. To control the stepper, voltage is<br />
applied to each of the coils in a specific sequence from the micro controller through<br />
a driver like the H-Bridge.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
Figure 6: A unipolar stepper motor coils<br />
21<br />
2012
Motor Sizing<br />
To size an electric motor for a particular drive application, the designer must first<br />
analyse the mechanics of the drive application. The following must be determined:<br />
Friction of the bearings, or other mechanical elements.<br />
The weight or load to be driven by the electric motor.<br />
Inertia of the mass to be moved or controlled. Acceleration and deceleration<br />
forces should be analysed.<br />
Mechanical system type and number of linkages.<br />
Friction - The friction may be determined by estimation, component specification<br />
or by measuring by use of a torque reading device or mechanism.<br />
Weight or Mass - The mass may be calculated using 3D CAD, specification or direct<br />
measurement.<br />
Inertia - Inertia is the force required to accelerate or decelerate a mass. Inertia is<br />
used to calculate the motor torque required to operate the mechanical system.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
22<br />
2012
Mechanical System - There are roughly four categories of mechanical drive<br />
systems<br />
Direct drive<br />
Gear drive<br />
Tangential drive<br />
Lead-screw or worm-gear<br />
The total torque due to the four items outlined above is determined and the motor<br />
chosen should have a torque that exceeds this calculated torque. The power and<br />
voltage ratings of the motor are supplied in the manufacturer’s data sheet. The<br />
torque of the motor depends on the desired linear velocity (V). For example a lead-<br />
screw drive:<br />
DN<br />
V =<br />
1000<br />
Where:<br />
• V is the linear velocity in m/min<br />
• D is the pitch diameter of the lead screw<br />
• N is the speed of motor in revolutions per minute (rpm)<br />
So, once linear speed required is known, the number of number of revolutions of the<br />
motor can be calculated as above. The power rating is a product of the speed and<br />
output torque.<br />
P T<br />
Where:<br />
• P is the power rating of the motor<br />
• T is the output torque of the motor<br />
• ω is the angular frequency<br />
It is this torque that should exceed the calculated initial torque of the robot system.<br />
The angular frequency ω is given by<br />
2<br />
N<br />
<br />
60<br />
[8]<br />
Email: david.irungu@stu.kuct.ac.ke<br />
23<br />
2012
SENSORS<br />
LED as light sensor<br />
Figure 8: LED used as light sensor for a Robot<br />
An LED can be used as a photodiode used for light detection as well as emission.<br />
This capability has been demonstrated and used in a variety of applications<br />
including ambient light detection and bidirectional communications.This<br />
implementation of LEDs is important because functionality can be added to designs<br />
with only minor modifications, usually at little or no cost<br />
An LED is a diode specifically made for efficient light emission and has been<br />
packaged in a transparent case. If inserted into a circuit in the same way as a<br />
photodiode, which is essentially the same thing, the LED will perform the same<br />
function. As a photodiode, it is sensitive to wavelengths equal to or shorter than the<br />
predominant wavelength it emits. For example, a green LED will be sensitive to blue<br />
light and to some green light, but not to yellow or red light. Additionally, the LED can<br />
be multiplexed in such a circuit, such that it can be used for both light emission and<br />
sensing at different times.<br />
Applications for this technology range from simple ambient light sensors to full<br />
bidirectional communications using a single LED. Applications benefit from the cost<br />
reduction of using the same component for multiple functions.<br />
Ambient light sensors<br />
LEDs have been used as ambient light sensors. For example, a remote control<br />
keypad backlight would be turned on by capacitive proximity sensors only in the<br />
Email: david.irungu@stu.kuct.ac.ke<br />
24<br />
2012
absence of ambient light. The LED used for the backlight was also used as the<br />
ambient light sensor. This resulted in increased functionality for no increase in<br />
manufacturing costs.<br />
Bidirectional communications<br />
LEDs can be used as both emitters and detectors of light, which means that a device<br />
having only a single LED can be used to achieve bidirectional communications with<br />
another device meeting these requirements. Using this technology, any of the<br />
ubiquitous LEDs connected to household appliances, computers and other<br />
electronic devices can be used as a bidirectional communications port.<br />
One application for bidirectional communication with a single LED is fibre optic<br />
communications. In typical plastic optical fibre communications, a single optical<br />
fiber is used only for communication in one direction. This is because a single LED<br />
transmitter is placed at one end of the fiber, and a photodiode receiver is placed at<br />
the other end. Thus, two fibers are needed for bidirectional communication.<br />
However, if a single LED is placed at each end of a fiber, then the optical fiber can<br />
carry information in both directions using half the number of components as a<br />
typical system. This reduces system weight, cost and complexity.<br />
Another application of this use of LEDs is a proposed alternative to RFID tags called<br />
the iDropper, developed by Mitsubishi Electric Research Laboratories in 2003. The<br />
iDropper is a small device that consists of a microcontroller, a battery, an LED, and a<br />
single push-button. The device records or transmits a small amount of data upon<br />
command from the user. Compared to RFID tags, the iDropper is more secure<br />
because the user must press a button to reveal personal information, and is similar<br />
in cost.<br />
A single LED can only operate as a half-duplex transceiver; it can either transmit or<br />
receive information at one time, not both simultaneously. Simultaneous two-way<br />
communication requires both a forward and reverse channel and a second LED.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
25<br />
2012
Photocells<br />
Photocells are sensors that allow you to detect light. They are small, inexpensive,<br />
low-power, easy to use and don't wear out. For that reason they often appear in<br />
toys, gadgets and appliances. They are often referred to as CdS cells (they are made<br />
of Cadmium-Sulphide), light-dependent resistors (LDR), and photo-resistors. [10]<br />
A light-dependent resistor (LDR) is used to detect light. The LDR is a semiconductor<br />
device whose resistance decreases with increasing incident light intensity. LDRs<br />
made of cadmium sulphide are cheap, but have poor response time. The following<br />
illustrations show the variation of LDR resistance as a function of incident light and<br />
some sample LDR devices.78<br />
Figure 9: Variation of LDR resistance as a function of Incident Light (Picture shows an example of LDR)<br />
Thermistor<br />
A thermistor is a temperature-dependent resistor. A thermistor is one of the<br />
cheapest temperature sensors. There are two types: negative temperature<br />
coefficient (NTC) and positive temperature coefficient (PTC). As the name suggests<br />
for the PTC thermistors, as the temperature raises the resistance of the thermistor<br />
increases. For the NTC thermistors, as the temperature rises, the resistance of the<br />
thermistor decreases. The only drawback of thermistors is the lack of linearity of the<br />
response of the thermistor, that is, the resistance variation as a function of<br />
Email: david.irungu@stu.kuct.ac.ke<br />
26<br />
2012
temperature is not a straight line, but is actually a nonlinear curve. It is possible to<br />
use the thermistor with a linear approximation in a small temperature range;<br />
however, for proper use, the thermistor must be linearized, whether with external<br />
components or a software table -based approach or by a mathematical model based<br />
on the Steinhart-Hart equation. In spite of these complications, the thermistor is an<br />
excellent temperature sensor, with fast temperature response time, and is widely<br />
used in thermostat applications. The next illustration shows the variation of<br />
temperature of the NTC as a function of temperature, and the photograph shows<br />
various thermistors.<br />
Figure 10: Variation of temperature of the NTC as a function of temperature. (Thermistor Picture)<br />
Storage<br />
Banks of batteries are used as energy storage after harvesting. Battery rating is a<br />
vital parameter that assists in the choice of the battery to settle at.<br />
B. CHARGER <strong>CONTROL</strong><br />
Charge Controllers<br />
A charge controller or regulator prevents overcharging by limiting the current<br />
flowing into the batteries. The key to extending battery life in a solar system is to<br />
protect batteries from a complete discharge / overcharge. A charge controller is a<br />
power system component whose functions include regulation of solar charge<br />
current and in some cases to provide low battery protection.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
27<br />
2012
Main functions Include<br />
PWM (Pulse Width Modulation) Charging<br />
Direct, boost and float auto-charging modes<br />
High precision control<br />
LED indication of system working status<br />
Over load and short circuit protections<br />
Temperature compensation<br />
Real time clock and display<br />
Digital LCD display of parameters<br />
Optimized control for intelligent adjustment of control parameters<br />
Based on actual charging/discharging rates<br />
DC 12V or DC 24V auto work<br />
Arduino microcontroller can function like a charger controller .This minimizes the<br />
resources as the microcontroller can be used to replace charger controller. [13]<br />
C. Street Light Review<br />
Increased efficiency of power collection is done by the tracker. Hence, efficiency in<br />
usage is fundamental and paramount. The LDR is used to turn the lamp on and off<br />
automatically at dusk and dawn this reduces power wastage in switching. Efficiency<br />
is increased by making the street light intelligent in the sense that it’s automated<br />
LED lamps are more efficient than HID lamps, hence led lamp is the choice to<br />
increase efficiency. MOSFET vast properties makes it a good choice , for this<br />
application MOSFET can used as a variable voltage resistor .The microcontroller<br />
used is ARDUINO where a PWM is produced to control the MOSFET. The MOSFET<br />
then controls the voltage and the intensity of light is varied. [14]<br />
Email: david.irungu@stu.kuct.ac.ke<br />
28<br />
2012
Specifications:<br />
Figure 11: Solar Security light at Kimathi University with one solar panel<br />
Solar panel 140 W ,monocrystalline conversion efficiency 15%, 30W.<br />
Light source Individual CREE LEDS ,2175 lumens ,0.3 – 2.0 foot-candles on<br />
the ground<br />
Pole 16 feet high made of galvanized steel<br />
Controller 12V ,10A solar charger controller<br />
Battery 12V,120Ah ,gel cell deep cycle battery<br />
Working time 8 ~ 10 hours/day, 2 ~ 3 cloudy or rainy days backup<br />
Wind Resistance 80mph<br />
Light Power 15W, 18W, 21W, 30W, 42W, 48W<br />
Pole Height 10 feet, 11 feet, 12 feet, 13 feet, 16 feet, 20 feet, 23 feet<br />
Battery Gel cell deep cycle battery or standard deep cycle battery,<br />
Email: david.irungu@stu.kuct.ac.ke<br />
50Ah, 80Ah, 100Ah, 150Ah<br />
Battery Position Under ground, at the foot of the pole<br />
Table 1: Specifications of street lighting system<br />
29<br />
2012
Applications<br />
Street Lighting<br />
Pathway Lighting<br />
Ramp Lighting<br />
Sidewalk Lighting<br />
Private Road Lighting<br />
Standard Features<br />
Solar Panel: over 25 years of power generation capacity<br />
LED Light: CREE LEDs provide super-bright light from little power, need<br />
simple thermal management, and last up to 50,000 hours, LED wattage is<br />
equivalent to approximately half the wattage of high pressure sodium light.<br />
Controller: over 8 years of typical operating life, automatic operation from<br />
dusk to dawn or timed ON/OFF operation<br />
Pole: up to 25 years of long life time<br />
Battery: 5 ~ 7 years of maximum life<br />
Benefits<br />
No line voltage, trenching, or metering<br />
No power outages<br />
Battery backup for cloudy or rainy days<br />
Distributed light and power - no single point of failure for enhanced security<br />
Easy to install with quick connect plugs - less than 1 hour<br />
No scheduled maintenance for up to 5 years<br />
No cost of replacing concrete, asphalt or landscaping<br />
No cost of transformers or meters to be added for electric service<br />
Qualify for savings from various state and federal taxes and incentives<br />
No monthly electric bills<br />
Email: david.irungu@stu.kuct.ac.ke<br />
30<br />
2012
Controlled charging to prolong battery service life<br />
Long-life <strong>PV</strong> modules with more than 25 years of power generation capacity<br />
Environmentally friendly - 100% powered by the sun, solar panels reduce<br />
fossil fuel consumption, eliminating pollution<br />
Self-contained solution - Light on/off controlled by automatic daylight<br />
sensing or hour preset, no running or maintenance cost<br />
Better light source - LED lights feature cool white light without flickering and<br />
higher brightness than sodium lights<br />
Safe 12 volt/24 volt circuit, no risk of electric shock [14]<br />
Improved Solar Street Lights Using Two Solar Panels<br />
Email: david.irungu@stu.kuct.ac.ke<br />
31<br />
2012
D. COMMUNICATION<br />
Wireless technologies<br />
Before starting the design of the system that will be developed it is important to<br />
describe some of the technology that will be involved in this project. It is important<br />
to mention about different wireless sensor networks (WSN) and some existing<br />
protocols.<br />
Wireless sensor networks have very small and efficient power consumption nodes<br />
that transmit information from the environment. The information is sensed and<br />
sent wireless through the network to finally arrive to a management centre where<br />
all the information is displayed. The information is then analysed and appropriate<br />
decision would be taken to decide what needs to be done. Wireless Sensor Network<br />
(WSN) can be used for example in monitoring temperature, pressure, moisture,<br />
pollution, sound, vibration, and many other variables that need to be known. An<br />
important aspect of a WSN is the power management and the network which needs<br />
an appropriate protocol in order to take care of the energy consumption. This point<br />
is very important because a sensor network normally has a battery as a source of<br />
energy and needs to last as long as possible.<br />
IEEE 802.11(Wi-Fi)<br />
Introduction<br />
The fast growing of wireless communication has contributed to less usage of cables.<br />
The devices that are suitable for this technology are many and some of the examples<br />
are mobile phone, personal computer and personal digital assistant (PDA) that<br />
needs to interact in order to share documents. These documents can come from<br />
several places such as email, information displays for customers in a shop or driver<br />
who wants to get access to map and tourist information while driving on the motor<br />
way. All this conveniences has been developed through the technological point of<br />
view.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
32<br />
2012
Wi-Fi is derived from the decades old term Hi-Fi that stands for the output’s type<br />
produced by quality music hardware. Wi-Fi Technology is WIRELESS FIDELITY and<br />
stands for all those technologies that fall under the specifications of IEEE 802.11<br />
including 802.11a, 802.11b and 802.11g. The association of the term Wi-Fi with<br />
various technologies is merely because of the promotions made by the Wi-Fi<br />
Alliance.<br />
Wi-Fi is also associated with 802.11 networking. The reference is derived from IEEE<br />
– Institute of Electrical and Electronics Engineers uses the numbering system for<br />
classifying a range of technological protocols.<br />
802.11<br />
802.11 is the Wi-Fi standard set by the IEEE for WLANs. There are different variants<br />
of 802.11, the most common being: 802.11b (2.4GHz, max data rate 11Mbit/s),<br />
802.11g.(2.4GHz, max data rate 54Mbit/s) and 802.11a (5Ghz, max data rate<br />
54Mbit/s). 802.11n (5 GHz and/or 2.4 GHz, 74-600Mbits/s) is the next proposed<br />
standard and is currently still in draft specification (after 4 years).<br />
802.11 standards define rules for communication on wireless local area networks<br />
(WLANs). Popular 802.11 standards include 802.11a, 802.11g, and 802.11n. Many<br />
products conform to the 802.11a, 802.11b, 802.11g, or 802.11n wireless<br />
standards collectively known as Wi-Fi technologies<br />
802.11b uses the same unregulated radio signalling frequency (2.4 GHz) as the<br />
original 802.11 standard. Vendors often prefer using these frequencies to lower<br />
their production costs. Being unregulated, 802.11b gear can incur interference from<br />
microwave ovens, cordless phones, and other appliances using the same 2.4 GHz<br />
range. However, by installing 802.11b gear a reasonable distance from other<br />
appliances, interference can easily be avoided<br />
802.11a supports bandwidth up to 54 Mbps and signals in a regulated frequency<br />
spectrum around 5 GHz. This higher frequency compared to 802.11b shortens the<br />
range of 802.11a networks. The higher frequency also means 802.11a signals have<br />
more difficulty penetrating walls and other obstructions.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
33<br />
2012
802.11a has fast maximum speed; regulated frequencies prevent signal interference<br />
from other devices while it is of highest cost; shorter range signal that is more easily<br />
obstructed<br />
The newest IEEE standard in the Wi-Fi category is 802.11n. It was designed to<br />
improve on 802.11g in the amount of bandwidth supported by utilizing multiple<br />
wireless signals and antennas (called MIMO technology) instead of one.<br />
802.11n has fastest maximum speed and best signal range; more resistant to signal<br />
interference from outside sources whereas its standard is not yet finalized; costs<br />
more than 802.11g; the use of multiple signals may greatly interfere with nearby<br />
802.11b/g based networks<br />
Wi-Fi communication devices are extended forms of radios used for cell phones and<br />
walkie-talkies: they simultaneously transmit and receive radio waves and convert<br />
1s to 0s into the radio waves along with reconverting the radio waves into 1s and 0s,<br />
however the Wi-Fi radios enjoy some exceptional features.<br />
Basic operation<br />
Powered Wi-Fi station starts by scanning accessible channels to detect active<br />
networks in areas where beacons are located for transmitting. A network is then<br />
selected which will be in ad hoc mode. After this section it verifies itself with the<br />
access point (AP) and joins it. Several qualities of service (QoS) degrees are available<br />
in Wi-Fi network. Even though a station is already a part of a network it still tries to<br />
detect new networks and the reason for such behaviour depends on the willing to<br />
associate with the strongest signal and if this occurs the current network<br />
disconnects itself and joins the new network. This character is called roaming where<br />
networks share a common distribution system. Power in Wi-Fi stations can be saved<br />
by setting a station in to sleep mode.<br />
Power management<br />
The design of Wi-Fi connection is constructed mainly for long range communication,<br />
which then leads to higher absorbing of current. The absorbing range for Wi-Fi<br />
devices is around 100-350 Am. Wi-Fi devices can be at two different state and those<br />
Email: david.irungu@stu.kuct.ac.ke<br />
34<br />
2012
are awake or doze. When a station is located in doze state it cannot transmit or<br />
receive. The power consumption is then reduced at this state. The power<br />
management is handled by two modes in Wi-Fi devices and these are active mode<br />
(AM) and power save (PS) mode. PS mode is handled in different ways depending<br />
on the type of topology the network is based on.<br />
Infrastructure Network- A station in AM which wants to pass in PS must signal the<br />
AP by using the power management bit in the header of its packets. The AP stores all<br />
the traffic addressed to stations that are in PS mode; when transmitting the periodic<br />
beacon, the AP sends the list of stations in PS mode and whether it has traffic<br />
queued for them at regular and configurable time intervals, the stations in PS switch<br />
to AM in order to receive the beacon. If there is traffic addressed to them, the<br />
stations can receive it and then return to PS.<br />
Ad Hoc Network- Stations can use the PS mode, but the task of storing the traffic<br />
addressed to them is distributed among all the active stations since no AP exists. All<br />
stations in PS mode switch to awake state in a temporal window (ATIM window)<br />
during which the stations that have traffic stored for others send special frames<br />
(ATIM frames). If a station receives an ATIM frame addressed to it, it remains in<br />
AWAKE state in order to receive its traffic; otherwise, the station returns to PS<br />
mode until the next ATIM window is started. Note that: “• Due to the absence of a<br />
reference station such as the AP, the instantaneous state of a station (awake or<br />
doze) can only be estimated by all other stations of the ad hoc network (e.g.,<br />
according to the history of past transmissions). In this topology, the standard does<br />
not specify any methodology for estimating the power state of the stations.<br />
• The transmission and reception of the ATIM frames during the ATIM window<br />
occur according to DCF rules, i.e. according to the CSMA/CA access method. It means<br />
that a station could receive an ATIM frame addressed to it-self, wait for the data, and<br />
yet not receive them because of congestion on the shared channel. In conclusion, the<br />
Wi-Fi standard specifies only one low-power state, the Doze state.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
35<br />
2012
Advantage and disadvantage<br />
Wireless techniques provide many advantages, but leads to some disadvantage as<br />
well. The disadvantage of Wi-Fi network is the power consumption that is required<br />
before a transmission can be approved compares to Bluetooth which is extremely<br />
low in short ranges. But on the other hand Wi-Fi is more convenient when<br />
transmission of data is required for long range and power consumption is not an<br />
issue.<br />
Figure 13: Wi-Fi Operation<br />
Wireless Fidelity (Wi-Fi Technology) provides so much entertainment and<br />
information than before with because it enables all devices like PC, games, mp3<br />
player, smart phone, laptop, printer and other tangential. The uses of the Wi-Fi<br />
Technology contain any type of WLAN product support any of the 802.11 together<br />
with dual-band, 802.11a, 802.11b. Wi-Fi Technology is through accessible hot Spots<br />
like Home, Office, Airports, Hotels, Railway stations, Restaurants etc.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
36<br />
2012
Bluetooth (IEEE 802.15.1)<br />
Introduction<br />
Bluetooth is wireless technology where devices can communicate with each other<br />
within a short range. The specification is based upon the Radio Frequency (RF)<br />
operating in the unlicensed 2.4GHz ISM (Industrial, Scientific and Medical) band and<br />
the technique is based on low-cost, short-range radio link which makes it easy to ad-<br />
hoc connections for stationary and mobile communication environments. The<br />
specification is available for areas such as short-range, point-to-multipoint, voice<br />
and data transfer.<br />
Bluetooth technology is a wireless protocol that connects electronic devices while<br />
they are close to each another like computers, phones up to a distance of 100<br />
metres. There are three class categories of range - Class 1, Class 2 and Class 3, which<br />
the operation of the device depends on. The highest range of operation falls under<br />
Class 1 Radios, which is of 100 meters or 300 meters range. This category is<br />
specifically used in case of the industries and generally not for domestic purpose.<br />
The second highest range is Class 2 Radios, with an operation range of 10 meters or<br />
30 meters. This category has found its scope in case of the mobile devices. Lastly, the<br />
Class 3 Radios is used to operate the devices within a very short range of 1meter or<br />
3 feet.<br />
Bluetooth connects a device to the other through the latest network system -<br />
commonly called "Piconets". This technology smartly operates at 2.40 GHz to 2.485<br />
GHz ISM band, while only the former (i.e. 2.40 GHz) is unlicensed and easily<br />
available in most parts of the world. ISM, here, refers to Industrial, Scientific and<br />
Medical band,<br />
Bluetooth technology uses spread spectrum, frequency hopping and full-duplex<br />
signal at a rate -- as lower as - 1600 hops per second. AFH -- Adaptive Frequency<br />
Hopping is another supportive technology, which makes the Bluetooth interference<br />
tolerant. This enables Bluetooth to send and receive an interference free<br />
Email: david.irungu@stu.kuct.ac.ke<br />
37<br />
2012
transmission. The latest version of Bluetooth technology is 2.0+ Enhanced Data<br />
Rate, which supports a data rate of 3 Mbps.<br />
You can use Bluetooth for the following:<br />
Connect to your PC or laptop to transfer files.<br />
Share data with other users - including contacts, diary entries, documents<br />
and photos<br />
Connect to the Internet for surfing or email, via a Bluetooth-enabled modem<br />
or access point<br />
Connect to a Bluetooth GPS unit for satellite navigation<br />
Basic operation<br />
The functionality of Bluetooth communication is based on frequency hopping<br />
system with a nominal hopping rate of 1600 hops per second. The hops are divided<br />
into time slots, each 625 µsec long. The reason why Bluetooth uses frequency<br />
hopping is for low interference and fading. For full duplex transmission it uses TDD<br />
(Time Division Duplex) scheme and transmits by using GFSK (Gaussian Frequency<br />
Shift Keying) modulation.<br />
Bluetooth protocol uses a mixture of circuit and packet switching. The protocol<br />
stack can use an asynchronous connection–less (ACL) link for data and up to three<br />
simultaneous synchronous connection-oriented (SCO) links for voice or a mixture of<br />
asynchronous voice (DV packet type). When two or more application are connected<br />
to the same channel in Bluetooth network it creates a piconet, which contains a<br />
master device and up to seven active slave devices. Interference becomes greater in<br />
Bluetooth communication when the amount of piconet increases. This courses a<br />
packet collision that needs retransmission. The reason to this is because of the<br />
randomly frequency hopping system provided by the Bluetooth communication<br />
amongst a total of 79 frequencies. A Bluetooth device can function in either master<br />
or slave mode. The maximum number of device which a piconet can contain is eight<br />
Email: david.irungu@stu.kuct.ac.ke<br />
38<br />
2012
devices seven active slaves plus one master see figure 12, which is the simplest<br />
configuration of a Bluetooth network.<br />
To be able to communicate among Bluetooth devices some kind of function for<br />
device discovery has to be implemented before any communication can occur for<br />
packets to transmit on the wireless link between master and slave devices and vice-<br />
versa. The function for device discovery contains inquiry and paging. Its purpose is<br />
to help find the destination address for devices with unknown source. The inquiry<br />
function can also be used to detect which other Bluetooth devices are within the<br />
range. Under an inquiring sub state the detecting device gathers the Bluetooth<br />
devices addresses and clocks of all units that respond to the inquiry message. It can<br />
then, if desired, make a connection to any one of them by means of the page<br />
procedure, where the paged device is contacted directly and invited to join a<br />
piconet.<br />
Power management<br />
Figure 14: Piconet Configuration<br />
Power management is crucial aspect when it comes to wireless communication<br />
since it affects the battery lifetime. Conserving battery energy in mobile application<br />
Email: david.irungu@stu.kuct.ac.ke<br />
39<br />
2012
is a hard challenge since consideration has to be taken in the entire protocol stack<br />
layers. The design of Bluetooth devices should be constructed in such way that it<br />
won’t be a burden on the battery lifetime. To avoid high power consumption in<br />
Bluetooth radio different levels of power conserving mode are included in the<br />
constructions and some of them are sniff, hold and park. Some other aspects that<br />
need to be considered too are base band mode and adaptive transmission power.<br />
The absorbing range for Bluetooth devices is around 1-35 Am.<br />
Advantage and disadvantage<br />
The main disadvantage with Bluetooth is the limitation of how far it can reach<br />
considering the range between devices communicating with each other. Another<br />
aspect that is also disadvantage for Bluetooth technology is the number of devices<br />
that can be connected simultaneously is only 7 devices. Now the positive side of<br />
Bluetooth is the power consumption since it consume very little power while active<br />
it give a beneficial of long time battery life compare to Wi-Fi which only last for<br />
couple of hours.<br />
Comparison between Wi-Fi and Bluetooth<br />
Both have lots of features of connectivity, printing and transferring of data. The<br />
technology of Bluetooth is functional when broadcasting of information among<br />
more than two devices exist near as headset, modem, printer etc. while Wi-Fi<br />
operating on full scale because it is a much faster than Bluetooth. No doubt Wi-Fi<br />
and Bluetooth is the basic need of modern age but have some differentiation as<br />
follow.<br />
The hardware requirements of Wi-Fi and Bluetooth are entirely different, Through<br />
Bluetooth adapter you can connect devices with each other. While in Wi-Fi network<br />
you need an adapter, router and access point to enable connection. The bandwidth<br />
required for Bluetooth is only 800 kbps and for Wi-Fi 11Mbps bandwidth require.<br />
Wi-Fi network come into existence in 1991 and Bluetooth in 1994.The specification<br />
of Bluetooth is SIG and Wi-Fi is IEEE, and WECA.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
40<br />
2012
The specification of Bluetooth are a lot as the usage is very simple and various<br />
devices can be connected at a time .You can also switch between devices via<br />
Bluetooth. In other hand Wi-Fi network is a complex network and hard to configure.<br />
You can use various devices with Bluetooth such as automation devices, mobile<br />
phones, keyboard, and mouse. While in Wi-Fi network server, desktop, and<br />
notebook computer can be used. The rising issue of Wi-Fi and Bluetooth is the range<br />
because the range of Bluetooth is 10 meters and as compared to Bluetooth Wi-Fi<br />
offering 100 meters range for user to make it more beneficial for user.<br />
The security level of both Bluetooth and Wi-Fi is also different from each other.<br />
Bluetooth has only 2 level of password to wrap little distance and escape user time.<br />
Wi-Fi is a risky network because when lots of network attached with each other,<br />
then a hacker may try to access toward connected user and if succeed your data may<br />
be stolen. The power used for Bluetooth is very low and for Wi-Fi it should be high<br />
because Wi-Fi has long range of connectivity and Bluetooth have low. The<br />
similarities in both are frequency because both technologies have same frequency<br />
which is 2.4 GHz.<br />
Bluetooth is non-resident tools while Wi-Fi is residential equipment and its<br />
purposes. Both technologies are wireless but for different purposes. Wi-Fi used to<br />
get access toward local area network in working areas while Bluetooth used to carry<br />
out personal application as smart energy. As we know Wi-Fi is an Ethernet network<br />
and a user should configure it to get quick access to internet .Through Wi-Fi<br />
transformation of files become easy. Users can also use hands-free and headset<br />
devices because it has a strong connection. Wi-Fi proves good because it provide full<br />
strength network to enable fast connection. Same as Bluetooth is also very efficient<br />
technology for transformation of data between next to devices as telephone,<br />
modem, headset etc.<br />
Both technologies are different because Bluetooth is a slow as compared to Wi-Fi<br />
because Wi-Fi is a fastest technology therefore Wi-Fi also unsuited with it. Wi-Fi<br />
enabled more and more user to connect with each other via wireless network. So<br />
Bluetooth and Wi-Fi have some resemblance but these both technologies<br />
complement each other due to their feature of connectivity, sharing, and speed.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
41<br />
2012
When we use these two technologies we can get better and battiest result of any<br />
project. Wi-Fi enabled you to connect with internet without any wires but when you<br />
are exist in the range of hotspot, because Wi-Fi works only in its specific range while<br />
Bluetooth offering quick exchanging of data and sharing opportunity of printer,<br />
laptop etc. In short the use of both technologies increasing day by day and both has<br />
something to looking forward.<br />
IEEE 802.15.4 and Zigbee<br />
Introduction<br />
IEEE 802.15.4 or Zigbee is a wireless personal area network (PAN) which can be<br />
used in several areas. Some basic areas where it can be utilize are building<br />
automation, control devices, personal healthcare, PC peripherals and consumer<br />
electronics.<br />
The main technology used to develop the wireless network for IEEE 802.15.4 and<br />
Zigbee is based on the same layers which are physical (PHY) and medium access<br />
control (MAC). The huge different between IEEE 802.15.4 and Zigbee is the ability of<br />
which kind of topology can be provided by the network. More over the security level<br />
in Zigbee is higher compare to IEEE 802.15.4. The IEEE 802.15.4 can provide point-<br />
to-point and point-to-multipoint topology, called star topology, while Zigbee can be<br />
used for the one’s mentioned above plus cluster tree and mesh topology. To achieve<br />
the functionalities which Zigbee can provide two more layers from the Open System<br />
Interconnection (OSI) is added and those are Network and Application layers.<br />
Zigbee is a technology of data transfer in wireless networks. It has low energy<br />
consumption and is designed for multi-channel control system, alarm systems and<br />
lighting control. It has also other various home and industry applications. Zigbee is<br />
more economical than WIFI while Bluetooth protocol also consumes more energy,<br />
and has the greatest scattering of parameters of conventional like compatible units.<br />
This is caused by the fact that Bluetooth does NOT have a unified data transfer<br />
Email: david.irungu@stu.kuct.ac.ke<br />
42<br />
2012
standard. Still that does not mean that Zigbee is oriented towards autonomous use.<br />
Key links of Zigbee are network coordinators and routers.<br />
Moreover, Zigbee is the set of specs built around the IEEE 802.15.4 wireless<br />
protocol. The IEEE is the Institute of Electrical and Electronics Engineers, a non-<br />
profit organization dedicated to furthering technology involving electronics and<br />
electronic devices. The 802 group is the section of the IEEE involved in network<br />
operations and technologies, including mid-sized networks and local networks.<br />
Group 15 deals specifically with wireless networking technologies, and includes the<br />
now ubiquitous 802.15.1 working group, which is also known as Bluetooth®. The<br />
standard itself is regulated by a group known as the Zigbee Alliance, with over 150<br />
members worldwide.<br />
While Bluetooth® focuses on connectivity between large packet user devices, such<br />
as laptops, phones, and major peripherals; Zigbee is designed to provide highly<br />
efficient connectivity between small packet devices. As a result of its simplified<br />
operations, which are one to two full orders of magnitude less complex than a<br />
comparable Bluetooth® device, pricing for Zigbee devices is extremely competitive,<br />
with full nodes available for a fraction of the cost of a Bluetooth® node.<br />
Zigbee devices are actively limited to a through-rate of 250 Kbps, compared to<br />
Bluetooth’s much larger pipeline of 1Mbps, operating on the 2.4 GHz ISM band,<br />
which is available throughout most of the world.<br />
PHY layer<br />
The physical layer main purpose is to control the radio of the device to evaluate the<br />
energy detection (ED) inside the channel and thereby impose Clear Channel<br />
Assessment (CCA) for Carrier Sense Multiple Access with Collision Avoidance<br />
(CSMA/CA). This control has to be introduced to avoid failure in transmission of<br />
data within a channel. What consumes most power in devices containing the PHY<br />
layer is idle listening. The on-going consumption can be reduced by setting the<br />
Radio Frequency (RF) transceiver into sleep mode for a certain time and after that<br />
back to active mode. Three frequency bands is available in IEEE 802.15.4 with a<br />
Email: david.irungu@stu.kuct.ac.ke<br />
43<br />
2012
total number of 27 channels, where 16 is applied to the 2.4 GHz, 10 for 915 MHz and<br />
finally 1 for 868 MHz Devices that are constructed with IEEE 802.15.4 protocol stack<br />
implemented in it uses Direct Sequence Spread Spectrum (DSSS) to raise the<br />
bandwidth of the transmitted signal for a reliable communication. The physical<br />
specifications are given in the table 1 below.<br />
The IEEE 802.15.4 MAC Layer<br />
Table 2: Specification of IEEE 802.15.4<br />
Applications for IEEE 802.15.4 wireless sensor networks are target for home<br />
automation, home networking, PC peripherals, and home security and so on. Several<br />
of those application demands only low-to-medium bitrates around some few<br />
hundreds of kbps. The physical layer provides different bitrates depending on which<br />
frequency range is applied by the device. The frequency also decides how many<br />
channels are available within the frequency range. MAC protocol uses only one of<br />
these channels at a time. Since it is the MAC layer that is used to link communication<br />
between devices a general description of how device get associated and<br />
disassociated on the network follows below, which is according to the book:<br />
Protocols and Architectures for Wireless Sensor Networks.<br />
• A Full Function Device (FFD) can operate in three different roles: it can be a<br />
PAN coordinator, a simple coordinator or a device<br />
• A Reduced Function Device can operate only as a device A device must be<br />
associated to a coordinator node (which must be a FFD) and communicate<br />
only with this way forming a star network. Coordinator can operate in peer-<br />
to-peer fashion and multiple coordinators can form Personal Area Network<br />
Email: david.irungu@stu.kuct.ac.ke<br />
44<br />
2012
(PAN). The PAN is identified by a 16-bit PAN Identifier and one of its<br />
coordinators is designed as a PAN coordinator.<br />
A coordinator handles among others the following task:<br />
• It manages a list of associated devices. Devices are required to explicitly<br />
associate and disassociate with a coordinator using certain signalling<br />
packets.<br />
• It allocates short addresses to it devices. All IEEE 802.15.4 nodes have a 64-<br />
bit device address. When a device associates with a coordinator, it may<br />
request assignment of a 16-bit short address to be subsequently in all<br />
communications between device and coordinator. The assigned address is<br />
included in the association response packet issued by the coordinator.<br />
• In the beaconed mode of IEEE 802.15.4, it transmits regularly frame beacon<br />
packets announcing the PAN identifier, a list of outstanding frames, and other<br />
parameters. Furthermore, the coordinator can accept and process requests<br />
to reserve fixed time slots to nodes and the allocation are indicated in the<br />
beacon.<br />
• It exchanges data packets with devices and with peer coordinators.<br />
Basic operation<br />
The main focus of IEEE 802.15.4 protocol is its ability to deliver low power<br />
consumption and low-rate wireless communication devices. The following numbers<br />
of channels can be used in IEEE 802.15.4, which is 16 channels for ISM 2.4GHz, 10<br />
channels for ISM 900 MHz and 1 channel for 868 MHz The PHY-layer used in IEEE<br />
802.15.4 provides Link Quality Indicator (LQI) for the communication that occurs<br />
between transmitter and receiver in order to maintain good quality of signals<br />
transmitted between nodes. The MAC layer which is utilized in IEEE 802.15.4 for<br />
communication is based on Carrier Sense Multiple Access with Collision Avoidance<br />
(CSMA/CA) mechanism to get admission of the channels. Devices that are supported<br />
by IEEE 802.15.4 are Full Function Device (FFD) and Reduced Function Device<br />
(RFD). A device which is constructed as FFD can be used for both FFD and RFD in<br />
Email: david.irungu@stu.kuct.ac.ke<br />
45<br />
2012
communication. FFD can also be set as PAN Coordinator, Router or End Device,<br />
while RFD is only suitable as End Device. Communication for RFD can only occur<br />
with FFD. An overview of how the protocol stack is defined for IEEE 802.15.4 is<br />
shown in the figure below.<br />
There are two types of communication mode process available in IEEE 802.15.4 for<br />
avoiding interference in an environment where several system are running on the<br />
same frequency band. The modes which help to reduce the disturbance are beacon<br />
mode and non-beacon mode.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
Figure 15: IEEE 802.15.4 protocol stack<br />
The beacon mode is used with Star-type networks that are configured with the<br />
network management node, referred to also as the “PAN coordinator”, at the core.<br />
The PAN coordinator sends off a beacon signal at fixed intervals, while other nodes<br />
synchronize with this beacon signal and perform communications during allotted<br />
periods. Since only the node that has been singularly assigned by the coordinator<br />
gains exclusive use of the channel, it becomes possible to conduct communications<br />
in which no collisions can occur. This mode, therefore, is used for communications<br />
46<br />
2012
equiring low delay levels. The non-beacon mode, on the other hand, is a mode<br />
wherein the channel is accessed constantly with the CSMA-CA. When this mode is<br />
used in a mesh link, with which direct communications are conducted with<br />
peripheral nodes, each node can directly communicate with any other mode at any<br />
time, while each node can also be ready to receive data addressed to that node, at all<br />
times. This need for each node to constantly remain in a reception standby<br />
condition makes it impossible to conserve energy by conducting intermittent<br />
operations as in the case of the beacon mode.<br />
Energy conserving process is available in End Devices by introducing non-beacon<br />
mode in a Star-link situation where the master unit is set as constant reception in a<br />
standby condition. To achieve this behaviour the End Devices are set to interrupt<br />
periodically in suspended or standby condition. Introducing this function in the End<br />
Device will enable request to receive data is periodically sent to master unit from<br />
End Devices. This is the main flow pattern for data in sensor networks. The figure<br />
below is an example of two types of topology that is available in IEEE 802.15.4.<br />
Figure 16: IEEE 802.15.4 star and peer-to-peer<br />
Email: david.irungu@stu.kuct.ac.ke<br />
47<br />
2012
Power management<br />
The main focus for power management for IEEE 802.15.4 is based on low cost, low<br />
consumption and low data rate. Implying all this aspect together gives us a<br />
significant protocol that consumes extremely low power.<br />
Advantage and disadvantage<br />
There are several reasons for why it is convenient to impose IEEE 802.15.4 protocol<br />
for wireless sensor network in areas where the need for transmission of data-rate is<br />
low and requirement of energy conserving is a huge concern. First of all it provide<br />
long battery life, due to it low transmission speed which is about 250kbs/s.<br />
Secondly it is easy to imply in systems and quite simple to use for development of<br />
networks. IEEE 802.15.4 sensor networks can handle up to 64000 devices<br />
simultaneously compare to Bluetooth which can only support 7 devices at the same<br />
time. The only disadvantage that is provided by IEEE 802.15.4 protocol is it data<br />
transfer ability. [11]<br />
Figure 17: ZigBee Network Model<br />
Email: david.irungu@stu.kuct.ac.ke<br />
48<br />
2012
Figure 18: Xbee Modules (One to act as a Coordinator and the other as the Router)<br />
An important requirement for the wireless network is the plug & play functionality.<br />
XBee is the RF-module which provides the wireless communication and collection of<br />
information from the sensor nodes, for supervising of the water fluid, electricity or<br />
temperature, see figure 1. The server transmits further the information from the<br />
customer to the host system through internet connection.<br />
Figure 19: Principle Structure of the X-Bee System<br />
Email: david.irungu@stu.kuct.ac.ke<br />
49<br />
2012
Figure 20: Reference Pin out (Xbee)<br />
The DTR, RTS, RESET and RX pins (going into the Xbee) pass through a level<br />
converter chip that brings the levels to 3.3V. You can use pretty much anywhere<br />
between 2.7 to 5.5V data to communicate with the XBee. The breakout pins on the<br />
bottom of the board are not level shifted and you should try to keep data going<br />
directly into the XBee pins under 3.3V [12]<br />
Description of ZigBee technology<br />
ZigBee is a protocol that uses the 802.15.4 standard as a baseline and adds<br />
additional routing and networking functionality.<br />
The ZigBee protocol was developed for a network protocol that can be used in a<br />
variety of commercial and industrial low data rate applications. ZigBee is designed<br />
to add mesh networking to the underlying 802.15.4 radio. It is a technology for<br />
implementing low-cost, low-power wireless control networks requiring high<br />
flexibility in node placement.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
50<br />
2012
It is designed for low power applications, it fits well into embedded systems and<br />
those markets where reliability and versatility are important but a high bandwidth<br />
is not required.<br />
The table below shows the comparison between the various wireless technologies<br />
and their application<br />
FOCUS<br />
APPLICATION<br />
Zigbee and<br />
802.15.4<br />
Monitoring<br />
and Control<br />
Email: david.irungu@stu.kuct.ac.ke<br />
GSM/GPRS/CDMA 802.11 BLUETOOTH<br />
Wide area voice<br />
and data<br />
High speed<br />
internet<br />
Device<br />
connectivity<br />
BATTERY LIFE years 1week 1 week 1 week<br />
BANDWIDTH 250 kbps Up to 2 mbps Up to 54<br />
TYPICAL<br />
RANGE<br />
ADVANTAGES Low power<br />
mbps<br />
100+ meters Several kilometres 50-100<br />
cost<br />
Table 3: Zigbee Comparison<br />
Existing<br />
infrastructure<br />
meters<br />
Speed<br />
ubiquity<br />
Reason for the application of Xbee module in this system<br />
a. Large number of nodes/sensors<br />
b. Very low system/node costs<br />
c. Operation for years on inexpensive batteries<br />
d. Reliable and secure links between network nodes<br />
e. Easy deployment and configuration<br />
f. Global solutions<br />
720 kbps<br />
51<br />
10-100 meters<br />
Convenience<br />
g. ZigBee technology protocol has proven that NO message is lost on transfer of data.<br />
2012
CHAPTER 3<br />
Methodology of Implementation<br />
Equipment: -<br />
Bread Board<br />
Arduino Micro controller<br />
5V, 12V Dc Power supply<br />
Light Sensor<br />
Lamp (Light Source)<br />
Temperature Sensor<br />
Servo Motor<br />
Zigbee Technology (Two XBee Modules)<br />
Computer (Control Centre)<br />
Solar Panel<br />
Control grid<br />
Relays<br />
Operation of the Tracking System:<br />
First control grid was designed, which composed of a stand, servo motor and the<br />
solar panel surface. Two LDR’s were placed at the both ends of the control grid<br />
adjacent to each other. The LDR’s were used to sense the solar light intensity;<br />
important for the solar panel orientation, the output signal was read by the<br />
analogue inputs of the Arduino Microcontroller. The microcontroller was<br />
programmed such that, according to the input signal it controlled the servo motor<br />
by sending a signal via the digital pins. I wished to use the Mono-Crystalline solar<br />
module which is made from cells cut from single silicon crystals but replaced that<br />
with an adjustable DC power supply from the LAB 4 – K.U.C.T. The energy<br />
conversion rate efficiency for a mono – crystalline solar panel is 16% (Ideal Case).<br />
Email: david.irungu@stu.kuct.ac.ke<br />
52<br />
2012
The Solar Panel, temperature sensor, motor and light sensor were connected as a<br />
unit to the Arduino microcontroller and the source code saved separately. The servo<br />
motor rotated the panel in the X coordinates with respect to the position of the<br />
source of light (X-axis only since Nyeri town relies only on the equatorial axis). The<br />
Arduino reads the position of the light source via the deviation of the electrical<br />
readings from the 2 LDR sensors and carries out signal conditioning according to<br />
the program that was wrote and outputs the signal via the PWM port outputs of the<br />
Arduino (N.O 9) to rotate the servo motor. The Arduino reads the temperature from<br />
the temperature sensor and the energy stored in the battery.<br />
When the source of the light intensity is changed, the control grid tracks the source<br />
of light. This is achieved through the feedback loop of the sensors. The servo motor<br />
receives a signal from the microcontroller and adjusts so as to achieve the tracking<br />
mechanism. The servo motor can rotate 180 degrees (but 360 degrees in other<br />
types of servo motors) but in this case I intend to move it from East to West (0 – 180<br />
degrees) since Nyeri is located along the equator where we don’t have much<br />
equinox variation.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
53<br />
2012
Block Diagram of Improved solar tracking system (STS)<br />
Figure 21: Block Diagram<br />
Email: david.irungu@stu.kuct.ac.ke<br />
54<br />
2012
Signal Flow Diagram<br />
ACTUATORS<br />
Stepper Motors<br />
Mechanical System<br />
SENSORS<br />
Light Sensor<br />
Temperature Sensor<br />
Energy Sensor<br />
OUTPUT SIGNAL CONDITIONING AND<br />
INTERFACE<br />
Digital to Analogue Converter<br />
Figure 22: Signal Flow diagram<br />
Arduino as a Charger Controller<br />
The Arduino Microcontroller acts as a Charger Controller normally used in solar<br />
system circuitry. It has a total of 5 nodes connected to the Arduino of which I<br />
specifically chose two of them to connect to the Zigbee module via Java based<br />
programming so as to monitor energy usage.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
55<br />
INPUT SIGNAL CONDITIONING AND<br />
CIRCUIT INTERFACE<br />
Analogue to Digital Converter<br />
DIGITAL <strong>CONTROL</strong> ARCHITECTURE<br />
Arduino Microcontroller<br />
Xbee Module<br />
Router<br />
Xbee Module<br />
Coordinator<br />
Computer<br />
(Control Centre)<br />
2012
Street Light Implementation<br />
Increased efficiency of power collection is done by the tracker. Hence, efficiency in<br />
usage is fundamental and paramount. The dimmer circuit is used to control the<br />
energy harvested in a more efficient way. A day – night circuit was designed which<br />
would switch between the tracking system (day) and Dimmer circuit (night)<br />
systems. An LDR was used to detect light intensity between day and night and this<br />
would turn the lamp on and off automatically at dusk and dawn thus reduces power<br />
wastage in switching. Efficiency is increased by making the street light intelligent in<br />
the sense that it’s automated LED lamps used are more efficient than HID lamps,<br />
hence led lamp is the choice to increase efficiency. The dimmer circuit varied from<br />
6v to 12v and down to 6v according to the program written to the Arduino<br />
microcontroller. This period of switching was designed to take place between<br />
6.00PM and 6.00AM East African Time. Also in this circuit, nodes connecting to each<br />
relay switch of the dimmer circuit were connected to the Arduino as well as the<br />
node from the DAY-NIGHT switch which was also displayed in the X-CTU (Zigbee<br />
display terminal).<br />
Thus the Arduino (2560) shall perform the following functions due to its vast<br />
applications, i.e.:<br />
PWM (Pulse Width Modulation) Charging & Tracking system<br />
Direct, boost and float auto-charging modes<br />
High precision control<br />
LED indication of system working status<br />
Over load and short circuit protections<br />
Temperature compensation via LM35 sensor used<br />
Real time clock and display via 16 x 2 LCD display<br />
Optimized control for intelligent adjustment of control parameters<br />
Based on actual charging/discharging rates<br />
DC 12V or DC 24V auto work (Charger controller)<br />
Tx and Rx for Zigbee Protocol (Transmission and Receiver capability for<br />
advanced low cost low power communication)<br />
Email: david.irungu@stu.kuct.ac.ke<br />
56<br />
2012
Communication System Methodology<br />
Zigbee Technology is a communication protocol, where an X-Bee device is used for<br />
the protocol. At the end point device I used an LCD display for monitoring<br />
temperature and system process. After each of the system components was<br />
established and worked, the remaining bit was to interconnect them and have a<br />
single program to run it. I need to take readings from all nodes and transfer the data<br />
from a remote area to a central destination (Control centre). The data read is then<br />
sent from the Xbee module router and sent wirelessly to the other Xbee Coordinator<br />
and information is displayed on the Computer. I programmed the Xbee modules<br />
needed for the system Point to Point communication. I would have rather designed a<br />
Point to Multipoint communication but for our prototype system a P2P was more<br />
preferable.<br />
Xbee Module: It is a very small piece of hardware that can connect wirelessly with<br />
another using the Zigbee communication protocols. There are many different<br />
models, including aerial types and power outputs for which my case I am using an<br />
XB24 Series 2 model which can transmit 10m indoor or 100m outdoor which I have<br />
tested and experienced. Other models of XBee can transmit up to 1.6km outdoor,<br />
and that is interesting owing to the low power low cost and maintenance.<br />
Temperature Connection: I used an LM35 sensor device which is calibrated to<br />
record voltage deviation analogously and read via the Arduino pins. Since the<br />
readings vary between 0 -1023, I needed to change them to voltage and temperature<br />
(Celsius) using the following arithmetic equations:<br />
val = analogRead(analogPin); // Reading hexadecimal inputs from 0 - 1023<br />
volt = (val/1023)*5; // Converting Hexadecimal inputs to voltage by<br />
mapping 0-1023 to 0-5v of the voltage peaks of the Arduino.<br />
temp= volt*100; // Converts voltage read to Temperature in Celsius<br />
Email: david.irungu@stu.kuct.ac.ke<br />
57<br />
2012
Figure 23: LM35, LCD connections to Arduino<br />
Control Unit (Computer): Data graphing, analysis and storage, monitoring of<br />
energy production from on-site renewable solar energy, was used to help in<br />
Email: david.irungu@stu.kuct.ac.ke<br />
58<br />
assessing feasibility study of<br />
renewable energy systems and<br />
grid distribution. I used my<br />
personal laptop for this project. I<br />
downloaded software – X-CTU<br />
with interface shown below so as<br />
to configure and monitor XBee<br />
data. I used the X-CTU software to<br />
configure one of the XBee chip as<br />
Coordinator and the other as<br />
Router.<br />
Figure 24: X-CTU Software<br />
2012
Figure 25: XBee Connection - Coordinator and Router<br />
Results & Analysis<br />
The system behaves automatically in such a way that the solar panel follows the<br />
position of the sun light to enable full utilization of the sun rays (energy).<br />
For the street light application, the intensity of the LED Lamp was varied via the<br />
dimmer circuit configuration hence the efficient utilization of the stored energy.<br />
More to that data is collected from the available nodes: LDR’s, charge of the battery,<br />
and the temperature outside (via LM35 sensor) etc. and transferred via the Zigbee<br />
technology which is a more secure gateway than IR and Bluetooth.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
59<br />
2012
Thus basically the figure shown below shows LDR-Resistor connections on the<br />
Panel Grid which are used for automatic Tracking control system where the solar<br />
panel (Photovoltaic-<strong>PV</strong> system) follows the position of the sun and sends data<br />
(secure) via Zigbee technology<br />
Alongside shows the X-CTU data received after the router sends the node signals<br />
and received by the<br />
Coordinator. Shown are the two LDRs readings in hexadecimal, the voltage read,<br />
values read from LM35 temperature sensor as well as the Day-Night Switch which<br />
switches between day and night.<br />
Figure 26: LDRs connection on solar plate<br />
Email: david.irungu@stu.kuct.ac.ke<br />
60<br />
2012
Figure 27: XBee readings on the control Terminal<br />
Then by using a hyperterminal module, I was able to export and upload data got to<br />
various file formats: Spreadsheets, Word documents, Text file and most importantly<br />
in HTML format for the website. Thus with the last format I can be able to upload<br />
the data and it can be accessed by anyone doing analysis, research and system<br />
monitoring around the globe. The hyperterminal is not usually in Windows 7 & 8<br />
systems but only in XP operating systems thus I had to download and install the<br />
application<br />
Email: david.irungu@stu.kuct.ac.ke<br />
61<br />
2012
Figure 28: HyperTerminal<br />
Figure 29: XBee Database - Mozilla & Spread sheet formats<br />
Email: david.irungu@stu.kuct.ac.ke<br />
62<br />
2012
LUX Analysis: This project uses a light dependent resistor (LDR) as a sensor of the<br />
light, to track as shown in the connection above. I used the two LDRs so as to<br />
calibrate them against the lux meter (scale of 0 – 2000 lux). By using the Lux and the<br />
average LDRs outputs, the relationship between the light and the resistance is<br />
found. Since the tracking control system was already in place, all I had to do was<br />
simply get the average readings of the two LDRs and compare with the behaviour of<br />
the LUX meter. Thus the relationship is as shown in the figure below:<br />
(A number of readings for the output voltage was taken with the corresponding lux<br />
values and a relationship with the least resolution between them was found using<br />
excel program). A photo resistor or LDR is an electronic component whose<br />
resistance decreases with increasing incident light intensity. It can also be referred<br />
to as a light-dependent resistor (LDR), photoconductor, or photocell.<br />
Figure 31: Lux-LDR readings in Spread sheet<br />
Email: david.irungu@stu.kuct.ac.ke<br />
Figure 30: LDR<br />
63<br />
2012
Conclusion: - Possible Errors<br />
1. Systematic error<br />
2. Inaccuracy in resistors ,in power supply<br />
3. Environmental error like temperature<br />
4. Personal error<br />
5. Error in the instrument used ( lux meter ,multi-meter)<br />
6. Random error<br />
7. Unknown noise<br />
8. Loose Connections<br />
9. Common grounding: This proved to be a major problem while grounding the<br />
system and led to impromptu readings especially with the temperature<br />
sensor and Zigbee nodes. The grounding essence was revealed when there<br />
was presence of grounding from Arduino and from D.C Power supply used to<br />
run the dimmer circuit in this project.<br />
Email: david.irungu@stu.kuct.ac.ke<br />
Figure 32: Lux Analysis for the system<br />
64<br />
2012
References<br />
1. Stephen Karekezi, John Kimani and Albert Waudo. "Annotated Bibliography of<br />
Photovoltaics and Solar Water Heaters". Working Paper No. 175,<br />
AFREPREN/FWD, Nairobi, 1998.<br />
2. Tobias Jonsson, Gabriel Acquaye. 2008. Application of IEEE 802.15.4 for home<br />
network. THESIS WORK 2008, Electrical Engineering<br />
3. Stephen Karekezi and Timothy Ranja. "Renewables in Kenya". Working Paper No.<br />
177, AFREPREN/FWD, Nairobi, 1998.<br />
4. Stephen Karekezi. “The Potential of Renewable Energy Technologies in Africa”.<br />
Working Paper No. 273, AFREPREN/FWD, Nairobi, 2001. 18pp.Australian<br />
National University – http://solar.anu.edu.au/<br />
5. B.L, A.K Theraja. A Textbook of Electrical Technology. Volume II. AC & DC<br />
Machines. Chapter 39.<br />
6. Dhananjay V. Gadre, NehulMalhotra. Tiny AVR Microcontroller. Projects for the<br />
Evil Genius. Chapter 5. (Page 129)<br />
7. Sollatek. Solar Street Lighting. www.sollatek.com<br />
8. Arduino. www.arduino-windows.com<br />
9. www.en.wikipedia.org/wiki/Maximum_power_point_tracking<br />
10. www2.tech.purdue.edu/Eet/courses/ecet483/.../L21.<strong>pdf</strong> - United State<br />
11. http://www.wisegeek.com/what-is-zigbee.htm<br />
12. Arduino. www.arduino-ArduinoXbeeShield.com , http://www.ladyada.net/<br />
13. www.windsun.com/ChargeControls/ChargeCont.htm<br />
14. www.sollatek.com<br />
Email: david.irungu@stu.kuct.ac.ke<br />
65<br />
2012
APPENDIX:<br />
Plan of Action<br />
Table 4: Plan of action<br />
GANTT CHART<br />
26-Dec-2012<br />
26-Nov-2012<br />
27-Oct-2012<br />
27-Sep-2012<br />
28-Aug-2012<br />
29-Jul-2012<br />
29-Jun-2012<br />
30-May-2012<br />
30-Apr-2012<br />
31-Mar-2012<br />
1-Mar-2012<br />
31-Jan-2012<br />
1-Jan-2012<br />
Table 5: Gantt chart<br />
Email: david.irungu@stu.kuct.ac.ke<br />
66<br />
2012
LM35 DATASHEET<br />
COMBINED SOURCE CODE<br />
#include // initialize the library with the numbers of LCD interface pins<br />
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);<br />
int nightpin = 5; // analogue pin 5 for DAY – NIGHT switch<br />
int nightpin_val =0;<br />
int analogPin = 4; // analogue input from temperature sensor – LM35<br />
double val ;<br />
double volt,temp;// variable to store the value read<br />
#include // initialize the library with Servo motor<br />
Servo myservo; // create servo object to control a servo<br />
int leftLDR=2;<br />
int rightLDR=3;<br />
int leftLDR_value=0; // variable to store the value read<br />
int rightLDR_value=0;<br />
int controlpin=6;<br />
int servov=0;<br />
int swpin6v = 22; // switching system<br />
int swpin8v = 24;<br />
int swpin10v = 26;<br />
int swpin12v = 28;<br />
int voltage_in=0; //Analog pin for charger controller<br />
int voltage_out=1;//Analog pin<br />
Email: david.irungu@stu.kuct.ac.ke<br />
67<br />
2012
int LED1=40; // Digitalpin<br />
int LED2=42; // Digital pin<br />
int charge_enable=44; // Digital pin<br />
int x;<br />
int y;<br />
int chon = 5000; // charge on time<br />
int choff = 2000; // charge off time<br />
int CP = 389; // CP: Charge Point sets the battery charge voltage level. Vary from 346 - 410.<br />
void setup()<br />
{<br />
Serial.begin(9600);<br />
pinMode(controlpin, OUTPUT);<br />
pinMode (swpin6v, OUTPUT);<br />
pinMode (swpin8v, OUTPUT);<br />
pinMode (swpin10v, OUTPUT);<br />
pinMode (swpin12v, OUTPUT);<br />
pinMode (nightpin, INPUT);<br />
pinMode(LED1, OUTPUT);<br />
pinMode(LED2, OUTPUT);<br />
pinMode(charge_enable, OUTPUT);<br />
digitalWrite(LED1, LOW); // Global<br />
digitalWrite(LED2, LOW);<br />
digitalWrite(charge_enable, LOW);<br />
}<br />
void loop()<br />
{<br />
nightpin_val = digitalRead(nightpin);//night =1<br />
Serial.println(nightpin_val);<br />
if(nightpin_val==0 )//if daytime<br />
{<br />
int i=0;//initiate for timing<br />
do { // necessary for running two systems simultaneously with delay<br />
myservo.attach(9);<br />
leftLDR_value=analogRead(leftLDR);<br />
rightLDR_value=analogRead(rightLDR);<br />
Serial.print("left LDR reading=");<br />
Serial.println(leftLDR_value); //printing of vaues to serial monitor<br />
Serial.print("right LDR reading=");<br />
Serial.println(rightLDR_value);<br />
//digitalWrite(controlpin, HIGH);<br />
if (rightLDR_value>leftLDR_value)<br />
{<br />
servov = ++servov;<br />
}<br />
else if (rightLDR_value
myservo.write(servov);<br />
delay(50); //dealy for 50 ms before the next read<br />
i=++i;<br />
} while (i CP) digitalWrite(LED2, HIGH);<br />
else if (y y) & (y < CP) & (x > CP)) { // check input voltage and voltage on battery<br />
digitalWrite(charge_enable, HIGH); // turn on voltage to battery<br />
chon = (CP - y) * 1000;<br />
delay(chon); // ON wait<br />
digitalWrite(charge_enable, LOW); // turn off charge enable<br />
delay(choff); // OFF wait<br />
} // end if<br />
}<br />
else<br />
{<br />
digitalWrite (swpin6v, HIGH);<br />
digitalWrite (swpin8v, LOW);<br />
digitalWrite (swpin10v, LOW);<br />
digitalWrite (swpin12v, LOW);<br />
delay (5000);<br />
digitalWrite (swpin8v, HIGH);<br />
digitalWrite (swpin6v, LOW);<br />
digitalWrite (swpin10v, LOW);<br />
digitalWrite (swpin12v, LOW);<br />
Email: david.irungu@stu.kuct.ac.ke<br />
69<br />
2012
delay (5000);<br />
digitalWrite (swpin10v, HIGH);<br />
digitalWrite (swpin6v, LOW);<br />
digitalWrite (swpin8v, LOW);<br />
digitalWrite (swpin12v, LOW);<br />
delay (5000);<br />
digitalWrite (swpin12v, HIGH);<br />
digitalWrite (swpin6v, LOW);<br />
digitalWrite (swpin8v, LOW);<br />
digitalWrite (swpin10v, LOW);<br />
delay (5000);<br />
digitalWrite (swpin12v, LOW);<br />
digitalWrite (swpin6v, LOW);<br />
digitalWrite (swpin8v, LOW);<br />
digitalWrite (swpin10v, LOW);<br />
}<br />
}<br />
Email: david.irungu@stu.kuct.ac.ke<br />
70<br />
2012