Draft: Iot Technician (Smart City)
Draft: Iot Technician (Smart City)
(Smart City)
NSQF LEVEL - 4
DRAFT
DIRECTORATE GENERAL OF TRAINING
MINISTRY OF SKILL DEVELOPMENT & ENTREPRENEURSHIP
GOVERNMENT OF INDIA
NATIONAL INSTRUCTIONAL
MEDIA INSTITUTE, CHENNAI
Post Box No. 3142, CTI Campus, Guindy, Chennai - 600 032
IoT Technician (Smart City)
21 Iden�fy different IoT 130. Iden�fy various IoT Introduc�on to Internet of Things
Applica�ons with IoT Applica�ons in smart city viz. applica�ons in smart city& their
architecture. smart environment, smart dis�nc�ve advantages - smart
street light and smart water & environment, smart street light and
waste management. (07 hrs) smart water & waste management.
131. Recognise the func�ons of What is an IOT? What makes
various Internets of Things embedded system an IOT?
(Smart City) (IoT) applica�ons Role and scope of IOT in present
& their dis�nc�ve advantages. and future marketplace.
(08 hrs) Smart objects, Wired – Cables, hubs
132. Iden�fy and explore different etc. Wireless – RFID, WiFi,
func�onal building blocks of Bluetooth etc.
IOT enabled system / Different func�onal building blocks
applica�on. (08 hrs) of IOT architecture.
133. Test signal flow into IOT
enabled system/applica�on as
per the IOT architecture. (07
hrs)
DRAFT
22 Iden�fy, test and 134. Connect and test Arduino Arduino development board, Pin
interconnect board to computer and diagram, Func�onal diagram,
components/parts of execute sample programs from Hardware familiariza�on and
IoT system. the example list. (04 hrs) opera�ng instruc�ons.
135. Upload computer code to the
physical board Integrated development
IoT Technician (Smart City)
DRAFT
Arduino. (02 hrs)
141. Make Circuit and upload a
program to Interface of LCD
display with a microcontroller
to display characters. (03 hrs)
142. Rig up the circuit and upload a
program to interface
temperature sensor – LM35
with a controller to display
temperature on the LCD. (02
hrs)
143. Set up Circuit and upload
program to Interface DC motor
(actuator) with microcontroller
to control
on/off/forward/reverse
operations. (03 hrs)
144. Rig up Circuit and upload
program micro-controller to
switch on/off two lights using
IoT Technician (Smart City)
25-26 Revision
27-28 Identify and test various 145. Test main heart of embedded Fundamental idea of embedded
parts of embedded system / micro controller and system – with architecture and
system. micro controller hardware familiarization with different
board /Hardware platform of components. Aurduino-Uno board -
an embedded system such as simplest Boards such STM, NXP
Arduino-Uno. (04 hrs) development board etc.
146. Power up Arduino Uno board,
and test its Analog, Digital and Basics of development boards,
I/O pins. (03 hrs) Arduino Uno board its needs,
147. Test and explore sensors and hardware familiarization, pin
actuators such as LDR, diagram Other available
temperature sensors, development boards.
potentiometers, piezo-
element, servo, relay and push Concept of integrated development
buttons, LED, Tri colour LED. platform (IDE), Its components and
DRAFT
(05 hrs) Serial Monitor.
148. Download and install Arduino
Software IDE in computer Concepts behind sensing light,
system. (03 hrs) temperature, Motion and other
149. Test and familiarize with physical parameters.
different components of
Arduino IDE/Sketch. (04 hrs) Familiarization with the
150. Rig up the circuit to test Light Sensors/Actuators such as Light
dependent resistor to switch dependent resistor, LM35
ON/OFF based light intensity. temperature Sensors, 7 Segment
(05 hrs) display, 16x2 LCD display, Relays,
151. Rig up a test circuit to display DC motors (Actuators), Switches,
0-9 Numbers on 7 segment buzzer and motion sensors, Gas
display. (05 hrs) Sensors(MQ2 sensor), rain sensor,
152. Rig up test circuit to control IR/Obstacle/Proximity sensor,
the backlight 16x2 character Ultrasonic/Distance measurement
display. (03 hrs) Sensors.
153. Rig up the test circuit to Pin diagram / connection /
control the relay. (04 hrs) Schematic diagrams /Functional
IoT Technician (Smart City)
DRAFT
noise pollution Sensors. (05 levels using Electrochemical
hrs) Sensors for pollution control in
164. Measure PM2.5 and PM10 smart environment.
levels using Electrochemical Explore sensors used in weather
Sensors. (04 hrs) monitoring system.
165. Explore sensors used in Measurement and record of
weather monitoring system. Information such as air
(03 hrs) temperature, wind speed, dew
166. Measure air temperature, point temperature, atmospheric
humidity, atmospheric pressure etc. at predetermined
pressure and solar radiation. intervals by Weather Stations.
(04 hrs)
167. Measure and record
Information such as air
temperature, wind speed,
dew point temperature, wind
direction, relative humidity,
solar radiation and
atmospheric pressure at
predetermined intervals by
IoT Technician (Smart City)
DRAFT
real GPS location. (05 hrs)
31-32 Identify and test Wired & 175. Explore the interfacing of Introduction to Zigbee, Block
Wireless communication Zigbee module to create diagram of Zigbee based sensor
medium such as RS232, wireless sensor network. (02 network. Introduction to wireless
RS485, Ethernet, Fiber hrs) personal area network system.
Optic, Wi-Fi, GSM, GPRS, 176. Check the M2M Wireless Introduction to Zigbee networking
RF etc. and Sensor Network (WSN) in IoT system.
Communication Zigbee router, end device and Concept of interfacing of Bluetooth
protocol. coordinator configuration. (02 module to local sensor network,
hrs) interfacing of GSM module to make
177. Identify the interfacing of node as a gateway.
Bluetooth module to create IoT Gateway using WiFi and
local sensor network. (02 hrs) Ethernet.
178. Explore the interfacing of GSM Application of GPS satellites in
module to make node as a Location Sensors.
gateway. (02 hrs) Creation of a combine sensor
179. Apply IoT Gateway using WiFi appropriate for local climate
and Ethernet. (02 hrs) monitoring.
180. Check UART Communication, Concept of Weather Stations.
RS485 Communication,I2C
IoT Technician (Smart City)
DRAFT
satellites broadcasting signals collected by GPS and supply it to
that allow GPS receivers to user in usable format – such as
calculate their position. (02 maps, graphs, charts or reports.
hrs) Tooth technology, operating
187. Analyze the Vehicle Speed modes, Pin configuration.
using Tacking system. (01 hr)
188. Use Geographical information Basics of Wi-fi Modules, Pin
system(GIS) consisting of a configurations, Modes of
computer software data base operations.
system used to input, store,
retrieve, analyze and display Basics of GSM/GPS modules.
in map like form, spatially
referenced geographical Basic blocks of networking,
information for more detailed - Specifications, Standards and
analysis of city roads, types of cables,
transport, traffic etc. (02 hrs) - Concept of wired or wireless
189. Analyze the data collected by communication medium
GPS and supply it to user in - Different types of networks
usable format such as maps, - Design and establish networks
graphs, charts or reports using
IoT Technician (Smart City)
DRAFT
199. Understand Frequency Band,
Gain, Antenna and
Modulation for Wi-Fi. (02 hrs)
200. Understand Frequency Band,
Gain, Antenna and
Modulation for GPRS. (02 hrs)
201. Understand Frequency Band,
Gain, Antenna and
Modulation for RF. (02 hrs)
202. Design and Test Local Area
Networks over Ethernet & Wi-
Fi. (03 hrs)
203. Design and Test Cellular Wide
Area Networks over GSM &
GPRS. (02 hrs)
204. Design and Test Personal Area
Networks over RF. (02 hrs)
33 Identify Solar Panel Basic 205. Explore and test series Basics of solar Electricity, Working
Testing, Characteristics, combination of Solar PV principle of PV panel, advantages
Charge Controller Circuit. Modules. (02 hrs) of solar electricity and components
IoT Technician (Smart City)
DRAFT
LEDs, Dusk to Dawn sensing.
(04 hrs)
216. Explore the use of P V
Analyzer. (02 hrs)
217. On Grid Smart Energy
Management. (02 hrs)
34-35 Perform installation, 218. Install Linux Operating System Installation of Linux Operating
configuration and check porting. (02 hrs) System porting.
working of IOT devices, 219. Configure Local cloud & Configuration of Local cloud &
network, database, app server. (02 hrs) server. Over the air (OTA) node
and web services. 220. Configure Over the air (OTA) configuration.
Monitor environmental node. (02 hrs) GUI based parameter
parameters like 221. Explore GUI based parameter configuration, GUI based IoT
Temperature, Humidity, configuration, GUI based IoT application.
Air Quality, PM2.5, application. (03 hrs) IoT Gateway using Wi-Fi and
PM10, CO2 etc. 222. Check IoT Gateway using Wi- Ethernet.
Fi and Ethernet. (02 hrs) User access and data security
223. Work with the command line (Cyber security) by Cryptography.
and the Shell. (02 hrs) The command line and the Shell,
224. Manage directories and files. directories and files.
IoT Technician (Smart City)
DRAFT
dioxide sensors. (03 hrs) Study and test of Magnetic field for
236. Identify and Install Oxygen smart parking, IR for human
sensors. (02 hrs) presence.
237. Select and Install Volatile Study and test of Hall Effect (doors
organic compound sensor. and windows openings), Water
(04 hrs) presence, Liquid level, Liquid flow,
238. Identify and Install Air Temperature, Humidity for smart
temperature, Air humidity security.
atmospheric pressure and UV Calibration Kits testing for the
sensor. (02 hrs) sensor probes for water quality
239. Select and Install Nitric Oxide analysis.
(NO), Hydrogen Sulphide,
Sulphur Dioxide, Carbon
Monoxide, Ozone Soil
Moisture and Soil
Temperature sensor. (02 hrs)
240. Check Magnetic field for
smart parking, IR for human
presence. (03 hrs)
241. Measure Hall Effect (doors
IoT Technician (Smart City)
DRAFT
248. Communicate and verify the
parameters on DLMS server
software. (06 hrs)
249. Setup wired Local Area
Network and wireless
network. (04 hrs)
250. Setup environment for
Modbus TCPIP server client
testing. (05 hrs)
251. Communicate and Configure
Modbus devices through GSM
GPRS network. (06 hrs)
252. Setup Serial to Ethernet
protocol converter and verify.
(05 hrs)
253. Setup Serial to Wi-Fi protocol
converter and verify. (05 hrs)
254. Setup Serial to GPRS protocol
converter and verify. (05 hrs)
255. Setup Ethernet IoT Data
IoT Technician (Smart City)
DRAFT
responsive Web input parameters and output Development of Sample Web
Application using APIs (10 hrs) Application.
and generate reports 265. Map Web API to Widget / Generation and export of Reports
using templates. Control / Plugin. (20 hrs) User access and rights
266. Display and configure graphs, management.
charts and other ready to use
controls and widgets. (20 hrs)
267. Generate reports using
readily available API,
templates and to export it to
excel, word pdf and other
required formats. (10 hrs)
42-43 Identify and test Smart 268. Rig up circuit to lighting Fundamental science of lighting
Lighting system and its system and measure different system. Different types of light
components. parameter such as Voltage, Luminaries, Smart Light Drivers.
current, Lux using multimeter Lumen, Lux, Wattage etc. Sensor
and Lux Meter. (04 hrs) integrated, Non-sensor integrated
269. Test different types of Lighting lighting System.
System such as Outdoor, Different dimming control methods
Indoor, street Light etc. (06 in lighting system.
IoT Technician (Smart City)
DRAFT
pollution sensors and vary
brightness of light in
accordance with Fog/Smog
environment. Upload the code
to microcontroller and test for
proper operation. (06 hrs)
277. Test System architecture of
smart lighting and Identify
Wired–DALI, GREENBUS2,
etc.
Wireless
Hybrid (10 hrs)
44-45 Identify, select, install 278. Install, test and Basic concepts of Smart Light-
and troubleshoot troubleshooting of Smart Working Principle of Solar street
different module / Light. (04 hrs) light, sensors used in street light
devices used in SMART 279. Install and test Solar street like dusk to dawn, Temperature
Street Light based on IoT light. (04 hrs) sensor.
and Cloud Technology. 280. Execute testing of sensors Solar battery management system -
used in street light like dusk to Basic concepts battery, types,
IoT Technician (Smart City)
DRAFT
details. (08 hrs)
46 Identify, select, install 289. Install LED display board. (04 Concept of Smart parking for better
and troubleshoot hrs) management of car park availability
different module / 290. Test Magnetic field for smart and traffic in the city to improve
devices used in SMART parking. (10 hrs) citizen’s life - smart parking
Parking. 291. Execute installation of solution.
proximity sensor for boom Connected Parking - LoRa
barrier, IR Sensor for WAN private network for better
presence. (06 hrs) understanding and better
292. Apply full stack solution to management of car park
deal with all aspects of availability.
parking including high level Use of proximity sensor, IR Sensor
tools for management and in smart parking.
analytics software down to Full stack solution to deal with all
street level occupation aspects of parking.
sensors and enforcing tools.
(10 hrs)
47 Identify, select, install 293. Use Location Sensors, GPS & Concept of Smart Road & Traffic,
and troubleshoot GPS integrated circuits. (06 Live & Connected roads - Benefits -
different module / hrs) experience of quicker, safer and
IoT Technician (Smart City)
devices used in SMART 294. Apply Solar panel, Antenna more effective trips.
Traffic. &Radio Technology. (06 hrs) Weather monitoring at risky points:
295. Use scanner for real-time Low cost weather station(Rainfall,
traffic and pedestrian Temperature + Humidity, Wind
estimation. (06 hrs) speed & direction), Pluviometer,
296. Carry out Smartphone Vane sensor, Anemometer,
Detection (Bluetooth, Wifi, Temperature+ Humidity, Liquid
3G/4G-GPRS etc.). (04 hrs) presence sensor.
297. Detect liquid presence over Smartphone Detection (Bluetooth,
road by Liquid presence Wifi, 3G/4G-GPRS etc.).
sensor for Smart Security. (04 Structural Crack monitoring.
hrs)
298. Apply Linear displacement
sensor for Structural Crack
monitoring. (04 hrs)
48 Apply IoT Application for 299. Select and install pH, Cupric Smart Waste Management system:
Water & Waste (Cu2+), Silver (Ag+), Lithium Definition, Application, working,
Management. (Li+), Conductivity, challenges, constraints, Detection
Temperature for maintenance of rubbish levels in containers to
of water quality. (06 hrs) optimize the trash collection routes
300. Install Smart dustbin. (06 hrs) - Concept of Smart Garbage Bin.
301. Install GPS based tracking Maintenance of dry waste and wet
system for smart bin. (06 hrs) waste separately.
302. Maintain dry waste and wet Different components- Ultrasonic
waste separately. (06 hrs) sensors, Wifi module &Thingspeak
DRAFT
303. Install, test & apply different (IoT Platform) cloud.
components like Ultrasonic
sensors, Wifi module
&Thingspeak (IoT Platform)
cloud. (06 hrs)
49-50 Project Work/Industrial Visit (Optional)
Broad Area:-
a) Cloud based water quality analysis system using different sensors on IoT Explore.
b) Wireless Building automation system using PIR, camera and Alarm.
c) Environmental monitoring system using different sensors.
d) Responsive Web based IoT Smart rooftop management system with Over voltage & current
protection using 3 phase MODBUS energy meter with class 1.0 accuracy
e) Responsive Web application for Smart Energy management system having map view based
dash board with Three Phase 415 VAC input, Single MODBUS, Ethernet, SD Card Storage,
Remote GSM/GPRS connectivity.
51-52 Revision & Examination
IT & ITES Trade Theory for Exercise 2.1.130
Smart City - Identify different IoT Application with IoT Architecture
Identify various IoT application in smart city viz. smart environment, smart
street light, smart water and waste management
Objective:
• to identify various IoT application in smart city viz. smart environment, smart street light, smart water and
waste management.
DRAFT
1
IT & ITES Trade Theory for Exercise 2.1.131
Smart City - Identify different IoT Application with IoT Architecture
DRAFT
and monitor environmental conditions, cyclists or athletes intelligent interfaces to connect and communicate within
can find the most “healthy” trips and the city can respond social, medical, environmental and users context”. Huge
by adjusting the traffic or by planting more trees in some investments are currently being made in the IoT area to
areas. The data will be accessible to all citizens to support the delivery of a wide range services. Various
promote the creation of applications using real-time aspects of social and economic life are currently being
information for residents. Cities have become hubs for studied for IoT. Trust in IoT implies that investors do not
knowledge sharing. The technologies and solutions hesitate to commit to it financially; 100 million euros were
needed for creating smart cities are just beginning to invested by large corporations such as Telefónica, SK
emerge. Figure 1 describes an example of a smart city. Telecom, NTT Docomo Ventures, Elliott Management
Corporation and industry groups GDF SUEZ, Air Liquide
The investment in IoT will be crucial to build smart cities,
for research and development of IoT.
services as data using will generate most of the revenues.
Safety and security of smart homes will be the second The deployment of IoT needs communication standards
largest market in terms of service revenues. As for that seamlessly operate among the various objects.
services related to health and well-being, they should Several worldwide organizations are involved in
represent a market of $ 38 billion in 2020. A practical standardizing such communications. These include the
solution must find the trade-offs between effectiveness International Telecommunication Union (ITU), the
and privacy risks. A sophisticated attacker could, for Institute of Electrical and Electronics Engineers (IEEE),
example, take control of various intelligent devices such the Internet Engineering Task Force (IETF), Global
as lights, cameras, traffic lights, connected cars and Standard1 (GS1), the Organization for the Advancement
many other smart devices in cities. With over 50 billion of Structured Information Standards (OASIS), the
devices connected by 2020, municipalities will be very Industrial Internet Consortium (IIC), and several others.
2
Fig. 1: Development of smart cities
We briefly present some of these IoT standards and CoAP Java framework, Erbium, CoAP framework for
initiatives in Table 1. For example, the Internet of Things Contiki, and XMesh networking stack. At the application
Standard Global Initiative (IoT-GSI) supported by ITU layer, a large number of applications have been
made two recommendations: the ITU-T Y.2060 , which developed: Iobridge Thingspeak, Nimbits, Evrythng,
provides an overview of the concept of IoT and ITU-T Open.Sen.se, NanoService, exosite One, HP supposed,
DRAFT
Y.2061, which describes the conditions for the machine Isidorey, SensorCloud, Manybots, and so on. Figure 2
interface oriented towards applications. Various compares the 6lowPAN communication stack with other
standards were proposed by IEEE and IETF at different popular communication stacks.
levels for sensor networks based on the Internet Protocol
The Electronic Product Code Global (EPC Global)
(IP). For example, at the link layer, the IEEE 802.15.4
initiative of the organization Global Standard 1(GS1)
standard is more suitable than Ethernet in industrial
defines a unique individual identifier for identifying an
environments.At the network level, the IPv6 over Low
electronic product and the overall EPC network
power Wireless Personal Area Networks (6LoWPAN)
architecture that defines the organization of information
standard can adapt the IPv6 protocol for wireless
systems designed to ensure the exchange of information
communications. In 2011, the IETF published the IPv6
in an EPC network. One of its main components is the
Routing Protocol (RPL) standard for Low-power
Object Naming Service (ONS) which is based on the
Networks.
Domain Name System (DNS).
IETF has also launched a Working Group to standardize
In fact, in 1970 the European Article Numbering (EAN)
an application layer-oriented protocol for connected
standard emerged for product identification. However,
objects. The reference protocol is called the Constrained
this EAN barcode is actually used to identify a class of
Application Protocol (CoAP). CoAP (see RFC 7252 of
products, not individual instances within this class.
June 2014) provides methods and commands (such as,
Furthermore, in IoT, a unique IP address for each
HTTP Get) to query an object and change its status.
connection is required. This is why EPC was proposed
CoAP relies on UDP and can optionally use Datagram
by GS1 as a new standard. Meanwhile, OASIS† issued
Transport Layer Security (DTLS), to provide
various recommendations on network technologies in IoT
communication security. Operating systems used in IoT
and messaging technologies such as Message Queue
include: TinyOS, Contiki OS, MantisOS, Nano-RK,
Telemetry Transport (MQTT), Advanced Message
Android, Brillo (Google), Windows 10 IoT Core, LiteOS
Queuing Protocol (AMQP) and the Data Distribution
(Huawei), Mbed OS (ARM). In addition, several platforms
Service for Real-Time Systems (DDS). In 2014, a new
[10] have been developed for IoT: Arrayent, Californium
3
Industrial Internet Consortium was launched in order to machine and human-to-machine communications).
coordinate and establish the priorities and enabling W ireless Sensor Networks (W SNs), the sensing-
technologies of the Industrial Internet. There are actuation arm of the IoT, seamlessly integrate into urban
thousands of founding and contributing members of ICC infrastructure forming a “digital skin” around it. The
and they include: Bosh, Intel, IBM, Schneider, Huawei, information generated is shared across diverse platforms
Cisco, and several others. There are currently 19 Working and applications to develop a Common Operating Picture
Groups and teams working on different areas: Business (COP) of the city.
Strategy and Solution Lifecycle, Legal, Liaison, Security,
IoT Architecture
Technology Testbeds, Marketing and Membership, and
so on. Figure 3 summarizes some IoT’s protocols and IoT technologies are expected to be part of large scale
standards and Table 2 details the used acronyms. networks, with the number of devices in the thousands
and areas spanning several kilometers. In the rest of
A smart city is defined as a city connecting physical
this chapter, we focus primarily on the LoRa Ultra-Narrow
infrastructures, ICT infrastructures, social infrastructures
Band (UNB) technology which was developed by
and business infrastructures to leverage the collective
Semtech and SigFox’s.
intelligence of the city. A city can be smart through a
large deployment of IoT (especially through machine-to-
TABLE
DRAFT
4
Table 2 Acronym table operators (e.g., Swisscom, NKE Electronics, and others)
are deploying this technology for nationwide networks
because of its benefits over competing technologies.
These benefits include bi-directional communications,
mobility for asset tracking, security, and accurate
localization.
SigFox
SigFox created an ultra-narrowband IoT communications
system designed to support IoT deployments over long
ranges, e.g. in excess of 20 km between a client device
and a base station. SigFox uses license-exempt
spectrum for its product, namely the 868 MHz band in
Europe and 915 MHz band in the US, to transmit data
Fig. 2: Comparison of 6LowPAN’s stack with other over a narrow spectrum to and from connected objects.
stacks The ultra-narrow band operation is achieved using
bandwidth channels lower than 1 KHz transmitting data
payloads of 12 bytes uplink and 8 bytes downlink with a
LoRa
protocol overhead of 26 bytes. One of the advantages of
LoRa is a wireless technology designed to provide the SigFox devices is their resource efficiency. The power
low-power within wide-area networks (LPWANs) required demand is negligible because devices are only “on” when
for Internet of Things services. The technology offers a they are transmitting; this means that the power demand
mix of long range, low power consumption and secure is a fraction of that for a device operating on cellular
data transmission. The LoRa standard has been networks.
developed for IoT-type devices in regional or global
networks. This technology provides seamless
interoperability among devices without requiring any
complex installations. The services targeted include
home energy monitoring, alarm systems, remote health
monitoring, transportation, environment protection, and
so on. This specification defines the communication
protocol and system architecture for the underlying
network. It supports frequencies in the 433, 868 or 915
MHz ISM bands, depending on the area where it is
deployed. In Europe, it uses either Gaussian Frequency
DRAFT
Shift Keying (GFSK) or the proprietary LoRa modulation
system, which works with a version of Chirp Spread
Spectrum using 125 KHz channel bandwidth. LoRa
architecture is describes in Figure 4.
The hierarchical star-based topology is used by LoRa
networks. IoT devices in such networks can be servers,
end-points, or gateways. Data rates can range, in Europe,
from 0.3 Kbps up to 50 Kbps when channel aggregation Fig. 3: Internet of Things protocol stack
is employed. In North America, the minimum data rate is
0.9 Kbps because of Federal Communications
Commission (FCC) requirements. The payload for this
technology can range from 2 to 255 bytes. This standard
is optimized for low cost and battery operated sensors.
The devices are asynchronous and communicate only
when they have data ready to send whether event-driven
or scheduled. Power consumption is proportional to the
time devices spent while in the listening mode. LoRa is
gaining significant attention in IoT networks that are being
deployed by wireless network operators. It can be
deployed with minimum upfront infrastructure
investments and operating costs. When increased
network capacity is required, further Gateways can be
added. It has been estimated that the deployment cost
of this technology in unlicensed bands needs much less Fig. 4: LoRa architecture [20]
capital than even a 3G software upgrade. Major Telecom
5
interface, which can enable the control of main
communication parameters such as battery and
temperature settings, signal quality, volume of exchanged
data, and others. Networks based on SigFox technology
have already connected thousands of devices in several
international cities. They are currently operational in 14
countries, covering an area of more than 1.2 million km2
and reach 223 million people.
In general, IoT can be divided into three layers: the
perception layer, the network layer and the application
layer. The perception layer is mainly used to capture and
gather, distinguish and identify the information of objects
in the physical world. This layer includes RFID tags,
Sig Fox technology allows deploying very efficient, low cameras, GPS, sensors, laser scanners, and so on. The
throughput communications by limiting the number of network layer is used to forward packets over a reliable
antennas (base stations). For the same level of coverage, communication medium. The application layer processes
SigFox requires around 1,000 times less antennas and the data, aggregates various sources and displays it.
base stations, compared with some cellular networks. Table 3 compares different low power WAN technologies
This technology offers access to a service management used in IoT use case scenarios.
DRAFT
6
IT & ITES Trade Theory for Exercise 2.1.132
Smart City - Identify different IoT Application with IoT Architecture
Identify and explore different functional building blocks of IoT enabled system/
applications
Objective:
• to Identify and explore different functional building blocks of IoT enabled system/ applications.
DRAFT
Examples of gateways are LAN, WAN, PAN, etc.
Applications
Applications are another end of an IoT system.
Applications do proper utilization of all the data collected
and provide interface to users to interact with that
data. These applications could be cloud based
applications which are responsible for rendering data
collected. Applications are user controllable and are
delivery points of particular services.
Examples of applications are: smart home apps, security
system control applications, industrial control hub
applications, etc.
If we summarize the elements of IoT then we can say that
Sensors the raw data gathered by the sensors are transferred to
embedded processors. Processors transform raw data
Sensors are the front end of the IoT devices. They really to meaningful information and then again transfer it to
mean “things” in IoT. Their main task is to get necessary remote cloud based applications or database systems
data from surroundings and pass it further to database via gateway device connectivity. It then transfers to the
or processing systems. They must be uniquely findable applications for the proper applied usage and also for
from there IP address because they are basic front end data analysis via big data.
interface in the large network of other
7
IT & ITES Trade Theory for Exercise 2.1.133
Smart City - Identify different IoT Application with IoT Architecture
Test signal flow into IoT enabled system/ applications as per the IoT architecture
Objective:
• to test signal flow into IoT enabled system/ applications as per the IoT architecture.
DRAFT
and it implies that different environments are having a be used as a medium to connect and control office
wide range of applications which can be deployed. appliances under the Internet of Things(IoT)
These can be grouped into the following domains: • System Architecture: There are different techniques
Smart Interactive Office Automation Smart Museum and devices can be used to implement this system.
System We can use Arduino or Raspberry Pi web-based,
email-based, mobile based, SMS based, Zigbee
Smart Air and Sound Pollution Monitoring System Smart based, Cloud-based, etc. In this system the IoT
Car Parking System devices that are used are listed in Table 1: Figure 1
Smart Gym System shows a block diagram of a system where the main
controller is Raspberry Pi which is connected with
Smart Irrigation System electrical appliances(fan, light, etc) via a relay module.
Smart Garbage Monitoring System Smart Healthcare • The system can use Wi-Fi or Ethernet port for
System connection of Internet. To operate this system we have
Smart Wild Animal Intrusion Detection System a mobile application which is basically an interface
between system and users. The mobile application
Smart Traffic Congestion Monitoring System In the provides facility to ON/OFF the electrical appliance,
above-listed applications domains, we distinguish sensing camera information, etc. As we can see in
between those applications that are directly relevant or figure 1, visitor counter. This module actually counts
near enough to our present-day livelihood and the future the number of visitors entered into office.
domains, which can only elaborate in a short time.
8
check weather visitor is entering into office or exiting from
office. The logic behind this is supposed one PIR sensor
is PIR1(outside) and another one is PIR2(inside). When
PIR1(outside) is cut followed by PIR2(inside) that means
a visitor to enter and when PIR2(inside) is cut followed
by PIR1(outside) then the visitor is exited from office as
shown in figure 2.
DRAFT
To implement this we used two PIR sensor placed at the
entrance door with some distance between them. The
main purpose of using the two PIR sensor is for detecting
the direction of visitors. In other words, we can say to
9
IT & ITES Trade Theory for Exercise 2.1.134 to 135
Smart City - Identify different IoT Application with IoT Architecture
Connect and test Arduino board to computer and execute sample programs
from the example list
Objective:
• to connect and test Arduino board to computer and execute sample programs from the example list.
DRAFT
Arduino Projects In order to complete the projects in this tutorial, you’ll
need to make sure you have the following items.
In this we’re going to help you create a few simple arduino
projects that are perfect for beginners. These basic Need the parts? Get the Arduino Starter Kit w/ Project
projects will help you understand how to set up the Ebook
Arduino software and then connect the components to
Download The Software
perform a specific action.
At this point, we’re ready to download the free software
If you’re completely brand new to Arduino, make sure
known as the IDE. The Arduino IDE is the interface
you download our free ebook below. This guide was
where you will write the sketches that tell the board what
created for the absolute beginner and will help you to
to do
understand the Arduino board along with its parts and
components. To install the software, you will need to click on the link
Tools and Parts Needed that corresponds with your computer’s operating system.
10
IT & ITES Trade Theory for Exercise 2.2.136
Smart City - Identify, test and interconnect components/ parts of IoT system
Write and upload computer code to the physical Arduino board micro controller
to sound buzzer
Objective:
• to write and upload computer code to the physical Arduino board micro controller to sound buzzer.
Requirement:
• Arduino Uno Board
• Breadboard – half size
• Jumper Wires
• USB Cable
• LED (5mm)
• Push button switch
• 10k Ohm Resistor
• 220 Ohm Resistor
PROCEDURE:
Upload the Blink Sketch
Now it’s time to upload the sketch (program) to the
Arduino and tell it what to do. In the IDE, there are built-
in example sketches that you can use which make it
easy for beginners.
To open the blink sketch, you will need to go
to File > Examples > Basics > Blink
DRAFT Next, you need to click on the verify button (check mark)
that’s located in the top left of the IDE box. This will
compile the sketch and look for errors. Once it says
Now you should have a fully coded blink sketch that looks “Done Compiling” you are ready to upload it. Click the
upload button (forward arrow) to send the program to
like the image below.
the Arduino board.
11
The built-in LEDs on the Arduino board will flash rapidly for a few seconds and then the program will execute. If
everything went correctly, the LED on the breadboard should turn on for a second and then off for a second and
continue in a loop.
DRAFT
12
IT & ITES Trade Theory for Exercise 2.2.137
S m a r t C i t y - Id e n t i f y, t e s t a n d i n t e r c o n n e c t c o m p o n e n t s / p a r t s o f Io T s y s t e m
• Connect the A0 pin of the Arduino to the same column • Then we will connect the other leg of the resistor to
where the LDR and resistor is connected (Since the pin number 13 (digital pin) of the Arduino
DRAFT
LDR gives out an analog voltage, it is connected to • and the shorter leg of the LED to the negative rail of
the analog input pin on the Arduino. The Arduino, with the breadboard
its built-in ADC (Analog to Digital Converter), then
13
IT & ITES Trade Theory for Exercise 2.2.138 to 139
Smart City - Identify, test and interconnect components/ parts of IoT system
Set up & test circuit to interface potentiometer with Arduino board and map to
digital values for eg- 0-1023
Objective:
• to set up and test circuit to interface potentiometer with Arduino board and map to digital values.
DRAFT
and ground, giving us a different analog input. When the
shaft is turned all the way in one direction, there are 0
volts going to the pin, and we read 0. When the shaft is
turned all the way in the other direction, there are 5 volts
going to the pin and we read 1023. In between,
analogRead() returns a number between 0 and 1023 that
is proportional to the amount of voltage being applied to
the pin. image developed using Fritzing. For more circuit
examples, see the Fritzing project page
In this example we use a variable resistor (a
potentiometer or a photoresistor), we read its value using With a photoresistor click the image to enlarge
one analog input of an Arduino or Genuino board and
we change the blink rate of the built-in LED accordingly.
14
DRAFT
image developed using Fritzing. For more circuit measure the voltage. These inputs do not draw almost
examples, see the Fritzing project page any current, therefore by Ohm’s law the voltage
measured on the other end of a resistor connected to
Connect three wires to the Arduino or Genuino board.
5V is always 5V, regardless the resistor’s value. To get a
The first goes to ground from one of the outer pins of the
voltage proportional to the photoresistor value, a resistor
potentiometer. The second goes from 5 volts to the other
divider is necessary. This circuit uses a variable resistor,
outer pin of the potentiometer. The third goes from analog
a fixed resistor and the measurement point is in the
input 0 to the middle pin of the potentiometer.
middle of the resistors. The voltage measured (Vout)
For this example, it is possible to use the board’s built in follows this formula:
LED attached to pin 13. To use an additional LED, attach
Vout=Vin*(R2/(R1+R2))
its longer leg (the positive leg, or anode), to digital pin 13
in series with the 220 ohm resistor, and it’s shorter leg where Vin is 5V, R2 is 10k ohm and R1 is the
(the negative leg, or cathode) to the ground (GND) pin photoresistor value that ranges from 1M ohm in darkness
next to pin 13. to 10k ohm in daylight (10 lumen) and less than 1k ohm
in bright light or sunlight (>100 lumen).
The circuit based on a photoresistor uses a resistor
divider to allow the high impedence Analog input to
15
IT & ITES Trade Theory for Exercise 2.2.140
Smart City - Identify, test and interconnect components/ parts of IoT system
Rig up the circuit and upload a program to control a relay switch on/off LED
light using Arduino
Objective:
• to rig up the circuit and upload a program to control a relay switch on/off LED light using Arduino.
• Breadboard or PCB
• Connecting jumper wire
• Power supply
• 1n4007 diode
• Screw terminal or terminal block
PROCEDURE:
Arduino Relay Control
When there is no voltage applied to the coil, COM
(common) is connected to NC (normally closed contact).
When there is some voltage applied to the coil, the
electromagnetic field produced, which attracts the
Armature (lever connected to spring), and COM and NO
(normally open contact) gets connected, which allow a
DRAFT
larger current to flow. Relays are available in many
ratings, here we used 6V operating voltage relay, which
allows 7A-250VAC current to flow.
The relay is always configured by using a small Driver
circuit which consists a Transistor, Diode and a
resistor. Transistor is used to amplify the current so that
full current (from the DC source – 9v battery) can flow
through a coil to fully energies it. The resistor is used to
provide biasing to the transistor. And Diode is used to
prevent reverse current flow, when the transistor is
LED Blinking is a very common and almost first program
switched OFF. Every Inductor coil produces equal and
for every embedded learner or beginner. In which we
opposite EMF when switched OFF suddenly, this may
blink an LED with having some delay. So today we are
cause permanent damage to components, so Diode must
here with the same project but here we will use an AC
be used to prevent reverse current. A Relay module is
bulb instead of normal LED and will blink an AC bulb.
easily available in the market with all its Driver circuit on
Whenever we need to connect any AC Appliance in our the board or you can create it on perf board or PCB like
embedded circuits, we use a Relay. So in this arduino below. Here we have used 6V Relay module.
relay control tutorial we will simply learn How to interface
Here to turn on the Relay with Arduino we just need
a Relay with Arduino. Here we are not using any Relay
to make that Arduino Pin High (A0 in our case) where
Driver IC like ULN2003 and will only use an NPN
Relay module is connected. Below given is Relay Driver
transistor to control relay.
Circuit to build your own Relay module:
Relay:
Relay is an electromagnetic switch, which is controlled
16
Relay Driver Circuit
DRAFT
17
IT & ITES Trade Theory for Exercise 2.2.141
Smart City - Identify, test and interconnect components/ parts of IoT system
Requirements: lines). Here we are using the LCD module in 4-bit mode.
First, I will show you how to display a plain text messages
• Arduino Uno
on the LCD module using arduino and then I have
• Microcontroller designed a useful project using LCD and arduino –
• LCD a digital thermometer. Before going in to the details of
the project, let’s have a look at the JHD162A LCD
• Jumper wires module.
• Computer system 16×2 LCD Module Pin Out Diagram
PROCEDURE: The JHD162A lcd module has 16 pins and can be
Interfacing LCD to Arduino – Display Text and operated in 4-bit mode or 8-bit mode. Here we are using
Characters on LCD Screen using Arduino the LCD module in 4-bit mode. Before going in to the
details of the project, let’s have a look at the JHD162A
In this guide, we’re learning how to interface LCD to LCD module.The schematic of a JHD162A LCD pin
Arduino and display text characters on LCD screen. diagram is given below.
W e’re interfacing 16×2 LCD to Arduino as a
demonstration with circuit and code. Let’s begin.
A Liquid Crystal Display commonly abbreviated
as LCD is basically a display unit built using Liquid
Crystal technology. When we build real life/real world
electronics based projects, we need a medium/device
to display output values and messages. The most basic
form of electronic display available is 7 Segment The name and functions of each pin of the 16×2 LCD
DRAFT
display – which has its own limitations. The next best module is given below.
available option is Liquid Crystal Displays which comes
Pin1(Vss):Ground pin of the LCD module.
in different size specifications. Out of all available LCD
modules in market, the most commonly used one is 16×2 Pin2(Vcc): Power to LCD module (+5V supply is given
LCD Module which can display 32 ASCII characters in to this pin)
2 lines (16 characters in 1 line). Other commonly used
Pin3(VEE):Contrast adjustment pin. This is done by
LCD displays are 20×4 Character LCD, Nokia 5110 LCD
connecting the ends of a 10K potentimeter to +5V and
module, 128×64 Graphical LCD Display and 2.4 inch TFT
ground and then connecting the slider pin to the VEE
Touch screen LCD display.
pin. The voltage at the VEE pin defines the contrast. The
In this article, we are going to learn how to interface lcd normal setting is between 0.4 and 0.9V.
to arduino with 2 examples – one being interfacing a 16×2
Pin4(RS):Register select pin.The JHD162A has two
LCD module to Arduino and the other being interfacing
registers namely command register and data register.
a 20×4 LCD module to Arduino.
Logic HIGH at RS pin selects data register and logic
Interfacing 16×2 LCD to Arduino uno LOW at RS pin selects command register. If we make
the RS pin HIGH and feed an input to the data lines (DB0
LCD modules form a very important part in many arduino
to DB7), this input will be treated as data to display on
based embedded system designs. So the knowledge on
LCD screen. If we make the RS pin LOW and feed an
interfacing LCD module to arduino is very essential in
input to the data lines, then this will be treated as a
designing embedded systems. This section of the article
command ( a command to be written to LCD controller –
is about interfacing an Arduino to 16×2 LCD. JHD162A
like positioning cursor or clear screen or scroll).
is the LCD module used here. JHD162A is a 16×2 LCD
module based on the HD44780 driver from Hitachi. The Pin5(R/W): Read/Write modes. This pin is used for
JHD162A has 16 pins and can be operated in 4-bit mode selecting between read and write modes. Logic HIGH at
(using only 4 data lines) or 8-bit mode (using all 8 data this pin activates read mode and logic LOW at this pin
activates write mode.
18
Pin6(E): This pin is meant for enabling the LCD module. light LED can be powered from the 3.3V source on the
A HIGH to LOW signal at this pin will enable the module. arduino board.
Pin7(DB0) to Pin14(DB7): These are data pins. The Pin16(LED-): Cathode of the back light LED.
commands and data are fed to the LCD module though
For knowing more about LCD module JHD162A and its
these pins.
pin functions, read this article: Interfacing 16×2 LCD
Pin15(LED+): Anode of the back light LED. When and 8051 microcontroller. The circuit diagram of
operated on 5V, a 560 ohm resistor should be connected interfacing LCD to arduino for displaying a text message
in series to this pin. In arduino based projects the back is shown below.
DRAFT
19
IT & ITES Trade Theory for Exercise 2.2.142
Smart City - Identify, test and interconnect components/ parts of IoT system
Requirements: • So that’s all info you need about LM35 for this
particular temperature display project using arduino
• Arduino UNO
uno. So lets get to LM35 temperature sensor
• LCD module interfacing with arduino!
• Temperature sensor • We are using Arduino Uno as our board and LM35
• Computer system can be connected to arduino as shown in circuit
diagram.
PROCEDURE:
• Note:- LM35 is an analog temperature sensor. This
• In this article, we are presenting a tutorial on how means the output of LM35 is an analog signal.
to interface LM35 and Arduino along with its program. Microcontrollers dont accept analog signals as their
Once we successfully interface arduino and lm35, we input directly. We need to convert this analog output
will go on to build a temperature display using arduino signal to digital before we can feed it to a
and a 16×2 LCD module which constantly monitors microcontroller’s input. For this purpose, we can use
temperature around the measurement field/range of an ADC( Analog to Digital Converter).If we are using
LM35 and displays the same on LCD module. So lets a basic microcontroller like 8051, we need to use an
get to building the project! external ADC to convert analog output from LM35 to
• LM35 is an analog, linear temperature sensor whose digital. We then feed the output of ADC ( converted
output voltage varies linearly with change in digital value) to input of 8051. But modern day boards
tem perature. LM35 is three terminal linear like Arduino and most modern day micro controllers
temperature sensor from National semiconductors. come with inbuilt ADC. Our arduino uno has an in
It can measure temperature from-55 degree celsius built 10 bit ADC (6 channel). We can make use of
to +150 degree celsius. The voltage output of the this in built ADC of arduino to convert the analog
DRAFT
LM35 increases 10mV per degree Celsius rise in output of LM35 to digital output. Since Arduino uno
temperature. LM35 can be operated from a 5V supply has a 6 channel inbuilt ADC, there are 6 analog input
and the stand by current is less than 60uA. The pin pins numbered from A0 to A5. Connect analog out of
out of LM35 is shown in the figure below. LM35 to any of these analog input pins of arduino.
20
IT & ITES Trade Theory for Exercise 2.2.143
Smart City - Identify, test and interconnect components/ parts of IoT system
DRAFT
In this project, I will show you how to achieve Speed and
Direction Control of DC Motor using Arduino UNO. It is a The circuit diagram, description and its working are
simple project using Arduino UNO and a few easily mentioned below.
available components to control the speed of rotation of
a DC Motor and also it direction of rotation. Circuit Diagram
Component Description
Arduino Uno
It is a Microcontroller Based prototyping board. The
Introduction microcontroller used on the Arduino Uno board is
ATmega328p. Arduino is responsible for controlling the
DC Motors are found everywhere: electronics, toys, fans, speed and direction of the motor with the help of other
tools, discs, pumps etc. DC Motor is an actuator that components.
converts the DC supply to rotation or movement.
2N2222
There are different types of DC motors:
It is an NPN transistor with an output current of 800mA.
• Brushed DC motor,
21
The maximum output current that is available from The pins 3 and 2 of the Arduino are connected to the
Arduino’s I/O pins is 50mA, which is not sufficient to drive base of Q1 and Q4 respectively. Pins 5 and 4 are
a motor. Hence, four transistors with high current connected to base of Q2 and Q3 respectively. All these
capability are used. connections are made through four 1 K&! resistors.
Circuit Design A DC Motor is an inductive load and can produce back
EMF when we are changing the direction. In order to
Arduino is the main processing unit of the project. The
eliminate the effect of any back EMF, four diodes are
wiper terminal of the POT is connected to the Analog
connected across the collector and emitter of each
Pin (A0) of the Arduino. The other terminals are
transistor.
connected to Vcc and GND. Four transistors are
connected as shown in the circuit diagram. Working
The aim of this project is to control the speed and
direction of a DC Motor without using a Motor Driver IC.
Hence, we need to form an H-bridge using transistors in
order to drive the motor. The working of the project is
explained here assuming all the connections are made
as per the circuit diagram.
The POT is connected to the analog pin A0 of the Arduino.
This is used to adjust the speed of the motor. The normal
operation of the motor is to rotate in forward direction.
When a button, which is connected to the Pin 7 of the
Arduino, is activated or pressed, the direction of the
rotation is reversed and continue to rotate in that direction
until the button is pressed once again.
With the load i.e. a DC Motor in the center, they form an
H – bridge. Transistors Q1 and Q4 form the backward For forward rotation of the motor, transistors Q2 and Q3
direction path while transistors Q2 and Q3 form forward must be turned on. Hence, the outputs 5 and 4 of the
rotation path. Arduino are high.
The inputs to the transistors are given from the Arduino.
DRAFT
22
IT & ITES Trade Theory for Exercise 2.2.144
Smart City - Identify, test and interconnect components/ parts of IoT system
Rig up circuit and upload program microcontroller to switch on/ off two lights
using Relay
Objective:
• to Rig up circuit and upload program microcontroller to switch on/off two lights using Relay.
Requirements: PROCEDURE:
• 1 Arduino UNO (or any Arduino compatible) Rig up Circuit and upload program micro-controller to
switch on/off two lights using.
• 1 Relay module (any 5v relay will work but you’ll need
other components) An simple, fun and useful device to impress your friends,
feel like a bon vivant, or simply turn the lights off in the
• 1 noise sensor FC-04 or similar
laziest way possible.
• 1 12v AC/DC adapter to power the Arduino
I set it to recognise two claps. Sometimes it can take
• A couple of female/male cables to connect the other repeating noises in the room (like coughing) by
components mistake, but can be improved to any kind of clapping
• 1 AC male plug pattern.
DRAFT
The FC-04 sensor has three pins. Connect VCC to the I’ve found out that some sound sensors return an analog
3.3v output pin and GND to GND on the Arduino board. value with the level of noise detected. The one I’m using
For this tutorial we will connect the OUT data to pin 2 on only returns a digital signal when it gets to the level set
the Arduino board, but you can use any digital pin. by the potentiometer in the sensor.
23
IT & ITES Trade Theory for Exercise 2.3.145
Smart City - Identify and test various parts of embedded system
Test main heart of embedded system / micro controller and micro controller
hardware board /Hardware platform of an embedded system such as Arduino-
Uno
Objectives:
• test the main heart of Arduino – UNO
• micro controller hardware board
• hardware platform of an embedded system.
DRAFT
and modules. discuss input/out of data (excepting the above), files or
Arduino UNO Pinout advanced C features. However, you will be able to
program and allow your Arduino to operate independently
The digital and analogue pins are capable of multiple of the computer, and you may power it with a separate
functions and it totally depends on your projects’ wall-mount power supply or even a battery.
requirement. If you want to use SPI modules then you
have to stick to SPI Pins and if you want to interface B. Arduino home page is shown below (https://
Serial module like GSM or GPS then you need to use www.arduino.cc/en/Guide/HomePage)
Serial Pins. We can also design software serial as well.
Arduino UNO Memory Features
Memories are of main concern while selecting a
microcontroller for your project. If you have bigger data
or code etc to save then you shouldn’t select this one, I
would recommend Arduino Mega. Although the SD card
option is always there, isn’t it? So, let’s have a look at its
memory features:
24
IT & ITES Trade Theory for Exercise 2.3.146
Smart City - Identify and test various parts of embedded system
Power up Arduino Uno board, and test its Analog, Digital and I/O pins.
Objective:
• to test its Analog, Digital and I/O pins.
• Breadboard – Half Size • Analog pin 4 (SDA) and pin 5 (SCA) also used for
TWI communication using Wire library.
• Jumper wires
Arduino Uno has a couple of other pins as explained
• (1) 10K Ω Resistor below:
• (1) Push Button Switch • AREF: Used to provide reference voltage for analog
inputs with analogReference() function.
Task 1: Test its Analog, Digital and I/O pins
• Reset Pin: Making this pin LOW, resets the
Arduino Uno is a microcontroller board based on 8-bit microcontroller.
ATmega328P microcontroller. Along with ATmega328P,
it consists other components such as crystal oscillator, Communication:
serial communication, voltage regulator, etc. to support Arduino can be used to communicate with a computer,
the microcontroller. Arduino Uno has 14 digital input/ another Arduino board or other microcontrollers. The
output pins (out of which 6 can be used as PWM outputs), ATmega328P microcontroller provides UART TTL (5V)
6 analog input pins, a USB connection, A Power barrel serial communication which can be done using digital
jack, an ICSP header and a reset button. pin 0 (Rx) and digital pin 1 (Tx). An ATmega16U2 on the
DRAFT
How to use Arduino Board board channels this serial communication over USB and
appears as a virtual com port to software on the
The 14 digital input/output pins can be used as input or computer. The ATmega16U2 firmware uses the standard
output pins by using pinMode(), digitalRead() and USB COM drivers, and no external driver is needed.
digitalWrite() functions in arduino programming. Each However, on Windows, a .inf file is required. The Arduino
pin operate at 5V and can provide or receive a maximum software includes a serial monitor which allows simple
of 40mA current, and has an internal pull-up resistor of textual data to be sent to and from the Arduino board.
20-50 KOhms which are disconnected by default. Out There are two RX and TX LEDs on the arduino board
of these 14 pins, some pins have specific functions as which will flash when data is being transmitted via the
listed below: USB-to-serial chip and USB connection to the computer
• Serial Pins 0 (Rx) and 1 (Tx): Rx and Tx pins are (not for serial communication on pins 0 and 1). A
used to receive and transmit TTL serial data. They SoftwareSerial library allows for serial communication
are connected with the corresponding ATmega328P on any of the Uno's digital pins. The ATmega328P also
USB to TTL serial chip. supports I2C (TWI) and SPI communication. The Arduino
software includes a Wire library to simplify use of the
• External Interrupt Pins 2 and 3: These pins can be
I2C bus.
configured to trigger an interrupt on a low value, a
rising or falling edge, or a change in value. Arduino Uno to ATmega328 Pin Mapping
• PWM Pins 3, 5, 6, 9 and 11: These pins provide an When ATmega328 chip is used in place of Arduino Uno,
8-bit PWM output by using analogWrite() function. or vice versa, the image below shows the pin mapping
between the two.
• SPI Pins 10 (SS), 11 (MOSI), 12 (MISO) and 13
(SCK): These pins are used for SPI communication.
25
// the loop function runs over and over again forever
void loop()
{ digitalWrite(LED_BUILTIN, HIGH); // turn the LED on
(HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off
by making the voltage LOW
delay(1000); // wait for a second}
Applications
• Prototyping of Electronics Products and Systems
• Multiple DIY Projects.
Software • Easy to use for beginner level DIYers and makers.
Arduino IDE (Integrated Development Environment) is • Projects requiring Multiple I/O interfaces and
required to program the Arduino Uno board. Download communications.
it here.
Arduino Uno 2D Model
Programming Arduino
Once arduino IDE is installed on the computer, connect
the board with computer using USB cable. Now open
the arduino IDE and choose the correct board by
selecting Tools>Boards>Arduino/Genuino Uno, and
choose the correct Port by selecting Tools>Port. Arduino
Uno is programmed using Arduino programming
language based on Wiring. To get it started with Arduino
Uno board and blink the built-in LED, load the example
code by selecting Files>Examples>Basics>Blink. Once
the example code (also shown below) is loaded into your
IDE, click on the ‘upload’ button given on the top bar.
Once the upload is finished, you should see the Arduino’s
built-in LED blinking. Below is the example code for
DRAFT
blinking:
// the setup function runs once when you press reset or
power the board
void setup()
{ // initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);}
26
IT & ITES Trade Theory for Exercise 2.3.147
Smart City - Identify and test various parts of embedded system
Test and explore sensors and actuators such as LDR, temperature sensors,
potentiometers, piezo- element, servo, relay and push buttons, LED, Tri color
LED
Objective:
• to explore the sensors and actuators such as LDR, temperature sensors, potentiometer, and piezo – elements,
servo, relay, push buttons, LED and Tri color LED.
DRAFT
wiper position determines the resistance ratio of the first
high resistance. There are many different symbols used resistor to the second resistor.
to indicate a photo resistor or LDR, one of the most
commonly used symbol is shown in the figure below. A potentiometer is also commonly known as a pot
The arrow indicates light falling on it. meter or pot. The most common form of pot meter is
the single turn rotary pot meter. This type of pot is often
Working Principle of Photo resistor (LDR) used in audio volume control (logarithmic taper) as well
Photo resistors work based off of the principle of as many other applications. Different materials are used
photoconductivity. Photoconductivity is an optical to construct potentiometers, including carbon
phenomenon in which the material’s conductivity is composition, cermet, wire wound, and conductive plastic
increased when light is absorbed by the material. or metal film.
When light falls i.e. when the photons fall on the device,
the electrons in the valence band of the semiconductor
material are excited to the conduction band. These
photons in the incident light should have energy greater
than the bandgap of the semiconductor material to make
the electrons jump from the valence band to the
conduction band.
Temperature sensors
A temperature sensor plays an important role in many
applications. For example, maintaining a specific
temperature is essential for equipment used to fabricate Piezo Element
medical drugs, heat liquids, or clean other equipment. A piezoelectric sensor is a device that uses the
For applications like these, the responsiveness and piezoelectric effect to detect changes in pressure,
accuracy of the detection circuit can be critical for quality acceleration, temperature, strain, or force by converting
control.
27
them to an electrical charge. A piezoelectric disc green LED will not detect light emitted by a red or yellow
generates voltage when deformed. The converse is also LED. All three LEDs will detect “white” light or light from
true; when voltage is applied, the piezoelectric material a blue LED. White light contains a blue light component
distorts. If attached to a metal diaphragm, it becomes a which can be detected by the green LED. Recall that
kind of speaker that can be used to create a high-pitched visible light wavelengths can be listed from longest
tone. All Electronics carries both non-encased and wavelength to shortest wavelength as Red, Orange,
encased piezo elements in various sizes and ratings. Yellow, Green, Blue, Indigo, Violet (remember the
mnemonic “Roy G. Biv”). Violet is the shortest wavelength
LED
light with the most energetic photons and red has the
When exposed to light photodiodes produce a current longest wavelength light with the least energetic photons
that is directly proportional to the intensity of the light. of all of the visible colors of light. LED’s with clear plastic
This light generated current flows in the opposite direction encapsulation will be more sensitive to broad-spectrum
to current in a normal diode or LED. As more photons hit illumination (like general room lighting) than LED’s with
the photodiode the current increases causing a voltage colored encapsulation (such as those included in the
across the diode. As the voltage across the diode ADALP2000 Analog Parts Kit).
increases the linearity decreases.
To use the LED as an optical detector, do not forward
In addition to emitting light, an LED can be used as a bias the LED into quadrant #1 of the current-voltage (I-
photodiode light sensor / detector. This capability may V) curve. (Quadrant 1 is when the operating voltage and
be used in a variety of applications including ambient current are both positive.) Allow the LED to operate in
light level sensor and bidirectional communications. As the solar cell mode, quadrant #4 (operating voltage is
a photodiode, an LED is sensitive to wavelengths equal positive, current is negative), or in the photodiode mode
to or shorter than the predominant wavelength it emits. quadrant #3 (operating voltage is negative, current is
A green LED would be sensitive to blue light and to some negative). In the solar cell mode, no applied bias voltage
green light, but not to yellow or red light. For example, a is used. The solar cell (or LED in this case) generates its
red LED will detect light emitted by a yellow LED and a own current and voltage.
yellow LED will detect light emitted by a green LED but a
DRAFT
28
IT & ITES Trade Theory for Exercise 2.3.148
Smart City - Identify and test various parts of embedded system
The process will extract and install all the required files
to execute properly the Arduino Software (IDE)
Proceed with board specific instructions
When the Arduino Software (IDE) is properly installed
you can go back to the Getting Started Home and choose
your board from the list on the right of the page.
DRAFT
Last revision 2016/08/09 by SM
The text of the Arduino getting started guide is licensed
under a Creative Commons Attribution-HYPERLINK
“http://creativecommons.org/licenses/by-sa/3.0/”Share
AlikeHYPERLINK “http://creativecommons.org/licenses/
by-sa/3.0/” 3.0 License. Code samples in the guide are
released into the public domain.
When the download finishes, proceed with the installation
and please allow the driver installation process when you
get a warning from the operating system.
Choose the components to install
29
IT & ITES Trade Theory for Exercise 2.3.149
Smart City - Identify and test various parts of embedded system
DRAFT
without too many options, menus and so on that could
languages ranging from Jave to C/C++ and so on. This
scare an inexperienced user. It is so easy that we do not
platform uses the plugins to extends its features and add
have to worry about how it works, we can focus only on
new platform support.
the development process. We write the Arduino code,
and the Arduino IDE compiles it and upload the compiled This is a plugin for Eclipse IDE that helps to develop
code into the Arduino board. That’s is. Arduino applications. You can download the plugin
directly from the Eclipse Marketplace. Of course, it is
Moreover, it is open source and it runs on several OS
required you install first the Eclipse C++ IDE. Once, this
such as Windows, Mac OS X, and Linux. Anyway, if you
plugin is installed in Eclipse IDE, you have to select the
do not feel comfortable with Arduino IDE there are several
platform or in other words the SDK that includes all the
alternatives you can use when developing your Arduino
libraries necessary to build the application. Once the
project. There are some missing features in Arduino IDE
plugin is configured, you are ready to develop your
that could bother you, especially if you are used to IDE
Arduino sketch. The IDE is essentially the Eclipse IDE
like Eclipse, Visual Studio or IntelliJ, just to name a few.
so if you are familiar with Eclipse you do not have
One missing feature in Arduino IDE, that really bothers
problems to use it. This IDE has all the features you
me, is the autocomplete. That is a way to predict the
have in the standard Arduino IDE such as Serial monitor
rest of the bothers me, is the autocomplete. That is a
to debug the Arduino sketch too.
way to predict the rest of the commands so that you do
not have to write it all. There are some other features I
30
IT & ITES Trade Theory for Exercise 2.3.150
Smart City - Identify and test various parts of embedded system
Rig up the circuit to test Light Dependent Resistor to switch ON/OFF based
light intensity
Objective:
• to test the Light Dependent Resistor to switch ON/OFF based light intensity.
DRAFT
Majority of street lights, outdoor lights, and a number of
indoor home appliances are typically operated and
maintained manually in many occasions. This is not only
risky, however additionally it leads to wastage of power
with the negligence of personnel or uncommon
circumstances in controlling these electrical appliances
ON and OFF. Hence, we can utilize the light sensor circuit
for automatic switch OFF the loads based on daylight’s
intensity by employing a light sensor. This article Working Principle of LDR
discusses in brief about what is a light dependent resistor, These devices depend on the light, when light falls on
how to make a light dependent resistor circuit and its the LDR then the resistance decreases, and increases
applications. in the dark.When a LDR is kept in the dark place, its
What is a Light Dependent Resistor? resistance is high and, when the LDR is kept in the light
its resistance will decrease.
An LDR or light dependent resistor is also known as
31
then the electrons get excited from the valence band to
the conduction band and number of charge carriers
increases.
Extrinsic Photo Resistors
These devices are doped with impurities and these
impurities creates a new energy bands above the valence
band. These bands are filled with electrons. Hence this
decrease the band gap and small amount of energy is
required in moving them. These resistors are mainly used
for long wavelengths.
Circuit Diagram of a Light Dependent Resistor
The circuit diagram of a LDR is shown below. When the
light intensity is low, then the resistance of the LDR is
high. This stops the current flow to the base terminal of
the transistor. So, the LED does not light. However, when
the light intensity onto the LDR is high, then the resistance
of the LDR is low.So current flows onto the base of the
first transistor and then the second
transistor.Consequently the LED lights.Here, a preset
Variation of LDR Resistance with Variation in Light resistor is used to turn up or down to increase or decrease
Intensity the resistance.
If a constant “V’ is applied to the LDR, the intensity of the
light increased and current increases. The figure below
shows the curve between resistance Vs illumination curve
for a particular light dependent resistor.
32
IT & ITES Trade Theory for Exercise 2.3.151
Smart City - Identify and test various parts of embedded system
DRAFT
are of two types, common cathode and common anode. Use 5V DC for powering the circuit.
In common anode type anodes of all the seven LEDs
The clock can be given to the pin 14 of IC2.
are tied together, while in common cathode type all
cathodes are tied together. The seven segment display D1 must be a seven segment common anode
used here is a common anode type .Resistor R1 to R7 display.
are current limiting resistors. IC 7446 is a decoder/driver All ICs must be mounted on holders.
IC used to drive the seven segment display.
33
IT & ITES Trade Theory for Exercise 2.3.152
Smart City - Identify and test various parts of embedded system
DRAFT
the HD44780 chip from Hitachi, a de facto standard in
the market for this kind of LCD. This is the same standard (click to enlarge)
used in the LCD library that comes with the Arduino IDE. Base Boarduino connection
To use the LCD Nanoshield, we provide an Arduino It is also possible to connect the LCd Nanoshield to our
library that allows you to easily control the LCD using Arduino-compatible microcontroller board, the Base
only two I/O pins of the I2C interface. HYPERLINK “https://www.circuitar.com/nanoshields/
modules/base-boarduino/index.html”Boarduino. The
connection is done in the same way as with the Base
Board, as shown in the picture below. You just need to
snap the boards together and upload our sample code
to verify it’s working (see the code samples section
below).
34
Connecting to a Base Boarduino (click to enlarge) Connecting to an Arduino UNO (click to enlarge)
Direct connection
By using the Mini Terminal HYPERLINK “https://
www.circuitar.com/nanoshields/modules/mini-terminal/
index.html”Nanoshield, it is possible to securely connect
the LCD Nanoshield to an Arduino equipped with a Base
Board or to a Base HYPERLINK “https://
www.c irc uita r.c om / nanos hields / m odu les /bas e-
boarduino/index.html”Boarduino. This connection uses
only five wires, and is useful when the LCD needs to be
mounted away from the Base Board – for instance when
if must be mounted on a panel or case. The diagram
below shows how to make that connection.
DRAFT
Mega. (optional)
GND GND Ground
Pinout table
35
IT & ITES Trade Theory for Exercise 2.3.153
Smart City - Identify and test various parts of embedded system
The six pins on the left side of the relay module connect
DRAFT
high voltage, and the pins on the right side connect the
component that requires low voltage—the Arduino pins.
36
• COM: common pin The set at the right consists of VCC and GND to power
up the module, and input 1 (IN1) and input 2 (IN2) to
• NC (Normally Closed): the normally closed
control the bottom and top relays, respectively.
configuration is used when you want the relay to be
closed by default, meaning the current is flowing The second set of pins consists of GND, VCC, and JD-
unless you send a signal from the Arduino to the relay VCC pins. The JD-VCC pin powers the electromagnet
module to open the circuit and stop the current. of the relay.
• NO (Normally Open): the norm ally open The connections between the relay module and the
configuration works the other way around: the relay Arduino are really simple:
is always open, so the circuit is broken unless you
• GND: goes to ground
send a signal from the Arduino to close the circuit.
• IN1: controls the first relay (it will be connected to an
Pin wiring
Arduino digital pin)
The low-voltage side has a set of four pins and a set of
• IN2: controls the second relay (it should be connected
three pins.
to an Arduino digital pin if you are using this second
relay. Otherwise, you don’t need to connect it)
• VCC: goes to 5V
DRAFT
37
IT & ITES Trade Theory for Exercise 2.3.154
Smart City - Identify and test various parts of embedded system
Requirements: We’re going to use the L298N motor driver that can
handle up to 3A at 35V. Additionally, it allows us to drive
• ESP32 DOIT DEVKIT V1 Board – read ESP32
two DC motors simultaneously, which is perfect to build
Development Boards Review and Comparison
a robot.
• DC motor
The L298N motor driver is shown in the following figure:
• L298N motor driver
• Power source: 4x 1.5 AA batteries or Bench power
supply
• 2x 100nF ceramic capacitors (optional)
• 1x SPDT slide switch (optional)
• Jumper wires
PROCEDURE:
Take a quick look on how the L298N motor driver works.
Then, we’ll show you an example on how to control the
speed and direction of a DC motor using the ESP32 with
Arduino IDE and the L298N motor driver.
L298N Motor Driver pinout
Let’s take a look at the L298N motor driver pinout and
see how it works.
DRAFT
The motor driver has a two terminal block in each side
for each motor. OUT1 and OUT2 at the left and OUT3
and OUT4 at the right.
• OUT1: DC motor A + terminal
• OUT2: DC motor A – terminal
• OUT3: DC motor B + terminal
L298N Motor Driver
• OUT4: DC motor B – terminal
There are many ways to control a DC motor. The method
we’ll use here is suitable for most hobbyist motors, that
require 6V or 12V to operate.
38
• If you send a PWM signal, you can control the speed
of the motor. The motor speed is proportional to the
duty cycle. However, note that for small duty cycles,
It’s important to note that despite the +12V terminal name, the motors might not spin, and make a continuous
with the setup we’ll use here (with the jumper in place) buzz sound.
you can supply any voltage between 6V and 12V. In this
tutorial will be using 4 AA 1.5V batteries that combined
output approximately 6V, but you can use any other
suitable power supply. For example, you can use a bench
power supply to test this tutorial.
In summary
• +12V: The +12V terminal is where you should connect
your power supply
Input pins
• GND: power supply GND
The input pins control the direction the motors are
• +5V: provide 5V if jumper is removed. Acts as a 5V spinning. Input 1 and input 2 control motor A, and input 3
output if jumper is in place and 4 control motor B.
• Jumper: jumper in place – uses the motors power • If you apply LOW to input1 and HIGH to input 2, the
supply to power up the chip. motor will spin forward;
Jumper removed: you need to provide 5V to the +5V • If you apply power the other way around: HIGH to
terminal. If you supply more than 12V, you should remove input 1 and LOW to input 2, the motor will rotate
the jumper backwards. Motor B can be controlled using the same
At the bottom right you have four input pins and two method but applying HIGH or LOW to input 3 and
enable terminals. The input pins are used to control the input 4.
direction of your DC motors, and the enable pins are Controlling 2 DC Motors – ideal to build a robot
used to control the speed of each motor.
If you want to build a robot car using 2 DC motors, these
• IN1: Input 1 for Motor A should be rotating in specific directions to make the robot
• IN2: Input 2 for Motor A go left, right, forward or backwards.
• IN3: Input 1 for Motor B For example, if you want your robot to move forward,
both motors should be rotating forward. To make it go
• IN4: Input 2 for Motor B backwards, both should be rotating backwards.
DRAFT
• EN1: Enable pin for Motor A To turn the robot in one direction, you need to spin the
• EN2: Enable pin for Motor B opposite motor faster. For example, to make the robot
turn right, enable the motor at the left, and disable the
There are jumper caps on the enable pins by default.
motor at the right. The following table shows the input
You need to remove those jumper caps to control the
pins’ state combinations for the robot directions.
speed of your motors.
Control DC motors with the L298N
Now that you’re familiar with the L298N Motor Driver,
let’s see how to use it to control your DC motors.
Enable pins
The enable pins are like an ON and OFF switch for your
motors. For example:
• If you send a HIGH signal to the enable 1 pin, motor
A is ready to be controlled and at the maximum speed;
• If you send a LOW signal to the enable 1 pin, motor A
turns off;
39
IT & ITES Trade Theory for Exercise 2.3.155
Smart City - Identify and test various parts of embedded system
If a buzzer operates from a low enough voltage and draws The buzzer used in this article has the part number
low enough current, it can be interfaced directly to an KPEG260 and the RS Components stock number: 535-
Arduino Uno pin. 8275, the brand is Kingstate.
The buzzer used in this example can operate from a This is a piezo buzzer that has built in circuitry that
voltage between 3 to 28V and draws only 4mA of current produces the audible buzzer tone. A plain piezo disk will
at 12V. When the current drawn by the buzzer was not work in this circuit as it does not have any circuitry to
measured at 5V, it was found that it only drew about drive it, although an Arduino sketch could be written to
1.1mA which is well within the drive capability of an drive a piezo disk that is connected to an Arduino pin.
Arduino Uno pin.
See the Arduino buzzer circuit if you want to connect a
buzzer to the Arduino that operates from a different
voltage to the Arduino or if you are using a buzzer that
draws more current than an Arduino pin can deliver.
DRAFT
Circuit Diagram
In this circuit, the positive lead of the buzzer is connected
to pin 13 of the Arduino, the negative lead of the buzzer
is connected to GND.
40
IT & ITES Trade Theory for Exercise 2.3.156
Smart City - Identify and test various parts of embedded system
Connect and test the motion sensor along with light/ Buzzer/ Streetlight and
also timer and area of motion detection
Objective:
• to connect and test the motion sensor along with light/ Buzzer/ Streetlight and also timer and area of
motion detection.
Introduction:
we will learn about PIR Sensor and how can it be used
as a Motion Sensor through the Arduino PIR Sensor
Tutorial. By going through this project, you can
understand how PIR Sensor works and how to hook up
a PIR Sensor to Arduino.
We have made a project using Arduino, PIR Sensor and
GSM Module called GSM based Home Security System
using Arduino. If you understand how a PIR Sensor
DRAFT
works, then you can many such interesting projects and
even more complex ones.
A PIR Sensor or a Passive Infrared Sensor is an
electronic device that measures the infrared (IR) light
emitted by the objects in its observable area. The term On the top of sensor board, there is a special type of
‘Passive’ in the PIR Sensor indicates that the sensor lens called Fresnal Lens that is covering up the actual
actually doesn’t emit any infrared light but rather passively Pyroelectric Sensor. The job of the Fresnal Lens is to
detects it that is emitted by its surrounding objects. focus all the infrared radiation onto the pyroelectric
sensor.
41
If you look at the back of the PIR Sensor board, the whole The first circuit consists of a PIR Sensor and an LED.
circuitry is housed there. The brain of the PIR Sensor When the PIR Sensor detects motions, the LED turns
Module is the BISS0001 PIR Motion Detector IC. Near ON. The duration for which the LED is ON can be
this IC, we have two potentiometers, one for adjusting adjusted with the help of Delay Adjust POT.
the Sensitivity and the other is for adjusting the delay
time.
Using Sensitivity Adjust, you can control the range of
field of view and in our sensor, it is up to 7 meters. Using
the Delay Time Adjust, you can control the duration for
which the Digital Out will stay HIGH when a moving object
is detected.
How PIR Sensor works?
PIR Sensors are complicated than most other sensors.
PIR Motion Sensor may seem simple when implemented
as all you need to do is check for a HIGH signal on the
Digital Out Pin of the Sensor whenever motion is
detected.
A similar PIR Sensor testing circuit is shown below but it
But, internally, there is a lot going on and the input and
consists of a buzzer. In order to drive the buzzer, an NPN
output of the sensor are dependent on several variables.
Transistor like BC547 or 2N2222 can be used. The
The actual PIR Sensor i.e. the one which is covered with buzzer will be activated when the sensor detects any
a lens, consists of two slots and both these slots are movement.
made up of IR Sensitive materials. Under normal
condition where there is no movement in front of the
sensor, both the slots in the Sensor detect same amount
of infrared radiation.
When there is movement in front of the sensor, like a
human or a cat, their radiation is interpreted by one of
the slots first and the differential output between the two
slots becomes positive.
As the person moves away, the second slot detects the
radiation and the differential output will become negative.
Based these output pulses, a motion is detected.
DRAFT
Testing the PIR Sensor
Since the Digital Out Pin of the PIR Sensor is either HIGH
or LOW based on the movement detected, you can build
a simple circuit to test the PIR Sensor.
42
IT & ITES Trade Theory for Exercise 2.3.157
Smart City - Identify and test various parts of embedded system
DRAFT
the anode LED, so it connects the same way in a circuit
as you would a regular LED.
To produce infrared LED from an IR LED, you just give
the LED sufficient voltage and it will emit infrared light.
Just place the DC power which the LED needs for power.
Check the datasheet of the IR LED in use to find out
how much voltage it needs. It will be called the forward
This circuit is very simple. voltage on the datasheet. Also check the maximum
forward current listed on the datasheet and use a resistor
When the IR phototransistor isn’t exposed to any infrared to make sure the LED does not receive more than this
light, there can be no current flow through the transistor, specification. Once the LED is supplied with the sufficient
because infrared light is what produces base current in current, it will emit infrared light. With it emitting IR light,
the transistor. The base current triggers a larger current now just point the IR LED to our original Infrared (IR)
from emitter to collector. Without infrared, there is no detector circuit. This will trigger the LED to light in the
base current. Therefore, no amplified current can be circuit. And, thus, our test will be complete.
produced.
43
IT & ITES Trade Theory for Exercise 2.3.158
Smart City - Identify and test various parts of embedded system
When water (due to rain fall) comes across the above Parts List
inputs, a low resistance is developed here. The preset R1 = 1M, R2 = 100K,
P1 is suitably adjusted such that any type of water across
P1 = 1M pre-set, can be replaced with a 1M fixed resistor
the sensing inputs triggers the IC appropriately.
IC = 555, C1 = 10uF/25V,
The sudden low resistance at pin #2 of the IC acts like a
DRAFT
pulse which exceeds the potential at pin #2 more than 1/ Simple Rain Sensor Circuit using a Single Transistor
3 of the supply voltage.
If you think the above circuit a bit over complex, then
This activation instantly makes the output of the IC go perhaps you could implement the design using a single
low, ringing the connected buzzer. The buzzer circuit is transistor and a resistor, as shown in the following image:
comprehensively explained here, if you wanted to build
The working of the above circuit is rather simple. When
one.
water droplets or rain droplets fall on the sensor device,
As long as the sensing input stays immersed under water, made using screw heads, the water bridges across the
the output continues with the above situation. screw heads allowing small electrical current to pass
across the metal, triggering the base of the transistor.
However the moment, water is removed from the
As soon as this happens, the transistor begins conducting
specified input terminals, the potential at pin #2 reverts
and amplifies the conduction across its collector/emitter
to less than 1/3 of the supply voltage, making the output
terminals.
go high, back to its original position, switching off the
buzzer. This results in the switching ON of the connected buzzer
which now begins buzzing or beeping indicating the
The above operation effectively indicates the
commencement of rain outside, and warning the user
commencement of a rain fall when the sensor is
regarding the same.
appropriately placed for the detection.
The charge inside the capacitor C1 keeps the buzzer
ringing for some period of time even after the water from
the sensing inputs is completely removed.
Therefore the value of C1 must be appropriately chosen,
or may be completely eliminated if the feature is not
required.
44
IT & ITES Trade Theory for Exercise 2.3.159
Smart City - Identify and test various parts of embedded system
Requirement:
Hardware:
• 1 x Arduino (I used UNO R3 but any model works)
• 1 x Ultrasonic sensor.
• A few female jumper cables.
• A few male jumper cables.
• 1 x A/B type USB cable (Usually included with Arduino)
Software:
• Arduino IDE
PROCEDURE:
Figure 2. Sent and reflected waves: ultrasonic sensor
How Does an Ultrasonic Sensor Work? basic operation.
An ultrasonic sensor is a device that uses ultrasonic Wiring an Ultrasonic Sensor to an Arduino Using
waves to measure an object’s distance. Ultrasonic TinkerCad Circuits
transducers — which are the microphone and speaker
With your basic understanding of how an ultrasonic
tandems — send and receive ultra-high frequency sound
sensor works, you are now ready to wire the device to
waves to obtain an object’s distance or proximity. The
an Arduino. To explore the operation of the ultrasonic
ultra-high frequency sound waves are reflected from an
sensor, you can build a virtual functional circuit
object’s surface creating a unique echo pattern.
using TinkerCad Circuits.
TinkerCad Circuits is a free online circuit simulator that
DRAFT
allows a variety of electrical and electronic circuits to be
simulated prior to wiring them on a real breadboard. You
can even test Arduino projects (including the code) with
TinkerCad Circuits. You can gain valuable electronics
knowledge through experimentation prior to committing
to building your physical circuit.
Figure 3 shows a functional ultrasonic sensor
Arduino project built with TinkerCad Circuits.
45
Figure 3. An online ultrasonic sensor and Arduino
TinkerCard Circuit.
Use Figure 4 as a reference if you have a breadboard to
experiment with the ultrasonic sensor.
DRAFT
You can use the ultrasonic sensor Arduino circuit built in Figure 5. The electrical wiring diagram for an actual
TinkerCad Circuits or the electrical wiring diagram shown ultrasonic sensor to an Arduino.
in Figure 5 to build your sensing device.
If you are using a 4-pin ultrasonic sensor, the normally
closed pin (NC) is wired to ground. You can place the
ultrasonic sensor as shown on the breadboard and with
jumper wires complete the wiring to the Arduino.
Here’s the circuit I built using a 4-wire jumper harness to
wire the ultrasonic sensor to the Arduino.
46
Figure 7. The 4-wire color-coded jumper wiring
connections.
You have now successfully wired an ultrasonic sensor
to an Arduino! You are now ready to install (upload) the
ultrasonic sensor code to the Arduino.
The Ultrasonic Sensor Code
The last part of the project is uploading the ultrasonic
sensor code to the Arduino. Connect the Arduino to your
desktop PC or laptop computer using a USB cable.
In Arduino IDE, enter the code shown below. You can
also download the code to your desktop PC or laptop
computer’s hard-drive. In the IDE, you can upload the
code by clicking the horizontal arrow.
This sketch reads a PING))) ultrasonic rangefinder and
returns the distance to the closest object in range. To do
this, it sends a pulse to the sensor to initiate a reading,
then listens for a pulse to return. The length of the
returning pulse is proportional to the distance of the object
from the sensor.
DRAFT
47
IT & ITES Trade Theory for Exercise 2.4.160
Smart City - Identify and select various types of sensors used in smartcity
DRAFT
embedded in smart phones and an integral part of the
Internet of Things (IoT). Sensors have been around for areas including hospitals, and meteorology stations to
a long time. The first thermostat was introduced in the report and predict weather.
late 1880s and infrared sensors have been around since 3. Pressure Sensors
the late 1940s. The IoT and its counterpart, the Industrial
Internet of Things (HYPERLINK “https://en.wikipedia.org/ A pressure sensor senses changes in gases and liquids.
wiki/Industrial_Internet_of_Things”IIoTHYPERLINK When the pressure changes, the sensor detects these
“h tt ps:// en.wikipe dia. org/wik i/ changes, and communicates them to connected
Industrial_Internet_of_Things”), are bringing sensor systems. Common use cases include leak testing which
usage to a new level. can be a result of decay. Pressure sensors are also useful
in the manufacturing of water systems as it is easy to
Broadly speaking, sensors are devices that detect and detect fluctuations or drops in pressure.
respond to changes in an environment. Inputs can come
from a variety of sources such as light, temperature, 4. Proximity Sensors
motion and pressure. Sensors output valuable Proximity sensors are used for non-contact detection of
information and if they are connected to a network, they objects near the sensor. These types of sensors often
can share data with other connected devices and emit electromagnetic fields or beams of radiation such
management systems. as infrared. Proximity sensors have some interesting use
Sensors are crucial to the operation of many of today’s cases. In retail, a proximity sensor can detect the motion
businesses. They can warn you of potential problems between a customer and a product in which he or she is
before they become big problems, allowing businesses interested. The user can be notified of any discounts or
to perform predictive maintenance and avoid costly special offers of products located near the sensor.
downtime. The data from sensors can also be analyzed Proximity sensors are also used in the parking lots of
for trends allowing business owners to gain insight into malls, stadiums and airports to indicate parking
crucial trends and make informed evidence-based availability. They can also be used on the assembly lines
decisions. of chemical, food and many other types of industries.
48
5. Level Sensors include mining, oil and gas, chemical research
andmanufacturing. A common consumer use case is the
Level sensors are used to detect the level of substances
familiar carbon dioxide detectors used in many homes.
including liquids, powders and granular materials. Many
industries including oil manufacturing, water treatment 9. Infrared Sensors
and beverage and food manufacturing factories use level
These types of sensors sense characteristics in their
sensors. Waste management systems provide a
surroundings by either emitting or detecting infrared
common use case as level sensors can detect the level
radiation. They can also measure the heat emitted by
of waste in a garbage can or dumpster.
objects. Infrared sensors are used in a variety of different
6. Accelerometers IoT projects including healthcare as they simplify the
monitoring of blood flow and blood pressure. Televisions
Accelerometers detect an object’s acceleration i.e. the
use infrared sensors to interpret the signals sent from a
rate of change of the object’s velocity with respect to
remote control. Another interesting application is that of
time. Accelerometers can also detect changes to gravity.
art historians using infrared sensors to see hidden layers
Use cases for accelerometers include smart pedometers
in paintings to help determine whether a work of art is
and monitoring driving fleets. They can also be used as
original or fake or has been altered by a restoration
anti-theft protection alerting the system if an object that
process.
should be stationary is moved.
10.Optical Sensors
7. Gyroscope
Optical sensors convert rays of light into electrical signals.
Gyroscope sensors measure the angular rate or velocity,
There are many applications and use cases for optical
often defined as a measurement of speed and rotation
sensors. In the auto industry, vehicles use optical sensors
around an axis. Use cases include automotive, such as
to recognize signs, obstacles, and other things that a
car navigation and electronic stability control (anti-skid)
driver would notice when driving or parking. Optical
systems. Additional use cases include motion sensing
sensors play a big role in the development of driverless
for video games, and camera-shake detection systems.
cars. Optical sensors are very common in smart phones.
8. Gas Sensors For example, ambient light sensors can extend battery
life. Optical sensors are also used in the biomedical field
These types of sensors monitor and detect changes in
including breath analysis and heart-rate monitors.
air quality, including the presence of toxic, combustible
or hazardous gasses. Industries using gas sensors
DRAFT
49
IT & ITES Trade Theory for Exercise 2.4.161
Smart City - Identify and select various types of sensors used in smartcity
DRAFT
manufacturing, sensors are used to monitor the Motion sensors
temperature of machines. In agriculture, these can be
used to monitor the temperature of soil, water and plants. Motion sensors are not only used for security purposes
but also in automatic door controls, automatic parking
Tem perature sensors include therm ocouples, systems, automated sinks, automated toilet flushers,
thermistors, resistor temperature detectors (RTDs) and hand dryers, energy management systems, etc.
integrated circuits (ICs).
You use these sensors in the IoT and monitor them from
your smartphone or computer.
HC-SR501 passive infrared (PIR) sensor is a popular
motion sensor for hobby projects.
50
Gas sensors determine force and altitude, respectively. In vehicle, tyre
pressure monitoring system (TPMS) is used to alert the
These sensors are used to detect toxic gases. The
driver when tyre pressure is too low and could create
sensing technologies most commonly used are
unsafe driving conditions.
electrochemical, photo-ionisation and semiconductor.
With technical advancements and new specifications,
there are a multitude of gas sensors available to help
extend the wired and wireless connectivity deployed in
IoT applications.
Image sensors
These sensors are found in digital cameras, medical
imaging systems, night-vision equipment, thermal
imaging devices, radars, sonars, media house and
biometric systems. In the retail industry, these sensors
Smoke sensors are used to monitor customers visiting the store through
IoT network. In offices and corporate buildings, they are
Smoke detectors have been in use in homes and
used to monitor employees and various activities through
industries for quite a long time. With the advent of the
IoT networks.
IoT, their application has become more convenient and
user-friendly. Furthermore, adding a wireless connection
to smoke detectors enables additional features that
increase safety and convenience.
DRAFT
Accelerometer sensors
These sensors are used in smartphones, vehicles,
aircrafts and other applications to detect orientation of
an object, shake, tap, tilt, motion, positioning, shock or
vibration. Different types of accelerometers include Hall-
effect accelerometers, capacitive accelerometers and
piezoelectric accelerometers.
Pressure sensors
These sensors are used in IoT systems to monitor
systems and devices that are driven by pressure signals.
When the pressure range is beyond the threshold level,
the device alerts the user about the problems that should
be fixed. For example, BMP180 is a popular digital
pressure sensor for use in mobile phones, PDAs, GPS
navigation devices and outdoor equipment. Pressure
sensors are also used in smart vehicles and aircrafts to
51
IR sensors Ultrasonic Sensor
These sensors can measure the heat emitted by objects. A transducer that works on the principle similar to the
They are used in various IoT projects including healthcare sonar or radar and estimate attributes of the target by
to monitor blood flow and blood pressure, smartphones interpreting is called as ultrasonic sensors or
to use as remote control and other functions, wearable transceivers. There are different types of sensors that
devices to detect amount of light, thermometers to are classified as active and passive ultrasonic sensors
monitor temperature and blind-spot detection in vehicles. that can be differentiated based on the working of
sensors.
Proximity sensors
These sensors detect the presence or absence of a
nearby object without any physical contact. Different
types of proximity sensors are inductive, capacitive,
photoelectric, ultrasonic and magnetic. These are mostly
used in object counters, process monitoring and control.
DRAFT
52
IT & ITES Trade Theory for Exercise 2.4.162
Smart City - Identify and select various types of sensors used in smartcity
DRAFT
A device that detects the presence or absence of a nearby
By definition, “A device, used to measure amount of heat object, or properties of that object, and converts it into
energy that allows to detect a physical change in signal which can be easily read by user or a simple
temperature from a particular source and converts the electronic instrument without getting in contact with them.
data for a device or user, is known as a Temperature
Proximity sensors are largely used in the retail industry,
Sensor.”
as they can detect motion and the correlation between
These sensors have been deployed for a long time in a the customer and product they might be interested in. A
variety of devices. However, with the emergence of IoT, user is immediately notified of discounts and special
they have found more room to be present in an even offers of nearby products.
greater number of devices.
Another big and quite an old use-case is vehicles. You
Only a couple of years ago, their uses mostly included are reversing your car and are alrmed about an obstacle
A/C control, refrigerators and similar devices used for while taking reverse, that’s the work of proximity sensor.
environmental control. However, with the advent of the
They are also used for parking availability in places such
IoT world, they have found their role in manufacturing
as malls, stadiums or airports.
processes, agriculture and health industry.
Following are some of the Proximity Sensors sub-
In the manufacturing process, many machines require
categorised:
specific environment temperature, as well as device
temperature. W ith this kind of measurement, the • Inductive Sensors: Inductive proximity sensors are
manufacturing process can always remain optimal. used for non-contact detection to find out the presence
of metallic objects using electromagnetic field or a
On the other hand, in agriculture, the temperature of soil
beam of electromagnetic radiation.It can operate at
is crucial for crop growth. This helps with the production
higher speeds than mechanical switches and also
of plants, maximizing the output.
seems more reliable because of its robustness.
Followed are some sub-categories of Temp Sensors:
• Capacitive Sensors: Capacitive proximity sensors
• Thermocouples: These are voltage devices that
53
can detect both metallic as well as non-metallic • pH Sensor: It is used to measure the pH level in the
targets. Nearly all other materials are dielectric dissolved water, which indicates how acidic or basic
different from air. It can be used to sense very small (alkaline) it is.
objects through a large portion of target. So, generally
• Oxygen-Reduction Potential Sensor: The ORP
used in difficult and complicated applications.
measurement provides insights into the level of
• Photoelectric Sensors: Photoelectric sensor is oxidation/reduction reactions occurring in the solution.
made up of light-sensitive parts and uses a beam of
Chemical sensor
light to detect the presence or absence of an object.
It is an ideal alternative of inductive sensors. And used Chemical sensors are applied in a number of different
for long distance sensing or to sense non-metal industries. Their goal is to indicate changes in liquid or
object. to find out air chemical changes. They play an important
role in bigger cities, where it is necessary to track
• Ultrasonic Sensors: Ultrasonic sensors are also
changes and protect the population.
used to detect the presence or to measure the
distance of targets similar to radar or sonar. This Main use cases of chemical sensors can be found in
makes a reliable solution for harsh and demanding Industrial environmental monitoring and process control,
conditions. intentionally or accidentally released harmful chemical
detection, explosive and radioactive detection, recycling
Pressure sensor
processes on Space Station, pharma industries and
A pressure sensor is a device that senses pressure and laboratory etc.
converts it into an electric signal. Here, the amount
Following are most common kind of chemical sensors
depends upon the level of pressure applied.
in use:
There are plenty of devices that rely on liquid or other
• Chemical field-effect transistor
forms of pressure. These sensors make it possible to
create IoT systems that monitor systems and devices • Chemiresistor
that are pressure propelled. With any deviation from • Electrochemical gas sensor
standard pressure range, the device notifies the system
administrator about any problems that should be fixed. • Fluorescent chloride sensor
Deployment of these sensors is not only very useful in • Hydrogen sulfide sensor
manufacturing, but also in the maintenance of whole • Nondispersive infrared sensor
water systems and heating systems, as it is easy to detect
any fluctuation or drops in pressure. • pH glass electrode
DRAFT
Water quality sensors are used to detect the water quality • Zinc oxide nanorod sensor
and Ion monitoring primarily in water distribution systems. Gas sensor
Water is practically used everywhere. These sensors play Gas sensors are similar to the chemical ones, but are
an important role as they monitor the quality of water for specifically used to monitor changes of the air quality
different purposes. They are used in a variety of and detect the presence of various gases. Like chemical
industries. sensors, they are used in numerous industries such as
Following is a list of the most common kind of water manufacturing, agriculture and health and used for air
sensors in use: quality monitoring, detection of toxic or combustible gas,
hazardous gas monitoring in coal mines, oil & gas
• Chlorine Residual Sensor: It measures chlorine industries, chemical laboratory research, manufacturing
residual (i.e. free chlorine, monochloramine & total – paints, plastics, rubber, pharmaceutical &
chlorine) in water and most widely used as disinfectant petrochemical etc.
because of its efficiency.
Following are some common Gas sensors:
• Total Organic Carbon Sensor: TOC sensor is used
to measure organic element in water. • Carbon dioxide sensor
• Turbidity Sensor: Turbidity sensors measure • Breathalyzer
suspended solids in water, typically it is used in river • Carbon monoxide detector
and stream gaging, wastewater and effluent
measurement. • Catalytic bead sensor
54
• Oxygen sensor Level sensors
• Ozone monitor A sensor which is used to determine the level or amount
of fluids, liquids or other substances that flow in an open
• Electrochemical gas sensor
or closed system is called Level sensor.
• Gas detector
Like IR sensors, level sensors are present in a wide array
• Hygrometer of industries. They are primarily known for measuring
fuel levels, but they are also used in businesses that
Smoke sensor
work with liquid materials. For example, the recycling
A smoke sensor is a device that senses smoke (airborne industry, as well as the juice and alcohol industry rely on
particulates & gases), and it’s level. these sensors to measure the number of liquid assets in
They have been in use for a long period of time. However, their possession.
with the development of IoT, they are now even more Best use cases of level sensor is, fuel gauging & liquid
effective, as they are plugged into a system that levels in open or closed containers, sea level monitoring
immediately notifies the user about any problem that & Tsunami warning, water reservoirs, medical equipment,
occurs in different industries. compressors, hydraulic reservoirs, machine tools,
Smoke sensors are extensively used by manufacturing beverage and pharmaceutical processing, high or low-
industry, HVAC, buildings and accommodation infra to level detection etc.
detect fire and gas incidences. This serves to protect This helps better streamline their businesses, as sensors
people working in dangerous environments, as the whole collect all the important data at all times. With the use of
system is much more effective in comparison to the older these sensors, any product manager can precisely see
ones. how much liquid is ready to be distributed and whether
Common Type of Smoke Sensors the manufacturing should be stepped up.
Smoke sensors detect the presence of Smoke, Gases There are two basic level measurement types:
and Flame surrounding their field. It can be detected Point level sensors: Point level sensors usually detect
either optically or by the physical process or by the use the particular specific level and respond to the user if
of both the methods. the sensing object is above or below that level. It is
• Optical smoke sensor (Photoelectric): Optical smoke integrated into single device to get an alarm or trigger
sensor used the light scatter principle trigger to Continuous level Sensor: Continuous level sensors
occupants. measure liquid or dry material levels within a specified
• Ionization smoke sensor: Ionization smoke sensor range and provide outputs which continuously indicate
works on the principle of ionization, kind of chemistry the level. The best example of it is fuel level display in
the vehicle.
DRAFT
to detect molecules causing a trigger alarm.
IR sensors Image sensors
An infrared sensor is a sensor which is used to sense Image sensors are instruments which are used to convert
certain characteristics of its surroundings by either optical images into electronic signals for displaying or
emitting or detecting infrared radiation. It is also capable storing files electronically.
of measuring the heat being emitted by the objects. The major use of image sensor is found in digital camera
They are now used in a variety of IoT projects, especially & modules, medical imaging and night vision
in Healthcare as they make monitoring of blood flow and equipment,thermal imaging devices, radar, sonar, media
blood pressure simple. They are even used in a wide house, Biometric & IRIS devices.
array of regular smart devices such as smartwatches Two main types of sensors are used in:
and smartphones as well.
• CCD (charge-coupled device), and
Other common use includes home appliances & remote
• CMOS (complementary metal-oxide semiconductor)
control, breath analysis, Infrared vision (i.e. visualize heat
imagers.
leaks in electronics, monitor blood flow, art historians to
see under layers of paint), wearable electronics, optical Although each type of sensor uses different technology
communication, non-contact based temperature to capture images, both CCD and CMOS imagers use
measurements, automotive blind-angle detection. metal-oxide semiconductors, having the same degree
of sensitivity to light, and no inherent quality difference
Their usage does not end there, they are also a great
tool for ensuring high-level security in your home. Also, An average consumer would think that this is a regular
their application includes environment checks, as they camera, but even though this is not far from the truth,
can detect a variety of chemicals and heat leaks. They image sensors are connected with a wide range of
are going to play an important role in the smart home different devices, making their functionality much better.
industry, as they have a wide-range of applications.
55
One of the best-known uses includes the car industry, in Accelerometer sensors
which imagery plays a very important role. With these
Accelerometer is a transducer that is used to measure
sensors, the system can recognize signs, obstacles and
the physical or measurable acceleration experienced by
many other things that a driver would generally notice
an object due to inertial forces and converts the
on the road. They play a very important role in IoT
mechanical motion into an electrical output. It is defined
industry, as they directly affect the progress of driverless
as rate of change of velocity with respect to time
cars.
These sensors are now present in millions of devices,
They are also implemented in improved security systems,
such as smartphones. Their uses involve detection of
where images help capture details about the perpetrator.
vibrations, tilting and acceleration in general. This is great
In the retail industry, these sensors serve to collect data for monitoring your driving fleet, or using a smart
about customers, helping businesses get a better insight pedometer.
into who is actually visiting their store, race, gender, age
In some instances, it is used as a form of anti-theft
are only some of the useful parameters that retail owners
protection, as the sensor can send an alert through the
get by using these IoT sensors.
system if an object that should remain stationary is
Motion detection sensors moved.
A motion detector is an electronic device which is used They are widely used in cellular & media devices,
to detect the physical movement (motion) in a given area vibration measurement, automotive control and
and it transforms motion into an electric signal; motion detection, free fall detection, aircraft and aviation
of any object or motion of human beings industries, movement detection, sports academy/athletes
behavior monitoring, consumer electronics, industrial &
Motion detection plays an important role in the security
construction sites etc.
industry. Businesses utilize these sensors in areas where
no movement should be detected at all times, and it is There are various kinds of accelerometers and following
easy to notice anybody’s presence with these sensors are few mainly used in IoT projects:
installed.
• Hall-effect accelerometers: Hall-effect
These are primarily used for intrusion detection systems, accelerometers are using Hall principle to measure
automatics door control, boom barrier, smart camera (i.e the acceleration, it measures the voltage variations
motion based capture/video recording),toll plaza, caused by changes in a magnetic field around them.
automatic parking systems, automated sinks/toilet
• Capacitive accelerometers: Capacitive
flusher,hand dryers,energy management systems(i.e.
accelerometers sensing output voltage dependents
Automated Lighting, AC, Fan, Appliances Control) etc.
on the distance between two planar surfaces.
On the other hand, these sensors can also decipher Capacitive accelerometers are also less prone to
different types of movements, making them useful in noise and variation with temperature.
DRAFT
some industries where a customer can communicate with
• Piezoelectric accelerometers: Piezoelectric sensing
the system by waving a hand or by performing a similar
principle is working on the piezoelectric effect. Piezo-
action. For example, someone can wave to a sensor in
film based accelerometers are best used to measure
the retail store to request assistance with making the
vibration, shock, and pressure.
right purchase decision.
Each accelerometer sensing technology has its own
Even though their primary use is correlated with the
advantages and compromises. Before selecting, it’s
security industry, as the technology advances, the
important to understand the basic differences of the
number of possible applications of these sensors is only
various types and the test requirements.
going to grow.
Gyroscope sensors
Following are key motion sensor types widely used:
A sensor or device which is used to measure the angular
• Passive Infrared (PIR): It Detects body heat (infrared
rate or angular velocity is known as Gyro sensors,
energy) and the most widely used motion sensor in
Angular velocity is simply defined as a measurement of
home security systems.
speed of rotation around an axis. It is a device used
• Ultrasonic: Sends out pulses of ultrasonic waves and primarily for navigation and measurement of angular and
measures the reflection off a moving object by rotational velocity in 3-axis directions. The most important
tracking the speed of sound waves. application is monitoring the orientation of an object.
• Microwave: Sends out radio wave pulses and Their main applications are in car navigation systems,
measures the reflection off a moving object. They game controllers, cellular & camera devices, consumer
cover a larger area than infrared & ultrasonic sensors, electronics, robotics control, drone & RC control
but they are vulnerable to electrical interference and helicopter or UAV control, vehicle control/ADAS and
more expensive. many more.
56
There are several different kinds of gyro sensors which practical for measuring different things simultaneously.
are selected by their working mechanism, output type, The technology behind this sensor allows it to monitor
power, sensing range and environmental conditions. electromagnetic energy, which includes, electricity, light
and so on.
• Rotary (classical) gyroscopes
Due to this fact, these sensors have found use in
• Vibrating Structure Gyroscope
healthcare, environment monitoring, energy, aerospace
• Optical Gyroscopes and many more industries. With their presence oil
• MEMS(micro-electro-mechanical systems) companies, pharmaceutical companies and mining
Gyroscopes companies are in a much better position to track
environmental changes while keeping their employees
These sensors are always com bined with safe.T
accelerometers. The use of these two sensors simply
provides more feedback to the system. WIth gyroscopic Their main use can be found in ambient light detection,
sensors installed, many devices can help athletes digital optical switches, optical fibres
improve the efficiency of their movements, as they gain communications,due to electrical isolation best suited
access to the athletes movement during sports activities. for oil and gas applications, civil and transportation fields,
high speed network systems, elevator door control,
This is only one example of its application, however, as assembly line part counters and safety systems.
the role of this sensor is to detect rotation or twist, its
application is crucial for the automation of some Following are key type of optical sensors:
manufacturing processes. • Photodetector: It uses light sensitive semiconductor
materials like photocells, photodiodes or
Humidity sensors
phototransistors to work as photodetector
Humidity is defined as the amount of water vapour in an
• Fiber Optics: Fibers optics carry no current, So its
atmosphere of air or other gases. The most commonly
immune to electrical & electromagnetics interference
used terms are “Relative Humidity (RH)
and even in damaged condition no sparking or shock
These sensors usually follow the use of temperature hazard happens.
sensors, as many manufacturing processes require
• Pyrometer: It estimates the temperature of an object
perfect working conditions. Through measuring humidity,
by sensing the color of the light and Objects radiate
you can ensure that the whole process runs smoothly,
light according to their temperature and produce same
and when there is any sudden change, action can be
colors at same temperature.
taken immediately, as sensors detect the change almost
instantaneously. • Proximity & Infrared: Proximity use light to sense
Their applications and use can be found in Industrial & objects nearby and Infrared are used where visible
light would be inconvenient.
DRAFT
residential domain for heating, ventilating, and air
conditioning systems control. They can also be found in It is clear that IoT has become incredibly popular, and
Automotive, museums, industrial spaces and current trends show that it is the future. It simply helps
greenhouses , meteorology stations,Paint and coatings with automation of various processes, making these
industries, hospitals & pharma industries to protect systems quite useful for both regular consumers and
medicines businesses.
Optical sensors We are yet to see the full potential this technology carries,
A sensor which measures the physical quantity of light as the whole platform is becoming smarter through the
rays and convert it into electrical signal which can be fusion of all the abovementioned sensors. When you
easily readable by user or an electronic instrument/device consider the fact that all of the measured data is collected
is called optical sensor. and can be analyzed, it is obvious that IoT is going to
become even smarter in the future.
Optical sensors are loved by IoT experts, as they are
57
IT & ITES Trade Theory for Exercise 2.4.163
Smart City - Identify and select various types of sensors used in smartcity
DRAFT
had the opportunity do so.
58
The circuit diagram above is the entirety of this pollution to a 131Ω resistor (it is not a standard value) use a 120Ω
detector works. A detailed circuit diagram for the solder
board follows later. Note that you can change most of resistor and a 12Ω resistor in series.
the digital ports and analog ports that sensors enter We place the sensing resistors in both devises in series
should you need to do so (for any reason); this will only
with 22kΩ resistors to create a voltage divider. From the
require that you edit the code we have provided to
account for these changes. voltage at the output of the voltage divider we can
calculate the sensing resistance.
Step 3: Particulate Matter Sensor
Rsenor = 22kΩ * (5V / Vout - 1)
Each Shinyei Detector has two signal outputs: one for
small particulate matter (left yellow wire in the picture Step 6: MQ Toxic Gas Sensors
above) and one for larger particulate matter. These output
We used MQ-2 and MQ-9 gas sensors to measure toxic
signals are connected the digital inputs of the Arduino.
gasses including Propane, Butane, LPG and Carbon
The detector needs to be powered by supplying +5V and
Monoxide.
ground to the ports on the detector. See the overall circuit
diagram for details. The MQ-2 and MQ-9 are very similar to the MiCS
detectors. They use a gas-sensitive resistor (SnO2) to
Each detector uses an infrared LED and a photodetector
detect concentrations of toxic gases and have an internal
to measure scattering off of small airborne particulates.
heating element to keep the sensor at the right
Internal circuitry turns the photodetector output into digital
temperature. The circuits we use for these devises are
output signals. Generally the sensor outputs a +5V signal,
practically the same as the circuits for the MiCS sensors,
when it detects particles is sends out a low-voltage pulse.
except that we use a transistor rather than a resistor to
The fraction of the time that the output signal is low or
regulate heater power in the MQ-9.
the "low-pulse occupancy percentage" is proportional to
the concentration of particulate matter in the air. Refer to the solder board circuit diagram for mounting
details. For the MQ-2 sensor, connect the pins marked
Step 4: Gas Sensor Circuit Board
A to the 5V power, connect the pin marked G to ground,
Above is the circuit diagram for the circuit board hosting and connect the pin marked S is connected to ground in
the gas sensors and temperature/humidity sensor? series with a 47 kΩ resistor. For the MQ-9 gas sensor,
Details about mounting each of the separate devices are connect the pin marked A to the transistor, the pin marked
in the following steps. Note that your circuit board can B to the 5 V power, the pin marked G to ground, and the
look different from ours physically. In fact, we recommend
you print a circuit board for the surface mount devices pin marked S to ground in series with a 10 kΩ resistor.
instead of using a solder board. It should work just as Step 7: Temperature and Humidity Sensors
well as long as you follow the circuit diagram.
This sensor is provided because temperature and
DRAFT
Step 5: Ozone and NO2 Sensors humidity play a role in the gas concentrations that our
We use surface-mount sensors MiCS-2614 and MiCS- sensors detect. High humidity and temperature as well
2714 to detect Ozone and Nitrogen Dioxide respectively. as dramatic changes in either would have detrimental
effects on the accuracy of readings It is therefore helpful
Both of these devises use an internal resistor as their to be able to monitor these variables. Both temperature
sensing element. The sensing resistor is connected and humidity can be read from this single sensor.
between the pins (G) and (K) in the diagram above. Use Oriented as it is in the photo above, the left pin is to be
an ohmmeter to check that you have found the right pins. attached to power, the middle pin is the output signal,
The resistance should be on the order of 10-20 kΩ. and the right pin is grounded. The output signal for this
component goes to a digital port on the Arduino. Our
Both devices also have a heating element between code is set up such expecting the temperature signal in
pins (A) and (H). This heating element keeps the sensing digital port 2. This can be changed to another digital port
element at the appropriate temperature. The resistance should you need to; simply alter the code in accordance
of the heating element is 50-60Ω. to what port you have chosen. Refer to the solder board
diagram to use this component.
Ideally these devices should be surface mounted onto a
circuit board. However, in the absence of a circuit board Step 8: Power and Fan
printer it is still possible to carefully solder to the back of
If you look at the circuit diagram for the entire project,
these devices using very low temperature solder and
you will see that we need only one input voltage of 5 V. A
much care.
common adaptor like the one shown above can be used
As shown in the solder board circuit diagram, we place to power the project. Furthermore, you will need a fan to
the 82Ω resistor and the 131Ω resistor in series with the ensure airflow through the box and prevent overheating.
heating elements of the MiCS-2614 and MiCS-2714 units We used the fan above but any fan that uses 5 V and is
respectively. This ensure that the heating elements of the appropriate size can be used.
receive the proper level of power. If you don't have access
59
Step 9: Container Temperature and humidity sensor code: https://
github.com/adafruit/DHT-sensor-library
While there are many ways to make an effective box,
we chose to use an UP 3D printer for our box. We have Step 11: Interpreting the Data
attached the STL that we used for the final printing.
We are in the process of determining how to transform
Attachments raw sensor values into meaningful outputs. Calibration
against known pollution sources will eventually be
Step 10: Coding
necessary to ensure accuracy. In meantime we have
The code for extracting raw data from the device is used sensor data sheets and prior research to make
attached above. This code will print the sensor resistance approximations.
values, Shinyei PPD42 low-pulse occupancy
To estimate particulate matter concentrations we use
percentages, and temperature and humidity readings to
information from a research paper by David Holstius. The
the computer via the serial monitor. It will cycle through
paper correlates the Shinyei PPD42 dust sensor outputs
the raw data on LCD screen as well.
with EPA measurements. The graphs in the appendix
In order to make the code work you will first need to show best fit lines for the data. We used the graphs to
download the libraries for the LCD shield and temperature approximate PM2.5 concentration in micrograms per
and humidity sensors. You will find the libraries at the cubic meter as:
following websites
PM2.5 = 5 + 5 * (small PM low-pulse occupancy
LCD shield code: https://learn.adafruit.com/rgb-lcd- percentage)
shield/using-th...
DRAFT
60
IT & ITES Trade Theory for Exercise 2.4.164
Smart City - Identify and select various types of sensors used in smartcity
DRAFT
popular microcontrollers do not have this feature, so
that’s why we chose the Uno for this project. You can connect the sensors exactly as we did by
following the diagrams exactly.
Bread Board
A breadboard is a tool used to prototype and test circuits.
Breadboards have two long rails (red rail for power and
blue rail for ground) on each of its sides that are each
connected vertically down the board. This is where
engineers typically plug in a power supply and ground
so that the whole rail can be easily used as a power and
ground connection. At the center of the board, there are
groups of 5-holed horizontal lines. Each of these lines is
horizontally connected (5-hole connection) which are
used for the circuit itself. You can even connect one
grouping to another to make a 10-hole connection and
so on and so forth.
61
IT & ITES Trade Theory for Exercise 2.4.165
Smart City - Identify and select various types of sensors used in smartcity
DRAFT
to monitor changes in a particular environment say
62
IT & ITES Trade Theory for Exercise 2.4.166
Smart City - Identify and select various types of sensors used in smartcity
DRAFT
and humidity in this HDC100x from Watterot.
It is a four – pin digital sensor. One of the important criteria
of this sensor is its sensitivity with direct sun light
exposure and rain.
Therefore, the material preventing the entering of sun
light and positioning of the weather station should be
considered.
A plastic box was implemented to store this sensor and
to avoid the effect of solar radiation, a brown thick paper
was applied to cover the top of the weather station box.
According EPA (1987), the standard measurement height
for temperature and relative humidity sensors is at least
2.0 meters above the ground surface.
Working with Air Temperature and Humidity sensor
PROCEDURE
REAL WORK APPLICATION
Hardware hookup
• HDC100x is a four-pin sensor, which has the most
four important pins needed to be connect:
• GND: ground pin, needed to be connect with GND
pin on Arduino Uno.
63
HDC100X SENSOR
DRAFT
64
IT & ITES Trade Theory for Exercise 2.4.167
Smart City - Identify and select various types of sensors used in smartcity
Measure and record Information such as air temperature, wind speed, dew
point temperature, wind direction, relative humidity, solar radiation and
atmospheric pressure at predetermined intervals by Weather Stations
Objective:
• to measure and record information such as air temperature, wind speed, dew point temperature, wind
direction, relative humidity, solar radiation and atmospheric pressure at predetermined intervals by weather
stations.
Requirement: You can use the below table as reference for making
your connections.
• Arduino Uno
• ESP8266 Wi-Fi Shield
• DHT11 Sensor
• BMP180 Sensor
• Breadboard
• Jumper Wires
PROCEDURE:
Weather stations normally comprises of few sensor to
measure environmental parameters and a monitoring or
logging system to analyze these parameters.
we will learn how to build such a wireless IoT based
weather station which can measure critical environmental
parameters like Temperature, Humidity and Pressure.
Since our weather station is IoT enabled, we can send
these parameters to a ThingSpeak channel (IoT cloud)
where we can store, analyze and access the data
DRAFT
remotely.
We will be using the Arduino board along with DHT11
sensor, BMP180 sensor and ESP8266 wifi module. The
DHT11 sensor senses the temperature and humidity,
while BMP180 sensor calculates the pressure and
ESP8266 is used for internet connectivity.
ThingSpeak enables live monitoring from anywhere in
the world and we can also view the logged data which
will be stored on their website and even graph it over
time to analyze it.
Circuit Diagram
The complete circuit for Arduino based IoT Weather
Station is shown below.
The DHT11 sensor is powered by the 5V pin of the
Arduino and its data pin is connected to pin 5 for one
wire communication. The BMP180 sensor is powered
by the 3.3V pin of Arduino and its data pins SCL (Serial
Clock) and SDA (Serial Data) are connected to A4 and
A5 pin of Arduino for I2C communication.
The ESP8266 module is also powered by the 3.3V pin
of the Arduino and its Tx and Rx pins are connected to
Digital pins 2 and 3 of Arduino for serial communication.
65
Setting up your ThingSpeak Channel computing software MATLAB. MAT LAB allows
ThingSpeak users to write and execute MATLAB code
ThingSpeak is an open data platform that allows you to
to perform preprocessing, visualizations, and analyses.
aggregate, visualize, and analyze live data in the cloud.
ThingSpeak takes minimum of 15 seconds to update your
You can control your devices using ThingSpeak, you can
readings. We have also done other interesting projects
send data to ThingSpeak from your devices, and even
with ThingSpeak like NodeMCU Temperature and
you can create instant visualizations of live data, and
Humidity Monitoring
send alerts using web services like Twitter and Twilio.
ThingSpeak has integrated support from the numerical
DRAFT
66
IT & ITES Trade Theory for Exercise 2.5.168
Smart City - Position the appropriate sensors and collect the information
required in Smart City
DRAFT
data, storing it in memory and even making system
decisions based on the results of the analysis.
Crucial to modern IoT nodes is the need for security with
some form of data encryption, the most common being
AES256. This security is critical for helping the
microcontroller perform a secure boot, insuring that the
core is running the code is meant to run. Encryption
security is also used to encrypt the data transmitted over
the network, insuring that it is viewed only by those
systems authorized to receive the data.
Smart Sensors for the Internet of Things
Smart Sensors are sensors that have some data
processing on board. These can be anywhere from
environmental sensors that perform basic processing of Optical Sensors for the Internet of Things
the data, to high accuracy MEMS sensors with a
Optical sensors detect the presence of light at visible or
gyroscope and accelerometer with integrated digital
non-visible wavelengths.
processing for sensor fusion calculations.
Environmental Sensors
A/D Converters for the Internet of Things
Environmental sensors detect the status of the present
Some of the systems being monitored in an IoT network
environment, including pressure, temperature, position,
already supply an analog signal. This is common in
acceleration, motion, or orientation. These can be simple
automotive and industrial systems. This analog signal
temperature sensors or complex MEMS devices. These
can be fed to an analog to digital converter (ADC). An
sensors provide a digital output that can easily be read
ADC measures an analog signal and converts the
by the main microcontroller.
magnitude to a binary number. W hile many
67
Low Dropout Regulators be essential for extending the service life of the system.
These ICs monitor the battery voltage and insure that
Low Dropout (LDO) Voltage Regulators are low loss
the appropriate charging current and voltage is applied.
voltage regulators that insure the system gets the proper
voltage with the best possible efficiency. Microcontrollers for the Internet of Things
DC/DC Converters Although an 8-bit microcontroller may be useful for simple
IoT nodes, most IoT applications use either a 16-bit or a
DC-to-DC converters take a battery voltage either step
32-bit microcontroller. 16-bits are used for low to medium
the voltage up or down. Stepping the voltage up insures
complexity nodes and provide a good compromise
that the system is operating at the correct voltage. DC/
between low power and data throughput. However, most
DC converters can also step the voltage down with an
IoT nodes use 32-bits for performance and a high level
efficiency much higher than a linear regulator or resistor
of integration. Some microcontrollers have sensor
divider network.
interfaces, voltage regulators, and on-chip RF radios,
Power Management ICs for the Internet of Things perfect for IoT nodes.
Sophisticated IoT nodes with high performance 802.15.4 Wireless
microcontrollers can have a power management chip to
Some IoT network nodes are dispersed in such a way
insure the proper distribution of power to the
that a peer-to-peer, or mesh network, is more appropriate
microcontroller as well as the rest of the system.
for the exchange of data. 802.15.4 Networking supports
Battery Management ICs peer-to-peer communications. Standards include ZigBee,
Thread, Wireless HART, and 6LoWPAN.
For battery powered systems, especially those that use
rechargeable batteries, a battery management IC can
DRAFT
68
IT & ITES Trade Theory for Exercise 2.5.169
Smart City - Position the appropriate sensors and collect the information
required in Smart City
Check connection with sensors and send data wirelessly to a central data logger
at program
Objective:
• to check connection with sensors and send data wirelessly to a central data logger at program.
DRAFT
• External battery (optional); Pros:
• Cable; • Almost any external components needed;
• Connector (to make it more "advanced"); • Integrated ADC
• Box (optional, again to make it more "advanced"); Cons:
• Led holder (optional); • Request library or software con decode the digital
Note: As I said you need to chose one of the signal (I2C, SPI, Serial, One Wire, ...);
two methods. If you choose LM35 • More expensive;
thermometer, you'll need a few others
I've chosen DS18B20 because I found a set of 5
component.
waterproof sensors on Amazon and because it's widely
• Attiny 45/85; documented on internet. Main feature is 9-12bit
• AVR programmer (or Arduino as ISP); measurement, 1-Wire bus, 3.0 to 5.5 supply voltage,
0.5°C accuracy. Again, for more detail here is the
• Resistor (1x1kΩ,1x2kΩ, 1x10kΩ, 1x18kΩ) datasheet: DS18B20.
• 2.54mm strip connector (optional) Step 3: LM35
• Diode (2x1N914) Let's analyse how I've implemented the external ADC
• Perfboard or PCB; and other feature for the LM35 thermometer. I found a
cable with three wires, one with shielding and two without.
Step 2: Choosing the Sensor I decided to add a decoupling capacitor to stabilize the
Choosing the sensor can be a difficult step: today there supply voltage near the sensor.
are tons of transducers (TI offers 144 different element) To convert analog temperature to digital, I've used
both analog and digital with different temperature range, Attiny85 microprocessor in a dip8 package (again for
accuracy and case.
69
more information see the datasheet: attiny85). Most #define LM35USER
important thing for us is the 10 bit ADC (not really the
Step 7: ESP8266 Code: DS18B20 User
best one but enough precise for me). To communicate
with Esp8266 I decided to use Serial communication As first operation you need to identify the device Address
keeping in mind that esp8266 works with 3.3V and for each sensor. Compile and program this code to the
attiny85 at 5V (as it needs to power the sensor). To esp and look in serial for the results. Code can be
achieve that, i used a simple voltage divider (see found here (search for this title in the page: «Read
schematic). To read negative temperature we need to individual DS18B20 Internal Addresses»). Connect only
add some external components (2x1N914 and 1x18k one sensor to obtain the address, results should be
resistor), since I don't want to use negative power supply. something like this (random number here! Just as
example):
SESP8266 Code
0x11, 0x22, 0x33, 0xD9, 0xB1, 0x17, 0x45, 0x12
• OTA update: you don't need to plug esp8266 to your
computer every time you need to upload the code Then you need to change my code in the section
(you have to do it only the first time); "Configuration for DS18B20" (line 31 to 36)":
• Wireless manager, if wireless network change, you #define ONE_WIRE_BUS ONEWIREPINHERE
don't need to reupload the sketch. You can simply #define TEMPERATURE_PRECISION
configure again the network parameters connecting TEMPBITPRECISION //(from 9 to 12)
to esp8266 access point;
#define delayDallas READINTERVAL //(In Milliseconds,
• Thingspeak data trasmission; minimum is 15s or 15000mS)
• Both LM35 and DS18B20 supported; DeviceAddress blueSensor = { 0x11, 0x22, 0x33, 0xD9,
• Simple User Interface (RGB led indicates some useful 0xB1, 0x17, 0x45, 0x12}; //CHANGE WITH YOUR
information); ADDRESS
Common LM35 and DS18B20 configuration DeviceAddress redSensor = { 0x11, 0x22, 0x33, 0xD9,
0xB1, 0x17, 0x45, 0x12}; //CHANGE WITH YOUR
You need to change pin definition, token, channel
ADDRESS
number, user and password for OTA update. Line from
15 to 23. DeviceAddress greenSensor = {0x11, 0x22, 0x33, 0xD9,
0xB1, 0x17, 0x45, 0x12 }; //CHANGE WITH YOUR
#def ine red YOURPINHERE #def ine green
ADDRESS
YOURPINHERE
On the top you need to add:
#define blue YOURPINHERE
#define DSUSER
const char* host = "select host address"; //not really
DRAFT
needed you can leave esp8266-webupdate ESP8266 Little Trick
const char* update_path = "/firmware"; //to change the After a bit of testing I found that if you plug esp8266
address for updating ex: 192.168.1.5/firmware without programming, it will not run the code until you
press reset one time. To solve this issue, after a bit of
const char* update_username = "YOURUSERHERE";
research, I discovered that you have to add a pull-up
const char* update_password = resistor from 3.3V to D3. This will tell the processor to
"YOURPASSWORDHERE; load the code from flash memory.
unsigned long myChannelNumber = With this method, D3 can directly be used to data input
CHANNELNUMBERHERE; for DS18B20 sensors.
const char * myWriteAPIKey = "WRITEAPIHERE"; First Time Operation
Step 6: ESP8266 Code: LM35 User If you've uploaded the code correctly but never use Wifi
manager library it's time to configure your wifi connection.
You need to connect the attiny board to esp8266, to
Wait until you see the RGB led flashing faster than before,
power the ADC unit use the VU pin and G pin. You need
then search with your mobile or PC the wifi network called
to choose which pin you want to use for serial
"AutoConnectAp" and connect.
communication (to keep hardware serial free for debug
purpose). Tx pin must be selected but isn't really used. After connection, open a web browser and enter
(Line 27). 192.168.4.1, you'll find the GUI interface of wifi manager
(see photos) and press "Configure Wifi". Wait for
SoftwareSerial mySerial (RXPIN, TXPIN);
esp8266 to search wifi networks, and select the desired
On the top you need to add: one. Insert password and press "save".
Esp8266 will restart (don't care RGB led this time
70
because it'll output some random information) and can see the biggest difference in accuracy from digital
connect to the network. to analog sensor (with my poor "ADC circuit") that give
some non-physical data.
Conclusion
Summing up, if you want to build this logger I suggest
In the end, here is a graph taken from the data logger in
using the DS18B20 digital temperature sensor since it's
action while logging my freezer temperature. In orange
easier to read and almost "plug and play", it's more stable
is the DS18B20 and in blue the LM35 and it's circuit. You
and accurate, it runs at 3.3V and require only one pin for
lots of sensors.
DRAFT
71
IT & ITES Trade Theory for Exercise 2.5.170
Smart City - Position the appropriate sensors and collect the information
required in Smart City
DRAFT
WiFi modules give users an easy gateway to the internet.
ZigBee is used for building low power, short-range mesh If you’re selling an IoT solution like a smart thermostat,
networks. If the mesh is well designed and well which is made for homes and businesses that are already
distributed—meaning it has a relatively dense number WiFi-connected, WiFi is a go-to option.
of nodes—it has the ability to cover a large area. If there
are holes in the mesh, the true range performance is One big issue issue with WiFi is provisioning: How can
pretty limited. you get the password for the customer’s network onto
the device? Someone has to type it in, and that’s a major
We’ve seen some application creators struggle to sell headache for many customers. Things like W iFi
products that use ZigBee’s hardware because their protected setup (WPS) were created in response to this
customers don’t design the mesh properly (and then have issue. WPS was supposed to allow customers to push a
numerous issues to deal with). It’s worth noting that there device on their routers and allow devices to join for a
are other proprietary versions of ZigBee that can work short period of time. But, they were never standardized
really well, like MeshConnect from CEL. This product is and are still not used regularly.
especially popular for smart home and energy solutions.
It’s also important to consider WiFi from a security
6LOWPAN & THREAD perspective. If you use a connected product that has a
6LoWPAN and Thread are rapidly growing standards. WiFi module in it, you must understand that you are now
They are low power versions of IP-based operating a device inside someone’s network. Thus, you
communications that allow end nodes to use 6LoWPAN need to be a good steward and make sure you are not
instead of WiFi to communicate back to access points. creating vulnerabilities for that network.
Google and Nest are big proponents of these Power budget is another issue. We don’t think you’ll find
technologies. We at Link Labs can’t use 6LoWPAN very many battery-powered WiFi IoT applications out
because the header size is too large for our technology, there, because staying connected to WiFi is relatively
but this is certainly a space to watch. If 6LoWPAN power intensive.
72
BLUETOOTH kinds of real-life use cases make Bluetooth and Bluetooth
Low Energy (BLE) an interesting module option.
This is a really interesting use case, because customers
actually carry the Bluetooth-to-internet bridge around in CELLULAR
their pocket. The Apple iBeacon ecosystem is one type
The advantages of using a cellular module are that it
of software development kit (SDK) that provides a
offers ubiquitous coverage and is an out-of-the-box
persistent Bluetooth-to-internet connection that runs in
solution. The issues with cellular lie in provisioning and
the background.
subscription management. You don’t want to be stuck
For example, with the use of a product like Gimbal’s paying for data for a bunch of products that are still sitting
Proximity Beacon, Bluetooth-enabled devices can feed on the shelf.
data from a person’s phone to the internet without them
There are a lot of companies in the mobile virtual network
knowing it. If someone has the ESPN app running in the
operator (MVNO) space—like KORE Wireless—or
background of her phone, and she walks into a store
strictly in the device management space—like Jasper—
with a Proximity Beacon in use, store owners can tell
that make that process easier. Aeris is another really
she’s in their store without her ever knowing it. These
good company that makes getting a data plan for your
IoT devices easier, and we’ve seen it in use a lot more
lately.
DRAFT
73
IT & ITES Trade Theory for Exercise 2.5.171
Smart City - Position the appropriate sensors and collect the information
required in Smart City
Select and Install sensors like NO2, PM2.5, PM10, CO2, O2, air temperature,
humidity etc
Objective:
• to select and Install sensors like NO2, PM2.5, PM10, CO2, O2, air temperature, Humidity.
• Keyes DHT11 Temperature and Humidity Sensor Precision sensors: A sensitive new particulate matter
sensor—commonly known as dust sensor—is included
• Access to 3D printer in the Gases PRO board. This sensor allows the
• Solder Board measurement of PM1, PM2.5, and PM10 particles and
comes calibrated from the factory.
• 5V fan
Should I choose Gases or Gases PRO?
• 10 to 15 wires of gauge 24
Libelium has created different systems in terms of
PROCEDURE: accuracy and pricing. The customer should consider
New Calibrated Air Quality Sensors for Smart Cities Gases PRO if she needs maximum performance sensors
DRAFT
for metering that require accurate ppm or percentage. If
Libelium released a new Gases PRO Sensor Board in the project just needs to detect gas presence or gas
May 2015. This platform features precision sensors to levels, the standard Gases Sensor Board is sufficient.
enable the implementation of urban monitoring, air quality,
industrial, environmental or farming projects with high The new Gases PRO Sensor Board can read up to 16
requirements in terms of accuracy, reliability, and gas sensors; it also has a high-end sensor for three
measurement range. The new gas sensors line is parameters: temperature, humidity and pressure.
available for both Waspmote OEM and Plug & Sense!.
74
high concentrations CO
Carbon Monoxide for low 0 to 25 ppm Calibrated ±0.1 ppm
concentrations CO
Carbon Dioxide CO2 0 to 5000 ppm Calibrated
±50 ppm (range 0~2500 ppm)
±200 ppm (range 2500~5000 ppm)
Molecular Oxygen O2 0 to 30% Calibrated ±0.1%
Ozone O3 0 to 18 ppm Calibrated ±0.2 ppm
Nitric Oxide for low 0 to 20 ppm Calibrated ±0.2 ppm
concentrations NO
Nitric Dioxide high 0 to 20 ppm Calibrated ±0.1 ppm
accuracy NO2
Sulfur Dioxide high 0 to 20 ppm Calibrated ±0.1 ppm
accuracy SO2
Ammonia for low 0 to 100 ppm Calibrated ±0.5 ppm
concentrations NH3
Ammonia for high 0 to 500 ppm Calibrated ±3 ppm
concentrations NH3
Methane and other 0 to 100 % / LEL Calibrated ±0.15 % LEL
combustible gases CH4
Molecular Hydrogen H2 0 to 1000 Calibrated ±10 ppm
Hydrogen Sulfide H2S 0 to 100 ppm Calibrated ±0.1 ppm
Hydrogen Chloride HCl 0 to 50 ppm Calibrated ±1 ppm
Hydrogen Cyanide HCN 0 to 50 ppm Calibrated ±0.2 ppm
Phosphine PH3 0 to 20 ppm Calibrated ±0.1 ppm
Ethylene Oxide ETO 0 to 100 ppm Calibrated ±1 ppm
Chlorine Cl2 0 to 50 ppm Calibrated ±0.1 ppm
DRAFT
Particle Matter – Dust 0.5 to 16 µm Calibrated
(16 steps) (includes PM1,
PM2.5 and PM10)
* Accuracy values have been calculated at average conditions: 20ºC / 101300 Pa. Accuracy levels may differ with
different temperature and pressure levels, aging and in presence of third type of gases which cause cross sensitivity.
See each Gas Sensor documentation for more information.
Gases v2.0 [Old Version]
Parameter Range Accuracy *
Temperature 40 to +125 ºC Not calibrated
±2 ºC (range 0 ~ 70 ºC), ±4 ºC
(range -40 ~ 125 ºC)
Humidity 0 to 100% HR Not calibrated
<±4% RH (at 25 ºC, range
30 ~ 80% RH),
<±6% RH (range 0 ~ 100% RH)
Pressure 15 to 115 kPa Not calibrated
<±1.5% V (range 0 ~ 85 ºC)
Carbon Monoxide CO 30 to 1000 ppm Not calibrated
75
Carbon Dioxide CO2 350 to 10000 ppm Not calibrated
Molecular Oxygen O 2
0 to 30% Not calibrated
Ozone O3 0.010 to 1 ppm Not calibrated
Nitric Dioxide NO2 0.05 to 5 ppm Not calibrated
Ammonia NH 3
10 to 100 ppm Not calibrated
Methane and other combustible 500 to 10000 ppm Not calibrated
gases CH4
Molecular Hydrogen H2 500 to 10000 ppm Not calibrated
Hydrogen SulfideH2S 0.1 to 3 ppm Not calibrated
Isobutane C4H10 50 to 5000 ppm Not calibrated
Ethanol CH3CH2OH 1 to 30 ppm
50 to 5000 ppm Not calibrated
DRAFT
sensor manufacturers, in laboratories. To obtain three calibration points for temperature, six points for
maximum accuracy, a two-point calibration process is humidity and nine points for pressure. These three
parameters are automatically inter-compensated to
obtain extreme accuracy.
Gases PRO Sensor Board is included in Libelium's new
Smart Cities sensing solution, Plug & Sense! Smart
Environment PRO. This board also allows to obtain
information about particle size and density ranging from
1um to 10um (PM1 / PM2.5 / PM10) in its surroundings,
using the new particulate matter sensor—commonly
known as dust sensor.
76
IT & ITES Trade Theory for Exercise 2.5.172
Smart City - Position the appropriate sensors and collect the information
required in Smart City
Configure sensor node using USB and over the air programming
Objective:
• to configure sensor node using USB and over the air programming.
Quick guide that shows how to do over-the-air (OTA) • Installing the ESP32 Board in Arduino IDE (Windows
programming with the ESP32 using the OTA Web instructions)
Updater in Arduino IDE. The OTA Web Updater allows • Installing the ESP32 Board in Arduino IDE (Mac and
you to update/upload new code to your ESP32 using a Linux instructions)
browser, without the need to make a serial connection
ESP32 OTA Web Updater
between the ESP32 and your computer.
When you install the ESP32 add-on for the Arduino IDE,
it will automatically install the ArduinoOTA library. Go
to File > Examples >ArduinoOTA> OTAWebUpdater.
DRAFT
OTA programming is useful when you need to update
code to ESP32 boards that are not easily accessible.
The example we’ll show here works when the ESP32
and your browser are on your local network.
The only disadvantage of the OTA Web Updater is that
you have to add the code for OTA in every sketch you
upload, so that you’re able to use OTA in the future.
How does OTA Web Updater Works?
• The first sketch should be uploaded via serial port.
This sketch should contain the code to create the OTA
Web Updater, so that you are able to upload code
later using your browser.
The following code should load.
• The OTA Web Updater sketch creates a web server
you can access to upload a new sketch via web /*
browser.
* OTAWebUpdater.ino Example from ArduinoOTA Library
• Then, you need to implement OTA routines in every
* Rui Santos
sketch you upload, so that you’re able to do the next
updates/uploads over-the-air. * Com plete Project Details https://
randomnerdtutorials.com
77
*/ “</table>”
#include <WiFi.h> “</form>”
#include <WiFiClient.h> “<script>”
#include <WebServer.h> “function check(form)”
#include <ESPmDNS.h> “{““if(form.userid.value==’admin’&&
form.pwd.value==’admin’)”
#include <Update.h>
“{““window.open(‘/serverIndex’)”
const char* host = “esp32”;
“}”“else”
const char* ssid = “REPLACE_WITH_YOUR_SSID”;
“{“
const char* password =
“REPLACE_WITH_YOUR_PASSWORD”; “ alert(‘Error Password or Username’)/*displays error
message*/”
WebServer server(80);
“}”
/*
“}”
* Login page
“</script>”;
*/
/*
const char* loginIndex =
* Server Index Page
“<form name=’loginForm’>”
*/
“<table width=’20%’ bgcolor=’A09F9F’ align=’center’>”
const char* serverIndex =
“<tr>”
“<script src=’https://ajax.googleapis.com/ajax/libs/jquery/
“<td colspan=2>”
3.2.1/jquery.min.js’></script>”
“<center><font size=4><b>ESP32 Login Page</b></
“<form method=’POST’ action=’#’ enctype=’multipart/
font></center>”
form-data’ id=’upload_form’>”
“<br>”
“<input type=’file’ name=’update’>”
“</td>”
“<input type=’submit’ value=’Update’>”
“<br>”
“</form>”
“<br>”
DRAFT
“<div id=’prg’>progress: 0%</div>”
“</tr>”
“<script>”
“<td>Username:</td>”
“$(‘form’).submit(function(e){“
“<td><input type=’text’ size=25 name=’userid’><br></
“e.preventDefault();”
td>”
“var form = $(‘#upload_form’)[0];”
“</tr>”
“var data = new FormData(form);”
“<br>”
“ $.ajax({“
“<br>”
“url: ‘/update’,”
“<tr>”
“type: ‘POST’,”
“<td>Password:</td>”
“data: data,”
“<td><input type=’Password’ size=25
name=’pwd’><br></td>” “contentType: false,”
“<br>” “processData:false,”
“<br>” “xhr: function() {“
“</tr>” “var xhr = new window.XMLHttpRequest();”
“<tr>” “xhr.upload.addEventListener(‘progress’, function(evt)
{“
“<td><input type=’submit’ onclick=’check(this.form)’
value=’Login’></td>” “if (evt.lengthComputable) {“
“</tr>” “var per = evt.loaded / evt.total;”
78
“$(‘#prg’).html(‘progress: ‘ + Math.round(per*100) + server.sendHeader(“Connection”, “close”);
‘%’);”
server.send(200, “text/html”, loginIndex);
“}”
});
“}, false);”
server.on(“/serverIndex”, HTTP_GET, []() {
“return xhr;”
server.sendHeader(“Connection”, “close”);
“},”
server.send(200, “text/html”, serverIndex);
“success:function(d, s) {“
});
“console.log(‘success!’)”
/*handling uploading firmware file */
“},”
server.on(“/update”, HTTP_POST, []() {
“error: function (a, b, c) {“
server.sendHeader(“Connection”, “close”);
“}”
server.send(200, “text/plain”, (Update.hasError()) ?
“});” “FAIL” : “OK”);
“});” ESP.restart();
“</script>”; }, []() {
/* HTTPUpload& upload = server.upload();
* setup function if (upload.status == UPLOAD_FILE_START) {
*/ Serial.printf(“Update: %s\n”, upload.filename.c_str());
void setup(void) { if (!Update.begin(UPDATE_SIZE_UNKNOWN)) { //
start with max available size
Serial.begin(115200);
Update.printError(Serial);
// Connect to WiFi network
}
WiFi.begin(ssid, password);
} else if (upload.status == UPLOAD_FILE_WRITE) {
Serial.println(“”);
/* flashing firmware to ESP*/
// Wait for connection
if (Update.write(upload.buf, upload.currentSize) !=
while (WiFi.status() != WL_CONNECTED) {
upload.currentSize) {
DRAFT
delay(500);
Update.printError(Serial);
Serial.print(“.”);
}
}
} else if (upload.status == UPLOAD_FILE_END) {
Serial.println(“”);
if (Update.end(true)) { //true to set the size to the current
Serial.print(“Connected to “); progress
Serial.println(ssid); Serial.printf(“Update Success: %u\nRebooting...\n”,
upload.totalSize);
Serial.print(“IP address: “);
} else {
Serial.println(WiFi.localIP());
Update.printError(Serial);
/*use mdns for host name resolution*/
}
if (!MDNS.begin(host)) { //http://esp32.local
}
Serial.println(“Error setting up MDNS responder!”);
});
while (1) {
server.begin();
delay(1000);
}
}
void loop(void) {
}
server.handleClient();
Serial.println(“mDNS responder started”);
delay(1);
/*return index page which is stored in serverIndex */
}
server.on(“/”, HTTP_GET, []() {
79
View raw code • Username: admin
You should change the following lines on the code to • Password: admin
include your own network credentials:
You can change the username and password on the
const char* ssid = “”; code.
const char* password = “”; Note: After you enter the username and password, you
are redirected to the /serverIndex URL. You don’t need
The OTAWebUpdater example for the ESP32 creates
to enter the username and password to access the /
an asynchronous web server where you can upload new
serverIndex URL. So, if someone knows the URL to
code to your board without the need for a serial
upload new code, the username and password don’t
connection.
protect the web page from being accessible from others.
Upload the previous code to your ESP32 board. Don’t
A new tab should open on the /serverIndex URL. This
forget to enter your network credentials and select the
page allows you to upload a new code to your ESP32.
right board and serial port.
You should upload .bin files (we’ll see how to do that in a
moment).
DRAFT
own code.
Now, you can upload code to your ESP32 over-the-air
using a browser on your local network. For learning purposes let’s upload a new code that blinks
an LED (without delay). Copy the following code to your
To test the OTA Web Updater you can disconnect the Arduino IDE.
ESP32 from your computer and power it using a power
bank, for example (this is optional, we’re suggesting this /*
to mimic a situation in which the ESP32 is not connected * Rui Santos
to your computer).
* Complete Project Details https://
Update New Code using OTA Web Updater randomnerdtutorials.com
Open a browser in your network and enter the ESP32 IP */
address. You should get the following:
#include <WiFi.h>
#include <WiFiClient.h>
#include <WebServer.h>
#include <ESPmDNS.h>
#include <Update.h>
const char* host = “esp32”;
const char* ssid = “REPLACE_WITH_YOUR_SSID”;
const char* password =
“REPLACE_WITH_YOUR_PASSWORD”;
//variabls to blink without delay:
Enter the username and the password:
80
const int led = 2; “{“
unsigned long previousMillis = 0; // will store last time “if(form.userid.value==’admin’&&
LED was updated form.pwd.value==’admin’)”
const long interval = 1000; // interval at which to “{“
blink (milliseconds)
“window.open(‘/serverIndex’)”
int ledState = LOW; // ledState used to set the LED
“}”
WebServer server(80);
“else”
/*
“{“
* Login page
“ alert(‘Error Password or Username’)/*displays error
*/ message*/”
const char* loginIndex = “}”
“<form name=’loginForm’>” “}”
“<table width=’20%’ bgcolor=’A09F9F’ align=’center’>” “</script>”;
“<tr>”
“<td colspan=2>” /*
“<center><font size=4><b>ESP32 Login Page</b></ * Server Index Page
font></center>”
*/
“<br>”
const char* serverIndex =
“</td>”
“<script src=’https://ajax.googleapis.com/ajax/libs/jquery/
“<br>” 3.2.1/jquery.min.js’></script>”
“<br>” “<form method=’POST’ action=’#’ enctype=’multipart/
form-data’ id=’upload_form’>”
“</tr>”
“<input type=’file’ name=’update’>”
“<td>Username:</td>”
“<input type=’submit’ value=’Update’>”
“<td><input type=’text’ size=25 name=’userid’><br></
td>” “</form>”
DRAFT
“</tr>” “<div id=’prg’>progress: 0%</div>”
“<br>” “<script>”
“<br>” “$(‘form’).submit(function(e){“
“<tr>” “e.preventDefault();”
“<td>Password:</td>” “var form = $(‘#upload_form’)[0];”
“<td><input type=’Password’ size=25 “var data = new FormData(form);”
name=’pwd’><br></td>”
“ $.ajax({“
“<br>”
“url: ‘/update’,”
“<br>”
“type: ‘POST’,”
“</tr>”
“data: data,”
“<tr>”
“contentType: false,”
“<td><input type=’submit’ onclick=’check(this.form)’
“processData:false,”
value=’Login’></td>”
“xhr: function() {“
“</tr>”
“var xhr = new window.XMLHttpRequest();”
“</table>”
“xhr.upload.addEventListener(‘progress’, function(evt)
“</form>”
{“
“<script>”
“if (evt.lengthComputable) {“
“function check(form)”
“var per = evt.loaded / evt.total;”
81
“$(‘#prg’).html(‘progress: ‘ + Math.round(per*100) + /*return index page which is stored in serverIndex */
‘%’);”
server.on(“/”, HTTP_GET, []() {
“}”
server.sendHeader(“Connection”, “close”);
“}, false);”
server.send(200, “text/html”, loginIndex);
“return xhr;”
});
“},”
server.on(“/serverIndex”, HTTP_GET, []() {
“success:function(d, s) {“
server.sendHeader(“Connection”, “close”);
“console.log(‘success!’)”
server.send(200, “text/html”, serverIndex);
“},”
});
“error: function (a, b, c) {“
/*handling uploading firmware file */
“}”
server.on(“/update”, HTTP_POST, []() {
“});”
server.sendHeader(“Connection”, “close”);
“});”
server.send(200, “text/plain”, (Update.hasError()) ?
“</script>”; “FAIL” : “OK”);
/* ESP.restart();
* setup function }, []() {
*/ HTTPUpload& upload = server.upload();
void setup(void) { if (upload.status == UPLOAD_FILE_START) {
pinMode(led, OUTPUT); Serial.printf(“Update: %s\n”, upload.filename.c_str());
Serial.begin(115200); if (!Update.begin(UPDATE_SIZE_UNKNOWN)) { //
start with max available size
// Connect to WiFi network
Update.printError(Serial);
WiFi.begin(ssid, password);
}
Serial.println(“”);
} else if (upload.status == UPLOAD_FILE_WRITE) {
// Wait for connection
/* flashing firmware to ESP*/
DRAFT
while (WiFi.status() != WL_CONNECTED) {
if (Update.write(upload.buf, upload.currentSize) !=
delay(500);
upload.currentSize) {
Serial.print(“.”);
Update.printError(Serial);
}
}
Serial.println(“”);
} else if (upload.status == UPLOAD_FILE_END) {
Serial.print(“Connected to “);
if (Update.end(true)) { //true to set the size to the
Serial.println(ssid); current progress
Serial.print(“IP address: “); Serial.printf(“Update Success: %u\nRebooting...\n”,
upload.totalSize);
Serial.println(WiFi.localIP());
} else {
/*use mdns for host name resolution*/
Update.printError(Serial);
if (!MDNS.begin(host)) { //http://esp32.local
}
Serial.println(“Error setting up MDNS responder!”);
}
while (1) {
});
delay(1000);
server.begin();
}
}
}
void loop(void) {
Serial.println(“mDNS responder started”);
server.handleClient();
82
delay(1);
//loop to blink without delay
unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= interval) {
// save the last time you blinked the LED
previousMillis = currentMillis;
// if the LED is off turn it on and vice-versa:
ledState = not(ledState);
// set the LED with the ledState of the variable:
Upload a new sketch over-the-air to the ESP32
digitalWrite(led, ledState);
In your browser, on the ESP32 OTA Web Updater page,
} click the Choose File button. Select the .bin file
} generated previously, and then click Update.
View raw code After a few seconds, the code should be successfully
uploaded.
As you can see, we’ve added the “blink without delay”
code to the OTAWebUpdater code, so that we’re able to
make updates later on.
After copying the code to your Arduino IDE, you should
generate a .bin file.
Generate a .bin file in Arduino IDE
Save your sketch as LED_Web_Updater.
To generate a .bin file from your sketch, go
to Sketch > Export compiled Binary The ESP32 built-in LED should be blinking.
DRAFT
A new file on the folder sketch should be created. Go
to Sketch > Show Sketch Folder. You should have two
files in your Sketch folder: the .ino and the .bin file. You
should upload the .bin file using the OTA Web Updater.
83
IT & ITES Trade Theory for Exercise 2.5.173
Smart City - Position the appropriate sensors and collect the information
required in Smart City
Check the battery level and solar panel connection with sensor node
Objective:
• to check the battery level and solar panel connection with sensor node.
Requirements:
• Arduino IDE
• Arduino
• Node mcu WiFi
• 12 volt battery
PROCEDURE:
ESP32 Solar Powered – Circuit Overview
The following diagram shows how the circuit to power
the ESP32 with solar panels works.
DRAFT
responsible for charging the battery and prevent
overcharging.
• The lithium battery outputs 4.2V when fully charged.
• You need to use a low dropout voltage regulator circuit
(MCP1700-3302E) to get 3.3V from the battery output.
• The output from the voltage regulator will power the
ESP32 through the 3.3V pin.
When wiring solar panels in parallel you’ll get the same
Solar Panels output voltage, and double the current (for identical solar
panels). As you can see in the following figure, the solar
The solar panels we’re using have an output voltage up
panels output approximately 6V.
to between 5V to 6V. If you want your battery to charge
faster, you can use several solar panels in parallel. In
this example we’re using two mini solar panels as shown
in the following figure.
84
The OUT+ and OUT- are the battery outputs. These
lithium batteries output up to 4.2V when fully charged
(although they have 3.7V marked in the label).
DRAFT
To drop the voltage efficiently with batteries, you need to
use a low-dropout regulator, or LDO for short, that can
regulate the output voltage.
85
Any LDO that has similar specifications to these two are
also good alternatives. Your LDO should have similar
specs when it comes to output voltage, quiescent current,
output current and a low dropout voltage. Take a look at
the datasheet below.
DRAFT
pins.
86
The voltage divider formula is as follows:
Vout = (Vin*R2)/(R1+R2)
So, if we use R1=27k Ohm, and R2=100k Ohm, we get:
Vout = (4.2*100k)/(27k + 100k) = 3.3V
So, when the battery is fully charged, the Vout outputs
3.3V that we can read with an ESP32 GPIO.
Add two resistors to your circuit as shown in the following
schematic diagram.
DRAFT
analog values to a percentage:
When you have your ESP32 powered with batteries or
solar powered as in this case, it can be very useful to float batteryLevel = map(analogRead(33), 0.0f, 4095.0f,
monitor the battery level. One way to do that is reading 0, 100);
the output voltage of the battery using an analog pin of
If you’re using ESP8266, it just supports analog reading
the ESP32.
on the A0 pin. So, you need to wire the circuit as follows:
However, the battery we’re using here outputs a
maximum of 4.2V when fully charged, but the ESP32
GPIOs work at 3.3V. So, we need to add a voltage divider
so that we’re able to read the voltage from the battery.
87
IT & ITES Trade Theory for Exercise 2.5.174
Smart City - Position the appropriate sensors and collect the information
required in Smart City
DRAFT
parameters that allow GPS devices to decode and Pseudorandom code
compute the precise location of the satellite. GPS
It is an I.D. code that identifies which satellite is
receivers use this information and trilateration to calculate
transmitting information. You can see which satellites you
a user’s exact location. Essentially, the GPS receiver
are getting signals from on your device’s satellite page.
measures the distance to each satellite by the amount
of time it takes to receive a transmitted signal. With Ephemeris data
distance measurements from a few more satellites, the
Ephemeris data is needed to determine a satellite’s
receiver can determine a user’s position and display it.
position and gives important information about the health
of a satellite, current date and time.
Almanac data
Almanac data tells the GPS receiver where each GPS
satellite should be at any time throughout the day and
shows the orbital information for that satellite and every
other satellite in the system.
Neo-6M GPS Module
The NEO-6M GPS module is shown in the figure below.
It comes with an external antenna and does not come
with header pins. So you will need to solder it.
88
• 3.3V LDO Regulator
The operating voltage of the NEO-6M chip is from 2.7 to
Overview of NEO-6M GPS Module 3.6V. But, the module comes with MIC5205 ultra-low
dropout 3V3 regulator from MICREL. The logic pins are
NEO-6M GPS Chip also 5-volt tolerant, so we can easily connect it to an
The heart of the module is a NEO-6M GPS chip from u- Arduino or any 5V logic microcontroller without using any
blox. It can track up to 22 satellites on 50 channels and logic level converter.
achieves the industry’s highest level of sensitivity i.e. -
161 dB tracking, while consuming only 45mA supply
current. The u-blox 6 positioning engine also boasts a
Time-To-First-Fix (TTFF) of under 1 second.
One of the best features the chip provides is Power Save
Mode(PSM). It allows a reduction in system power
consumption by selectively switching parts of the receiver
ON and OFF. This dramatically reduces power
consumption of the module to just 11mA making it
suitable for power sensitive applications like GPS Battery & EEPROM
wristwatch.
The module is equipped with an HK24C32 two wire serial
The necessary data pins of NEO-6M GPS chip are EEPROM. It is 4KB in size and connected to the NEO-
broken out to a “0.13 pitch headers. This includes pins 6M chip via I2C.The module also contains a rechargeable
required for communication with a microcontroller over button battery which acts as a super-capacitor.
UART.
An EEPROM together with battery helps retain the battery
DRAFT
Note:- The module supports baud rate from backed RAM (BBR). The BBR contains clock data, latest
4800bps to 230400bps with default baud of position data (GNSS or bit data) and module
9600. configuration. But it is not meant for permanent data
storage.
As the battery retains clock and last position, time to first
fix (TTFF) significantly reduces to 1s. This allows much
faster position locks.
Without the battery the GPS always cold-start so the initial
GPS lock takes more time. The battery is automatically
charged when power is applied and maintains data for
up to two weeks without power.
89
Pinout Arduino Mega
• GND is the Ground Pin and needs to be connected Arduino is an open-source electronics platform based
to GND pin on the Arduino. on easy-to-use hardware and software. Arduino boards
are able to read inputs - light on a sensor, a finger on a
• TxD (Transmitter) pin is used for serial
button, or a Twitter message - and turn it into an output -
communication.
activating a motor, turning on an LED, publishing
• RxD (Receiver) pin is used for serial communication. something online. You can tell your board what to do by
• VCC supplies power for the module. You can directly sending a set of instructions to the microcontroller on
connect it to the 5V pin on the Arduino. the board. To do so you use the Arduino programming
language (based on Wiring), and the Arduino Software
(IDE), based on Processing.
DRAFT
90
IT & ITES Trade Theory for Exercise 2.5.175
Smart City - Position the appropriate sensors and collect the information
required in Smart City
DRAFT
wireless sensor network (WSN) is found to be an efficient standard. The IEEE 802.15.4 standard defines the
method of measuring and monitoring air pollutants. physical and MAC (Medium Access Control) layers for
low rate wireless personal area network.
WSN is one of the most significant technologies in 21st
century. A WSN is a system comprised of radio frequency Wireless Network Module
(RF) transceivers, sensors, microcontrollers and power
sources. Recent advances in wireless sensor network
technology have led to the development of low cost, low
power multifunctional sensor nodes. There are various
technologies available for WSN , viz ., Wi Fi, ,Bluetooth,
and ZigBee etc. It is an undisputed fact that Zigbee has
many advantages over other methods. To name a few, it
operates in industrial scientific and medical (ISM) band
of 2.4 GHz,and it is low cost, high reliability , very long
battery life, high security, self-healing properties,, large
number of nodes supported , ease of deployment ,
guaranteed delivery , route optimization.
Multi-hop communication over the ISM band is also
possible in WSN since it consumes less power than
traditional single hop communication . A communication
network is composed of many nodes each of which can ZigBee technology is known by its very low power
transmit and receive data over communication links. The consumption, which in combination with low power
ZigBee network layer supports star, tree and mesh sensor circuits comprises a system that can operate for
topologies. The ZigBee coordinator is responsible for a long period of time. By using the ultra low power
initiating and maintaining the devices on the network and MSP430 microcontroller and the CC2480 ZigBee
91
coprocessor, it is possible to achieve several years of resistive type humidity sensor is used. Carbon monoxide
operation using common off-the-shelf batteries. The is measured using TGS 2442- CO sensor, carbon dioxide
ZigBee module ez430-RF2480 by Texas instruments is is measured using TGS 4161-CO2 sensor, the presence
used. of volatile organic compounds such as Benzene is
measured using TGS 823- VOC sensor.
This is a complete wireless development tool that
includes the ultra low power microcontroller MSP430 and Nitrogen dioxide is measured using TGS 2106 sensor.
the low power transceiver CC2480. It operates in the 2- The electrical response of the gas sensors is converted
4 GHz industrial scientific medical (ISM) free radio into voltage signals by using suitable signal conditioning
frequency band with 16 channels. It provides extensive circuits.
hardware support for packet handling, data buffering,
Central Server
burst transmissions, clear channel assessment, link
quality indication and wake on radio. There are five power The central server here is the personal computer (PC)
down modes by which the power consumption can be with accessibility to the internet. The server (PC) is
minimized. connected to the ZigBee modem using the RS232
communication standard. The data received from the
Sensor Array:
ZigBee receiver is stored and displayed in the PC. A
A simple multimode network is developed using ZigBee graphical user interface is developed, for the continuous
technology. The sensor array consists of sensors like analysis of the data.
CO sensor, CO2 sensor, VOC sensor and NOX sensors
The data displayed on the internet will help to check the
along with temperature and humidity sensors. The
real-time air pollutants level. For this a normal browser
temperature is measured using DS 1820 sensor and
on any PC can be used.
DRAFT
92
IT & ITES Trade Theory for Exercise 2.6.176
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
Check the M2M Wireless Sensor Network (WSN) in IoT ZigBee router, end device
and coordinator configuration
Objective:
• to check the M2M Wireless Sensor Network (WSN) in IoT ZigBee router, end device and coordinator
configuration.
DRAFT
example, a WSN, at home can be used for light control,
heating ventilation air conditioning (HVAC), security
monitoring, and emergency event detection. And for The IEEE 802.15.4
industrial control can be used to improve the current
Before start being more technical about ZigBee, let’s
manufacturing control system, detect unstable situations,
introduce the IEEE 802.15.4 standard. Basically what It
control production pipelines, and so on.
does is to specify the physical and data link layer
ZigBee provides ultra low consumption and efficiency protocols for low-rate wireless personal area network
(thanks to the adaptable duty cycle, the low rate rates (LR-WPAN) and it was defined in 2003.
and the low coverage radio), and enable large scale
networks for the WPN, making it one of the most
convenient standards for this purpose.
The ZigBee Alliance
The ZigBee alliance objective is to work on the
interoperability issues of IEEE 802.15.4/ZigBee protocol
stacks. There are three levels of membership: Adopter,
Participant, and Promoter.
• Adopter: Offers access to final, approved
specifications, use of the Zigbee Member logo,
participation in interoperability events, workshops and
developers conferences.
• Participant: Offers full participation in all Alliance
committees, work/task groups and member meetings.
Participants earn voting rights in work groups and
93
Devices in a LR-WPAN can be classified as full function • ZigBee Coordinator: responsible for initializing,
device (FFDs) and reduce function devices (RFDs). One maintaining and controlling the network. There is one
device is designated as the PAN coordinator which is and only one per network
the responsible for maintaining the network and
• ZigBee Router: connected to the coordinator or other
managing other devices
routers. It can have zero or more children nodes.
It also defines two types of network topologies: star Participate in multi hop routing
topology and peer-to-peer topology.
• ZigBee End Devices: does not participate in routing
The star pattern is structured, where the coordinator of
the network will necessarily be the central node. Peer-
to-Peer networks can form arbitrary patterns of
connection, and their extension is limited by the distance
between each pair of nodes.
It can operate on channel 868 MHz in Europe, 916 MHz
in America and Australia and 2400 MHz worldwide, also
some other were added.
DRAFT
allows to the device to save energy when duty cycles
are defined and the device sleeps. It also characterize
the link quality/strength of a received signal of a link -
Link Quality Indication (LQI).
The Data Link Layer
Is the layer in charge of data transference between the
nodes of the network. It introduces - on the MAC sublayer
- the superframe structure. The superframe is defined
by the time between two beacons send by the coordinator
of the network. The superframe can be divided between
active period and inactive period, this - together with the
Finally in the mesh topology there is no synchronization,
sleeping state- allows to save energy during the inactive
therefore no beacon enable mode, meaning that the
periods.
ZigBee Coordinator and the ZigBee Routers must be
The beacons are used also to synchronizing with other always on. And because of the dynamics of the network
devices, announcing the existence of a PAN, and there is no bandwidth guaranty.
informing pending data in coordinators.
ZigBee - First release
The ZigBee protocol uses the IEEE 802.15.4 standard
for the first two layers and adds the network and security,
and framework protocol on top of it.
The network layer provides reliable and secure
transmission among devices.
It defines three types of devices:
94
IT & ITES Trade Theory for Exercise 2.6.177
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
Schematic
Let’s Start Building
DRAFT LED turns ON
95
LED turns OFF
• You can download the android app from the app link
given below:
• https://github.com/Mayoogh/Arduino-Bluetooth-Basic
• Pair your device with HC 05/06 Bluetooth module1)
Turn ON HC 05/06 Bluetooth module2) Scan for
available device3) Pair to HC 05/06 by entering default
password 1234 OR 0000
• Install LED application on your android device
• Open the Application
• After connecting successfully
• Press ON button to turn ON LED and OFF button to
turn OFF the LED
• Paring screen
DRAFT
• Disconnect button to disconnect from Bluetooth
module.
This is just basic tutorial on interfacing Bluetooth module
with Arduino This project can be improved to a higher
level like Home automation using a smartphone,
Smartphone controlled robot and much more.
96
IT & ITES Trade Theory for Exercise 2.6.178
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
DRAFT
application connects an AVR ATmega8 and SIM300,
SIM900 module using a RS232 connection. Most GSM As we are using AVR ATmega8 we prefer TTL UART
modems have same AT commands. Interface. Most GSM Modem have RS232 and UART
(TTL) Interface.
Contents
Few GSM Modem comes with USB Interface also, when
• Types of GSM Modem
you are interfacing GSM Modem with PC use USB
• Points to consider while choosing GSM modem Interface. It eliminates need of USB to serial converter
and few modems are USB powered so no need of
• Interface to GSM modems.
external power supply.
• Implementation of AT-Command set.
Size, Price
• PDU string compression and decompression.
Size and price of each modem varies based on its
• SMS transmission, how to send and receive. manufacturer use of external components.
Types of GSM Modems Audio Interface (MIC/SPK)
There are many GSM modems are available in market Audio interface is required if you are using GSM Modem
Simcom SIM300, SIM900 and Quectel M10. lets review to make calls or to interface with DTMF decoder for
on its features making IVRS system.
Points to consider while choosing GSM Modem
There are may GSM modems available in market these
97
IT & ITES Trade Theory for Exercise 2.6.179
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
DRAFT
peripherals present not only on a home or office network You can find cmd by pressing windows button on
but can go further over internet. keyboard and then in search type cmd. Open cmd and
enter ipconfig /all command. This command will display
the IP that router assigned to your system.
See the below picture.
DRAFT
Vehicle Tracking System using GPS and Arduino
GPS module sends the data related to tracking position
In our previous article, we have learned about “How to in real time, and it sends so many data in NMEA format
interface GPS module with Computer and How to make (see the screenshot below). NMEA format consist several
a GPS updated Clock”. In this project we are going one sentences, in which we only need one sentence. This
step ahead with GPS and going to track a vehicle using sentence starts from $GPGGA and contains the
GPS and GSM. This Vehicle Tracking System can also coordinates, time and other useful information.
be used for Accident Detection Alert System, Soldier This GPGGA is referred to Global Positioning System
Tracking System and many more, by just making few Fix Data. Know more about Reading GPS data and its
changes in hardware and software. strings here.
Tracking of vehicle is a process in which we track the We can extract coordinate from $GPGGA string by
vehicle location in form of Latitude and Longitude (GPS counting the commas in the string. Suppose you find
coordinates). GPS Coordinates are the value of a $GPGGA string and stores it in an array, then Latitude
location. This system is very efficient for outdoor can be found after two commas and Longitude can be
application purpose. found after four commas. Now these latitude and
longitude can be put in other arrays.
99
$GPGGA,HHMMSS.SSS, latitude, N,longitude,
E,FQ,NOS, HDP,altitude, M,height, M,,checksum data
Identifier Description
Longitude Longitude(Coordinate)
M Meter
Height Height
DRAFT
100
IT & ITES Trade Theory for Exercise 2.6.181
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
Identify the Wi-Fi module and lua script for data communication
Objective:
• to identify the Wi-Fi module and lua script for data communication.
DRAFT
Modern Internet development tools such as Node.js • Support Smart Link Smart Networking
can take advantage of the NodeMCU with the built- • ESP8266 has IO Pin
in API to put your idea on the fast track
immediately. NodeMCU is built based on the • Don’t need to download resetting
mature ESP8266 technology to take advantage of the • A great set of tools to develop ESP8266
abundant resources available on the web. • Lowest cost WI-FI
NodeMCU has ESP-12 based serial WiFi integrated • FOR Arduino like hardware IO
onboard to provide GPIO, PWM, ADC, I2C and 1-WIRE
resources at your fingertips, built-in USB-TTL serial with • Greatly speed up your IOT application developing
super reliable industrial strength CH340 for superior process
stability on all supported platforms. This module is one • Open-source, Interactive, Programmable, Low cost,
of the cheapest available wifi-modules in the market. V3 Simple, Smart, WI-FI enabled
or Version3 is the latest version of this module. This
• W I-FI MCU ESP8266 integrated and easy to
tutorial, however, will facilitate you to connect all the
prototyping development kit.
versions of ESP8266 NodeMcu, i.e V1, V2 or V3.
• We provide the best platform for IoT application
• Arduino-like hardware IO – Advanced API for
development at the lowest cost.
hardware IO, which can dramatically reduce the
redundant work for configuring and manipulating • NodeMCU has built-in USB-TTL serial with super
hardware. Code like Arduino, but interactively in Lua reliable industrial strength CH340G for superior
script. stability on all supported platforms.
• Nodejs style network API Event-driven API for • Advanced API f or hardware IO, which can
network applications, which facilitates developers dramatically reduce the redundant work for
writing code running on a 5mm5mm sized MCU in configuring and manipulating hardware.
Nodejs style. Greatly speed up your IOT application • Event-driven API for network applications, which
developing process. facilitates developers writing code running on a
5mm*5mm sized MCU in Nodes style.
101
IT & ITES Trade Theory for Exercise 2.6.182
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
DRAFT
passengers) with a real-time aircraft position and map
speed and direction of movement, helping them to
of each flight’s progress. GPS also allows airline
understand how landscapes change over time. Similarly,
operators to pre-select the safest, fastest and most fuel-
GPS receivers can be installed on solid bedrock to help
efficient routes to each destination, and ensure that each
understand very small and very slow changes in tectonic
route is followed as closely as possible when the flight is
plate motion across the world.
underway.
Surveying
Marine
When high accuracy GPS is fitted to boats and ships, it Surveyors are responsible for mapping and measuring
allows captains to navigate through unfamiliar harbors, features on the earth’s surface and under water with high
shipping channels and waterways without running accuracy. This includes things like determining land
aground or hitting known obstacles. GPS is also used to boundaries, monitoring changes in the shape of
position and map dredging operations in rivers, wharfs structures or mapping the sea floor. Surveyors have
and sandbars, so other boats know precisely where it is historically required line-of-sight between their
deep enough for them to operate. instruments in order to undertake such work, but the
availability of high accuracy GPS receivers has reduced
Farming the need for this. GPS can either be setup over a single
point to establish a reference marker, or it can be used
Farmers rely on repeat planting season after season to in a moving configuration to map out the boundaries of
maximize their crop productions. By putting GPS various features. This data can then be transferred into
receivers on tractors and other agricultural equipment, mapping software to create very quick and detailed maps
farmers can map their plantations and ensure that they for customers.
return to exactly the same areas when sewing their seeds
in future. This strategy also allows farmers to continue Military
working in low- visibility conditions such as fog and
The GPS system was originally developed by the United
darkness, as each piece of machinery is guided by its
102
States Department of Defense for use by the US military, Today, GPS is used to map the location of vehicles and
but was later made available for public use. Since then, other assets on various battlefields in real time, which
GPS navigation has been adopted by many different helps to manage resources and protect soldiers on the
military forces around the world, including the Australian ground. GPS technology is also fitted to military vehicles
Defense Force. Some countries have even decided to and other hardware such as missiles, providing them
develop their own satellite navigation networks for use with tracking and guidance to various targets at all times
during wartimes. of the day and in all weather conditions.
DRAFT
103
IT & ITES Trade Theory for Exercise 2.6.183
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
Required Hardware: 1. Click on the Windows Start icon on the task bar.
• 1 x Arduino or 1 x Starter Kit for Raspberry Pi + 2. In the Search programs and files.. window, type: cmd
Raspberry Pi
3. Press Enter on the keyboard to go to the Command
• 1 x GPRS+GPS Quad band Module for Arduino Prompt.
(SIM908)
Using Windows 8:
• 1 x GPRS antenna
1. Click on the Search (magnifying glass) icon on the
• 1 x GPS antenna task bar located on the right side of the desktop.
• 1 x SIM card 2. In the Search Apps window, type in the letters: cmd
• 1 x PC 3. Press Enter on the keyboard to go to the Command
Prompt.
PROCEDURE:
At the Command Prompt type >ipconfig –all
Setting up a Direct Ethernet Connection using a USB to
Ethernet Adapter Press Enter to review the Ethernet adapter Local Area
Connection Settings:
KB0166: Setting up a Direct Ethernet Connection using
a USB to Ethernet Adapter In this example, the IP address of the computer is
169.254.241.227 and the subnet mask is 255.255.0.0
In some cases a network connection to your main router
is not close or convenient, and the direct USB cable 4. Assign the IP Address and Subnet in your Clock.
connection will not work properly. a. Choose an available IP address.
DRAFT
A reliable and easy solution is to install a USB to Ethernet b. The first 9 digits of the clock’s IP address must
adapter. This creates a one port match your computer’s IP address, exactly.
network connection between the clock and a USB port c. The last 3 digits of your clock’s IP address must
on your PC or MAC. be different.
NOTE: Some models may come with a driver CD. Make Using the example above, we will assign the clock’s IP
sure to follow the manufacturer’s instructions address to: 169.254.241.230.
to install the drivers first. a. Enter into Supervisor Mode at your employee time
clock terminal.
Solution:
b Press the padlock key on the time clock.
1. Connect the Ethernet cable to the port on the bottom
of the clock and the port on the adapter. c. Enter in your security code – the default security code
is 00 00 00.
2. Plug the USB connection of the adapter into your
computer. Windows should recognize the connection d. Using the Arrow keys, scroll through the options until
and the Ethernet port connection lights should activate you find the option View IP Address – press Enter.
underneath the clock.
e. The current IP address of the clock will appear. Press
3. If you are using Windows, go to the Command Prompt Enter.
to verify the IP address of the new connection.
f. Enter the desired IP address including leading zeroes
NOTE: Apple MAC users can select the Apple if needed. (For example .076 etc.)
Icon\System Preferences\Network and the
The IP address in this Example is: 169.254.241.230
“USB Ethernet” option to
g. The clock will display IP Address Set Successfully.
view the new network settings described below.
h. Enter the Subnet Mask as 255.255.000.000
Using Windows 7, Vista, or Windows 10:
i. The clock will display Subnet Mask Set Successfully.
104
j. Enter the Gateway as 000.000.000.000. m. The clock will display DNS Address Set successfully.
k. The clock will display Gateway Address Set n. Press Clear to exit out of Supervisor Mode.
Successfully.
o. To log into the time clock open a web browser on
l. Enter the DNS as 000.000.000.000 your computer, and in the address bar type in the IP
address of the clock and press Enter.
DRAFT
105
IT & ITES Trade Theory for Exercise 2.6.184
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
DRAFT
on the data collected are discussed in this paper in detail. parameters of timestamp, temperature and humidity are
Weather parameters like temperature, humidity, PM 2.5 responsible for the concentration of PM 2.5. The data of
and PM 10 concentrations and Air Quality Index (AQI) PM 2.5 was taken from Berkeley Earth database and
are monitored and visualized in graphical means using temperature and other weather parameters are populated
the Raspberry Pi as server and data accessed over the using API connectivity to a local weather station in
intranet or internet in a specified subnet or world wide Weather Channel. The data is not populated from the
web. The data visualization is provided as result and same geographic location. To address these issues, an
proves to be a robust framework for analyzing weather IoT based weather monitoring system is designed and
parameters in any geographical location studying the developed at Thai-Nichi Institute of Technology.
effect of smog and PM 2.5 concentration.
106
IT & ITES Trade Theory for Exercise 2.6.185
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
Use signals from GPS satellites to determine latitude, longitude and altitude to
within feet by Location Sensors for precise positioning
Objective:
• to use signals from GPS satellites to determine latitude, longitude and altitude to within feet by Location
sensors for precise Positioning.
DRAFT
processed. Optical sensors have been developed to
determine clay, organic matter, and moisture content of that are placed at various locations throughout growing
the soil. Vishay, for example, offers hundreds of fields. These stations have a combination of sensors
photodetectors and photodiodes, a basic building block appropriate for the local crops and climate. Information
for optical sensors. such as air temperature, soil temperature at various
depths, rainfall, leaf wetness, chlorophyll, wind speed,
Electrochemical Sensors provide key information dew point temperature, wind direction, relative humidity,
required in precision agriculture: pH and soil nutrient solar radiation, and atmospheric pressure are measured
levels. Sensor electrodes work by detecting specific ions and recorded at predetermined intervals. This data is
in the soil. Currently, sensors mounted to specially compiled and sent wirelessly to a central data logger at
designed “sleds” help gather, process, and map soil programmed intervals. Their portability and decreasing
chemical data. prices make weather stations attractive for farms of all
Mechanical Sensors measure soil compaction or sizes.
107
IT & ITES Trade Theory for Exercise 2.6.186
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
DRAFT
seemed like a monumental loss in the technology race location. Each satellite is powered by solar energy and
turned into a massive advantage in the hands of the orbits the Earth twice a day, transmitting signals regularly.
accomplished scientists at MIT. They immediately started
As the GPS technology improved, various industries have
working on a new satellite system that would allow the
started adopting the advanced tools it introduced to the
US army to keep track of strategical locations and targets
market. Especially for the vehicle industry, GPS tracking
on the ground. TRANSIT was the first satellite navigation
systems have been a groundbreaking development.
system built by the US Navy to locate US submarines
Today, tracking devices are being used for many
carrying nuclear missiles in 1959. With the help of private
purposes; mainly to monitor the movements of people,
tech companies like Aerospace Corporation, the military
vehicles, and assets. Features such as real-time tracking,
started working on another system; a series of satellites
route history, geofence zones and event alerts allow
in orbit that send signals to receivers on the ground
users to provide personal safety measures for family
continuously. After 11 years of research and
members and enhance vehicle security. Fleet companies
development, the US Air Force launched the first satellite
use the data provided by GPS and telematics devices to
of the 24-satellite navigation system called NAVSTAR.
reduce operational costs and enforce better driving
An unfortunate incident that happened in 1983 changed habits. On the other hand, concerned parents and family
the fate of the GPS technology forever. Korean Air Flight members employ the services of personal locators to
007 wandered off course into Soviet airspace and was keep an eye on their loved ones. The ability to track the
shot down shortly after. Following the aftermath of the location of a person in real-time and receive instant
event, President Ronald Reagan signed an executive notifications of important events make personal tracking
order to make GPS available for civilian use to improve devices one of the best safety systems on the market.
navigation and air safety once it is fully operational.
When it comes to selecting the right GPS tracker, there
Another significant event in the history of GPS is the
are mainly two options you can choose from; battery-
removal of selective availability that was in effect since
powered also known as portable trackers and hardwired
the first Gulf War by Bill Clinton in 2000. Since then, the
tracking devices. Each type comes with its own set of
US military expanded the size of the constellation to 31
advantages and disadvantages, and they can be used
108
for different purposes. Portable trackers are the go-to the device. These GPS trackers could be used by
device for keeping track of a person or an object. anyone, including security agencies in case they want to
Innovations in the field introduced devices with longer track a potential suspect or can be used by parents to
battery lives and access to a wealth of information. track the position of their kids and thus remain informed
Portable devices can also be moved from one object to of their children’s activities. Therefore, these types of
another easily and with optional magnetic cases; the GPS tracking unit devices are very important and useful.
placement options are limitless. Hardwired tracking
Data pullers
devices are more suitable for tracking vehicles, and they
need to be connected to a power source. The go-to place The data pullers are employed for tracking the location
for a hardwired tracker is under the dashboard where it same as data pushers. The main difference in both of
can be attached to the car battery discreetly. While they these units is that the data pushers do not send any kind
are not mobile, hardwired trackers are less susceptible of information to the server, rather it is requested to send
to tampering and provide better accuracy when locating any required data. Also, the data pushers send the data
a target. Fleet companies prefer wired tracking devices; at regular intervals, however, the data pullers are always
with additional sensors and access to the vehicle engine on and could be used to retrieve data at any time.
computer, these trackers provide the necessary Data loggers
information to eliminate the causes of fuel waste, get
ahead of driver related problems and lower maintenance The data loggers are used to store the position of any
expenses. vehicle or person in its internal memory and do not send
any data to a central server.
GPS is an abbreviation for Global Positioning System.
This term basically means a navigation structure which Therefore, all of the three types of GPS tracking units
is used for the accurate location of an individual or a are very beneficial and helpful in tracking the exact
vehicle (Zap, 2008). The device which is usually used location of any specified person, vehicle or fleet tracking.
for this purpose is a GPS tracking system unit. Understanding GPS Technology
This unit can be used to tell the precise location of a When many people begin researching and learning about
person or any vehicle, whether it is stationary or moving. the various products offered throughout the GPS
The GPS tracking unit records the data within the unit tracking industry they are often left feeling
and then transmits it to a central server with the help of a overwhelmed. Tracking System understands that there
satellite modem which directly fits inside the unit. The are many terms and words associated with vehicle
unit can be used to view the position of any person or management and GPS monitoring technology that
vehicle in a real-time scenario (or later) whenever it is parents, businesses, and police agencies will likely hear
necessary to check the situation of any vehicle (Smith, for the first time as they begin their journey into the GPS
2006). The software used for this purpose is called GPS and telematics industries. This glossary was designed
tracking software which helps to view the location of any to help bring simplicity and understanding to many of
DRAFT
target intended. Nowadays, mobiles having the GPS the terms, words, and phrases frequently used
capability are being used to track the precise position of throughout the GPS monitoring industry, providing a
any person with the help of GPS software which is resource for anyone interested in a complete and
specifically designed for mobile systems. comprehensive overview of GPS-related definitions.
There are basically three types of GPS tracking A-GPS
devices which are as follows:
A-GPS is an acronym associated with the term “Assisted-
• Data pushers Global Positioning System”. Assisted GPS basically
• Data pullers refers to the combination of both GPS satellite and
cellular/wireless technologies. A-GPS is a term often
• Data loggers associated with and used to describe how location-based
Data pushers data recorded onto a GPS tracker is transmitted.
The data pushers are those types of GPS tracking units Active
which are usually used for any personal tracking, asset Active tracking is synonymous with the more commonly
tracking or the tracking of any type of vehicle. In case of used term for real-time tracking. Active simply refers to
personal as well as asset tracking, the location of any having instant remote access to GPS tracking data.
specific person or vehicle is sent to the server over short
time intervals where the data is stored as well as Alkaline Battery
examined closely (Zap, 2008). As far as the vehicle A f orm of battery often used in both the GPS
tracking is concerned, the GPS tracking unit not only Tracking Key (AAA alkaline battery) and GPS Tracking
sends the position of the vehicle to the server but is also Key Pro (AA alkaline battery) models, alkaline batteries
able to analyze the speed at which the vehicle is in motion are the most commonly used form of battery in consumer
or any other data required. These units send all the electronics products. Known for having a long shelf life,
important information to the server where all the required
coordinates are analyzed clearly and then are stored in
109
alkaline batteries are also viewed as being high-quality to acquire radio signals from GPS satellites, external GPS
sources of power. antennas are designed separately from the monitoring
device. Although the external antenna is independent of
Atomic Clock
the GPS unit, it allows the GPS hardware to capture GPS
Although the name sounds pretty intimidating, an atomic signals. External antennas are popular among
clock is simply a way of calculating time through the businesses looking for some versatility and flexibility in
periodic movements of atoms. Atomic clockwork is regards to the placement of the tracking device.
utilized by Global Positioning System units to provide a
Fleet Management
timing mechanism that allows GPS accuracy to be
calculated with precision. The process of overseeing and managing numerous
mobile assets and vehicles of a single company in an
Auto Theft Recovery
effort to improve routing, driver safety, customer service
The process of safely recovering a vehicle or mobile and overall company efficiency. Having remote access
asset if it is stolen. Real-time GPS trackers are often to all vehicles operating in the field provides companies
used by people looking for an auto-theft recovery/ with a way to safeguard equipment, control employee
prevention system because the devices can alert users routes more effectively and reduces the costs associated
if a vehicle is moved, and the technology provides 24/7 with fuel consumption.
access to an automobile’s location.
Geo-Fence
Auxiliary Power
Geo-fence, or geo-fencing, is an alert feature that is
Auxiliary power refers to the supplemental or secondary common among many real-time tracking systems.
source of power that is used by a tracking unit or Essentially how the feature works is by allowing the user
electronic device. This could refer to a GPS unit using to set a virtual boundary or “fence” around a particular
an alternative source of power such as a cigarette lighter area on a map. The alert is programmed into the GPS
adapter to power the system rather than the device’s unit, and when the object/asset being monitored enters
primary source of power, an internal battery system such or exits through that virtual boundary an alert is sent to
as a lithium ion or alkaline. the GPS user via email or cellular text message.
Car Tracker Geotagging/Geocoding
GPS vehicle management system that is used to monitor The process of linking, connecting or tagging forms of
the movements of an automobile. Commonly used by digital media such as photographs, video data, RSS
parents to observe teen driving behaviours, businesses feeds or even web pages with geographical data that
to monitor employee driving activity and police agencies includes longitude and latitude positions acquired through
to conduct surveillance. GPS tracking. This feature is popular among outdoor
adventurists who enjoy documenting their journeys and
Covert Surveillance
DRAFT
uploading the information for friends and family.
The behaviour or act of acquiring, observing or recording
Global Positioning System (GPS)
data or information related to the activities of another in
a secret fashion. Private investigators and police The heart and soul of both the GPS vehicle tracking and
departments have a fundamental need to gather GPS navigational industries. The most simplistic way to
information in a covert way, making vehicle describe the Global Positioning System would be as an
tracking systems very popular among security organized network of satellites orbiting the planet that
professionals and law enforcement. were designed and are controlled by the U.S. Department
of Defense.
Drivers
Google Earth
A form of the computer program that has controlling
power over a device or GPS unit. When GPS tracking Satellite image program designed and updated by Google
devices are connected to a personal computer it may be that many GPS systems use as a primary source of
necessary or required to load new drivers to ensure showcasing recorded or live tracking data. The computer
proper system operation. information program offers users access to historical
imagery, street views, 3D buildings and more.
Elderly Tracking
GPRS
The process of monitoring and observing the driving
habits and behaviours of a senior citizen in an effort to GPRS are the acronyms for “General Packet Radio
improve personal safety. Many families choose to hard- Services”, which basically is in reference to a form of
wire real-time tracking systems to the vehicles being radio technology used by mobile communication devices
operated by an elderly family member to ensure that the and networks that allow the transfer of data.
senior is driving safely or not becoming lost.
GPS Navigation Device
External GPS Antenna
The most commonly used form of GPS technology,
An essential piece of equipment or hardware that is used navigation systems are electronic devices that are often
110
onboard vehicles and installed to an automobile’s 12- unit itself. This engineering design allows tracking devices
volt system and placed on the front windshield. The GPS increased portability.
receives satellite signals and uses that data to accurately
Lithium Battery
determine position. The devices then work with mapping
programs to help drivers with routing or directions. This One of the newest forms of battery technology, lithium-
form of GPS technology is perfect for those travelling to ion batteries provide long-lasting power and are much
new places, or who commonly become lost. lighter than alkaline batteries, making them much more
efficient for high-tech systems. Lithium batteries have a
GPS Tracking System
long shelf-life, and most importantly are not susceptible
An electronic device that is used to capture location- to leaking like alkaline batteries.
based data and store the information to internal memory
NMEA
(GPS receiver/passive), or transmit the information
where it can be accessed live remotely via the personal Acronyms for the “National Marine Electronics
computer (Active/real-time). Using GPS satellites to Association”, a unifying force behind the electronics
accurately determine the position of a vehicle, asset or industries that provides a file extension format that is an
person, a GPS tracking system will record an assortment industry standard. Initially developed to aid in marine
of location-based data ranging from speeds travelled, electronic equipment in the 1908s, the technology is now
addresses arrived/departed, maximum speed travelled, common among GPS technological systems.
stops made, time en route and more. GPS tracking Operating System (OS)
systems are often described as the ultimate fleet
management solutions. Software consisting of multiple data and programs that
basically operates on computers and manages hardware.
GPX Format Some of the most common operating systems people
The data format that allows GPS users to exchange files, utilize every day on their personal computers include
regardless if the systems are supported by conflicting Microsoft Windows programs and Mac OS X. However,
operating systems or programming software. GPX format Google has been in the process of creating an OS that
provides users with a unique way to write, read and many people believe could be one of the efficient.
download routes. Passive Tracking System
GSM Commonly labelled as data loggers or receivers, passive
A term used to define “Global System Mobile trackers record GPS data and store that information in
Communications”, which is currently the only form of internal memory for review at a later time. The data from
cellular service offered throughout Europe. An a passive tracker is manually downloaded view USB port
international standard for digital mobile or download cable, resulting in the system being much
telecommunications systems, this form of technology more cost-effective and not having monthly service fees.
DRAFT
was created to provide an alternative solution to The GPS Tracking Key and GPS Tracking Key Pro are
analogue. Mobile communication devices and trackers the two most popular passive tracking systems among
that utilize GSM use SIM cards. consumers and businesses.
Hard-Wire RFID
The connection between electrical wires/cables and a Radio Frequency Identification: A form of technology that
vehicle’s or piece of equipment’s circuit (Often 12-volt utilizes radio frequency tags that are connected to objects
system in automobiles). This form of connection offers that will transmit information or data to a receiver.
an alternative source of power that can keep a device Real-Time Tracking
powered by means other than an internal battery.
A form of GPS tracking that allows users to remotely
Interface access GPS data live as it happens. The real-time
Reference to a point of interaction among a particular tracking unit receives GPS signals and then transmits
set of components. Applicable to both levels of hardware that information via wireless networks, allowing users to
or software, an interface provides independent objects have instant access to the location of a person, vehicle,
with the ability to communicate with each other via a asset or object. This form of GPS tracking is commonly
connection, device or another form of a system. Past- used in fleet management and auto-theft recovery
Track monitoring software interfaces with Google Earth applications.
software, allowing a GPS user to view recorded GPS Sampling Rate
data over the satellite image program.
The frequency or rate in which position updates are
Internal Antenna acquired and stored in the internal memory of a GPS
A piece of hardware that is essential in acquiring GPS receiver. Think of the sampling rate like “breadcrumbs”
signals so a system can calculate data. Unlike an external strong across a path, independent pieces of data that
antenna, internal antennas are designed into the GPS are used in conjunction with one another to provide GPS
users with a way to monitor travels.
111
Satellite computer and wireless technologies along with mobile
communication systems for data transfer and reception.
Both a natural (When planets revolve around a star such
as a sun) and unnatural phenomenon (Object created Triangulation
by man such as a space probe) where a particular object
The sophisticated process of accurately determining the
revolves around another object in regular intervals.
exact position of a GPS receiver operating on Earth by
Satellites are used for a variety of communication
using a mathematical system that measures distance
purposes.
via relative space between three GPS satellites orbiting
Short Message Service (SMS) in space. When a GPS system is placed in an optimum
location where it has a direct line of sight to the sky, the
A form of technology that is similar to that used by paging
process of triangulation results in GPS tracking data is
systems, SMS provides an avenue to send short text
accurate within 2.5 meters.
messages electronically to mobile communication
devices such as cellular phones. Although the amount USB Port
of data is often limited by a set number of characters, it
Universal Serial Bus Ports are referred to as a
is one of the most efficient ways to transmit data and
standardized electrical point of connection on a personal
alerts from a real-time tracking device to a user’s
computer that provides an avenue interface to numerous
personal cell phone.
other electronic equipment such as printers, scanners,
Teen Tracking keyboards and more. Passive vehicle tracking devices
such as the GPS Tracking Key have a USB drive
The process of monitoring the driving habits of teenagers
engineered into the hardware, allowing users to connect
to improve teen safety and overall road safety for
the GPS system directly to a personal computer USB
everyone sharing the highways and roadways. With many
port to manually download GPS tracking data.
teens having a tendency to drive at dangerous speeds,
and motor vehicle accidents leading the list of causes of WAAS
premature death among teenagers, parents are utilizing
Established in the mid-1990s by the Department of
both real-time tracking and passive monitoring to observe
Transportation, Wide Area Augmentation Services
teen driving behaviours.
(WAAS) refers to a system that was created to boost
Telematics accuracy and the availability of both GPS navigation and
tracking data. Ground stations were developed and
Telematics basically refers to the technology of
strategically placed throughout the country to monitor
transmitting, receiving and storing data or information
and observe GPS satellite signals, accounting for any
between telecommunication systems. Also referred to
gaps in service or errors, resulting in WAAS-enabled GPS
as telemetry, telematics plays a significant role in the
receivers having a superior accuracy of location-based
GPS tracking industry because the technology is often
data and position.
used to describe the use of GPS vehicle management
DRAFT
or navigational systems since the devices integrate Water Resistant
One common misconception is that water resistant is
the same as waterproof. IT IS NOT! Water resistant
refers to a limited ability to keep moisture off hardware,
circuitry and GPS components. People looking to use a
car tracker that is water resistant on the outside of their
vehicle should take additional precautions to safeguard
their GPS tracking unit from the elements.
112
IT & ITES Trade Theory for Exercise 2.6.187
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
DRAFT
on routes the way it will revolutionize different industries.
• OBD II obtains information on vehicle maintenance Consumers are already the biggest beneficiary of this
and driving conditions. era of connected devices while businesses are still
traversing how this technology breakthrough will improve
GPS or the Global Positioning Satellite system has been their bottom line.
around long before IoT devices came out.
Growth is already significant in the IoT Sector. In
While GPS data transmitted to a host over a mobile data 2015, DHL HYPERLINK “https://www.dpdhl.com/content/
connection is enough to track the moment of a vehicle d a m / d p d h l / p r e s s e / p d f / 2 0 1 5 /
in real time,IoT essentially makes Vehicle Tracking DHLTrendReport_Internet_of_things.pdf”&HYPERLINK
solutions a lot more efficient, economical, automated, “https://www.dpdhl.com/content/dam/dpdhl/presse/pdf/
and reliable. 2015/DHLTrendReport_Internet_of_things.pdf” Cisco
conducted a study to understand the implications of
Internet of Thing (IoT) Devices on logistics sector.
As per the study, there were 15 billion connected devices
in 2015 and they will rise to 50 billion by 2020–a
staggering rise of 333% since 2012 in the number of IoT
devices.
The report further indicates that Logistics Industry would
be the biggest beneficiary of IoT.
This how an IoT based typical fleet tracking system works Benefits of IoT in fleet management
• Location data collected by on-vehicle sensors, • IoT offers many new tools, like in-vehicle streaming
including GPS, OBD II sensors. camera, driver m obile apps etc. making
communication easier and rapid.
113
• Scheduling, freight management, chauffeur and truck To monitor all these data manually would be a tough task.
tracking, and effective routing are some advantages Moreover, it’s prone to human errors.
of Internet of Things.
However, with the help of IoT and the real-time GPS
• IoT supports third party APIs for traffic reporting, park- tracking software, you can keep an eye on all these data
assist, average speed, driving etiquettes monitoring and subsequently analyze it to enhance the overall
etc. efficiency of your fleet system.
• Logistic companies can move to the cloud for their • IoT automates various processes in fleet
daily operations and track fleets anywhere, anytime management. IoT enables companies to set up an
and on any device. automatic flow of logistics processes as the
interconnected devices and work as part of an
• Collective data from IoT devices assist fleet
integrated process.
management systems to get valuable insights into
chauffeur behaviour, acts of law breaking by the driver, • Vehicle Idling pumps tons of gases into the air; it also
over-speeding etc. results in usage of billions of gallons of fuel. We can
stop this with IoT; we can send a real-time notification
• With the help of IoT and GPS tracking system, the
to drivers and monitor the idling time closely.
fleet managers are able to access vital information
such as the road conditions, weather, and the traffic. • IoT helps in tracking the performances of your vehicle
This access helps them in deploying their vehicles components. It compares the present performance
and drivers in an optimized way. of that part with its standard performance. It sends
notification if it finds any irregularity or drops in
• Businesses can ensure that all their vehicles are
performance.
working properly by setting alerts for maintenance,
wear & tear of tire, deviations in temperature, and • Early adopters of IoT enjoys an absolute advantage
many more. over others due to two reasons.
Moreover, you can run preventive maintenance with your First, it reduces the overall cost by optimum utilization of
vehicle management system that keeps your fleet in the resources, and second, it helps in acquiring, sharing and
best condition and safe. acting on real-time data which results in quick and precise
decisions.
It also prevents any sudden expenses or incurring delays
due to breakdowns. • Proper application of IoT shrinks total costs by optimal
use of resources and enhanced performance.
• A fleet will generate a huge amount of information
such as the tracking speed, fuel consumption, • Gathering, sharing, and acting on real time info helps
distance traveled, utilization of vehicles, and many a firm mak e rapid decisions and prompt
more. improvements.
DRAFT
114
IT & ITES Trade Theory for Exercise 2.6.188
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
Requirements:
• System having GPS
• GPS hardware drives
• GUI Graphical User Interface
• Database Management System DBMS
PROCEDURE:
DATA TYPES IN GEOGRAPHIC INFORMATION
SYSTEMS (MAP DATA REPRESENTATION)
A Geographic information system stores two types of
data that are found on a map- the geographic definitions
of earth surface features and the attributes or qualities
that those features possess. Not all systems use the With vector representation, the boundaries or the course
same logic for achieving this. Nearly all, however, use of the features are defined by a series of points that when
DRAFT
one or a combination of both of the fundamental map joined with straight lines, form the graphic representation
representation techniques: of that feature. The points themselves are encoded with
a pair of numbers giving the x and the y coordinates.
• Raster Based That is the information about points, lines and polygons
• Vector Based is encoded and stored as a collection of x and y
coordinates. The location of a point feature, such as a
Vector Systems bore well/bore hole can be described by a single x, y
coordinate. For example, the location of a point, which
is 300 meters east, and 200 meters north of an origin (0,
0) would be stored as the x, y co-ordinate pair (300,200).
Linear features, such as roads and rivers, can be stored
as a collection of point coordinates. Polygonal features
such as sales territories and river catchments can be
stored as a closed loop of coordinates.
Raster Systems
With raster systems, the graphic representation of
features and the attributes they possess are merged into
unified data file. In fact, we typically do not define features
at all. Rather, the study area is divided into a fine mesh
of grid cells in which we record the condition or attribute
of the earth’s surface at that point. That is Raster data
are stored as a matrix of pixels (Contraction of the term
picture element) with each pixel location assigned a row
and column designation.
115
modeling service connections to consumers, service
districts as well as detailed facilities inventories and
layouts, such as transformers, valves conduits, and
schematic diagrams.
What’s in a GIS map?
Today we look for it to guide our decision-making through
fuller control of our natural resources, a giant step in
itself and more than ambitious enough in many respects.
GIS has become a key element at many levels:
1. In customer support (to respond to service failure),
2. In maintenance and daily operations (To identify work
requirements and assess inventories) and
3. In planning (to respond to projected needs).
Business Application of GIS
Business organizations operate in an ever changing and
challenging environment, in which competitive forces
require that information technology be exploited to the
full. On widely cited model of business, the Value Chain
Model by Porter identifies five primary business activities:
1. Inbound Logistics (Inputs)
2. Operations
3. Outbound Logistics (Outputs)
4. Marketing and sales and
5. Services.
GIS TOOLS
There are an extraordinary range of software packages
that are presented as tools for developing IS applications.
Querying the GIS
There are about 63 GIS software systems currently
DRAFT
GIS stores both spatial and non-spatial data in a database available. Most of these are sold as application software
system, which links the two types of data to provide only or as turnkey systems that include hardware,
flexible and powerful ways of querying or asking about software and user training. A few are offered as consulting
the data. In some cases we query by location For services. Some of the products such as base networks
example “what land use is at this location?” In other cases or data files, for which the user must develop data input
we query by attribute -“What areas have high levels of and retrieval routing, are limited in the form but broad in
carbon-di-oxide?” Some time we undertake simple scope. There are a number of GIS software packages
queries such as the above and at other time we ask about available today. Some of them are listed below:
complex compounds of conditions like- “Show all
wetlands that are larger than 1 hectare and that are
adjacent to industrial lands”
APPLICATIONS OF GEOGRAPHIC INFORMATION
SYSTEMS
At a broad range of scales, map have become
increasingly important as legal document that convey
land ownership and jurisdictional boundaries, as tools to
support decision making (For example, in urban
planning).
GIS provides the ability to completely model utility
networks, such as those supplying water, power and
telecommunications to a large number of consumers.
Such a system may operate at a variety of scales,
116
IT & ITES Trade Theory for Exercise 2.6.189
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
Analyze data collected by GPS and supply it to user in usable format such as
maps, graphs, charts or reports using suitable Computer Hardware and Software
Objective:
• To analyze data collected by GPS and supply it to user in usable format such as maps, graphs, charts or
reports using suitable Computer Hardware and Software.
DRAFT
observations, for example, you’ll have to define what might also want to group observations in several
you’re observing and arrange to make observations at different ways, so that you can study interactions
the right times, so you actually observe what you need among different variables.
to. You’ll have to record the observations in appropriate
ways and organize them so they’re optimally useful. There are two kinds of variables in research.
An independent variable (the intervention) is a condition
Recording and organizing data may take different forms, implemented by the researcher or community to see if it
depending on the kind of information you’re will create change and improvement. This could be a
collecting. The way you collect your data should relate program, method, system, or other action. A dependent
to how you’re planning to analyze and use it. Regardless variable is what may change as a result of the
of what method you decide to use, recording should be independent variable or intervention. A dependent
done concurrent with data collection if possible, or soon variable could be a behavior, outcome, or other
afterwards, so that nothing gets lost and memory doesn’t condition. A smoking cessation program, for example,
fade. is an independent variable that may change group
Some of the things you might do with the information members’ smoking behavior, the primary dependent
you collect include: variable.
• Gathering together information from all sources and WHAT DO WE MEAN BY ANALYZING DATA?
observations Analyzing information involves examining it in ways that
• Making photocopies of all recording forms, records, reveal the relationships, patterns, trends, etc. that can
audio or video recordings, and any other collected be found within it. That may mean subjecting it to
materials, to guard against loss, accidental erasure, statistical operations that can tell you not only what kinds
or other problems of relationships seem to exist among variables, but also
to what level you can trust the answers you’re getting. It
• Entering narratives, numbers, and other information may mean comparing your information to that from other
into a computer program, where they can be arranged groups (a control or comparison group, statewide figures,
and/or worked on in various ways etc.), to help draw some conclusions from the data. The
117
point, in terms of your evaluation, is to get an accurate intervention or program, or by another factor, known or
assessment in order to better understand your work and unknown. And they can identify relationships among
its effects on those you’re concerned with, or in order to different variables, which may or may not mean that one
better understand the overall situation. causes another.
There are two kinds of data you’re apt to be working QUALITATIVE DATA
with, although not all evaluations will necessarily include
Unlike numbers or “hard data,” qualitative information
both. Quantitative data refer to the information that is
tends to be “soft,” meaning it can’t always be reduced to
collected as, or can be translated into, numbers, which
something definite. That is in some ways a weakness,
can then be displayed and analyzed
but it’s also a strength. A number may tell you how well a
mathematically. Qualitative data are collected as
student did on a test; the look on her face after seeing
descriptions, anecdotes, opinions, quotes,
her grade, however, may tell you even more about the
interpretations, etc., and are generally either not able to
effect of that result on her. That look can’t be translated
be reduced to numbers, or are considered more valuable
to a number, nor can a teacher’s knowledge of that
or informative if left as narratives. As you might expect,
student’s history, progress, and experience, all of which
quantitative and qualitative information needs to be
go into the teacher’s interpretation of that look. And that
analyzed differently.
interpretation may be far more valuable in helping that
QUANTITATIVE DATA student succeed than knowing her grade or numerical
score on the test.
Quantitative data are typically collected directly as
numbers. Some examples include: Qualitative data can sometimes be changed into
numbers, usually by counting the number of times
• The frequency (rate, duration) of specific behaviors
specific things occur in the course of observations or
or conditions
interviews, or by assigning numbers or ratings to
• Test scores (e.g., scores/levels of knowledge, skill, dimensions (e.g., importance, satisfaction, ease of use).
etc.)
The challenges of translating qualitative into quantitative
• Survey results (e.g., reported behavior, or outcomes data have to do with the human factor. Even if most
to environmental conditions; ratings of satisfaction, people agree on what 1 (lowest) or 5 (highest) means in
stress, etc.) regard to rating “satisfaction” with a program, ratings of
2, 3, and 4 may be very different for different people.
• Numbers or percentages of people with certain
Furthermore, the numbers say nothing about why people
characteristics in a population (diagnosed with
reported the way they did. One may dislike the program
diabetes, unemployed, Spanish-speaking, under age
because of the content, the facilitator, the time of day,
14, grade of school completed, etc.)
etc. The same may be true when you’re counting
Data can also be collected in forms other than numbers, instances of the mention of an event, such as the onset
DRAFT
and turned into quantitative data for of a new policy or program in a community based on
analysis. Researchers can count the number of times interviews or archival records. Where one person might
an event is documented in interviews or records, for see a change in program he considers important another
instance, or assign numbers to the levels of intensity of may omit it due to perceived unimportance.
an observed event or behavior. For instance, community
Qualitative data can sometimes tell you things that
initiatives often want to document the amount and
quantitative data can’t. It may reveal why certain methods
intensity of environmental changes they bring about –
are working or not working, whether part of what you’re
the new programs and policies that result from their
doing conflicts with participants’ culture, what participants
efforts. W hether or not this kind of translation is
see as important, etc. It may also show you patterns –
necessary or useful depends on the nature of what you’re
in behavior, physical or social environment, or other
observing and on the kinds of questions your evaluation
factors – that the numbers in your quantitative data don’t,
is meant to answer.
and occasionally even identify variables that researchers
Quantitative data is usually subjected to statistical weren’t aware of.
procedures such as calculating the mean or average
number of times an event or behavior occurs (per day, It is often helpful to collect both quantitative and qualitative
month, year). These operations, because numbers are information.
“hard” data and not interpretation, can give definitive, or Quantitative analysis is considered to be objective –
nearly definitive, answers to different questions. Various without any human bias attached to it – because it
kinds of quantitative analysis can indicate changes in a depends on the comparison of numbers according to
dependent variable related to – frequency, duration, mathematical computations. Analysis of qualitative data
timing (when particular things happen), intensity, level, is generally accomplished by methods more subjective
etc. They can allow you to compare those changes to – dependent on people’s opinions, knowledge,
one another, to changes in another variable, or to assumptions, and inferences (and therefore biases) –
changes in another population. They might be able to than that of quantitative data. The identification of
tell you, at a particular degree of reliability, whether those patterns, the interpretation of people’s statements or
changes are likely to have been caused by your other communication, the spotting of trends – all of these
118
can be influenced by the way the researcher sees the · They can show connections between or among
world. Be aware, however, that quantitative analysis is various factors that may have an effect on the
influenced by a number of subjective factors as well. results of your evaluation. Some types of statistical
What the researcher chooses to measure, the accuracy procedures look for connections (“correlations” is the
of the observations, and the way the research is research term) among variables. Certain dependent
structured to ask only particular questions can all variables may change when others do. These
influence the results, as can the researcher ’s changes may be similar – i.e., both variables increase
understanding and interpretation of the subsequent or decrease (e.g., as children’s proficiency at reading
analyses. increases, the amount of reading they do also
increases). Or the opposite may be observed – i.e.
WHY SHOULD YOU COLLECT AND ANALYZE
the two variables change in opposite directions (as
DATA FOR YOUR EVALUATION?
the amount of exercise they engage in increases,
Part of the answer here is that not every organization – peoples’ weight decreases). Correlations don’t mean
particularly small community-based or non-governmental that one variable causes another, or that they both
ones – will necessarily have extensive resources to have the same cause, but they can provide valuable
conduct a formal evaluation. They may have to be information about associations to expect in an
content with less formal evaluations, which can still be evaluation.
extremely helpful in providing direction for a program or
· They can help shed light on the reasons that your
intervention. An informal evaluation will involve some
work was effective or, perhaps, less effective than
data gathering and analysis. This data collection and
you’d hoped. By combining quantitative and
sensemaking is critical to an initiative and its future
qualitative analysis, you can often determine not only
success, and has a number of advantages.
what worked or didn’t, but why. The effect of cultural
· The data can show whether there was any issues, how well methods are used, the
significant change in the dependent variable(s) appropriateness of your approach for the population
you hoped to influence. Collecting and analyzing – these as well as other factors that influence success
data helps you see whether your intervention brought can be highlighted by careful data collection and
about the desired results analysis. This knowledge gives you a basis for
adapting and changing what you do to make it more
The term “significance” has a specific meaning when
likely you’ll achieve the desired outcomes in the future.
you’re discussing statistics. The level of significance of
a statistical result is the level of confidence you can have · They can provide you with credible evidence to
in the answer you get. Generally, researchers don’t show stakeholders that your program is
consider a result significant unless it shows at least a successful, or that you’ve uncovered, and are
95% certainty that it’s correct (called the .05 level of addressing limitations. Stakeholders, such as
significance, since there’s a 5% chance that it’s wrong). funders and community boards, want to know their
DRAFT
The level of significance is built into the statistical investments are well spent. Showing evidence of
formulas: once you get a mathematical result, a table intermediate outcomes (e.g. new programs and
(or the software you’re using) will tell you the level of policies) and longer-term outcom es (e.g.,
significance. improvements in education or health indicators) is
becoming increasingly important to receiving – and
Thus, if data analysis finds that the independent variable
retaining – funding.
(the intervention) influenced the dependent variable at
the .05 level of significance, it means there’s a 95% · Their use shows that you’re serious about
probability or likelihood that your program or intervention evaluation and about improving your work. Being
had the desired effect. The .05 level is generally a good trustee or steward of community investment
considered a reasonable result, and the .01 level (99% includes regular review of data regarding progress
probability) is considered about as close to certainty as and improvement.
you are likely to get. A 95% level of certainty doesn’t
· They can show the field what you’re learning, and
mean that the program works on 95% of participants, or
thus pave the way for others to implement
that it will work 95% of the time. It means that there’s
successful methods and approaches. In that way,
only a 5% possibility that it isn’t actually what’s influencing
you’ll be helping to improve community efforts and,
the dependent variable(s) and causing the changes that
ultimately, quality of life for people who benefit.
it seems to be associated with.
W H E N AN D B Y W H O M S H O U L D D ATA B E
· They can uncover factors that may be associated
COLLECTED AND ANALYZED?
with changes in the dependent variable(s). Data
analyses may help discover unexpected influences; As far as data collection goes, the “when” part of this
for instance, that the effort was twice as large for those question is relatively simple: data collection should start
participants who also were a part of a support group. no later than when you begin your work – or before you
This can be used to identify key aspects of begin in order to establish a baseline or starting point –
implementation. and continue throughout. Ideally, you should collect data
for a period of time before you start your program or
119
intervention in order to determine if there are any trends control group for comparison. If your control is
in the data before the onset of the properly structured, you can draw some fairly reliable
intervention. Additionally, in order to gauge your conclusions simply by comparing its results to those
program’s longer-term effects, you should collect follow- of your intervention group. Again, these results won’t
up data for a period of time following the conclusion of be as reliable as if the comparison were made using
the program. statistical procedures, but they can point you in the
right direction. It’s fairly easy to tell whether or not
The timing of analysis can be looked at in at least two
there’s a major difference between the numbers for
ways: One is that it’s best to analyze your information
the two or more groups. If 95% of the students in
when you’ve collected all of it, so you can look at it as a
your class passed the test, and only 60% of those in
whole. The other is that if you analyze it as you go along,
a similar but uninstructed control group did, you can
you’ll be able to adjust your thinking about what
be pretty sure that your class made a difference in
information you actually need, and to adjust your program
some way, although you may not be able to tell exactly
to respond to the information you’re getting. Which of
what it was that mattered. By the same token, if 72%
these approaches you take depends on your research
of your students passed and 70% of the control group
purposes. If you’re more concerned with a summative
did as well, it seems pretty clear that your instruction
evaluation – finding out whether your approach was
had essentially no effect, if the groups were starting
effective, you might be more inclined toward the first. If
from approximately the same place.
you’re oriented toward improvement – a formative
evaluation – we recommend gathering information along Who should actually collect and analyze data also
the way. Both approaches are legitimate, but ongoing depends on the form of your evaluation. If you’re doing
data collection and review can particularly lead to a participatory evaluation, much of the data collection -
improvements in your work. and analyzing - will be done by community members or
program participants themselves. If you’re conducting an
The “who” question can be more complex. If you’re
evaluation in which the observation is specialized, the
reasonably familiar with statistics and statistical
data collectors may be staff members, professionals,
procedures, and you have the resources in time, money,
highly trained volunteers, or others with specific skills or
and personnel, it’s likely that you’ll do a somewhat formal
training (graduate students, for example). Analysis also
study, using standard statistical tests. (There’s a great
could be accomplished by a participatory process. Even
deal of software – both for sale and free or open-source
where complicated statistical procedures are necessary,
– available to help you.)
participants and/or community members might be
If that’s not the case, you have some choices: involved in sorting out what those results actually mean
once the math is done and the results are in. Another
• You can hire or find a volunteer outside evaluator,
way analysis can be accomplished is by professionals
such as from a nearby college or university, to take
or other trained individuals, depending upon the nature
care of data collection and/or analysis for you.
DRAFT
of the data to be analyzed, the methods of analysis, and
• You can conduct a less formal evaluation. Your results the level of sophistication aimed at in the conclusions.
may not be as sophisticated as if you subjected them
HOW DO YOU COLLECT AND ANALYZE DATA?
to rigorous statistical procedures, but they can still
tell you a lot about your program. Just the numbers Whether your evaluation includes formal or informal
– the number of dropouts (and when most dropped research procedures, you’ll still have to collect and
out), for instance, or the characteristics of the people analyze data, and there are some basic steps you can
you serve – can give you important and usable take to do so.
information.
IMPLEMENT YOUR MEASUREMENT SYSTEM
• You can try to learn enough about statistics and
We’ve previously discussed designing an
statistical software to conduct a formal evaluation
observational system to gather information. Now it’s
yourself. (Take a course, for example.)
time to put that system in place.
• You can collect the data and then send it off to
• Clearly define and describe what measurements or
someone – a university program, a friendly statistician
observations are needed. The definition and
or researcher, or someone you hire – to process it for
description should be clear enough to enable
you.
observers to agree on what they’re observing and
• You can collect and rely largely on qualitative data. reliably record data in the same way.
Whether this is an option depends to a large extent
• Select and train observers. Particularly if this is part
on what your program is about. You wouldn’t want to
of a participatory process, observers need training to
conduct a formal evaluation of effectiveness of a new
know what to record; to recognize key behaviors,
medication using only qualitative data, but you might
events, and conditions; and to reach an acceptable
be able to draw some reasonable conclusions about
level of inter-rater reliability (agreement among
use or com pliance patterns from qualitative
observers).
information.
• Conduct observations at the appropriate times for the
• If possible, use a randomized or closely matched
120
appropriate period of time. This may include reviewing and/or mode (most frequent) of a series of
archival material; conducting interviews, surveys, or measurements or observations. W hat was the
focus groups; engaging in direct observation; etc. average blood pressure, for instance, of people who
exercised 30 minutes a day at least five days a week,
• Record data in the agreed-upon ways. These may
as opposed to that of people who exercised two days
include pencil and paper, computer (using a laptop
a week or less?
or handheld device in the field, entering numbers into
a program, etc.), audio or video, journals, etc. • Using qualitative interviews, conversations, and
participant observation to observe (and track changes
ORGANIZE THE DATA YOU’VE COLLECTED
in) the people or situation. Journals can be particularly
How you do this depends on what you’re planning revealing in this area because they record people’s
to do with it, and on what you’re interested in. experiences and reflections over time.
• Enter any necessary data into the computer. This may • Finding patterns in qualitative data. If many people
mean simply typing comments, descriptions, etc., into refer to similar problems or barriers, these may be
a word processing program, or entering various kinds important in understanding the issue, determining
of information (possibly including audio and video) what works or doesn’t work and why, or more.
into a database, spreadsheet, a GIS (Geographic
• Comparing actual results to previously determined
Information Systems) program, or some other type
goals or benchmarks. One measure of success might
of software or file.
be meeting a goal for planning or program
• Transcribe any audio- or videotapes. This makes implementation, for example.
them easier to work with and copy, and allows the
TAK E N O T E O F AN Y S I G N I F I C AN T OR
opportunity to clarify any hard-to-understand
INTERESTING RESULTS
passages of speech.
Depending on the nature of your research, results may
• Score any tests and record the scores appropriately.
be statistically significant (the 95% or better certainty that
• Sort your information in ways appropriate to your we discussed earlier), or simply important or unusual.
interest. This may include sorting by category of They may or may not be socially significant (i.e., large
observation, by event, by place, by individual, by enough to solve the problem).
group, by the time of observation, or by a combination
There are a number of different kinds of results you
or some other standard.
might be looking for.
• W hen possible, necessary, and appropriate,
• Differences within people or groups. If you have
transform qualitative into quantitative data. This might
repeated measurements for individuals/groups over
involve, for example, counting the number of times
time, we can see if there are marked increases/
specific issues were mentioned in interviews, or how
decreases in the (frequency, rate) of behavior (events,
DRAFT
often certain behaviors were observed.
etc.) following introduction of the program or
CONDUCT D ATA G R AP H I N G, V I S U AL intervention. When the effects are seen when and
I N S P E C T I O N , S TAT I S T I C AL AN ALY S I S , O R only when the intervention is introduced – and if the
O T H E R O P E R AT I O N S O N T H E D ATA AS intervention is staggered (delayed) across people or
APPROPRIATE groups – this increases our confidence that the
intervention, and not something else, is producing the
We’ve referred several times to statistical procedures
observed effects.
that you can apply to quantitative data. If you have the
right numbers, you can find out a great deal about • Differences between or among two or more groups.
whether your program is causing or contributing to If you have one or more randomized control groups
change and improvement, what that change is, whether in a formal study (groups that are drawn at random
there are any expected or unexpected connections from the same population as the group in your
among variables, how your group compares to another program, but are not getting the same program or
you’re measuring, etc. intervention, or are getting none at all), then the
statistical significance of differences between or
There are other excellent possibilities for analysis
among the groups should tell you whether your
besides statistical procedures, however. A few
program has any more influence on the dependent
include:
variable(s) than what’s experienced by the other
• Simple counting, graphing and visual inspection of groups.
frequency or rates of behavior, events, etc., over time.
• Results that show statistically significant changes.
• Using visual inspection of patterns over time to identify With or without a control or comparison group, many
discontinuities (marked increases, decreases) in the statistical procedures can tell you whether changes
measures over time (sessions, weeks, months). in dependent variables are truly significant (or not
• Calculating the mean (average), median (midpoint), likely due to chance). These results may say nothing
121
about the causes of the change (or they may, program, then you’re either running an ineffective
depending on how you’ve structured your evaluation), program, or you’re simply not reaching those who are
but they do tell you what’s happening, and give you a most likely to have poorer outcomes (which can also
place to start. be interpreted to mean you’re running an ineffective
program.)
• Correlations. Correlation means that there are
connections between or among two or more Not all important findings will necessarily tell you whether
variables. Correlations can sometimes point to your program worked, or what is the most effective
important relationships you might not have predicted. method. It might be obvious from your data collection,
Sometimes they can shed light on the issue itself, for instance, that, while violence or roadway injuries may
and sometimes on the effects of a group’s cultural not be seen as a problem citywide, they are much higher
practices. In some cases, they can highlight potential in one or more particular areas, or that the rates of
causes of an issue or condition, and thus pave the diabetes are markedly higher for particular groups or
way for future interventions. those living in areas with greater disparities of income. If
you have the resources, it’s wise to look at the results of
Correlation between variables doesn’t tell you that one
your research in a number of different ways, both to find
necessarily causes the other, but simply that changes in
out how to improve your program, and to learn what else
one have a relationship to changes in the other. Among
you might do to affect the issue.
American teenagers, for instance, there is probably a
fairly high correlation between an increase in body size INTERPRET THE RESULTS
and an understanding of algebra. This is not because
Once you’ve organized your results and run them through
one causes the other, but rather the result of the fact
whatever statistical or other analysis you’ve planned for,
that American schools tend to begin teaching algebra in
it’s time to figure out what they mean for your
the seventh, eighth, or ninth grades, a time when many
evaluation. Probably the most common question that
12-, 13-, and 14-year-olds are naturally experiencing a
evaluation research is directed toward is whether the
growth spurt.
program being evaluated works or makes a difference. In
On the other hand, correlations can reveal important research terms, that often translates to “What were the
connections. A very high correlation between, for effects of the independent variable (the program,
instance, the use of a particular medication and the onset intervention, etc.) on the dependent variable(s) (the
of depression might lead to the withdrawal of that behavior, conditions, or other factors it was meant to
medication, or at least a study of its side effects, and change)?” There are a number of possible answers to
increased awareness and caution among doctors who this question:
prescribe it. A very high correlation between gang
• Your program had exactly the effects on the
membership and having a parent with a substance abuse
dependent variable(s) you expected and hoped it
problem may not reveal a direct cause-and-effect
would. Statistics or other analysis showed clear
DRAFT
relationship, but may tell you something important about
positive effects at a high level of significance for the
who is more at risk for substance abuse.
people in your program and – if you used a multiple-
• Patterns. In both quantitative and qualitative group design – none, or far fewer, of the same effects
information, patterns often emerge: certain health for a similar control group and/or for a group that
conditions seem to cluster in particular geographical received a different intervention with the same
areas; people from a particular group behave in similar purpose. Your early childhood education program, for
ways; etc. These patterns may not be specifically instance, greatly increased development outcomes
what you were looking for or expected to find, but for children in the community, and also contributed to
they may either be important in themselves or shed an increase in the percentage of children succeeding
light on the areas you’re interested in. In some cases, in school.
you may need to subject them to statistical procedures
• Your program had no effect. Your program produced
(regression analysis, for example) to see if, in fact,
no significant results on the dependent variable,
they’re random, or if they constitute actual patterns.
whether alone or compared to other groups. This
• Obvious important findings. Whether as a result of would mean no change as a result of your program
statistical analysis, or of examination of your data and or intervention.
application of logic, some findings may stand out. If
• Your program had a negative effect. For instance,
70% of a group of overweight participants in a healthy
intimate partner violence increased (or at least
eating and physical activity program lowered their
appeared to) as a result of your intervention. (It is
weight and blood pressure significantly, compared to
relatively common for reported events, such as
only 20% of a similar group not in the program, you
violence or injury, to increase when the intervention
can probably assume that program may have been
results in improved surveillance and ease of
effective. If there’s no change whatsoever in
reporting).
education outcomes after two years of your education
• Your program had the effects you hoped for and other
effects as well.
122
• These effects might be positive. Your youth violence If your analysis shows that your program is ineffective or
prevention program, for instance, might have resulted negative, however – or, for that matter, if a positive
in greatly reduced violence among teens, and might analysis leaves you wondering how to make your
also have resulted in significantly improved academic successful efforts still more successful – interpretation
performance for the kids involved. becomes more complex. Are you using an absolutely
wrong approach? Are you using an approach that could
• These effects might be neutral. The same youth
be effective, but is poorly implement? Is there a particular
violence prevention program might somehow result
contributing factor you’re failing to take into account?
in youth watching TV more often after school.
Are there barriers to success – of culture, experience,
• These effects might be negative. (These effects are personal characteristics, systematic discrimination –
usually called unintended consequences.) Youth present in the population from which participants are
violence might decrease significantly, but the drawn? Are there particular components or elements
incidence of teen pregnancies or alcohol consumption you can change to make your program more effective,
among youth in the program might increase or should you start again from scratch? What should
significantly at the same time. you address to make a good program better?
• These effects might be multiple, or mixed.For Careful and insightful interpretation of your data may
instance, a program to reduce HIV/AIDS might lower allow you to answer questions like these. You may be
rates of unprotected sex but might also increase able to use correlations, for instance, to generate
conflict and instances of partner violence. Your hypotheses about your results. If positive or negative
program had no effect or a negative effect and other changes in particular variables are consistently
effects as well. As with programs with positive effects, associated with positive or negative changes in other
these might be positive, neutral, or negative; single variables, the two may be connected. (The word “may”
or multiple; or consistent or mixed. is important here. The two may be connected, but they
If your analysis gives you a clear indication that what may not, or both may be related to a third variable that
you’re doing is accomplishing your purposes, you’re not aware of or that you consider trivial.) Such a
interpretation is relatively simple: You should keep doing connection can point the way toward a factor (e.g.,
it, while trying out ways to make it even more effective, access to support) that is causing the changes in both
or while aiming at other related issues as well. variables, and that must be addressed to make your
program successful. Correlations may also indicate
As we discuss elsewhere in the Community Tool Box, patterns in your data, or may lead to an unexpected way
good programs are dynamic — constantly striving to of looking at the issue you’re addressing.
improve, rather than assuming that what they’re doing is
as good as it can be.
DRAFT
123
IT & ITES Trade Theory for Exercise 2.7.190
Smart City - Identify solar Panel Basic Testing, characterstics, charge controller
circuit
Test the android phone and its features, use of sensors and its usage
Objective:
• to test the android phone and its features, use of sensors and its usage.
DRAFT
the ear. It throws an infrared light (which is invisible
to human eye) at the near object and the IR detector
detects at what distance the object is. Actions are
performed accordingly.
• Light Sensor: Detects how bright the surrounding
light is, in which the phone is placed.
• Barometer: This is mostly found in high-end phones.
You probably know this. It detects how high the phone
above the sea level is. This gives better GPS
accuracy.
You can perform these test not just on your phone but
also on some other phone that you might buy from
someone else. Testing used phones before buying is a
must. But, before digging into the guide I’d like to share
some knowledge of different sensors the new age
android phones have.
124
IT & ITES Trade Theory for Exercise 2.7.191
Smart City - Identify solar Panel Basic Testing, characterstics, charge controller
circuit
Check the Bluetooth module along and explore the possibility of pairing with
Android smart phone
Objective:
• to check the Bluetooth module along and explore the possibility of pairing with Android smart phone.
DRAFT
troubleshooting that can be done to resolve the most
common Bluetooth issues and will progress to more in-
depth troubleshooting. So let’s start from the basics and
go from there.
Power cycle
If your cell phone started to suddenly have Bluetooth
issues unexpectedly and out of the blue then try simply
powering your Android cell phone off, wait a minute (30- There might be a setting in your phone which is now
60 seconds), and then power the phone back on. Then preventing your Android’s Bluetooth from connecting to
try to establish a connection again and see if this simple or even recognizing an available Bluetooth to sync to.
trick helped to fix it. If not then proceed to the next So start by clearing the cache in your Bluetooth settings.
suggestion.
The method that you use to access the Bluetooth settings
Battery pull and clear its cache is going to depend on what make
Much like powering your cell phone off and then back and model of cell phone you are currently using as well
on, another form of soft reset for an Android device is to as what version of Android is currently installed on the
remove the battery while the device is powered on. Wait device.
about 30 seconds, plug the battery back in, power the What you are going to need to locate is your phones
phone on and see if the Bluetooth will connect. “Application manager” or an option to “Manage
Remember that not all cell phones are designed to have applications”. This feature will let you view all of the
a removable battery. If your cell phone does not allow applications installed on your phone and you will be able
you to remove its battery then you can skip this portion to locate your Bluetooth feature and its settings.
of troubleshooting. A common way to access this setting and clear the cache
on Android 4.2 Jelly Bean is to open the phones Settings,
125
tap the More tab > tap Application manager > If for some reason your Bluetooth is still having trouble
view ALL > Bluetooth share > tap Clear cache. then keep reading for some additional suggestions.
Note: “Bluetooth share” is a common name for the Safe Mode
Bluetooth feature on an Android cell phone but if you
This issue with your Bluetooth might be the result of an
cannot locate a “Bluetooth share” option then it might be
application on your cell phone not playing nice with
labeled differently. Typically it will still have the word
another application or conflicting with its software. To help
“Bluetooth” in its label.
rule out this scenario then you can try using your phone
Once you clear the cache, power cycle or restart your in Safe Mode.
cell phone, try your Bluetooth and see if it’s working
properly. If not then along with the cache try clearing
your Bluetooth Data as well.
Clear the data
Safe Mode allows the phone to run without any third party
applications and can help you to locate apps that are
DRAFT
causing mischief. If the phone runs properly while in Safe
mode then it means that an app is in fact causing
problems and you can start going through your recently
Before clearing the Bluetooth data make sure to record installed or recently updated apps to locate the
any important Bluetooth connections that you do not think troublemaker. Just uninstall the app(s) that you believe
you will be able to remember or setup again. This step in might be the cause, reboot, test and if necessary repeat.
troubleshooting will tell your phone to make your Once you have found the app that’s causing problems
Bluetooth feature start fresh and clean again and as such you can re-install it, see if that helps, or simply keep it
it will erase any current connections saved in your uninstalled and off of your phone.
Bluetooth’s connection log/memory. This shouldn’t be a Check the other device
big issue as you will be able to simply re-connect to those
Bluetooth connections when you need to use them again Usually pairing the Bluetooth on your cell phone with
but I thought I would mention it for good measure. another device is pretty straightforward and very user
friendly. If you are still having difficulties pairing to another
To clear the Bluetooth app data it’s pretty much the same device then try and make sure to check that device to
steps used when clearing its cache only instead of “Clear make sure that it is functioning properly. It may not be an
cache” you’re going to select the “Clear data” option. So issue with your phone but an issue with that other device.
open the phones Settings, tap the More tab >
tap Application manager > view ALL > Bluetooth So make sure that the other unit is setup correctly and
share > Clear data. that you are trying to pair your phone to that device
properly. If by the off chance another phone can pair to
Once the Data is also cleared then restart the phone that other device but your phone is still having issues
and enjoy your working Bluetooth. Don’t forget to let me then there can still be a problem with the software on
know if this helped fix your cell phone by pressing the your device (which the next section of this article should
Facebook Like or Google + button(s) at the bottom of help solve) or a hardware issue where an actual piece of
this article. the phone is defective or malfunctioning in which case
126
you will have to look into your repair or replacement troubleshooting tool as it removes everything from the
options (which we’ll cover later in the article as well). phone which includes any viruses, software bugs or
glitches, troublesome programs, bad apps, and also puts
Hard reset
all of the phones settings back to factory default. So if
Performing a factory data reset is usually a last resort there is something on the phone that’s causing problems
when troubleshooting as it erases all user data from the and you can’t find what it is chances are a factory data
cell phone in question. It is however a very powerful reset can help you get rid of it.
DRAFT
127
IT & ITES Trade Theory for Exercise 2.7.192
Smart City - Identify solar Panel Basic Testing, characterstics, charge controller
circuit
Test Bluetooth module with a micro controller and program to switch on/off an
LED/Buzzer
Objective:
• to test Bluetooth module with a micro controller and program to switch on/off an LED/Buzzer.
Requirement:
• Bluetooth module HC-05
• Arduino UNO
• 1K ohm resistor
• LED
PROCEDURE:
Android studio isn't really required here, since I will
provide you with the Android application that I made. You
can install the given .apk file to use the application.
How Does It Work?
There are three main parts to this project. An Android
Arduino Pins | Bluetooth Pins
smartphone, a Bluetooth transceiver, and an Arduino.
RX (Pin 0) ———> TX
TX (Pin 1) ———> RX
5V ———> VCC
GND ———> GND
Connect an LED positive to pin 13 of the Arduino through
DRAFT
a resistance (valued between 220?–1K?). Connect its
HC 05/06 works on serial communication. The Android negative to GND, and you're done with the circuit!
app is designed to send serial data to the Arduino
Bluetooth module when a button is pressed on the app. You can connect the Bluetooth module to the Arduino
The Arduino Bluetooth module at the other end receives using a set of jumper wires and a connector.
the data and sends it to the Arduino through the TX pin Note: Don’t connect RX to RX and TX to TX on
of the Bluetooth module (connected to RX pin of Arduino). the Bluetooth and Arduino. You will receive no
The code uploaded to the Arduino checks the received data. Here, TX means transmit and RX means
data and compares it. If the received data is 1, the LED receive.
turns ON. The LED turns OFF when the received data is
Uploading the Sketch to Arduino
0. You can open the serial monitor and watch the received
data while connecting. char data = 0; //Variable for storing received
data
Connecting the Arduino Bluetooth Hardware
void setup()
This circuit is simple and small. There are only four
connections to be made between the Arduino and {
Bluetooth module!
Serial.begin(9600); //Sets the data rate in bits per
second (baud) for serial data transmission
pinMode(13, OUTPUT); //Sets digital pin 13 as
output pin
128
} • Install the LED application on your Android device.
void loop() • Open the application.
{
if(Serial.available() > 0) // Send data only when you
receive data:
{
data = Serial.read(); //Read the incoming data and
store it into variable data
Serial.print(data); //Print Value inside data in Serial
monitor
Serial.print("\n"); //New line
if(data == '1') //Checks whether value of data is
equal to 1
digitalWrite(13, HIGH); //If value is 1 then LED turns ON
else if(data == '0') //Checks whether value of data is
equal to 0
digitalWrite(13, LOW); //If value is 0 then LED turns
OFF
}
} • Press "paired devices".
Upload the given sketch to Arduino using the Arduino • Select your Bluetooth module from the list (HC-05/
IDE software, you can also get it from Github. 06)
Installing the Android Application
DRAFT
In this tutorial, I will not cover Android app development.
You can download the Android application from here and
the source code of the entire project.
• Download the application from Amazon App
Store or Github. • After connecting successfully, press the ON button
to turn the LED on and the OFF button to turn the
• Pair your device with the HC 05/06 Bluetooth module: LED off.
• Turn ON the HC 05/06 Bluetooth module by powering • Disconnect the button to disconnect the Bluetooth
the Arduino. module.
• Scan your smartphone for available devices.3. Pair
your smartphone to the HC 05/06 by entering default
password 1234 OR 0000.
129
Here's how it works! This is just a basic tutorial on interfacing a Bluetooth
module with Arduino. This project can be taken to a higher
level, like home automation using a smartphone,
smartphone-controlled robots, and much more! You can
watch the video tutorial below:
DRAFT
130
IT & ITES Trade Theory for Exercise 2.7.193
Smart City - Identify solar Panel Basic Testing, characterstics, charge controller
circuit
DRAFT
to lot of creative projects if it could be interfaced with a
Microcontroller. Hence in this tutorial we will learn how
we can Interface the GSM module (SIM900A) with AVR
microcontroller ATmega16 and will demonstrate it by
sending and receiving messages using GSM Module.
Software Used
We will use CodeVisionAVR software for writing our code
and SinaProg software for uploading our code to
Atmega16 using USBASP programmer.
You can download these softwares from the given links:
CodeVisionAVR : http://www.hpinf otech.ro/
cvavr_download.html
SinaProg : http://www.ablab.in/sinaprog-hex-file-
downloader-software-to-download-c ode-to-a vr-
microcontroller/#inline_content
GSM Module
Communicating with GSM module using AT
commands
As you might have guessed it, the GSM module can
communicate through Serial communication and could
understand only one language and that is “AT
131
If you have used GSM module with Arduino, while
receiving messages you can use +CMT: command to
view the mobile number and text message on serial
monitor. Text message comes on second line as shown
in picture.
We will scan this +CMT: command to check whether
message is available or not.
DRAFT
132
IT & ITES Trade Theory for Exercise 2.8.194
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
Download mobile app from play store and control (ON/OFF) a simple LED via
Bluetooth
Objective:
• to download mobile app from play store and control (ON/OFF) a simple LED via Bluetooth.
DRAFT
connect it with 5V as that can cook the module
It’s a simple sketch which waits for a character on serial
• Connect GND with any GND of Arduino
and in case of a desirable character, it turns an LED on/
• Connect Rx pin with Tx of Arduino
off.
• Connect Tx pin with Rx of Arduino
Possible string values:
Now power-up the Uno using USB cable, a red light LED
a (to turn the LED on)
on HC-05 will start blinking, means we are ready to go
forward to the next step! b (tor turn the LED off)
Step 2: Connect the LED and Control It Using Arduino */
Serial Monitor
char junk;
I often refer to this step as Arduino 101, connecting the
String inputString=””;
LED with Arduino on pin 13 is the most basic thing to do
and you must be familiar with it if you came so far, just to void setup() // run once, when the sketch starts
help you again doing it:
{
• Connect the long end of LED with 220 ohm to 1K
Serial.begin(9600); // set the baud rate to 9600,
ohm resistor
same should be of your Serial Monitor
• Connect the other end of resistor to the pin 13 of
pinMode(13, OUTPUT);
Arduino
}
• Connect the short leg of LED to GND of Arduino
void loop()
If you prefer, you can skip this step and just use the built-
in yellow LED of Arduino. Our circuit is now complete {
133
if(Serial.available()){ • From the menu, tap on “Connect a device - Insecure”.
while(Serial.available()) • You will see a pop-up of “Paired Devices”, tap on “HC-
05”, after a second you will get a toast notifying
{
“Connected to HC-05”.
char inChar = (char)Serial.read(); //read the input
• Now type “a” and send, the LED will turn on, similarly,
inputString += inChar; //make a string of the send “b” to turn the LED off.
characters coming on serial
In the next step will start building our cross-platform
} HTML5 app by installing and using Cordova and
Serial.println(inputString); Evothings Studio.
Step 5: Installing Evothings Studio
while (Serial.available() > 0)
In this step, we will install Evothings Studio.
{ junk = Serial.read() ; } // clear the serial buffer
Evothings Studio uses Cordova which let’s you develop
if(inputString == “a”){ //in case of ‘a’ turn the LED on
applications in HTML5 and provides easy to use functions
digitalWrite(13, HIGH); to interface with underlying OS architecture to use
}else if(inputString == “b”){ //incase of ‘b’ turn the LED different functionalities of smartphone itself! Apps built
off with Cordova can be deployed on all kinds of modern
mobile operating systems such as iOS, Android and
digitalWrite(13, LOW); Windows Phone etc. It’s open-source and a large
} community is behind it, means you can easily find online
help and plugins written for different use-cases and
inputString = “”; technologies.
} Similarly, Evothings Studio is also open-source and it’s
} main advantage is it’s “reload-on-save” functionality,
which means you don’t need to rebuild your app all the
After uploading, open Arduino Serial Monitor, set the baud time. If Evothings client and studio are installed and
rate to 9600 and command line ending drop down (the working, you can just edit your source HTML file and
one next to baud rate) to “No line ending”, that means can see the latest changes in your mobile phone instantly.
we will not be sending and /r or /n characters with our
serial command. Now quickly, follow these steps:
Now type character “a” in the serial monitor and press • Install Evothings Workbench.
send, the your LED should turn on, then send “b”, the • Install Evothings Client app ( Android, iOS)
DRAFT
LED should turn off.
• Connect Evothings Client with Evothings Workbench
I have also attached the sketch file with this step, this is using your local WiFi IP address.
all we need at Arduino sketch level for turning LED on/
off even through the Bluetooth and mobile app. In next • Download and save the complete example app code
step, we will from my github repository.
Step 4: Getting HC-5 to Work with Arduino and • Drag & drop the app’s “index.html” file from the
Testing the Communication example app code folder to the Evothings Workbench,
that will creat a new project entry in the Evothings
In this step, we are focusing on getting HC-05 to work Workbench.
with Arduino and testing all the communication before
we move towards building our mobile app. • Click the “Run” button alongside the new project entry,
that will load the example app inside the Evothings
Important: There is no extra step or coding required for Client.
HC-05 to work, it’s a simple serial port module, which
means if you pair it and then connect to it using any serial • Now click the “Code” button to see the location of the
port terminal, it will work just like Arduino Serial Monitor. code, open the “index.html” file in your favourite IDE
and change something, like the colour of a button,
Follow these mini-steps: the Evothings Studio will immediately pick the change
• Connect the Rx and Tx pins of HC-05 back to Arduino and will reload the app inside the Evothings Client,
(if you haven’t did this already). this functionality allows you to rapidly prototype your
web app for IoT devices.
• Pair the device with your mobile phone (in my case I
am using Android OS and my phone is Samsung SII). Step 6: Introducing BluetoothSerial
• Download “Bluetooth Terminal” app from Google Play Evothings comes pre-installed
Store. with BluetoothSerial plugin of Cordova, that means we
can straight away start implementing bluetooth to serial
• Open Bluetooth Terminal app.
134
communication in our project. bluetoothSerial.write(“b”);
The most important function of BluetoothSerial plugin }
is:
Step 7: Developing Front-end Using Evothings
bluetoothSerial.write();
So, we have everything ready now, our circuit, Arduino
Whatever we will send in write function, the plugin will sketch, example app code and Evothings Studio also
write that on serial output of bluetooth module. knows about the location of the project and can “Run” it.
So, in this case, following code bit is doing all the work. The plugin’s functionality code is hidden under /www/js/
When a user presses the “LED ON” button, the script index.js and front-end is in /www/index.html, we have
will write “a” onto the Arduino serial using BluetoothSerial copied default CSS of Evothings and project is also
plugin and in the other case it will write the character “b”, running using Evothings Studio, whatever we will change,
which our Arduino sketch understands as the argument it will automatically reload the app in the phone, giving
to switch the LED to off status. us the instant preview.
app.initialize(); The only bit required is a bit of JavaScript and HTML
know-how.
app.ledOn = function(){
Step 8: Reviewing the Completed Bluetooth Remote
bluetoothSerial.write(“a”);
Control App
}
So, now we have our app and hardware working. Your
app.ledOff = function() app is already running in Evothings client, that is great,
you have your 3 buttons and they switch the lights on
and off and also let your manage your connection with
the Bluetooth module. Play with these, your work is over.
The next step will be to Google a tutorial about adding a
relay instead of the LED and control your home’s lights
through your new remote control.
DRAFT
135
IT & ITES Trade Theory for Exercise 2.8.195
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
Requirements: For that, first you need to find latitude and longitude to
define the location. Once you find your location, you can
• Arduino UNO & Genuino UNO
use the latitude and longitude values to find distance to
• GPS Module (Generic) NEO-6M GPS Module the location and by keeping a range you can turn on the
notifier.
• LED (generic)
Parts and Tools
• Texas Instruments Dual H-Bridge motor drivers
L293D To get started with your destination notifier, here are the
required parts:
• Brown Dog Gadgets Solar Cockroach Vibrating Disc
Motor • Arduino UNO
• Spark Fun Snappable Proto board • NEO-6M GPS Module
• 9V battery (generic) • GPS stands for global positioning system and can be
used to determine position, time and speed if you are
• 9V to Barrel Jack Connector
travelling.
• Jumper wires (generic)
• This module has an external antenna and built-in
PROCEDURE: EEPROM.
Introduction: • Interface: RS232 TTL
Everyone knows that traffic jams can be a major time • Power supply: 3V to 5V
waster. And it is impossible to predict how long it would
• Default baudrate: 9600 bps
take from origin to destination.
DRAFT
• Works with standard NMEA sentences
The problem of traffic jams affected me when I came to
a city two months ago. Every day I spend more than two The NEO-6M GPS module has four pins: VCC, RX, TX,
hours stuck in jams. And I felt it like why can’t I utilize and GND. The module communicates with the Arduino
this time to do something? via serial communication using the TX and RX pins, so
the wiring couldn’t be simpler:
Note: I use public transport. :-)
NEO-6M GPS Module Wiring to Arduino UNO
There are plenty of other things you can do while being
stuck in traffic jam! • VCC VIN
Some of the ones below are not just fun, but productive • RX TX pin defined in the software serial
too:
• TX RX pin defined in the software serial
Use the time to think and plan, either for current and
• GND GND
future projects.
And of course making electronics stuffs always inspires • L293D IC
me. So I built a destination notifier using Arduino and
GPS module. So what it does is whenever you are near
to your destination, it notifies you by glowing LED or
through vibration (by using mini vibrating motor). I have
provided circuits for both LED and vibrating motor.
136
NEO – 6M GPS Module
TinyGPS++ Library :
The TinyGPS++ library makes it simple to get information
on location in a format that is useful and easy to
understand.
The TinyGPS++ library allows you to get way more
information than just the location, and in simple way,
besides the location, you can get:
>>date
>>time
>>speed
>>course
>>altitude
DRAFT
137
IT & ITES Trade Theory for Exercise 2.8.196
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
DRAFT
current < 5uA
• Integrated low power 32-bit MCU
• SDIO 2.0, SPI, UART, I2C
• Standby power consumption of < 1.0mW (DTIM3)
Testing the module
As the world is more and more interconnected it is crucial
to allow your projects communicating with the rest of the
network and the cloud.
• 1 x breadboard
138
Wiring
I wire the module as depicted in the below figure
Power
The ESP8266–01 modules, according to its
specifications, should be powered with a DC stable
source at 3.3V.
Note:I really suggest to power it with a very stable 3.3V
DC power source as the module is quite sensible to
current fluctuation and it might be subject to auto-reset
• 1x AA battery holder (I have reused one from an old problem
RC car) and 2x AA battery
In my very first test I have tried to power the module
from an Arduino Uno but it was not providing enough
Amps therefore I have switched to AA batteries
In the above schema the batteries must be wired in the
following way:
DRAFT
• blue wire (+) is the positive from batteries
• black wire (-) is the negative or ground from batteries
Serial Interconnection
I use a USB to TTL converter which I have in my toolbox
(PL2302HX ). This module provides 3.3V power but also
in this case the current it is not enough to properly power
the ESP module.
Note: you can use any other USB to TTL converter, they
all work in the same way
Wire and connect the USB to TTL module in the following
• 8x rainbow wire male-female
way:
• black wire [1] to ground
• purple wire [1] to RX pin
• grey wire [1] to TX pin
139
DRAFT
140
IT & ITES Trade Theory for Exercise 2.8.197
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
Requirements: VIN Pin - This pin is used to power the Arduino Uno
board using an external power source. The voltage
• Arduino UNO
should be within the range mentioned above.
• DC power jack
USB cable - when connected to the computer, provides
• USB 5 volts at 500mA.
• VIN pin
PROCEDURE:
Introduction:
we’ll be taking a closer look at the Arduino hardware,
and more specifically, the Arduino Uno pinout. Arduino
Uno is based on the ATmega328ÿþ by Atmel. The Arduino
Uno pinout consists of 14 digital pins, 6 analog inputs, a
power jack, USB connection and ICSP header. The
versatility of the pinout provides many different options
such as driving motors, LEDs, reading sensors and more.
In this post, we’ll go over the capabilities of the Arduino
Uno pinout. There is a polarity protection diode connecting between
the positive of the barrel jack to the VIN pin, rated at 1
Arduino Uno Pinout – Diagram Ampere.
The power source you use determines the power you
DRAFT
have available for your circuit. For instance, powering
the circuit using the USB limits you to 500mA. Take into
consideration that this is also used for powering the MCU,
its peripherals, the on-board regulators, and the
components connected to it. When powering your circuit
through the barrel jack or VIN, the maximum capacity
available is determined by the 5 and 3.3 volts regulators
on-board the Arduino.
5v and 3v3
They provide regulated 5 and 3.3v to power external
components according to manufacturer specifications.
GND
In the Arduino Uno pinout, you can find 5 GND pins,
which are all interconnected.
Arduino Uno pinout - Power Supply
The GND pins are used to close the electrical circuit and
There are 3 ways to power the Arduino Uno:
provide a common logic reference level throughout your
Barrel Jack - The Barrel jack, or DC Power Jack can be circuit. Always make sure that all GNDs (of the Arduino,
used to power your Arduino board. The barrel jack is peripherals and components) are connected to one
usually connected to a wall adapter. The board can be another and have a common ground.
powered by 5-20 volts but the manufacturer recommends
RESET - resets the Arduino
to keep it between 7-12 volts. Above 12 volts, the
regulators might overheat, and below 7 volts, might not IOREF - This pin is the input/output reference. It provides
suffice. the voltage reference with which the microcontroller
operates.
141
Arduino Uno Pinout - Analog IN waves (voice) into analog voltage. This goes through the
device’s ADC, gets converted into digital data, which is
The Arduino Uno has 6 analog pins, which utilize ADC
transmitted to the receiving side over the internet.
(Analog to Digital converter).
Arduino Uno Pinout - Digital Pins
These pins serve as analog inputs but can also function
as digital inputs or digital outputs. Pins 0-13 of the Arduino Uno serve as digital input/output
pins.
Pin 13 of the Arduino Uno is connected to the built-in
LED.
In the Arduino Uno - pins 3,5,6,9,10,11 have PWM
capability.
ADC stands for Analog to Digital Converter. ADC is an • Each pin can provide/sink up to 40 mA max. But the
electronic circuit used to convert analog signals into digital recommended current is 20 mA.
signals. This digital representation of analog signals • The absolute max current provided (or sank) from all
allows the processor (which is a digital device) to pins together is 200mA.
measure the analog signal and use it through its
operation.
Arduino Pins A0-A5 are capable of reading analog
voltages. On Arduino the ADC has 10-bit resolution,
meaning it can represent analog voltage by 1,024 digital
levels. The ADC converts voltage into bits which the
microprocessor can understand.
One common example of an ADC is Voice over IP (VoIP).
Every smartphone has a microphone that converts sound
DRAFT
142
IT & ITES Trade Theory for Exercise 2.8.198
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
Comparison Chart
Application Used with ethernet cables Used for connecting telephone wires
Number of wires 8 4
DRAFT
Type 8P8C 6P4C
DRAFT
144
IT & ITES Trade Theory for Exercise 2.8.199
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
Requirements:
• Wi-Fi IEEE 802.11
• WLAN
• Smart phones
• System
• Router
PROCEDURE:
Introduction Wireless signals are electromagnetic waves travelling
through the air. These are formed when electric energy
This document covers the basics of how wireless travels through a piece of metal — for example a wire or
technology works, and how it is used to create networks. antenna — and waves are formed around that piece of
W ireless technology is used in many types of metal. These waves can travel some distance depending
communication. We use it for networking because it is on the strength of that energy.
cheaper and more flexible than running cables. While
wireless networks can be just as fast and powerful as For more on how electromagnetic signals work, check
wired networks, they do have some drawbacks. the #External Resources section at the end of this
document.
Reading and working through Learn Networking
Basics before this document will help you with some of Types of Wireless Signals
the concepts used in wireless networks. There are many, many types of wireless technologies.
DRAFT
In addition to some background information, this You may be familiar with AM and FM radio, Television,
document covers six basic concepts: Cellular phones, Wi-Fi, Satellite signals such as GPS
and television, two-way radio, and Bluetooth. These are
• Wireless signals - what they are and how signals some of the most common signals, but what makes them
can differ.
different?
• Wireless devices - the differences and uses for
receivers and transmitters. Frequency
• Wi-Fi Modes - how networks are made up of clients, First of all, wireless signals occupy a spectrum, or wide
access points, or ad-hoc devices. range, of frequencies: the rate at which a signal vibrates.
If the signal vibrates very slowly, it has a low frequency.
• Wi-Fi Signals - the unique characteristics of Wi-Fi, If the signal vibrates very quickly, it has a high frequency.
and how signals are organized. Frequency is measured in Hertz, which is the count of
• Power and Receiver sensitivity - how far each how quickly a signal changes every second. As an
wireless device can go, and how well a router can example, FM radio signals vibrate around 100 million
listen and filter out interference and noise. times every second! Since communications signals are
often very high in frequency, we abbreviate the
• Antennas - how the type of antenna changes the way measurements for the frequencies - millions of vibrations
the router broadcasts. a second is Megahertz (MHz), and billions of vibrations
Reading through this material should take about an hour. a second is Gigahertz (GHz). One thousand Megahertz
Working through the activities, or diving deeper into the is one Gigahertz.
subject with a group may take longer. Example Frequency Ranges
What is a wireless signal? Below we can see the span of frequencies that are
Wireless signals are important because they can transfer com monly used in comm unications. Broadcast
information — audio, video, our voices, data — without transmitters for AM, FM and Television use frequencies
the use of wires, and that makes them very useful. below 1000 MHz, Wi-Fi uses two bands at higher
145
frequencies - 2.4 and 5GHz. Cellular phones use many Example two: FM radio. The F in FM comes from
different frequencies. Frequency - defined by how quickly the wave vibrates
every second. An un-modulated FM wave might look like:
The frequencies from left to right:
• AM Radio: Around 10MHz
• FM Radio: Around 100MHz
• Television: Many frequencies from 470MHz to
800MHz, and others
And a modulated FM radio wave has higher and lower
• Cellular phones: 850MHz, 1900MHz, and others frequencies indicating higher and lower audio
• Wi-Fi: 2.4GHz frequencies in the signal:
• Satellite: 3.5GHz
• Wi-Fi: 5GHz
Modulation
From left to right, we have the normal, un-modulated
In addition to having different frequencies, wireless wave, then the lower frequency wave (representing lower
signals can be different in the way they convey audio amplitudes), then the higher frequency wave
information. A wireless signal needs to be modulated— (representing higher audio amplitudes).
or changed—to send information. There are many types
The type of modulation various technologies use to
of modulation, and different technologies can use one
communicate can be very different, and are often not
or more types to send and receive information. In the
compatible. Satellite equipment cannot speak directly to
two examples below — AM and FM radio — the M stands
your laptop or smartphone, which uses Wi-Fi to send
for modulation. The type of modulation is what makes
and receive information. This is because the radios in
them different.
different devices can listen only to certain types of
Example one: AM radio. The A in AM comes from modulations and frequencies.
Amplitude - the energy or strength of the signal, operating
at a single frequency. An un-modulated AM wave might
look like:
DRAFT
And a modulated AM radio wave has higher and lower
energy (amplitude) waves indicating higher and lower
audio frequencies in the signal:
146
Technology or device Type of wireless signal
Nearly every device or technology uses a different There are two types of Wi-Fi signal, based on the
wireless frequency and modulation. This means most frequencies they use:
devices can only understand a very specific kind of
• 2.4GHz - A lower frequency, this is the more common
wireless signal.
Wi-Fi technology in use today. Many devices use it,
Receivers and Transmitters so the signals can become more crowded and
interfere with each other. It can pass through walls
When a device sends out a wireless signal, it is called a
and windows fairly well.
transmitter. When another device picks up that wireless
signal and understands the information, it is called a • 5GHz - This higher frequency technology is used by
receiver. In the case of FM radio, there is one fewer devices, and can sometimes achieve higher
DRAFT
transmitter—owned and operated by the radio station— speeds because the frequencies are less crowded.
and many receivers that people listen to the station with. It cannot pass through walls and windows as well as
When a device has both a transmitter and a receiver, it the 2.4GHz band signals, so the range of 5GHz
is sometimes called a transceiver. Devices such as technology is often shorter.
routers can both transmit and receive, which is what
These two types of Wi-Fi are called the Frequency
makes them useful for building networks—you probably
Bands, or just Bands for short.
want to be able to send messages to your neighbors
and out to the world, as well as receive messages! Each frequency band used in Wi-Fi is divided up into
multiple “channels”. Each channel is similar to rooms at
Quick Activity: W hat devices do you own or use
a party - if one room is crowded it is hard to carry on a
frequently that are transm itters, receivers or
conversation. You can move to the next room, but that
transceivers? Fill in some examples below each type:
might get crowded as well. As soon as the building is
Transmitter Receiver Transceiver full, it becomes difficult to carry on a conversation at the
party.
2.4GHz Band
Examples: Examples: Examples:
For the 2.4GHz band, there are 14 channels total.
Do you use more transmitters, receivers, or transceivers
Unfortunately, these channels overlap, so they aren’t all
throughout the day? What is different about the way you
usable at the same time. If you are setting up a mesh
use each of these?
network — all of the mesh links will need to be on the
Wi-Fi Signals same channel.
When building a network, you will be using Wi-Fi The available channels vary depending on where you
technology, which has some unique characteristics you are in the world. For example, in the United States
will need to know. channels 12, 13 and 14 are not allowed for Wi-Fi, as
those frequencies are used by TV and satellite services.
147
If you are building networks in the United States, you A router’s transmit power can be measured with two
can only use channels 1 through 11. In the rest of the scales — milliwatts (mW) or dBm:
world, channels 1 through 13 are generally usable, and
• A milliwatt is one thousandth (that’s 1/1000) of a
in a few places channel 14 is available.
single watt - which is a generic measurement of
Despite that, the best channels in the United States and power. For instance, a light bulb might be 40 watts. A
most of the world to use for 2.4GHz band equipment are router will have an output power of 100mW, which is
channels 1, 6, and 11. This will minimize interference 400 times less!
caused by partially overlapping Wi-Fi signals:
• A dBm is a relative measurement using logarithms.
You could use other sets of Wi-Fi channels, as long as One milliwatt is 0 dBm. 10 milliwatts is 10 dBm; 100
they are 5 channels apart - for instance 3, 8 and 13. This milliwatts is 20 dBm, and so on. This is the scale that
may not be optimal though, as channels 1 and 2 would many network designers use to calculate if longer
be unused, and in many places in the world channel 13 wireless links will work.
is not available. Wherever you are, try and check what
A few examples of the transmit power levels in common
channels are most in use, and plan your network to use
Wi-Fi hardware is below:
a channel that doesn’t overlap.
10mW (10dBm): Laptop or smartphone, or very low cost
5GHz Band
Wi-Fi router.
The 5GHz frequency band is much wider and has more
About 25 to 50 meters
channels, so the diagram is a bit more extensive.
Fortunately, these channels do not overlap, so you don’t 100mW (20dBm): Indoor home or office router.
have to worry about picking non-standard channels like
About 50 to 100 meters
in the 2.4GHz band.
100mW (20dBm): Outdoor sector router.
There are many more channels available in the 5GHz
band, so it should be easier to select a channel in this About 5 to 10 kilometers
band that doesn’t cause interference. This may not 500mW (1/2 Watt or 27dBm): Outdoor, long distance
always be true — more and more wireless equipment is focused routers.
starting to use the 5GHz
About 10 to 20 kilometers or more
In the United States, only channels available for building
mesh networks are 36, 40, 44, 48, 149, 153, 157, 161, Wireless transmitter power is only one half of the
and 165. There are other channels available for Access connection. The Wi-Fi receiver has a range of power
Points or other types of community networks, but those levels it can hear—the “listen power” in the diagram
channels won’t work with mesh wireless. The best place above. This is also known as the receive sensitivity.
to check what is allowed in your area is online. Links are The receive sensitivity values are generally rated in dBm,
DRAFT
provided in External Resources at the end of this and are usually in the range of -40dBm to -80dBm. The
document. negative number indicates a very small signal — tiny
fractions of a milliwatt.
When setting up your wireless network, you will need to
think about what frequency band to use, and what Below we have an example of two routers in relatively
channel to use. close range. They have a good connection because the
signal strength between them is strong.
Power and Receiver Sensitivity
As a receiver moves away from a wireless router, the
Many people want to know how far wireless signals will signal it hears will get “quieter” — in other words, the
go. Knowing this is important for planning a network, as power it receives will go down. Below, we can see the
the power of the routers will affect the design of the same routers, but with more distance between them. In
network, and how much equipment is needed. this case, the routers have a weaker connection because
Different Wi-Fi routers can have very different power the signal is near the limit of what the routers can hear.
levels. Some are much stronger: they have more The speed between the routers will be less.
speaking or transmitting power than others. Some are If the router moves too far away from the transmitter, it
very good listeners: they have what is called a better won’t be able to receive any signal, either due to the
receive sensitivity. These two elements define how well signal being too weak or other signals interfering, and
wireless devices will connect, and how far away a the routers will disconnect. Below we can see the two
receiving Wi-Fi router can be. routers have disconnected, as there isn’t enough signal.
Manufacturers do not usually publish information about The optimal signal range for outdoor wireless equipment
their router’s transmit power or receive sensitivity. is between -40dBm and -60dBm. This will ensure the
Instead, the manufacturer will give a generic “range” connection can maintain the highest bandwidth possible.
rating to their routers, usually relative to each other. In
some cases, usually with more business or professional Antennas
oriented equipment you can find the information for Wireless routers have different types of antennas. Some
transmit power and receive sensitivity.
148
routers will have antennas built in, and sometimes the Using directional antennas has the benefit of increasing
routers will have a choice of antenna you can attach to the distance a signal will travel in one direction, while
the router. There are many specific types of antennas, reducing it in all other directions. Since the signal is all
but three basic types are used most of the time, and will going one way, the power that would be sent out in all
be useful in building a wireless network. The first type of directions with omnidirectional nodes is now focused,
antenna is also the most common—omnidirectional. increasing the power in that direction.
Omnidirectional Antennas It can also decrease the interference received at the
node. There are fewer signals coming in to the antenna,
An omnidirectional antenna sends a signal out equally
since the node is only listening to signals from the
in all directions around it.
direction it is pointing. It won’t hear signals behind it or to
Using omnidirectional antennas has the benefit of the sides as well or at all. This reduces the signals it
creating connections in any direction. You don’t have to needs to sort out, and allows it to focus on other signals
do as much planning to connect with multiple neighbors more, increasing the quality of those connections.
or buildings. If there is enough signal between nodes,
However, directional antennas also have the drawback
they should connect.
of requiring more planning to create links in your
The all-direction strength of these antennas comes with neighborhood. Since you are defining and limiting the
the drawback of transmitting a weaker signal. Since the areas where wireless signals go, you need to think about
signal is going in all directions, it spreads out and gets how those signals cover your neighborhood. If there are
weaker with distance very fast. If nodes or clients are far areas that are then left out, how will those areas be
away, they may not connect well. included in the network?
Also, if there are only nodes or clients in one direction of Also, the node has a very powerful signal in a single
the router, then the signals going in the opposite direction direction. If omnidirectional units, or lower power units
are wasted: such as laptops, are connecting to the node, they may
not connect properly. The laptop will hear the node very
Directional Antennas
well, but the directional node may not hear the laptop.
The next type of antenna is known as directional—it This will create the situation where it looks like there is a
sends out a signal in a more focused way. There are two strong signal, but you cannot connect.
main types of directional antennas:
Quick Activity: What are the best uses for the different
Sector Antenna Focused Antenna kinds of antennas?
Sector antennas send out a pie-shaped wedge of signal Antenna Type Best Uses
- it can be anywhere between 30 degrees and 120
OmnidirectionalSectorFocused
degrees wide. These are often long, rectangular
______________________________
________________________________________________________
________________________________________________________
__________________________
antennas that are separate or integrated in to a router.
DRAFT
A focused antenna sends out a narrow beam of signal - What would the best antennas to use for building a
it is normally around 5 to 10 degrees wide, but it can be neighborhood network?
a little wider as well. These are often dishes or have a
mesh bowl reflecting signal behind them.
149
IT & ITES Trade Theory for Exercise 2.8.200
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
DRAFT
on the strength of that energy. signals can be different in the way they convey
Types of Wireless Signals information. A wireless signal needs to be modulated—
or changed—to send information. There are many types
There are many, many types of wireless technologies.
of modulation, and different technologies can use one
You may be familiar with AM and FM radio, Television,
or more types to send and receive information. In the
Cellular phones, Wi-Fi, Satellite signals such as GPS
two examples below — AM and FM radio — the M stands
and television, two-way radio, and Bluetooth. These are
for modulation. The type of modulation is what makes
some of the most common signals, but what makes them
them different.
different?
Example one: AM radio. The A in AM comes from
Frequency
Amplitude - the energy or strength of the signal, operating
First of all, wireless signals occupy a spectrum, or wide at a single frequency.
range, of frequencies: the rate at which a signal vibrates.
An un-modulated AM wave might look like:
If the signal vibrates very slowly, it has a low frequency.
If the signal vibrates very quickly, it has a high frequency. And a modulated AM radio wave has higher and lower
Frequency is measured in Hertz, which is the count of energy (amplitude) waves indicating higher and lower
how quickly a signal changes every second. As an audio frequencies in the signal:
example, FM radio signals vibrate around 100 million From left to right, we have the normal, un-modulated
times every second! Since communications signals are wave, then the lower amplitude wave (representing low
often very high in frequency, we abbreviate the points in audio waves), then the higher amplitude wave
measurements for the frequencies - millions of vibrations (representing crests or high points in audio waves).
a second is Megahertz (MHz), and billions of vibrations
a second is Gigahertz (GHz). One thousand Megahertz A more detailed version of an AM signal is below:
is one Gigahertz. The audio signal is the wave on the top, with the
corresponding Amplitude Modulated wave below it.
150
Example two: FM radio. The F in FM comes from 5GHz - This higher frequency technology is used by fewer
Frequency - defined by how quickly the wave vibrates devices, and can sometimes achieve higher speeds
every second. An un-modulated FM wave might look like: because the frequencies are less crowded. It cannot pass
through walls and windows as well as the 2.4GHz band
And a modulated FM radio wave has higher and lower
signals, so the range of 5GHz technology is often shorter.
frequencies indicating higher and lower audio
frequencies in the signal: These two types of Wi-Fi are called the Frequency
Bands, or just Bands for short.
Each frequency band used in Wi-Fi is divided up into
From left to right, we have the normal, un-modulated
multiple “channels”. Each channel is similar to rooms at
wave, then the lower frequency wave (representing lower
a party - if one room is crowded it is hard to carry on a
audio amplitudes), then the higher frequency wave
conversation. You can move to the next room, but that
(representing higher audio amplitudes).
might get crowded as well. As soon as the building is
The type of modulation various technologies use to full, it becomes difficult to carry on a conversation at the
communicate can be very different, and are often not party.
compatible. Satellite equipment cannot speak directly to
2.4GHz Band
your laptop or smartphone, which uses Wi-Fi to send
and receive information. This is because the radios in For the 2.4GHz band, there are 14 channels total.
different devices can listen only to certain types of Unfortunately, these channels overlap, so they aren’t all
modulations and frequencies. usable at the same time. If you are setting up a mesh
network — all of the mesh links will need to be on the
As an example, some broadcast radio receivers have a
same channel.
switch to select between AM and FM signals, for two
reasons: they use different frequencies to transmit, and The available channels vary depending on where you
they use different modulation types. If you try and listen are in the world. For example, in the United States
to an AM signal with a radio in FM mode, it won’t work. channels 12, 13 and 14 are not allowed for Wi-Fi, as
The opposite is also true - in AM mode, an FM signal those frequencies are used by TV and satellite services.
doesn’t make sense to the receiver. It is important that If you are building networks in the United States, you
transmitters and receivers use the same frequencies and can only use channels 1 through 11. In the rest of the
modulation types to communicate. world, channels 1 through 13 are generally usable, and
in a few places channel 14 is available.
Devices in your daily life use many types of wireless
signals. Look at the table below to see the various Despite that, the best channels in the United States and
frequencies and types of modulation each uses: most of the world to use for 2.4GHz band equipment are
channels 1, 6, and 11. This will minimize interference
Receivers and Transmitters
caused by partially overlapping Wi-Fi signals:
DRAFT
When a device sends out a wireless signal, it is called a
You could use other sets of Wi-Fi channels, as long as
transmitter. When another device picks up that wireless
they are 5 channels apart - for instance 3, 8 and 13. This
signal and understands the information, it is called a
may not be optimal though, as channels 1 and 2 would
receiver. In the case of FM radio, there is one
be unused, and in many places in the world channel 13
transmitter—owned and operated by the radio station—
is not available. Wherever you are, try and check what
and many receivers that people listen to the station with.
channels are most in use, and plan your network to use
When a device has both a transmitter and a receiver, it
a channel that doesn’t overlap.
is sometimes called a transceiver. Devices such as
routers can both transmit and receive, which is what 5GHz Band
makes them useful for building networks—you probably
The 5GHz frequency band is much wider and has more
want to be able to send messages to your neighbors
channels, so the diagram is a bit more extensive.
and out to the world, as well as receive messages!
Fortunately, these channels do not overlap, so you don’t
Wi-Fi Signals have to worry about picking non-standard channels like
in the 2.4GHz band.
When building a network, you will be using Wi-Fi
technology, which has some unique characteristics you There are many more channels available in the 5GHz
will need to know. band, so it should be easier to select a channel in this
band that doesn’t cause interference. This may not
There are two types of Wi-Fi signal, based on the
always be true — more and more wireless equipment is
frequencies they use:
starting to use the 5GHz
2.4GHz - A lower frequency, this is the more common
In the United States, only channels available for building
Wi-Fi technology in use today. Many devices use it, so
mesh networks are 36, 40, 44, 48, 149, 153, 157, 161,
the signals can become more crowded and interfere with
and 165. There are other channels available for Access
each other. It can pass through walls and windows fairly
Points or other types of community networks, but those
well.
channels won’t work with mesh wireless.
151
Power and Receiver Sensitivity some cases, usually with more business or professional
oriented equipment you can find the information for
Many people want to know how far wireless signals will
transmit power and receive sensitivity.
go. Knowing this is important for planning a network, as
the power of the routers will affect the design of the A router’s transmit power can be measured with two
network, and how much equipment is needed. scales — milliwatts (mW) or dBm:
Different Wi-Fi routers can have very different power • A milliwatt is one thousandth (that’s 1/1000) of a single
levels. Some are much stronger: they have more watt - which is a generic measurement of power. For
speaking or transmitting power than others. Some are instance, a light bulb might be 40 watts. A router will
very good listeners: they have what is called a better have an output power of 100mW, which is 400 times
receive sensitivity. These two elements define how well less!
wireless devices will connect, and how far away a
• A dBm is a relative measurement using logarithms.
receiving Wi-Fi router can be.
One milliwatt is 0 dBm. 10 milliwatts is 10 dBm; 100
Manufacturers do not usually publish information about milliwatts is 20 dBm, and so on. This is the scale that
their router’s transmit power or receive sensitivity. many network designers use to calculate if longer
Instead, the manufacturer will give a generic “range” wireless links will work.
rating to their routers, usually relative to each other. In
DRAFT
152
IT & ITES Trade Theory for Exercise 2.8.201
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
DRAFT
from our experience with filters. RF systems revolve
around frequencies and the various ways in which
frequencies are generated, controlled, or affected by
components and parasitic circuit elements. The dB scale
is convenient in a context such as this because frequency
response plots are intuitive and visually informative when
the frequency axis uses a logarithmic scale and the
amplitude axis uses a dB scale.
We won’t cover the generic details of decibels because
they are already available on this page of the
AAC Electric Circuits textbook. Instead, we will focus on
practical aspects of the decibel in the specific context of
RF systems.
Relative, Not Absolute
It is easy to forget that dB is a relative unit. You cannot
say, “The output power is 10 dB.”
Voltage is an absolute measurement because we always
speak of a potential difference, i.e., the difference in
potential between two points; usually we are referring to
the potential of one node with respect to a 0 V ground
node. Current is also an absolute measurement because
the unit (amperes) involves a specific amount of charge
with respect to a specific amount of time. In contrast, dB
is a unit that involves the logarithm of a ratio between
153
A Bode plot showing the magnitude response Other antennas, however, can be designed to
of different band-pass filters. Image courtesy concentrate radiated energy in certain directions, and in
of AnalogDialogue. this sense an antenna can have “gain.” The antenna is
not actually adding power to the signal, but
When dB Is Absolute
it effectively increases the transmitted power by
We’ve established that dB is a ratio and thus cannot concentrating electromagnetic radiation according to the
describe the absolute power or amplitude of a signal. orientation of the communication system (obviously this
However, it would be awkward to be constantly switching is more practical when the antenna designer knows the
back and forth between dB and non-dB values, and spatial relationship between the transmitter and receiver).
perhaps this is why RF engineers developed the dBm
unit.
We can avoid the “ratios only” problem by simply creating
a new unit that always includes a reference value. In the
case of dBm, the reference value is 1 mW. Thus, if we
have a 5 mW signal and we want to stay within the realm
of dB, we can describe this signal as having a power of
7 dBm:
10log10(5 mW1 mW)=10log10(5)H”7 dBm10log10a
(5 mW1 mW)=10log10a (5)H”7 dBm
You definitely want to familiarize yourself with the concept
of dBm. This is a standard unit used in real-life RF system
development, and it’s very convenient when, for example,
you are calculating a link budget, because gains and
losses expressed in dB can simply be added to or
subtracted from the output power expressed in dBm.
There is also a dBW unit; this uses 1 W for the reference
value instead of 1 mW. Nowadays most RF engineers
are working with relatively low-power systems, and this
probably explains why dBm is more common.
More dB Variants
Two other dB-based units are dBc and dBi. Image from Timothy Truckle (own work)
Instead of a fixed value such as 1 mW, dBc uses the [GFDL]. Here you can see the unequal
DRAFT
strength of the carrier signal as the reference. For distribution of radiated energy that results in
example, phase noise (discussed in page 2 of this gain in the forward direction (i.e., 0°).
chapter) is reported in units of dBc/Hz; the first part of The dBi unit allows antenna manufacturers to specify a
this unit indicates that the phase noise power at a specific “gain” figure that uses the ever-popular dB scale. As
frequency is being measured with respect to the power always, we need a ratio when we’re working with dB,
of the carrier (in this case “carrier” refers to the signal and in the case of dBi, the antenna gain is given with
strength at the nominal frequency). reference to the gain of an isotropic antenna.
An idealized point-source antenna receives a certain Some antennas (such as those accompanied by a
amount of energy from the transmitter circuit and radiates parabolic dish) have significant amounts of gain, and thus
it equally in all directions. These “isotropic” antennas are they can make a nontrivial contribution to the range or
considered to have zero gain and zero loss. performance of an RF system.
154
IT & ITES Trade Theory for Exercise 2.8.202
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
Design and Test Local Area Networks over Ethernet & Wi- Fi. Selecting
Appropriate LAN Technology
Objective:
• to design and test Local Area Networks over Ethernet & Wi-Fi.
DRAFT
be some benefit to having the network that justifies the directly attached to switch ports, while others are grouped
expense of building it. Clearly, the benefit is never infinite, in small numbers on hubs.
so as network designers, we have a responsibility to build
a network that meets the requirements for the lowest Another important economy involves the use of
possible cost. unmanageable Access devices. Small workgroup hubs
and switches with no management capabilities are
This problem is particularly important in the selection of available for remarkably low prices. In the same vein, it
network technologies. The classic example is that Token is still possible to build an old-fashioned 10Base2
Ring cards for PCs are more expensive than the network, using a long piece of coax cable (often called
equivalent Ethernet cards. This fact alone has explained "thin-net"), for almost nothing.
why so many organizations have undergone expensive
changes in their LAN infrastructure to use more cost- These inexpensive Access options definitely have their
effective options. As discussed previously, Token Ring place. They may be ideal for the home or small office
has many performance benefits over Ethernet. But if the LAN. They can also be used to increase the effective
cost of Ethernet is low enough and the cost of Token port density of the network's Access Level by allowing
Ring is high enough, then you can engineer around the small groups of users to share ports, as shown in Figure.
performance benefits to build an Ethernet network that This figure shows a Distribution Area containing two
is at least as good as Token Ring, but less expensive. Distribution switches and three Access switches.
Or, you may decide to spend more money on Token Ring Workgroup hubs and workgroup switches are connected
and get better performance. to these Access switches. Some users are connected
through the workgroup devices and some are connected
Similarly, you could get a high-performance network by directly to the Access switches. Note that I have shown
running Gigabit Ethernet to every desk. But the cost of some of these workgroup devices with dual attachments
doing this would be orders of magnitude higher than the to the Access switches to provide extra redundancy.
same network using Fast Ethernet. There may still be
155
be difficult to narrow down which device is in trouble,
though.
Most seriously, if there are problems with one or more
devices connected to a workgroup switch, then the only
noticeable result will be performance problems for the
other devices in that workgroup. The workgroup switch
will not pass bad frames to the Access switch,[1] and it
can't complain about the bad frames it receives from its
end devices. It is possible to have a serious problem
that simply will never be seen unless the users are diligent
about complaining.
Installed Base
Installed base is another facet of cost effectiveness. The
chances are slim that you are building a new network
from scratch. In most cases, there is existing equipment,
existing applications, servers, and a cable plant. A
significantly cheaper alternative network technology may
Increasing effective port density of the LAN Access Level be available. If migrating to that means that you have to
with unmanageable devices absorb a high cost in changing your installed base, then
simply staying with the existing technology may be more
This approach works well, but two main structural cost-effective.
disadvantages should be considered. First, even if the
end devices are able to connect to a workgroup switch For example, a large company may make extensive use
at full-duplex Fast Ethernet speeds, they are still of native Token Ring protocols to connect to legacy
constrained by the uplink speed to the Access switch. If mainframe equipment. Token Ring equipment is more
the Access switch is also Fast Ethernet, then remember expensive than Ethernet equipment, but after factoring
that these end devices must share that link. This option in the cost of replacing the mainframe, rewriting the
may or may not be acceptable, given the application applications to use TCP/IP, and changing every end
traffic patterns. device to use this new application, they probably won't
want to make the change.
The second disadvantage is the increased probability of
failure. The diagram shows that some of the workgroup This is where it is useful to have a long-term strategic
devices have dual connections to the Access switches, information technology vision for the entire organization.
and having these connections is a good way of helping If you have a long-term goal to phase out these legacy
applications, then you need to build a network that can
DRAFT
to reduce the net probability of failure. However,
workgroup devices are generally not built for the same accommodate a phased-in migration to the target
level of serious use as the chassis switches that I prefer technology. Perhaps you will migrate the Core of the
for the Access switches. Specifically, they often have network from Token Ring to Fast and Gigabit Ethernet
external power supplies of similar quality to those used with TCP/IP routing and use DLSw to tunnel the native
for low-end consumer electronics. Token Ring protocols. Then, when the new servers and
applications are available, you can migrate user devices
Augmenting the network's Access Level with workgroup in relatively small groups. Maintainability
hubs or switches (or passive MAUs in Token Ring
networks) is sometimes a reasonable way to reduce One of the biggest potential hidden costs in a network is
costs. Giving up manageability can be dangerous, maintenance. I have mentioned how using
though, or at least inconvenient. Connecting end devices unmanageable workgroup devices in the Access Level
directly to Access switches allows control over their VLAN of the network can make it harder to find problems. I
membership. Connecting these devices through an previously mentioned that the design principle of
intermediate workgroup hub or switch, however, generally simplicity makes network maintenance easier.
means that every device on the workgroup hub or switch Remember that these are not just annoyance factors for
must be part of the same VLAN. This requirement affects the engineer who gets stuck with the ultimate
flexibility. responsibility for running the network. There are costs
are associated with these issues.
A more serious problem is the loss of fault management
information. An unmanageable workgroup hub or switch The trouble is that quantifying these costs can be
cannot tell you when one of the devices misbehaves or extremely difficult. How can you tell, for example, that
when a cable is faulty. It can't tell you when its power cutting a particular corner will result in needing an extra
supply is overheating. You might be able to get some staff member to keep the network going? Only
information about an ill-behaved device somewhere on experience can tell you what the hidden costs are. In
a workgroup hub by looking at the more complete general, since your design goals are centered on
management information on the Access switch. It can reliability, the more corners you cut, the less reliable the
156
results will be. Lower reliability generally translates into days because it is difficult to maintain and considerably
higher maintenance costs. more expensive than higher speed options. This system
uses a thick coaxial cable with considerably longer
Performance
distance limitations than 10Base2 (500 meters for
And this topic brings us to performance considerations. 10Base5 versus 185 meters for 10Base2). Devices
You always want to build the fastest and best network connect to the wire using a "vampire tap," which uses a
you can for the money. Of course, by "best," I mean that retractable spike to connect to the wire in the middle of
the network best fulfills the business application the cable. A transceiver is then required to connect this
requirements. A brilliant network with unbelievable tap connector to the end device.
throughput and low latency is useless if it doesn't support
It is safe to consider both 10Base2 and 10Base5 as
the applications for which it was built.
essentially obsolete technology, but they are still in use
I mention performance last because it is far too easy to in some older networks, which is why I mention them
get absorbed in abstract issues of technology here.
improvement. You always have to bear in mind that a
Besides copper-based Ethernet technologies, several
network is built for a business reason. It has a budget
different fiber optic systems are grouped together under
that is based on how much money this business goal is
the general IEEE title of 10BaseF. The most common
worth to the organization. If you spend more on building
10Mbps fiber optic Ethernet standard is 10BaseFL. Other
and maintaining the network than it is worth to the
options exist, such as 10BaseFB and 10BaseFP. The
organization, either through money saved or revenue
term FOIRL (Fiber Optic Inter-Repeater Link) is often
earned, then the network actually hurts the organization
used generically to describe any 10BaseF transceiver,
more than it helps.
although technically, FOIRL describes an earlier
Within these limitations, your goal is to build the best standard.
network that you can. That also implies that you have to
Since the same fiber optic cabling is capable of
select technology that is appropriate to what you want to
transmitting Gigabit Ethernet, there is seldom much point
accomplish. Part of a LAN may serve an environment
in installing new 10BaseF systems. It is still used primarily
where cabling is impossible, so wireless technology could
in places where the distance limitations on copper
be a natural fit. But wireless technology tends to offer
Ethernet standards make it necessary to use fiber optic
relatively poor bandwidth and latency compared to a
cable, which has much longer distance capabilities. The
similar network built with Fast Ethernet. When selecting
dominant flavors of Fast Ethernet are 100BaseTX, which
appropriate technology, you have to be sensitive to these
runs over standard Category 5 twisted pair cabling, and
trade-offs and understand the strengths and weaknesses
100BaseFX, which uses a fiber optic cable.
of the different options available to you.
Designations such as 10BaseT may appear mysterious
Ethernet and Fast Ethernet
and arbitrary, but they have simple logic. The first part of
DRAFT
Ethernet is a bus topology LAN technology with a the designation refers to the theoretical peak bandwidth—
collision-based mechanism for dealing with contention. in this case, it is 10Mbps. For 100BaseT, it is 100Mbps.
Physically, there are several different options for The word "Base" signifies baseband rather than
implementing an Ethernet network. I am generally broadband signaling. Baseband simply means that there
including Fast Ethernet in these comments because the is just one carrier frequency. Broadband, on the other
similarities between Ethernet and Fast Ethernet are hand, can multiplex several different signals on the same
strong. I will explicitly note where the comments do not medium by transmitting them with different carrier
apply to both. frequencies.
Physical implementations of Ethernet and Fast Ethernet The last part is used inconsistently. The "2" in 10Base2
are generally determined by their IEEE designations. For means 200 meters for the maximum distance of a
10Mbps standard Ethernet, the most common option segment, while the "5" in 10Base5 stands for 500 meters.
today is 10BaseT. This option uses standard twisted pair When twisted pair standards such as 10BaseT came
cabling, such as Category 5 (although 10BaseT also along, the developers probably felt that designating the
works well over Category 3 cable plants). Other options type of medium was more important. Instead of calling
include 10Base2 and 10Base5, which implement the LAN the new twisted pair Ethernet standard 10Base1 to show
bus with an extended cable. that it has a 100-meter distance limit, it was called
10BaseT to designate that it operates over twisted pair
In 10Base2 (also called "thin-net"), the cable is an
cabling. Similarly, when the fiber optic standards were
inexpensive 50? impedance coaxial cable that is
developed, the letter "F" was adopted to designate this
terminated at both ends with an impedance-matching
different cabling standard.
resistor. Devices connect to the wire by means of T-
junction connectors along the length of the cable. Some The naming standards start to get a little strange when
end devices are equipped with 10Base2 connectors, but we get to names like 100VG-AnyLAN (actually, 100VG-
a transceiver is frequently required. I will discuss AnyLAN isn't really Ethernet at all, because it doesn't
transceivers later in this section. use collisions to control contention). If the reader wants
more details on these standards and the naming
10Base5 (also called "thick-net") is less common these
157
conventions, it is best to look at the reference section of came from an intermediate device such as a router, then
this book to find other books that focus more specifically the source address will be that of the router. This address
on these matters. is included mostly for the benefit of the recipient device,
which needs to know where to send its responses. If the
Ethernet Framing Standards
return path needs to pass through a router, then the
Figure shows the standard 802.3 Ethernet frame router's address needs to be here.
structure. Several standard fields are defined, and they
The third important field in the Ethernet frame header is
must all be present in some form. An installed base
the multipurpose "length/type" field (also called
doesn't need to cripple a network, but it can limit your
Ethertype). This 2-byte number could either be a length
design options temporarily.
or a type. The only way to tell the difference is that the
maximum valid length is 1500 bytes.[2] If the value in
this field is less than or equal to 1500, it is interpreted as
a length.
Similarly, anything larger than 1500 must be a type. Just
to be absolutely certain, there is a small gap to the nearest
"round" number in hexadecimal, 0600, which is 1536 in
decimal. The actual values in the type field represent
different protocols, and the IEEE keeps track of these
values. An up-to-date list of assigned values is available
online from the IEEE web site at http://standards.ieee.org/
regauth/ethertype/type-pub.html . This list includes a very
large number of companies that have registered
particular Ethernet protocol types, although only a handful
of types are commonly seen in most production LANs.
Ethernet framing formats, including 802.1Q VLAN
tagging Novell reserves Ethernet types 8137 and 8138 for IPX.
Type 8137 designates an older version of IPX that is not
The frame starts with a "preamble." The preamble
widely used anymore, while 8138 is the most typical for
consists of a string of seven bytes of the binary pattern
modern IPX installations. Apple's Ethernet protocol uses
"10101010" to indicate that the device is about to start
type code 809B. The Banyan Network Operating System
sending a frame. Then the eighth byte, called the "start
uses 0BAD and 0BAF, and 8191 is reserved for NetBEUI,
of frame delimiter," is nearly the same as the preamble
which is frequently used for PC file-sharing systems. The
except for the last bit: "10101011". The preamble and
most common type field values are 0800, used for frames
the start of frame delimiter are not included in the frame
containing standard IP packets, and 0806, used for IP
length counter. Once you get past the preamble and start
DRAFT
ARP packets.
of frame delimiter, you get into the interesting parts of
the Ethernet frame. Three important fields are in the In most LANs, IPX uses the length rather than the type.
frame header: the source and destination MAC If you look at a protocol analyzer, you will probably see
addresses and the length/type field. all of the IPX frames with a length/type value of something
less than 05DC (the hex value of the decimal number
All Ethernet MAC addresses are 6 bytes long. Every
1500).
network interface card (NIC) has a globally unique
address "burned-in" to it. It is possible to override this TCP/IP, on the other hand, almost universally uses the
burned-in address (BIA) to create a locally administered type rather than length. The reason for the difference is
address (LAA). However, there are also more special- largely historical. The type interpretation is used by an
purpose MAC addresses, such as multicast and earlier standard for defining Ethernet frames, called
broadcast addresses. I will discuss these special- Ethernet II. The length interpretation, on the other hand,
purpose addresses later in this book. is the method employed by the newer IEEE 802.3
standard.
The destination MAC address is always first. This gives
the network devices every possible advantage in It should be obvious why it is more efficient to use the
forwarding packets as quickly as possible. Modern high- type field as a type rather than as a length. If any one
speed networking equipment is able to read the frame protocol prefers to use its length, then that protocol has
as it is received. Since the network usually only need to effectively trampled over 1500 possible type codes.
look at where the packet is going, if the destination Furthermore, it is much more efficient if the protocol
address is first, it is often possible to start directing the stacks of both the end and network devices don't have
frame to the appropriate destination port just from this to read into the data portion of the frame before they can
information. figure out what type of packet it is. Not every device cares
about every protocol (particularly when the packets are
The source MAC address comes next. This is the
received as broadcasts), so knowing whether they should
address of the device that sent the frame. Note that it is
bother decoding any given packet is useful. But there
not necessarily the originator of the packet. If the packet
are other benefits to this system.
158
For protocols that use the 802.3 standard, it is necessary that are seen are usually caused by other problems, such
to use another method for identifying the type. Using this as late collisions. However, when random electrical
method is done by adding Sub-Network Access Protocol problems are on a link, these checksums are useful in
(SNAP) information to the packet. SNAP is part of the finding them.
LLC (Logical Link Control) sublayer of the Data Link
This checksum is calculated on the entire Ethernet frame
Layer. It is defined as an extension to the 802.2 standard.
from the Destination Address right up to the Data (and
The presence of a type rather than a length value in the
possible padding). If the payload protocol contains
"length/type" field automatically tells the receiving station
another checksum, it provides an extra layer of certainty.
to look for LLC information later in the packet.
When there are checksum failures, it can also be used
This process may sound complicated, but it allows to investigate which layers of the protocol see the
greater flexibility in the protocol. Rather than a single problem. For example, if the Ethernet level FCS field is
type field, 802.2 allows the creation of an arbitrary good, but the TCP checksum is bad, then the problem
Protocol Data Unit (PDU), which can be used to contain must have existed before the packet hit this part of the
a huge variety of extensions to the protocol. This LLC network.
PDU information is tacked on to the start of the data
The same 802.3 Ethernet frame used for 10Mbps
portion of the packet, immediately after the standard
Ethernet is also used for 100Mbps, Gigabit, and 10
Ethernet header information. In effect, it looks like another
Gigabit Ethernet. The same MAC multicast and
type of header, placed after the MAC header.
broadcast addresses are used by all of these standards.
Also note that the 802.2 LLC sublayer is not unique to The use of these addresses makes life much easier for
Ethernet. Exactly the same SNAP PDU that defines IPX the network designer because it means that you can
in an Ethernet frame can be used to define IPX in a Token freely mix these different standards to fit your immediate
Ring frame. needs.
SNAP is just one simple example of this type of a PDU. For example, you can have Gigabit Ethernet trunks
Inside the SNAP PDU is a field that defines that protocol connecting your Distribution switch to your Access
type. switches. Then you can have 100Mbps Fast Ethernet
links to some workstations, and even step down to
At the end of every 802.3 Ethernet frame is a 4-byte
workgroup hubs of standard half-duplex 10BaseT for the
checksum called Frame Check Sequence (FCS). This
less active user workstations. Throughout this complex
checksum is a relatively simple method of ensuring that
hybrid of media types, the same Ethernet frames can be
the packet was not damaged as it crossed through the
transmitted without change.
network. Generally, one doesn't expect to see very many
checksum errors in a stable Ethernet network. Those
DRAFT
159
IT & ITES Trade Theory for Exercise 2.8.203
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
Design and Test Local Area Networks over Ethernet & Wi- Fi. Selecting
Appropriate LAN Technology
Objective:
• to design and test Local Area Networks over Ethernet & Wi-Fi.
Introduction GPRS
The Service Managed Gateway (SMG) contains a GSM GPRS (General Packet Radio Service) uses packet-
(Global System for Mobile communications) 3G wireless switched technology to transmit small bursts of data. The
modem. The modem uses a SIM card to create a dial- 3G modem on the GW Series router supports multi-slot
up WAN connection to the Internet. class 6, which allows a maximum data rate of 384Kbps
class 3. The maximum data rate available to the 3G
Typical uses of the GSM (3G) modem modem depends on provisioning by the network operator.
• You can use the GSM (3G) modem on the GW Series HSDPA
router in two ways.
HSDPA (High-Speed Downlink Packet Access) uses
• You can create a primary WAN link over the GSM circuit-switched technology to transmit data at speeds
(3G) modem. of up to 1.8Mbps.
DRAFT
CSD in EGSM900/GSM1800 MHz
CSD (Circuit-Switched Data) mode enables the 3G
modem to transmit data over the EGSM (Extended
Global System for Mobile communications) frequency
or the GSM frequency. The modem behaves as a dual-
band mobile phone behaves.
A primary WAN link over the 3G modem Configuring the SMG
You can use the GSM (3G) modem as a backup WAN The Service Managed Gateway (SMG) contains an
link. If the primary interface link fails, the GW Series internal web server that is used to configure the SMG.
router uses its GSM (3G) modem to automatically route Before you can access the internal web server and start
traffic across the Internet via its alternative interface. This the SMG configuration, you must ensure that your PC
set up is not covered in this document. For further has the correct networking set up.
information contact Virtual Access. To enable and configure connections on your SMG, the
gateway must be correctly installed, and a valid service
must be configured on it.
When your Service Managed Gateway is correctly
connected to your PC, type fast. start into the URL line
of your browser to display the Start page.
160
updated all your settings. When you have completed all
your configuration changes,
step 1: Configure the IP default route
DRAFT
(3G) modem interface The IP default route fields, their descriptions and
command lines
To configure the GW Series router to use the GSM (3G)
modem interface, follow the steps given below. You do Click Update. The Configuration Update Result page
not have to save each configuration until you have appears.
161
IT & ITES Trade Theory for Exercise 2.8.204
Smart City - Identify and test Wired and Wireless communiaction medium such
as RS232, RS485, Ethernet, Fibre optics, Wi-Fi, GSM, GPRS, RF etc and
communication protocol
DRAFT
Singapore1 Singapore
• Radio Resource Management (RRM), also known as
Auto-RF Taiwan1 Republic of China
(Taiwan) 1
RF Basics
The regulations of Singapore and Taiwan for wireless
This section provides a summary of regulatory domains
LANs are particular to these countries only for operation
and their operating frequencies.
in the 5 GHz band. Singapore and Taiwan are therefore
Regulatory Domains only regulatory domains for 5 GHz operation; for
Devices that operate in unlicensed bands do not require operation in 2.4 GHz, they fall into the ETSI and FCC
any formal licensing process, but when operating in these domains, respectively.
bands, the user is obligated to follow the government Note See the Cisco website for compliance
regulations for that region. The regulatory domains in information and also check with your local
different parts of the world monitor these bands according regulatory authority to find out what is
to different criteria, and the WLAN devices used in these permitted within your country. The information
domains must comply with the specifications of the provided in Table 3-2 and Table 3-3 should be
relevant governing regulatory domain. Although the used as a general guideline.
regulatory requirements do not affect the interoperability
Operating Frequencies
of IEEE 802.11b/g and 802.11a-compliant products, the
regulatory agencies do set certain criteria in the standard. The 802.11b/g band regulations have been relatively
For example, the emission requirements for WLAN to constant, given the length of time it has been operating.
minimize the amount of interference a radio can generate The FCC allows for 11 channels, ETSI allows for up to
or receive from another radio in the same proximity. It is 13 channels, and Japan allows up to 14 channels, but
the responsibility of the vendor to get the product certified requires a special license to operate in channel 14.
from the relevant regulatory body. Table 3-1 summarizes
For 802.11a, countries are moving to open the frequency
the current regulatory domains for Wi-Fi products. The
range 5.250-5.350 GHz (UNII-2) and the frequency range
main regulatory domains are FCC, ETSI, and the MKK.
162
5.470 to 5.780 GHz for additional 802.11a channels. The 802.11g standard, which was ratified in June 2003,
These various frequencies are covered in more detail in operates in the same spectrum as 802.11b and is
the specific 802.11 sections in this chapter. backward-compatible with the 802.11b standard. 802.11g
supports the additional data rates of 6, 9, 12, 18, 24, 36,
802.11b/g Operating Frequencies and Data Rates
48, and 54 Mbps. 802.11g delivers the same 54 Mbps
Ratified in September 1999, the 802.11b standard maximum data rate as 802.11a, but operates in the same
operates in the 2.4 GHz spectrum and supports data 2.4 GHz band as 802.11b. It also provides backward
rates of 1, 2, 5.5, and 11 Mbps. 802.11b enjoys broad compatibility with existing 802.11b devices.
user acceptance and vendor support. 802.11b technology
Table 3-2 lists the various 802.11b/g channel frequencies
has been deployed by thousands of enterprise
and specifies whether a regulatory agency allows their
organizations, which typically find its speed and
use in their domain. Note that not all of these frequencies
performance acceptable for their current applications.
are available for use in all regulatory domains.
1 2412 X X X
2 2417 X X X
3 2422 X X X
4 2427 X X X
5 2432 X X X X
6 2437 X X X X
7 2442 X X X X
8 2447 X X X X
9 2452 X X X X
10 2457 X X X X
11 2462 X X X X
DRAFT
12 2467 X X X
13 2472 X X X
142 2484 X
1 Israel allows channels 1 through 13 indoors. responsible for implementing these technologies must
be able to make an educated choice between deploying
2 Japan requires a special license for channel 14.
2.4 GHz-only networks, 5 GHz-only networks, or a
802.11a Operating Frequencies and Data Rates combination of both. Organizations with existing 802.11b
networks cannot simply deploy a new 802.11a network
Operating in the unlicensed portion of the 5 GHz radio
for existing APs and expect to have their 802.11a 54
band, 802.11a is immune to interference from devices
Mbps coverage in the same areas as their 11Mbps
that operate in the 2.4 GHz band, such as microwave
802.11b coverage. The technical characteristics of both
ovens, cordless phones, and Bluetooth (a short-range,
these bands simply do not allow for this kind of coverage
low-speed, point-to-point, personal-area-network
interchangeability.
wireless standard). Because the 802.11a standard
operates in a different frequency range, it is not 802.11a provides data rates of 6, 9, 12, 18, 24, 36, 48,
compatible with existing 802.11b or 802.11g-compliant with a maximum data rate of 54 Mbps, though generally
wireless devices, but it does mean that 2.4-GHz and 5- at shorter ranges for a given power and gain, but it has
GHz equipment can operate in the same physical up to 23 nonoverlapping frequency channels (depending
environment without interference. on the geographic area) compared to the three
Choosing between these two technologies (802.11b/g nonoverlapping channels of 802.11b/g, which results in
and 802.11a) does not involve a one-for-one trade-off. increased network capacity, improved scalability, and the
They are complementary technologies and will continue ability to create microcellular deployments without
to coexist in future enterprise environments. Those interference from adjacent cells.
163
The 5 GHz band in which 802.11a operates is divided external antennas, but the UNII-3 band can now be used
into several different sections. Each of the Unlicensed for indoor or outdoor 802.11a WLANs as well.
National Information Infrastructure (UNII) bands
The channels in UNII-1 (5.150 to 5.250 GHz) are 34, 36,
presented in Table 3-3 was originally intended for
38, 40, 42, 44, 46, and 48. The channels in UNII-2 (5.250-
different uses, but all can currently be used by indoor
5.350 GHz) are 52, 56, 60, 64 and require Dynamic
802.11a with appropriate power restrictions. Initially, the
Frequency Selection (DFS) and Transmitter Power
FCC defined only the UNII-1, UNII-2, and UNII-3 bands,
Control (TPC). The channels in the new frequency range
each of which had four channels. The channels were
(5.470-5.725 GHz) are 100, 104, 108, 112, 116, 120, 124,
spaced 20 MHz apart with an RF spectrum bandwidth of
128, 132, 136, 140 and require DFS and TPC. The
20 MHz, thereby providing nonoverlapping channels.
channels in UNII-3 are 149, 153, 157, 161, 165 and
There are differing limitations on these three UNII bands. require DFS and TPC. Not all channels in a given range
Restrictions vary between them for transmit power, can be used in all of the regulatory domains. Figure 3-
antenna gain, antenna styles, and usage. The UNII-1 1 shows the various channels in the UNII-1, 2, and 3
band is designated for indoor operations, and initially had bands, along with the additional 11 new channels.
a restriction of permanently attached antennas. The UNII-
For more information on FCC regulation updates, see
2 band was designated for indoor or outdoor operations,
the following URL: http://www.cisco.com/en/US/products/
and permitted external antennas. The UNII-3 band was
h w / w i r e l e s s / p s 4 6 9 /
intended for outdoor bridge products and permitted
products_white_paper0900aecd801c4a88.shtml
Center 5180 5200 5220 5240 5260 5280 5300 5320 5745 5765 5785 5805
Frequency
DRAFT
Japan1 U-NII lower bands 36 5.180
40 5.200
44 5.220
48 5.240
Singapore U-NII lower band 36 5.180
40 5.200
44 5.220
48 5.240
Taiwan 52 5260
56 5280
60 5300
64 5320
EMEA 1 Same as USA Same as USA Same as USA
Australia
New Zealand
EMEA 22 U-NII lower band 36 5.180
40 5.200
44 5.220
164
1 Japan is changing from channels 34,38,42,46 to f To develop recommended practices for
36,40,44,48 and adding channels 52, 56, 60, and 64 but Inter Access Point Protocol (IAPP) for
required Dynamic Frequency Selection on channels 52 multi-vendor use
- 64. Cisco Equipment with the old channels are
g To develop higher speed PHY extension
designated with a -J, Cisco equipment with the new
to 802.11b (54 Mbps)
channels are designated with a -P.
h To enhance 802.11 MAC and 802.11a
2 Some EMEA countries, such as Denmark and
PHY-Dynamic Frequency selection (DFS),
Germany, are limited to 20 mW.
Transmit Power control (TPC)
In February of 2004, the FCC released a revision to the
i To enhance 802.11 MAC security and
regulations covering the 5 GHz 802.11a channel usage.
authentication mechanisms
This revision added 11 additional channels, bringing the
available channels capacity to 23 channels (see Figure 3- j To enhance the 802.11 standard and
1). The new additional 11 channels will be for Indoor/ amendments to add channel selection for
Outdoor use. To use the 11 new channels, however, 4.9 GHz and 5 GHz in Japan
radios must comply with two features that are part of the k To define RRM enhancements to provide
802.11h specification: transmit power control (TPC) and interfaces to higher layers for radio and
dynamic frequency selection (DFS). DFS is required to network measurements
avoid radar that operates in this frequency range, but it
can also be used for other purposes, such as dynamic l To define Radio Resource Measurement
frequency planning. 802.11h has been supported since enhancements to provide interfaces to
Cisco Unified Wireless Network Software Release 3.1. higher layers for radio and network
measurements
Figure 3-1 802.11 Channel Capacity
m To perform editorial maintenance,
Understanding the IEEE 802.11 Standards corrections, improvements, clarifications,
IEEE 802.11 is the working group within the Institute for and interpretations relevant to
Electrical and Electronics Engineers (IEEE) responsible documentation for 802.11 family
for wireless LAN standards at the physical and link layer specifications
(Layer 1 and Layer 2) of the OSI model, as compared to n Focus on high throughput extensions
the Internet Engineering Task Force (IETF, which works (>100MB/s at MAC SAP) in 2.4GHz and/
on network layer (Layer 3) protocols. Within the 802.11 or 5GHz bands
working group are a number of task groups that are
responsible for elements of the 802.11 W LAN o To provide Fast Handoffs in Voice over
standard. Table 3-5 summarizes some of the task group WLAN (goal is around 50ms)
initiatives.
DRAFT
p Focus on vehicular communications
For more information on these working groups, see the protocol aimed at vehicles, such as toll
following URL: collection, vehicle safety services, and
commerce transactions via cars
http://www.ieee802.org/11/
r To develop a standard specifying fast BSS
Table 3-5 IEEE 802.11 Task Group Activities transitions and fast roaming
Task Project s To define a MAC and PHY for meshed
Group networks that improves coverage with no
MAC To develop one common MAC for WLANs single point of failure
in conjunction with a physical layer entity t To provide a set of performance metrics,
(PHY) task group measurement methodologies, and test
PHY To develop three WLAN PHYs—Infrared, conditions to enable manufacturers, test
2.4 GHz FHSS, 2.4 GHz DSSS labs, service providers, and users to
measure the performance of 802.11
a To develop PHY for 5 GHz UNII band
WLAN devices and networks at the
b To develop higher rate PHY in 2.4 GHz component and application level
band
u To provide functionality and interface
c To cover bridge operation with 802.11 between an IEEE 802.11 access network
MACs (spanning tree) (Hotspot) and any external network
d To define physical layer requirements for v To provide extensions to the 802.11 MAC/
802.11 operation in other regulatory PHY to provide network management for
domains (countries) stations (STAs)
e To enhance 802.11 MAC for QoS
165
w To provide mechanisms that enable data and 2 Mbps rates and 8 chips (complimentary code
integrity, data origin authenticity, replay keying-CCK) at the 11 and 5.5 Mbps rate. This means
protection, and data confidentiality for that at 11 Mbps, 8 bits are transmitted for every one bit
selected IEEE 802.11 management of data. The chipping sequence is transmitted in parallel
frames including but not limited to: action across the spread spectrum frequency range.
management frames, deauthentication
IEEE 802.11b Direct Sequence Channels
and disassociation frames
14 channels are defined in the IEEE 802.11b direct
RF Spectrum Implementations
sequence (DS) channel set. Each DS channel
In the United States, three bands are defined as transmitted is 22 MHz wide, but the channel separation
unlicensed: industrial, scientific, and medical (ISM) is only 5 MHz. This leads to channel overlap such that
bands. The ISM bands are as follows: signals from neighboring channels can interfere with each
other. In a 14-channel DS system (11 usable channels
• 900 MHz (902-to-928 MHz)
in the US), only three nonoverlapping (and thus, non-
• 2.4 GHz (2.4-to-2.4835 GHz) (IEEE 802.11b/g interfering) channels 25 MHz apart are possible
operates in this frequency range) (channels 1, 6, and 11).
• 5 GHz (5.15-to-5.35 and 5.725-to-5.825 GHz) (IEEE This channel spacing governs the use and allocation of
802.11a operates in this frequency range) channels in a multi-AP environment, such as an office
or campus. APs are usually deployed in a cellular fashion
Each range has different characteristics. The lower
within an enterprise, where adjacent APs are allocated
frequencies exhibit better range, but with limited
nonoverlapping channels. Alternatively, APs can be co-
bandwidth and thus lower data rates. The higher
located using channels 1, 6, and 11 to deliver 33 Mbps
frequencies exhibit less range and are subject to greater
bandwidth to a single area (but only 11 Mbps to a single
attenuation from solid objects.
client). The channel allocation scheme is illustrated
The following sections cover some of the specific RF in Figure 3-2.
characteristics that the various 802.11 radios use for
Figure 3-2 IEEE 802.11 DSS Channel Allocations
improving communications in the 2.4 and 5 GHz
frequency ranges. IEEE 802.11g
Direct Sequence Spread Spectrum 802.11g provides for a higher data rate (up to 54 Mbps)
in the 2.4-GHz band, the same spectrum as 802.11b.
Direct sequence spread spectrum (DSSS) encodes
802.11g is backward-compatible with 802.11b and
redundant information into the RF signal. This provides
provides additional data rates of 6, 9, 12, 18, 24, 36, 48,
the 802.11 radio with a greater chance of understanding
and 54 Mbps. At higher data rates, 802.11g uses the
the reception of a packet, given background noise or
same modulation technique, orthogonal frequency
interference on the channel. Every data bit is expanded
DRAFT
division multiplexing (OFDM), as 802.11a (see IEEE
into a string of bits, or chips, called a chipping sequence
802.11a OFDM Physical Layer).
or barker sequence. The chipping rate mandated by IEEE
802.11 is 11 chips per bit. It uses binary phase-shift keying Table 3-6 lists 802.11g modulation and transmission
(BPSK)/quadrature phase-shift keying (QPSK) at the 1 types for the various data rates.
166
IEEE 802.11a OFDM Physical Layer indoor coverage area should double. For every decrease
of 9dB, the indoor coverage area should be cut in half.
IEEE 802.11a defines requirements for the physical layer
of the OSI model, operating in the 5.0 GHz UNII dBi
frequency, with data rates ranging from 6 Mbps to 54
The term dBi is used to describe the power gain rating
Mbps. It uses Orthogonal Frequency Division Multiplexing
of antennas. The real antennas are compared to an
(OFDM), which is a multi-carrier system (compared to
isotropic antenna (a theoretical or imaginary antenna)
single carrier systems). OFDM allows subchannels to
that sends the same power density in all directions, thus
overlap, providing a high spectral efficiency. The
the use of dBi.
modulation technique allowed in OFDM is more efficient
than spread spectrum techniques used with 802.11b. Antennas are compared to this ideal measurement, and
all FCC calculations use this measurement (dBi). For
IEEE 802.11a Channels
example, a Cisco omni-directional AIR-ANT4941 has a
The 802.11a channel shows the center frequency of the gain of 2.2 dBi, meaning that the maximum energy
channels. The frequency of the channel is 10 MHz on density of the antenna is 2.2 dB greater than an isotropic
either side of the dotted line. There is 5 MHz of separation antenna.
between channels, as shown in Figure 3-3.
dBm
Figure 3-3 Channel Set
The term dBm uses the same calculation as described
For the US-based 802.11a standard, the 5 GHz in the dB section, but has a reference value of 1 milliWatt.
unlicensed band covers 300 MHz of spectrum and
So, taking into consideration the example previously
supports 12 channels. As a result, the 5 GHz band is
given in the dB section, if the power jumped from 1 mW
actually a conglomerate of three bands in the USA: 5.150-
to 100mW at the radio, the power level would jump from
to-5.250 GHz (UNII 1), 5.250-to-5.350 GHz (UNII 2), and
0 dBm to 20 dBm.
5.725-to-5.875 GHz (UNII 3).
Besides describing transmitter power, dBm can also
RF Power Terminology
describe receiver sensitivity. Receiver sensitivity is in
RF-specific terms, such as dB, dBi, and dBm are used minus dBm (-dBm), because the signal reduces in value
to describe the amount of change in power transmitted from its point of transmission. The sensitivity indicates
measured at any discrete point, as perceived by the radio. the lowest power the receiver can receive before it
The following sections cover their differences and provide considers the signal unintelligible. The approximate
a rule of thumb for their use, in addition to providing an receiver sensitivity of Cisco radios is -84dBm for a 1200
explanation of effective isotropic radiated power (EIRP). series "a" radio and -90 dBm for the 1200 "g" radio.
dB Note The "g" radio can recover a signal at half
the strength of the "a" radio. It is generally true
The term decibel (dB) is mainly used for attenuation or
DRAFT
that for a given technology, lower frequency
amplification of the power level. dB is a logarithmic ratio
radios can achieve a better sensitivity than
of a signal to another standardized value. For example,
higher frequency radios.
dBm is where the value is being compared to 1 milliWatt,
and dBw is where the value is being compared to 1 Watt. Effective Isotropic Radiated Power
The math is as follows: Although transmitted power based on the radio setting
is rated in either dBm or Watts, the maximum energy
Power (in dB) = 10 * log10 (signal/reference)
density coming from an antenna from a complete system
Plugging in some numbers (signal 100mW, reference is measured as effective isotropic radiated power (EIRP),
1mW) gives a value in dB of 20 (100 = 10 squared; taking which is a summation of the dB values of the various
the exponent 2 and multiplying by 10 gives you 20). components. EIRP is the value that regulatory agencies,
such as the FCC or ETSI, use to determine and measure
Remember that it is logarithmic (meaning that it increases
power limits, expressed in terms of maximum energy
or decreases exponentially and not linearly), and it is a
density within the first Fresnel of the radiating antenna.
ratio of some value to a reference. Also, remember that
EIRP is calculated by adding the transmitter power (in
it is multiplied by 10.
dBm) to antenna gain (in dBi) and subtracting any cable
Given that it is logarithmic, there are some general rules losses (in dB). For example, if you have a Cisco Aironet
of thumb. An increase or decrease of 3 dB means that 350 bridge connected to a solid dish antenna by a 50
the signal doubled (double the power) or reduced in foot length of coaxial cable, plugging in the numbers gives
strength by 1/2, respectively. An increase or decrease of the following:
10dB means that the signal went up by 10 times or down
• Bridge—20 dBm
to 1/10th the original value.
• 50 Foot Cable—3.3 dBm (negative because of cable
Indoor WLAN and outdoor WLAN deployments both offer
loss)
separate challenges in RF deployments, and need to be
analyzed separately. However, there are some rules of • Dish Antenna—21 dBi
thumb for indoor use. For every increase of 9dB, the
167
• EIRP—37.7dBm Strength Indication (RSSI) above 35 at all time in your
installation. This is to ensure that the VoIP phone has
Planning for RF Deployment
good reception as well as allowing some over-
Many of the RF-design considerations are subscription and enhances roaming choices for the
interdependent or implementation-dependent. As a phone.
result, there is no "one-size-fits-all" template for the
Remember that designing for low noise background is
majority of requirements and environments.
as important as relatively high energy density within the
Different Deployment Types of Overlapping WLAN cell. This means that a good baseline power setting for
Coverage the AP is in the 35-50 mW range. This generally requires
approximately 15 percent more APs than if you deployed
How much overlapping WLAN coverage you set in your
a coverage model at 100 mW. The smaller the cell,
wireless network depends on the usage, though with
generally the more homogenous the energy density
limited exceptions, all designs should be deployed to
across the cell.
enable low latency coverage. Wireless networks can be
deployed for location management, voice, or data-only 100 mW designs also generate significantly greater noise
networks, or a combination of all three. The difference is load into a given area; 35-50 mW designs are commonly
in the pattern in which the APs are laid out, and the 10 dBm or lower in background noise, even in complex
amount of RF overlap in the coverage area. When coverage areas.
planning a WLAN deployment consideration should be
Pre-site surveys are useful for identifying and
given to future uses of the WLAN deployment.
characterizing certain challenging areas and potential
Converting a WLAN deployment to support additional sources for interference, such as existing WLANs,
services beyond a data-only deployment is not simply a rogues, and non-802.11 interference from sources such
matter of adding APs; it can require an additional site as microwave ovens and cordless telephones. Following
survey and the possible relocation of existing APs. a design that should be reviewed and approved by all
stakeholders, post-site surveys should be considered as
Data-Only Deployment
an excellent audit mechanism to ensure that the
Data-only deployments do not require a large amount of coverage model complies with the intended functional
overlap. This is because 802.11 clients respond to a lower requirements as set forth by the stakeholders.
signal from a nearby AP, should one fail, by stepping
When making your estimation for separation, remember
down their rate and taking a longer time to transmit. The
to factor in objects that affect RF coverage such as wall
required overlap is determined by the WLAN data rate
densities, machinery, elevators, or even wide open
requirement described in W LAN Data Rate
spaces with steel cages, because your results may vary
Requirements. Minimal overlap is required for data-only
depending on the RF environment. Be sure to include
networks, which allow all data rates. For data-only
transient dynamics such as forklifts, large groups of
networks, the rule of thumb for separation of APs is
DRAFT
people, or large objects moved through the area by crane
typically 120-130 feet, but, when making your estimation
or similar load bearing devices. Characterizing for other
for AP separation, remember to factor in objects that
wireless deployments such as robotic systems, cranes,
affect RF coverage, such as wall densities, machinery,
and so on, are also a good idea. A WLC is often a very
elevators, or even wide-open space with steel cages,
effective method for preliminary site evaluation, by
because your results can vary depending on the RF
allowing a fast deployment of a WLAN infrastructure that
environment. RRM has been developed for this type of
can then be used to make RF measurements of the area;
deployment and it is very useful for controlling the RF
a hand-walked site survey is also effective insurance for
coverage.
complex areas such as those commonly found in
Voice/Deployment healthcare, retail, and manufacturing.
Figure 3-4 shows the voice network pattern and overlap. Figure 3-4 Single Floor Site Survey for Voice
The APs are grouped closer together and have more
For more information on a wireless voice deployment,
overlap than a data-only installation, because voice
see Chapter 11, "VoW LAN Design
clients should roam to a better AP before dropping
Recommendations," as well as the 7920 deployment
packets. You generally also want to run smaller cells than
guide at the following URL: http://www.cisco.com/en/US/
in the past, and ensure the overlapping cell edges at or
docs/voice_ip_comm/cuipph/7920/5_0/english/design/
above -67 dBm. This accomplishes a number of things
guide/7920ddg.html.
including greater homogeneity across a single cell and
reducing processor load in the handheld, which increases Location-Based Services Deployments
link stability and reduces latency. Although only one AP
The third type of deployment is the location-based
might be required for a defined area, Cisco recommends
services (LBS) deployments, which may be the most
that you have two APs on nonoverlapping channels with
complex of current applications because it relies not only
a received signal strength indication (RSSI) above 35 at
on excellent cell coverage, but optimal location of APs.
all times in your installation, for redundancy and load
Location management deployments can simultaneously
balancing purposes. For the 7920 voice deployment,
track thousands of devices by using the W LAN
Cisco recommends that you have a Received Signal
168
infrastructure. Examples include W i-Fi tag type AP Density for Different Data Rates
deployments or asset tracking deployments to locate
The minimum required reliable data rate has a direct
equipment or devices via the wireless network and/or
impact upon the number of APs needed in the design,
simply to indicate where wireless clients are throughout
along with power setting, antenna gain, and
the wireless network in relation to a drawing or diagram.
location. Figure 3-7 shows coverage comparison and AP
This can be used to make the wireless infrastructure
density for different data rates. Although six APs with a
more secure by providing the location of a rogue client
minimum data rate of 2 Mbps might adequately service
or APs, and greatly improve client troubleshooting
an area, it might take twice as many APs to support a
capabilities.
minimum data rate of 5 Mbps, and more again to support
For a location management deployment, the APs are a minimum data rate of 11 Mbps for the same coverage
laid out in a staggered pattern. Figure 3-5 shows a typical area.
pattern. The staggered pattern allows for more accurate
Figure 3-7 Coverage Comparison and AP Density for
estimation of the location of a device.
Different Data Rates
For a discussion of Location-Based Services,
The data rate you choose depends on the type of
see Chapter 15, "Cisco Unified Wireless Location-Based
application to be supported, but should not be greater
Services," and the white paper entitled WiFi Location
than the typical requirements because there is tradeoff
Based Services 4.1 Design Guide, which can be found
in coverage. In a typical WLAN environment, the higher
at the following URL: http://www.cisco.com/en/US/docs/
data rates give maximum throughput and should
solutions/Enterprise/Mobility/WiFiLBS-DG.html.
minimize performance-related support issues. In a WLAN
Figure 3-5 Example of a Single Floor Location vertical application environment, the data rates selected
Management Deployment are determined by the application requirements of speed
and reliability as measured by delay and jitter. The
WLAN Data Rate Requirements
physical facility and/or whether the network is client-
Data rates affect AP coverage areas. Lower data rates centric generally dictates range requirements; some
(such as 1 Mbps) can extend the coverage area farther clients might not support the higher data rates, longer
from the AP than higher data rates (such as 54 Mbps) ranges, or the delay and jitter rates of an infrastructure
as illustrated in Figure 3-6(which is not drawn to scale). element such as an AP.
Therefore, the data rate (and power level) affects
It might seem logical to choose the default configuration
coverage and consequently the number of APs required
of APs and clients, thereby allowing all data rates.
for the installation, as illustrated in Figure 3-7 for different
However, there are three key reasons for limiting the
data rates. As part of the planning process, consider the
data rate to the highest rate at which full coverage is
required data rates, the required range, and the required
obtained:
reliability.
• Broadcast and multicast (if enabled) are sent at the
DRAFT
Data Rate Compared to Coverage Area
lowest associated data rate (to ensure that all clients
Different data rates are achieved by the AP sending a can receive the packets). This reduces the throughput
redundant signal on the wireless link, allowing data to of the WLAN because traffic must wait until frames
be more easily recovered from noise. The number of are processed at the slower rate.
symbols, or chips, sent out for a packet at the 1 Mbps
• Clients that are farther away, and therefore accessing
data rate is greater than the number of symbols used for
the network at a lower data rate, decrease the overall
the same packet at 11 Mbps. This means that sending
throughput by causing delays while the lower bit rates
data at the lower bit rates takes more time than sending
are being serviced. It might be better to force the
the equivalent data at a higher bit rate. And when there
clients to roam to a closer AP so as not to impact the
is more than one client associated to the radio, the lower
performance of the rest of the network.
rate client affects the higher rate clients' maximum data
rate by taking longer to transmit a packet of the same • If a 54 Mbps service is specified and provisioned with
length. APs to support all data rates, clients at lower rates
can associate with the APs that can create a coverage
Figure 3-6 Data Rate Compared with Coverage
area greater than planned, thereby increasing the
The actual diameter of the coverage depends on factors security exposure (by allowing association from
such as environment, power level, and antenna gain. outside the building) and potentially interfering with
For example, indoors using the standard antennas on other WLANs.
the NIC card and APs, the diameter of the 1 Mbps circle
Client Density and Throughput Requirements
is approximately 700 feet (210 m), and the diameter of
the 11 Mbps circle is about 200 feet (60 m). Increasing Wireless APs have two characteristics that make actual
the gain of the antenna can increase the distance and client data throughput slower than the data rate:
change the shape of the radiation pattern to something
• APs have an aggregate throughput less than the data
more directional.
rate because 802.11 provides a reliable transport
169
mechanism that ACKs all packets, thereby halving minimum data rate, be sure to consider how much
the throughput on the channel. throughput should, on average, be provided to each user
of the wireless LAN.
• APs are similar to shared hubs. That is, the channel
is shared by all the clients associated to that AP on Take the example of barcode scanners; 25 Kbps may
that channel, thus collisions slow data throughput. be more than sufficient bandwidth for such an application
because using an 802.11b AP at 11 Mbps of data rate
With this in mind, you must have the approximate
results in an aggregate throughput of 5-6 Mbps. A simple
estimate of the maximum number of active associations
division results in a maximum number of 200 users that
(active clients). This can be adjusted more or less
can theoretically be supported. This number cannot in
according to the particular application.
fact be achieved because of the 802.11 management
Each cell provides an aggregate amount of throughput overhead associated with the large number of clients
that is shared by all the client devices that are within the and packet collisions. For a 1 Mbps system, 20 users
cell and associated to a given AP. This basically defines can use the same AP for similar bandwidth results.
a cell as a collision domain. After deciding on the
DRAFT
170
IT & ITES Trade Theory for Exercise 2.9.205
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
DRAFT
171
IT & ITES Trade Theory for Exercise 2.9.206
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
You want your solar panels to deliver the maximum What does “in series” and “in parallel” even mean?
amount of energy possible, right? But did you know how Components connected in series looks like a string of
your solar panels are connected within the electrical Christmas lights – each piece is placed in a line, one
wiring of your house makes a difference in how well they after another, with each piece connected only to the one
work? Connecting your solar panel in series vs parallel before and after. Since all the components are connected
affects current flow and is dictated by your installation’s in a single line, the electrical current can only travel in
setup. one direction. If a circuit is disconnected at any point,
Warning: Science below! While we’re not going to get current will not be able to flow through it. This will halt
too deep into the details, the difference between electrical activity in the entire circuit.
connecting solar panels in series vs in parallel is an You experience this each year when you take those
intermediate level solar discussion. If you’re looking for Christmas lights out of storage, then have to check every
DRAFT
something a bit more on the beginner level, check out bulb to find the one that’s burnt out and preventing the
our articles How Do Solar Panels Work? and Everything entire strand from lighting.
You Need to Know About Solar Inverter Types.
Fortunately, this isn’t how the wiring in your house works.
OK, now that the disclaimer is out of the way, we’re ready! Most household electrical circuits are parallel circuits.
What is a circuit? Each component is connected to every other component.
A parallel circuit will continue to work even if it contains a
Before we get into whether solar panels are better broken component because it has multiple paths for
connected in series or in parallel, let’s talk a little about current to travel.
wiring basics, starting with circuits. An electronic circuit is
simply a path electrons can flow through. The simplest A broken component reduces the overall current, but the
circuit is a battery, wires, and light bulb. other components will stay operational. This why you can
have 5 lights connected to the same circuit in your home,
As electrons move through a circuit, they but choose which ones to turn on or off without affecting
create voltage — the difference in charge between two any of the others.
points (measured in volts) — and current — the rate at
which charge is flowing (measured in amps). Check out
172
IT & ITES Trade Theory for Exercise 2.9.207
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
DRAFT
ratings. issue. Whenever you connect with each other a 60W
solar panel to a 100W panel in series, the gross hooked
If Photovoltaic devices are hooked up in series to
up power is likely to be 160W, given that the two solar
accomplish increased output voltage. The optimum
panels are of identical ampere rating.
system voltage however should not be surpassed.
At this point any specific difference in voltages is not
Having said that when panels are attached in series, one
crucial, voltages would simply add up and all you’ve might
of the panel may carry a rated power below the other
need to judge is the fact that the total voltage must come
panel, because of the lower current spec of this solar
within the inverter voltage limit.
panel with respect to the other modules in the chain,
that unit could tend to drag down the existing system's In case their current specs are not the same , just be
output: willing to witness undesirable consequences, because
the overall current could possibly be the lower of the two
Combining different solar panels in series
panel specifications, which usually shows that you’re not
Solar devices are normally attached in parallel to achieve gonna accomplish a maximum of 160W rather often way
greater output current. For Photo voltaic components less. Just how much less - is relative to dissimilarity in
attached in parallel absolute power is determined specified currents.
Contrary to the combination in series, when solar panels Additionally if you connect collectively a 60W solar panels
are connected in parallel there may be one panel having to a 100W panel in parallel, the absolute associated
power output below the spec of the other devices, this power is likely to be 160W, assuming that the two solar
could perhaps not influence the total power output of the panels are of matching voltage.
chain significantly only if this particular panel possesses
Here any kind of difference in currents is not crucial,
voltage rating on par with the other modules voltage:
currents wouls simply add up and all you’ve need to take
Optimum voltage on a series of modules should invariably into account is that the absolute current must not extend
be less than highest input DC voltage of the inverter. past the highest inverter input current.
173
When their voltage specifications are not the same, you likely to accomplish an overall of 160W rather consistently
need to be ready to expect disagreeable situations, less.
because the overall voltage could possibly be much lower
Just how much less - boils down to the difference
than the individual units that could imply that you’re not
between the voltage ratings of the two.
DRAFT
174
IT & ITES Trade Theory for Exercise 2.9.208
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
Requirements:
• Solar Panel
• System
• Internet Connectivity
• Potentiometer
• Multimeter
• Clamp
• Connecting wires
PROCEDURE:
Introduction: Construction of a solar cell
Solar cell is the basic unit of solar energy generation Solar Cell I-V Characteristics Curve
system where electrical energy is extracted directly from
light energy without any intermediate process. The Solar Cell I-V Characteristics Curve is the superposition
working of a solar cell solely depends upon its of the I-V curves of the solar cell diode in absence (dark)
photovoltaic effect, hence a solar cell also known as and in presence of light. Illuminating a cell adds to the
photovoltaic cell. A solar cell is basically a semiconductor normal "dark"
p-n junction device. It is formed by joining p- type (high
concentration of hole or deficiency of electron) and n-
DRAFT
type (high concentration of electron) semiconductor
material. at the junction excess electrons from n-type try
to diffuse to p-side and vice-versa. Movement of electrons
to the p-side exposes positive ion cores in n- side, while
movement of holes to the n-side exposes negative ion
cores in the p-side. This results in an electric field at the
junction and forming the depletion region. When sunlight
falls on the solar cell, photons with energy greater than
band gap of the semiconductor are absorbed by the cell
and generate electron-hole (e-h) pair. These e-h pairs
migrate respectively to n- and p- side of the pn junction
due to electrostatic force of the field across the junction.
In this way a potential difference is established between
two sides of the cell. Typically a solar or photovoltaic cell
has negative front contact and positive back contact.
A semiconductor p-n junction is in the middle of these
two contacts like a battery. If these two sides are
connected by an external circuit, current will start flowing
from positive to negative terminal of the solar cell. This
is basic working principle of a solar cell. For silicon, the
band gap at room temperature is Eg =1.1 eV and the
diffusion potential is UD = 0.5 to 0.7 V.
175
Circuit for I-V characteristics of solar cell from the solar cell to the product of Voc and Isc.
Graphically, the FF is a measure of the "squareness" of
A typical circuit for measuring I-V characteristics is shown
the solar cell and is also the area of the largest rectangle
in Figure. From this characteristics various parameters
which will fit in the IV curve as shown in Figure.
of the solar cell can be determined, such as: short-circuit
current (Isc), the open-circuit voltage (VoC), the fill factor The efficiency is the most commonly used parameter to
(FF) and the efficiency. The rating of a solar panel compare the performance of one solar cell to another.
depends on these parameters. Efficiency is defined as the ratio of energy output from
the solar cell to input energy from the sun. In addition to
The short-circuit current is the current through the solar
reflecting the performance of the solar cell itself, the
cell when the voltage across the solar cell is zero (i.e.,
efficiency depends on the spectrum and intensity of the
when the solar cell is short circuited). is due to the
incident sunlight and the temperature of the solar cell.
generation and collection of light-generated carriers. For
an ideal solar cell at most moderate resistive loss
mechanisms, the short-circuit current and the light-
generated current are identical. Therefore, the short-
circuit current is the largest current which may be drawn
from the solar cell.
The open-circuit voltage, VOC, is the maximum voltage
available from a solar cell, and this occurs at zero current.
The open-circuit voltage corresponds to the amount of
forward bias on the solar cell due to the bias of the solar
cell junction with the light-generated current.
The "fill factor", more commonly known by its abbreviation
"FF", is a parameter which, in conjunction with Voc and
Isc, determines the maximum power from a solar cell. A Typical I-V curve and power curve of a solar cell.
The FF is defined as the ratio of the maximum power
DRAFT
176
IT & ITES Trade Theory for Exercise 2.9.209
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
Explore and test the Blocking Diode and Bypass Diode for solar panels
Objective:
• to explore and test the blocking diode and bypass diode for solar panels
DRAFT
from high to low voltage, when a solar panel has cells
that are partially shaded, the current is then forced than the voltage of the battery, so there is a possibility of
through the low-voltage shaded cells. This causes the some backwards flow, pulling power out of the battery. It
solar panel to heat up, and have severe power won’t be as much as the flow during the day, but there
loss. Those shaded solar cells become consumers of may be some.
electricity instead of producers. As a result, in the days before charge controllers, people
Bypass diodes inside the junction box of a solar panel would put a blocking diode in series between the battery
provide a low resistance path for the current to go around and the solar panel, only allowing power to go into the
a series of solar cells that have been shaded. The diode battery. Nowadays, most solar power systems have a
is wired in parallel with the cells. Because electricity takes charge controller between the solar panel and the
the path of least resistance, it is easier for the current to battery, and this charge controller prevents this
go through the diode than through the shaded cell, so it backflow of electricity, eliminating the need for a blocking
diode.
177
IT & ITES Trade Theory for Exercise 2.9.210
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
Requirements: Current flow for two cells in series and the effect of a
bypass diode. The animation progresses automatically
• Solar panel
from one condition to another.
• Bypass diode
The effect of a bypass diode on an IV curve can be
• System determined by first finding the IV curve of a single solar
PROCEDURE: cell with a bypass diode and then combining this curve
with other solar cell IV curves. The bypass diode affects
Bypass Diodes the solar cell only in reverse bias. If the reverse bias is
The destructive effects of hot-spot heating may be greater than the knee voltage of the solar cell, then the
circumvented through the use of a bypass diode. A diode turns on and conducts current. The combined IV
bypass diode is connected in parallel, but with opposite curve is shown in the figure below.
polarity, to a solar cell as shown below. Under normal
operation, each solar cell will be forward biased and
therefore the bypass diode will be reverse biased and
will effectively be an open circuit. However, if a solar cell
is reverse biased due to a mismatch in short-circuit
current between several series connected cells, then the
bypass diode conducts, thereby allowing the current from
the good solar cells to flow in the external circuit rather
than forward biasing each good cell. The maximum
reverse bias across the poor cell is reduced to about a
single diode drop, thus limiting the current and preventing
DRAFT
hot-spot heating. The operation of a bypass diode and
the effect on.
178
In practice, however, one bypass diode per solar cell is 2 bypass diodes are used to ensure the module will not
generally too expensive and instead bypass diodes are be vulnerable to "hot-spot" damage.
usually placed across groups of solar cells. The voltage
across the shaded or low current solar cell is equal to
the forward bias voltage of the other series cells which
share the same bypass diode plus the voltage of the
bypass diode. This is shown in the figure below. The
voltage across the unshaded solar cells depends on the
degree of shading on the low current cell. For example,
if the cell is completely shaded, then the unshaded solar
cells will be forward biased by their short circuit current
and the voltage will be about 0.6V. If the poor cell is only
partially shaded, the some of the current from the good
cells can flow through the circuit, and the remainder is
used to forward bias each solar cell junction, causing a
lower forward bias voltage across each cell. The
maximum power dissipation in the shaded cell is Bypass diodes across groups of solar cells. The voltage
approximately equal to the generating capability of all across the unshaded solar cells depends on the degree
cells in the group. The maximum group size per diode, of shading of the poor cell. In the figure above, 0.5V is
without causing damage, is about 15 cells/bypass diode, arbitrarily shown.
for silicon cells. For a normal 36 cell module, therefore,
DRAFT
179
IT & ITES Trade Theory for Exercise 2.9.211
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
Requirements: of tilt angle on soiling, one has to know how it affects the
current of the PV modules as it is directly proportional to
Solar panel
the irradiance reaching the solar cells.
Photovoltaic cell
The incident irradiance on PV cells inside a PV module
System and the operating temperature of PV cells primarily
dictate the power output of module. On a dual axis
PROCEDURE:
tracker, when module surface and the incident light rays
Introduction: are perpendicular to each other, the power output will be
A solar Photovoltaic is a method of generating electrical the highest. Therefore, this study aims to provide a better
power by converting the solar radiation into direct current understanding of the extent at which tilt angle affects the
electricity using semiconductors that exhibit the dust, and hence the performance, of PV modules.
photovoltaic effect. Methodology
Photovoltaic system installation has played a big role in Description of the study and set up of the PV Module:
renewable energy because PV systems are pollution free,
Bahir Dar city is located at latitude of 11°36?N and
economically reliable for long-term operation and secure
longitude of 37°23?E respectively, and an elevation of
energy source. The major obstruction of PV technology
1,840 meters above sea level. Fig 1 shows four modules
is its high capital costs compared to conventional energy
that, two modules were dirt and tilt different two angles
sources and also it is the more widely used technology
and the other two modules were clean by washing water
all over the world; there is 100GW of solar PV now
and detergent and tilt similar to the two dust modules
installed in our world.
and also due to the location of Bahir Dar those four
It is estimated that a total of some 5.3MWp of PV is now modules face towards south by using compass, since
DRAFT
in use in Ethiopia. In April 2012 Ethiopia has established more near to the equator and the system were installed
the first Polycrystalline solar PV module assembly plant at a minimum height of 1.5 meter from the ground.
with the cooperation of SKY Energy International, Metals
and Engineering Corporation (METEC) and an Ethiopian
state enterprise. The plant would expected to achieve
20% of Ethiopian power capacity coming from solar
energy within the next five years including 3Million solar
home systems distribution plan and may also be exported
to a neighboring country .
Performance of these solar-photovoltaic (PV) system not
only depends on its basic electrical characteristics;
maximum power, tolerance rated value of percentage,
maximum power voltage, maximum power current, open-
circuit voltage (Voc), short-circuit current (Isc), maximum
system voltage, but also is negatively influenced by
several obstacles such as ambient temperature, relative
humidity, dust storms and suspension in air, shading,
global solar radiation intensity, spectrum and angle of
irradiance. Fig. 1. Clean and dust PV module at 21.50 and 250 tilt
angle.
The radiation received by cells in the PV module is lower
than radiation reaching the module surface. The main Calibration and Linearity check of the PV Module
causes of these energy difference are dirt accumulation The international Electronic Commissions (IEC) 60904-
on the surface of the modules, reflection and absorption 10 standard describes the procedures utilized for
losses by the materials covering the cells and the tilt determination of the degree of linearity of any photovoltaic
angle of the PV module. To better understand the effect device parameter in relation to a test parameter. A device
180
is linear when it meets the requirements of IECat section Fig. 2. Hydrometer analysis of percentage of passing
7.3, which is stated as follows. When some device is versus diameter of particle size.
claimed to be linear, the applicable range of irradiance,
Experimental Set up and Data Collecting of Wind
voltage, temperatures, or other necessary conditions
Speed
should also be stated. The requirements for the
acceptable limits of non-linearity (variation) are: The vantage pro 2 instrument as shown below on Fig 3
that has been used to measure the weather condition of
a. For the curve of short-circuit current versus irradiance,
the environment (solar radiation, rainfall, etc). But, for
the maximum deviation from linearity should not
this experiment it is only used to measure the wind speed
exceed 2 %.
of the environment close to the PV module installed. The
b. For the curve of open-circuit voltage versus the instrument has been installed 2.5m away from the PV
irradiance logarithm, the maximum deviation from and at an average height of 1.7m. The wind data has
linearity should not exceed 5 %. been stored in the data logger of the wireless vantage
pro 2 (Fig 4) devices and export the record data by
c. If the temperature coefficient of short circuit current
connecting USB cable to the personal computer. The
doesn’t exceed 0.1 %/°K, the device can be regarded
wind speed and direction data were record for eight days
as linear in relation to this parameter [7, 8].
within 30 minutes time interval. During this time the tilt
During the outdoor experiment, the temperature and the angles are changed in two days interval.
output voltage of all the modules were recorded
simultaneously every 15 minute using a multi-meter and
a digital thermometer. As well as the irradiance and the
short circuit current flow that analysed the linearity of
the experiment.
Properties of Dust Based on the Laboratory Testing
Due to small diameter and less density of dust, can be
blows in the environment with natural force. This dust
diameter that flows on Bahir Dar city that estimates
around 0.5-150 microns. However it will vary from place
to place. Thus, the average particle diameter is used for
this experiment by sieving the dust with diameter of
0.075mm and it distributed 25 gram amount of dust to Fig. 3. Set up of vantage pro2 with clean and dusty PV
each tilt angle of PV module to make dirty. module.
Hydrometer Analysis: Composition of the Finer Dust
Particles
DRAFT
According to ASTM D 422 claysare defined as particles
diameter of between 0.075mm to 0.005mm and silt
particles less than 0.005mm in diameter. Thus, from the
50 gram sample test of dust silt and clay amount were
63.62% and 36.38% respectively. Fig 2 shows that
percentage of finer versus grain size diameter (mm).
181
IT & ITES Trade Theory for Exercise 2.9.212
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
DRAFT
and termination methods. One is the "charge transfer", which is the actual chemical
Charge Termination reaction taking place at the interface of the electrode
with the electrolyte and this proceeds relatively quickly.
Once a battery is fully charged, the charging current has
to be dissipated somehow. The result is the generation The second is the "mass transport" or "diffusion" process
of heat and gasses both of which are bad for batteries. in which the materials transformed in the charge transfer
The essence of good charging is to be able to detect process are moved on from the electrode surface,
when the reconstitution of the active chemicals is making way for further materials to reach the electrode
complete and to stop the charging process before any to take part in the transformation process. This is a
damage is done while at all times maintaining the cell relatively slow process which continues until all the
temperature within its safe limits. Detecting this cut off materials have been transformed.
point and terminating the charge is critical in preserving The charging process may also be subject to other
battery life. In the simplest of chargers this is when a significant effects whose reaction time should also be
predetermined upper voltage limit, often called taken into account such as the "intercalation process"
the termination voltage has been reached. This is by which Lithium cells are charged in which Lithium ions
particularly important with fast chargers where the danger are inserted into the crystal lattice of the host electrode.
of overcharging is greater. See also Lithium Plating due to excessive charging rates
Safe Charging or charging at low temperatures.
If for any reason there is a risk of overcharging the battery, All of these processes are also temperature dependent.
either from errors in determining the cut-off point or from In addition there may be other parasitic or side effects
abuse this will normally be accompanied by a rise in such as passivation of the electrodes, crystal formation
temperature. Internal fault conditions within the battery and gas build up, which all affect charging times and
or high ambient temperatures can also take a battery efficiencies, but these may be relatively minor or
beyond its safe operating temperature limits. Elevated infrequent, or may occur only during conditions of abuse.
temperatures hasten the death of batteries and They are therefore not considered here.
182
The battery charging process thus has at least three curves. During charging the measured cell voltage during
characteristic time constants associated with achieving a rest period will migrate slowly downwards towards the
complete conversion of the active chemicals which quiescent condition as the chemical transformation in
depend on both the chemicals employed and on the cell the cell stabilises. Similarly during discharging, the
construction. The time constant associated with the measured cell voltage during a rest period will migrate
charge transfer could be one minute or less, whereas upwards towards the quiescent condition.
the mass transport time constant can be as high as
Fast charging also causes increased Joule heating of
several hours or more in a large high capacity cell. This
the cell because of the higher currents involved and the
is one of the reasons why cells can deliver or accept
higher temperature in turn causes an increase in the rate
very high pulse currents, but much lower continuous
of the chemical conversion processes.
currents.(Another major factor is the heat dissipation
involved). These phenomena are non linear and apply The section on Discharge Rates shows how the effective
to the discharging process as well as to charging. There cell capacity is affected by the discharge rates.
is thus a limit to the charge acceptance rate of the cell. The section on Cell Construction describes how the cell
Continuing to pump energy into the cell faster than the designs can be optimised for fast charging.
chemicals can react to the charge can cause local
overcharge conditions including polarisation, overheating Charge Efficiency
as well as unwanted chemical reactions, near to the This refers to the properties of the battery itself and does
electrodes thus damaging the cell. Fast charging forces not depend on the charger. It is the ratio (expressed as
up the rate of chemical reaction in the cell (as does fast a percentage) between the energy removed from a
discharging) and it may be necessary to allow "rest battery during discharge compared with the energy used
periods" during the charging process for the chemical during charging to restore the original capacity. Also
actions to propagate throughout the bulk of the chemical called the Coulombic Efficiency or Charge Acceptance.
mass in the cell and to stabilise at progressive levels of
charge. Charge acceptance and charge time are considerably
influenced by temperature as noted above. Lower
See more about rest periods and how they can be used temperature increases charge time and reduces charge
to increase battery life and to improve the accuracy of acceptance.
SOC measurments in the Software Configurable
Battery page. Note that at low temperatures the battery will
not necessarily receive a full charge even
See also the affects of Chemical Changes and Charging though the terminal voltage may indicate full
Rate in the section on Battery Life. charge. See Factors Influencing State of
A memorable though not quite equivalent phenomenon Charge.
is the pouring of beer into a glass. Pouring very quickly Basic Charging Methods
DRAFT
results in a lot of froth and a small amount of beer at the
bottom of the glass. Pouring slowly down the side of the Constant Voltage A constant voltage charger is basically
glass or alternatively letting the beer settle till the froth a DC power supply which in its simplest form may consist
disperses and then topping up allows the glass to be of a step down transformer from the mains with a rectifier
filled completely. to provide the DC voltage to charge the battery. Such
simple designs are often found in cheap car battery
Hysteresis chargers. The lead-acid cells used for cars and backup
The time constants and the phenomena mentioned power systems typically use constant voltage chargers.
above thus give rise to hysteresis in the battery. During In addition, lithium-ion cells often use constant voltage
charging the chemical reaction lags behind the systems, although these usually are more complex with
application of the charging voltage and similarly, when a added circuitry to protect both the batteries and the user
load is applied to the battery to discharge it, there is a safety.
delay before the full current can be delivered through Constant Current Constant current chargers vary the
the load. As with magnetic hysteresis, energy is lost voltage they apply to the battery to maintain a constant
during the charge discharge cycle due to the chemical current flow, switching off when the voltage reaches the
hysteresis effect. level of a full charge. This design is usually used for
The diagram below shows the hysteresis effect in a nickel-cadmium and nickel-metal hydride cells or
Lithium battery. batteries.
Allowing short settling or rest periods during the charge Taper Current This is charging from a crude unregulated
discharge processes to accommodate the chemical constant voltage source. It is not a controlled charge as
reaction times will tend to reduce but not eliminate the in V Taper above. The current diminishes as the cell
voltage difference due to hysteresis. voltage (back emf) builds up. There is a serious danger
of damaging the cells through overcharging. To avoid
The true battery voltage at any state of charge (SOC) this the charging rate and duration should be limited.
when the battery is in its "at rest" or quiescent condition Suitable for SLA batteries only.
will be somewhere between the charge and discharge
183
Pulsed charge Pulsed chargers feed the charge current applications the charger is designed to switch to trickle
to the battery in pulses. The charging rate (based on the charging when the battery is fully charged.
average current) can be precisely controlled by varying
Float charge. The battery and the load are permanently
the width of the pulses, typically about one second. During
connected in parallel across the DC charging source and
the charging process, short rest periods of 20 to 30
held at a constant voltage below the battery's upper
milliseconds, between pulses allow the chemical actions
voltage limit. Used for emergency power back up
in the battery to stabilise by equalising the reaction
systems. Mainly used with lead acid batteries.
throughout the bulk of the electrode before
recommencing the charge. This enables the chemical Random charging All of the above applications involve
reaction to keep pace with the rate of inputting the controlled charge of the battery, however there are many
electrical energy. It is also claimed that this method can applications where the energy to charge the battery is
reduce unwanted chemical reactions at the electrode only available, or is delivered, in some random,
surface such as gas formation, crystal growth and uncontrolled way. This applies to automotive applications
passivation. (See also Pulsed Charger below). If where the energy depends on the engine speed which
required, it is also possible to sample the open circuit is continuously changing. The problem is more acute in
voltage of the battery during the rest period. EV and HEV applications which use regenerative braking
since this generates large power spikes during braking
The optimum current profile depends on the cell
which the battery must absorb. More benign applications
chemistry and construction.
are in solar panel installations which can only be charged
Burp charging also called Reflex or Negative Pulse when the sun is shining. These all require special
Charging Used in conjunction with pulse charging, it techniques to limit the charging current or voltage to
applies a very short discharge pulse, typically 2 to 3 times levels which the battery can tolerate.
the charging current for 5 milliseconds, during the
Charging Rates
charging rest period to depolarise the cell. These pulses
dislodge any gas bubbles which have built up on the Batteries can be charged at different rates depending
electrodes during fast charging, speeding up the on the requirement. Typical rates are shown below:
stabilisation process and hence the overall charging Slow Charge = Overnight or 14-16 hours charging at 0.1C
process. The release and diffusion of the gas bubbles is rate
known as "burping". Controversial claims have been
made for the improvements in both the charge rate and Quick Charge = 3 to 6 Hours charging at 0.3C rate
the battery lifetime as well as for the removal of dendrites Fast Charge = Less than 1 hour charging at 1.0C rate
made possible by this technique. The least that can be
said is that "it does not damage the battery". Slow charging
IUI Charging This is a recently developed charging profile Slow charging can be carried out in relatively simple
chargers and should not result in the battery overheating.
DRAFT
used for fast charging standard flooded lead acid
batteries from particular manufacturers. It is not suitable When charging is complete batteries should be removed
for all lead acid batteries. Initially the battery is charged from the charger.
at a constant (I) rate until the cell voltage reaches a Nicads are generally the most robust type with respect
present value - normally a voltage near to that at which to overcharging and can be left on trickle charge for very
gassing occurs. This first part of the charging cycle is long periods since their recombination process tends to
known as the bulk charge phase. When the present keep the voltage down to a safe level. The constant
voltage has been reached, the charger switches into the recombination keeps internal cell pressure high, so the
constant voltage (U) phase and the current drawn by the seals gradually leak. It also keeps the cell temperature
battery will gradually drop until it reaches another present above ambient, and higher temperatures shorten life.
level. This second part of the cycle completes the normal So life is still better if you take it off the charger.
charging of the battery at a slowly diminishing rate. Finally
the charger switches again into the constant current Lead acid batteries are slightly less robust but can
mode (I) and the voltage continues to rise up to a new tolerate a short duration trickle charge. Flooded batteries
higher preset limit when the charger is switched off. This tend to use up their water, and SLAs tend to die early
last phase is used to equalise the charge on the individual from grid corrosion. Lead-acids should either be left
cells in the battery to maximise battery life. See Cell sitting, or float-charged (held at a constant voltage well
Balancing. below the gassing point).
Trickle charge Trickle charging is designed to NiMH cells on the other hand will be damaged by
compensate for the self discharge of the battery. prolonged trickle charge.
Continuous charge. Long term constant current charging Lithium ion cells however cannot tolerate overcharging
for standby use. The charge rate varies according to the or overvoltage and the charge should be terminated
frequency of discharge. Not suitable for some battery immediately when the upper voltage limit is reached.
chem istries, e.g. NiMH and Lithium, which are
susceptible to damage from overcharging. In some Fast / Quick Charging
184
As the charging rate increases, so do the dangers of Fast charging and quick charging require more complex
overcharging or overheating the battery. Preventing the chargers. Since these chargers must be designed for
battery from overheating and terminating the charge specific cell chemistries, it is not normally possible to
when the battery reaches full charge become much more charge one cell type in a charger that was designed for
critical. Each cell chemistry has its own characteristic another cell chemistry and damage is likely to occur.
charging curve and battery chargers must be designed Universal chargers, able to charge all cell types, must
to detect the end of charge conditions for the specific have sensing devices to identify the cell type and apply
chem istry involved. In addition, some form of the appropriate charging profile.
Temperature Cut Off (TCO) or Thermal Fuse must be
incorporated to prevent the battery from overheating
during the charging process.
DRAFT
185
IT & ITES Trade Theory for Exercise 2.9.213
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
Te s t B u c k & B o o s t c o n v e r t e r
Objective:
• to test Buck and Boost converter.
DRAFT
= ton/T, wherein ton is a time interval when the switch
The voltage value produced by the converter is controlled
on. Figure 2.b. shows a buck-boost converter equivalent
by the pulse width produced by the PWM (Pulse Width
circuit for CCM when the switch is on and the diode is
Modulation) generator. The pulse width produced by the
off, and when the switch is off and the diode is on.
PWM generator is controlled by a microcontroller. The
Microcontroller is programmed to control the pulse width During time interval 0 < t ?? DT, the switch turns on and
and frequency produced. According to stated above, here the diode turns off, as indicated in Figure 2.b. The diode
we have created a circuit architecture as well as a voltage is –(Vi+Vo) and this keeps the diode off. The
controller scheme for buck-boost converters which may inductor voltage is Vi and adds the linear increase on
produce a constant voltage output, which is not affected the inductor current with a steepness of Vi/L. During the
by sunlight intensity. DT < t ?? T time interval, the switch off and the diode on,
as shown in Figure 2.c. The inductor voltage is -Vo and
The controller scheme used is the PID (proportional
causes the inductor current to decrease linearly with a
Integral Derivative). The converter circuit is connected
steepness of -Vo/L. The switch voltage is Vi + Vo. When
to the arduino microcontroller, and simulated in proteus.
t = T, the switch turns on, and a new cycle begins.
Pulse Width Modulation (PWM)
PWM buck-boost converter and it’s ideal equivalent
Pulse width modulation is a method used to adjust the circuit for CCM mode. (a) Buck-boost converter circuit.
width of a signal. This signal width is represented as a (b) Equivalent circuit during on switch and off diode. (c)
pulse width for one period of time. Commonly, a PWM Equivalent circuit during off switch and on diode.
signal has an equal basic amplitude and frequency, but
with a varying pulse width. With the PWM technique,
several on and off pulses will be formed. The percentage
of on pulses are represented in duty cycles. A duty cycle
has a range of 0 to 100%. From the calculation of duty
186
The value of minimum power desired is 50 W. The initial
voltage that enters is assumed as 25 V. Hence, the output
current is 50 W / 25 V = 2 A. The input voltage is
regulated, becoming 12 V. With the decrease in voltage,
the current increases to 5 A. With this, the power is
12 5 = 60 W. For accuracy in calculation,
the current value set is into 3 A.
Hence,
Methodology
The designing of the buck-boost converter is done with
first determining the types of component, component’s
value, as well as aligning the component’s values with
the ones available on market. Then, a programming is
done on the Arduino microcontroller by referring to a
previously made flowchart. This virtual circuit is then
assembled on Proteus 8.4, and simulated by inserting
DRAFT
the completed program.
Calculation of Components
Before component-calculating, the desired parameters
are set, which are:
187
Design of PWM MOSFET driver:
The PWM driver acts as a switching pengatur of a
MOSFET. Without the PWM driver, a MOSFET may not
be able to change from the on to off state, or the opposite.
This will cause a circuit failure.
DRAFT
188
IT & ITES Trade Theory for Exercise 2.9.214
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
DRAFT
directionality. reduction dependent on the path length through the
These effects are summarized in the figure below. atmosphere. When the sun is overhead, the absorption
due to these atmospheric elements causes a relatively
uniform reduction across the visible spectrum, so the
incident light appears white. However, for longer path
lengths, higher energy (lower wavelength) light is more
effectively absorbed and scattered. Hence in the morning
and evening the sun appears much redder and has a
lower intensity than in the middle of the day.
189
Show Blackbody Show AM0 Show AM1.5
DRAFT
Show Visible Wavelengths Show Notes
A comparison of solar radiation outside the Earth's
atmosphere with the amount of solar radiation reaching
the Earth itself. The human eye has evolved to the point
where sensitivity is greatest at the most intense
wavelengths 2.
The standard spectra given above and described in more
detail in the appendices give a typical spectra for a
sunlight. Computers models allow for more detailed
models of the solar spectra for a particular location and
time of day. The Simple Model of the Atmospheric
Radiative Transfer of Sunshine, or SMARTS,3 is used
to generate the standard solar spectra. The
solar spectrum calculator at PV lighthouse also gives the
solar spectrum as a function of location and time of the
day. It uses a slightly simpler algorithm from Bird4
Direct and Diffuse Radiation Due to Scattering of
Incident Light
Light is absorbed as it passes through the atmosphere
and at the same time it is subject to scattering. One of
the mechanisms for light scattering in the atmosphere is
known as Rayleigh scattering which is caused by
molecules in the atmosphere. Rayleigh scattering is
190
particularly effective for short wavelength light (that is
blue light) since it has a ?-4 dependence. In addition to
Rayleigh scattering, aerosols and dust particles
contribute to the scattering of incident light known as
Mie scattering.
Scattered light is undirected, and so it appears to be
coming from any region of the sky. This light is called
"diffuse" light. Since diffuse light is primarily "blue" light,
the light that comes from regions of the sky other than
where the sun is, appears blue. In the absence of
scattering in the atmosphere, the sky would appear black,
and the sun would appear as a disk light source. On a
clear day, about 10% of the total incident solar radiation
is diffuse.
Effect of clouds and other local variations in the
atmosphere
Relative output current from a photovoltaic array on a
The final effect of the atmosphere on incident solar sunny and a cloudy winter's day in Melbourne with an
radiation is due to local variations in the atmosphere. array tilt angle of 60° 5.
Depending on the type of cloud cover, the incident power
is severely reduced. An example of heavy cloud cover is
shown below.
DRAFT
191
IT & ITES Trade Theory for Exercise 2.9.215
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
Explore and test running different applications i.e. LEDs, Dusk to Dawn sensing
Objective:
• to explore and test running different application like LEDs, Duck to Dawn sensing.
DRAFT
Gear wise you'll need solar panels, batteries, a charge can be damaged.
controller, and cable to hook it all up with. For years I Take what's left in your "possibly good" pile and charge
have been a big fan of using 12-14ga outdoor lighting them on a slow charger. Small batteries in the 20Ah size
cable like what's used in Malibu light setups. The stuff or less should be charged at around 2Ah. All the small
has a heavy sun resistant insulation and will last for years car battery chargers I have seen have a setting that is
outdoors. comparable to this. Any higher and you risk cooking the
What to expect from one of these systems? battery. If you have any 6v batteries you'll need a 6v
capable charger.
A fairly reliable solar lighting system that can illuminate
part of your yard without reliance on the commercial Charge a used battery on slow charge over night. Take it
power grid. off the charger and let it sit for about an hour to stabilize.
Measure the voltage, write it on the battery with a
What limitations will a solar powered lighting system permanent marker and let the battery sit disconnected
have? over night and re-measure it's voltage the following day.
To put it simply, no sun = no power. Without getting into If it's dropped under 12v it's bad and has an internal short
an oversized panel and battery setup, you just have to of some kind. If it's voltage is above 12v chances are it's
accept that on cloudy days your system may not run as usable. On 6v batteries the test is the same but pass on
many hours as expected. In this instruct able we're all any that drop below 6v after sitting for a day. There are
about keeping it simple enough so it works reliably on actual battery capacity testers for this purpose but we're
sunny days. keeping it cheap and simple here.
The battery is your "gas tank". It stores the power you How much battery capacity do you need?
have generated during the day. For a simple dusk till Take the number of lights running, add their wattage,
dawn setup (on at night, off during the day), 10Ah per multiply by the number of hours they will be on, finally
10w of LED lighting is right at the minimum. If you can divide by 12 which is our system voltage. this will give us
afford a little more battery capacity then go for it! Is 10w the amount of amps we will draw for one day of operation.
192
There's always that one battery question everybody panels have the longest lifespan. It's not uncommon for
getting into solar always asks... Can I use a car battery? one to last 20+ years as long as it's not physically abused.
Yes you can but car batteries have some shortcomings.
Unframed panels need to be framed to protect them and
They are intended for a quick massive draw from the
give you a way to mount them. Epoxy faced panels work
starter motor and then immediately recharged. They don't
well for a few years but the epoxy sealant will slowly
work well for long discharge applications. Car and truck
begin to darken over time and diminish the panels output.
batteries are also what is referred to as a wet cell battery.
Eventually the epoxy gets so dark, the panel is useless.
They are filled with liquid acid so must remain upright at
Flexible panels are convenient for portable installations
all times and emit fumes when charged. SLA's are much
but have short lifespans due to the flexing of electrical
better suited for enclosed electronics boxes and indoor
contacts and the epoxy sealer they use to keep the whole
applications.
assembly flexible. Glass faced aluminium framed silicon
is the way to go.
Solar panels come in many different output variations.
In order to keep it simple, stay with panels that have an
open circuit voltage in the 17-20v range. These would
be considered 12v system panels and will match up nicely
with the ultra cheap regulators we'll be talking about later.
Can you use panels with higher voltages? Yes but it will
require a more expensive MPPT regulator.
Can you use panels with lower open circuit voltages?
Not without some electronics ingenuity that is simply not
worth the effort. The exception is if you have multiples of
the same panel and you connect them in series to raise
their operating voltage. There's an additional electrical
spec to worry about but we'll come back to that.
Solar panels come in all shapes, sizes, ratings, and Figuring out how much solar panel capacity you need
prices. You can spend a bunch of money but don't need isn't hard but you do need to know some data about how
to if you're an educated shopper. We're keeping it thrifty much of an electrical load you're going to run and how
remember? good the sunlight is in your area. Solar panels are typically
rated in watts. This number is derived by multiplying the
Amorphous Vs Silicon
panel's operating voltage times it's current. This info is
Amorphous solar panels (pic 1) are what's usually found found on the label on the backside of the panel.
in little solar powered yard lights and trinkets. The panels
DRAFT
This instruct able is intended to help folks set up a cheap
have a brownish look. This is a low cost technology that
lighting solution while keeping things simple. So far we've
is the most inefficient (requires more panel to produce
been sticking with 12v 10w LED bulbs as a load. This
the same power when compared to silicon) and has a
gives us an easy number to work with and those bulbs
shorter lifespan. There are some discount tool vendors
are cheap and easy to find online.
that sell solar kits made up from amorphous panels. They
do have one benefit which is they perform better in Calculating the long way...
"shaded" applications, cloudy days for example. Pass
On a dusk till dawn system we're looking for a operating
on these unless you got them for free or darn near free.
time of about 10-12hrs every day for most places. This
The one benefit doesn't outweigh all the negatives.
means our solar panels have to produce enough
Silicon panels (pic 2) have a blue look to them and that's electricity to run the lights overnight and overcome any
what you want. Silicon solar cells can be made from mono losses from charging. No system is 100% efficient.
or poly crystals. This results in a dark blue even color or
1 10w bulb running for 12hrs = 120w of power
a blue color that seems to be made up of slivers. Either
consumption every night.
one is fine for our needs. There is a difference in mono
Vs poly crystal panels but for our purposes either one is 2 10w bulbs running for 12hrs = 240w of power
fine. Mono crystal panels tend to produce more power consumption every night
per square inch but it's a minimal difference on the scale
So, if we want to run (2) 10w LED floodlights for 12hrs
that we're working at.
every night we need to produce 240w of power from our
So we're looking for silicon cell panels, what else do you system. This number is in a perfect world though. No
need to physically look for? battery charging system is 100% efficient. Add to this
you may have a cloudy day or a bird that decided to
Solar panels can be framed or unframed. They can be
camp out on your panels. A good rule of thumb in sunny
rigid or flexible. they can have a glass face or an epoxy
places is to consider that your system 80% efficient in a
sealed face. Aluminium framed, glass faced silicon
perfect world.
193
So our math tells us we need 240w of power for (2) 10w Next to the solar panels themselves, the next biggest
LED lights. Our system is 80% efficient at best so we price drop in solar has been the cost of regulators. The
need to come up with 300w per day to keep the battery regulator or charge controller is what takes the power
charged enough to run our lights that evening. This is coming from the panel and keeps it within a safe range
cutting it close though. One day of lousy weather and to charge your battery with. Some charge controllers can
you have taken a big hit on how much power you put into also provide you with a low voltage disconnect (LVD)
your battery for the day. I prefer to have a bigger safety and the ability to automatically turn the lights on at dusk
blanket and at least double the number of what I need to and back off at dawn.
produce. So for (2) 10w LED lights running 12hrs I'd like
to have 480w minimum of daily production. This looks
like a big number but it really isn't as you will see.
Anywhere you go in the world, you can look up what an
area's average solar insolation number is. This is the
number of hours of good strong sunlight an area
averages. Where I'm at, that magic number is 7.5. So
knowing that number I can easily calculate what my
panels will produce on a daily basis in clear weather.
30w panel multiplied by 7.5 = 225w of production from
good strong sunlight. This is close enough to my target
of 240w (120w x 2 safety margin) for a single 10w LED
lamp to run 12hrs a day reliably.
Why am I calculating solely on the solar isolation
number? This leaves me a little safety margin at the start
and the end of the day where the solar panel is still
producing something but it's not at peak output.
Solar capacity needed for dusk till dawn system = wattage
of lamps multiplied times hours of operation and then
doubled.
To calculate what a panel produces for the day find out
solar insolation number and multiply that by panel's rated
wattage.
There's lot's of variables here. Do your panels really
DRAFT
produce what they claim? If your system more inefficient
than typical? etc. This will get you in the ballpark.
Now the easy way based on my experiences in sunny
South Florida...
30w of panel and 10Ah battery will run a 10w LED
floodlight all night but you have no safety margin.
20w of panel and a 10Ah battery will run a 9w LED lamp
all night but you have no safety margin.
A word about system reliability...
In order to keep costs and size down I've kept things to
a scale that will be very reliable on sunny days and
somewhat tolerant of a partially cloudy day. As I said
before,
no sun = no power.
If you are absolutely in need of a setup that can handle a
completely overcast day without leaving you in the dark,
I suggest you multiply your battery and solar capacity by
the number of cloudy days you expect to get through
before the system has a chance to recharge.
Don't forget to upgrade your regulator as well. A 10A
charge controller (regulator) can only handle 120w of
panel in a 12v system.
194
switch. The dusk till dawn feature can be bypassed via
button programming on every single charge controller I
have seen that has an LCD display of some sort. Some
very basic charge controllers retain the LVD but do away
with the dusk till dawn feature.
Resist the urge to bypass the LVD by connecting your
lights straight to the battery. If your battery is run flat, it
will ruin it.
My experience with the recent crop of Chinese charge
controllers (regulators) is you connect the battery FIRST,
then the panels, then the load. Some of these controllers
can operate on 24v systems and connecting the battery
first is what tells it that you are using a 12v or 24v system.
Charge controllers are rated in amps (pic 2) they can
handle. A little overkill is not a big deal but for a basic
light setup like we are building here, a 10A unit is plenty.
A 20A unit is more than you'll need for a basic system
like we're discussing here.
USB charging - added bonus!
Seems the latest trend in Chinese charge controllers is
to provide you with a USB charge port for phones and
such. For folks building a setup for use in a cabin or
workshop this charge port can be a welcome addition.
DRAFT
There's one more charge controller tech called MPPT
which is the most efficient and has some benefits over
the PWM type but they do cost more money, hence out
of the scope of this instruct able.
In pics 1, & 3-5) you see a few different options from
China. These range from 10a to 20a. They all have LVD
and dusk till dawn light control ability.
What is the LVD?
The Low Voltage Disconnect is a circuit within the charge
controller that detects when your batteries have run very
low and disconnects the load (whatever is being
powered) from the battery. This is important because
running a lead acid battery dead will drastically shorten
it's life. This is a failsafe to prevent battery damage. Once When it comes to solar lighting projects, there's one way
the battery is charged back up the LVD resets and to go and that's LED!
everything works again.
LED tech has really been one of the best things to happen
What is the dusk till dawn feature? to off grid power. It's efficient, rugged, cheap, and there's
a ton of options ranging from sterile bright white to bulbs
This feature uses the solar panels as light sensors. If
that can change colour via remote control. If it wasn't for
the panels aren't seeing light, they aren't producing
LED bulbs, none of my setups would be worth doing.
power. If no power is being produced, this means it's
dark and we should turn on the lights. That's how it works. In pic 1 you see my latest floodlight setup for the
In the case of a lighting system being used inside a cabin backyard. Those two lights are enough to illuminate a
or shed for example, you'll want control of the light via a sizable portion of the yard yet only consume 20w of
195
power. In pics 2 and 3 you can see what the fixtures look My preference for white light is warm white (aprox 3000k
like when they aren't powered up. on the color temp scale) which closely matches the light
from a conventional incandescent. The comforting warm
In pic 4 you see another wonderful option for retrofitting
white color comes at the expense of slightly reduced
conventional 110v fixtures. These are 12v LED Edison
light output. Cold white bulbs (6000-7000k) produce a
based bulbs. They screw into a regular fixture so you
sterile bright white light and can achieve more lumens
can re-purpose nice looking yard fixtures intended for
(light output) per watt but some folks find it annoying for
110v bulbs.
anything other than task lighting.
In pics 3-5 you see the e27 base bulb inside a regular
Remember LED bulbs are much more efficient at
fixture and a couple of shots of the fixture. Since they
producing light than their old incandescent predecessors.
can fit any standard fixture, you can do like I did and
A 10w LED floodlight can easily light up a 2 car driveway.
grab some nice fixtures off the clearance table at the
The 9w bulbs I used in the outdoor fixtures do a great
local home improvement store and use them with your
job of lighting the yard without being obnoxiously bright.
solar setup without any mods. The same wiring that works
for 110v can be used for 12v since the current draw is so LED's are polarity sensitive. If your light doesn't work,
minimal in our application. flip around the wires to the lamp. I haven't seen any that
get damaged by being connected backwards but most
One thing to consider with these bargain bulbs though is
DC LED bulbs won't turn on if the polarity is incorrect.
they are typically not weather proof. Whatever you put
The rare exception is some 12V ac/dc bulbs that don't
them in must shield the bulb from the environment. The
care about polarity.
exception is outdoor rated floodlights you see in pics 2-
3.
DRAFT
196
IT & ITES Trade Theory for Exercise 2.9.216
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
DRAFT
Input VoItage (recommended) 7-12V
humidity, temperature, voItage, and current parameters,
• Input voItage (limits) 6-20V
in renewable energy applications is also available. A
hardware system is developed to plot the V-I • Digital output Pins 14 (of which 6 provide PWM output)
characteristics of PV system in real time in. A system is
• Analog input pins 6
designed to monitor the PV array characteristics and
solar irradiance and temperature in. With the motivation • DC current per output pin 40 mA
of above literature review, the research noveIty of this
• DC current for 3.3V pin 50 mA
paper is that a low cost PV analyzer is designed to
monitor the PV module performance. • Flash memory- 32 KB (Atmega 328) of which 0.5 KB
used by boot loader
LAYOUT OF PV ANAL YZER
• SRAM- 2 KB (Atmega 328)
Apparatus Description In this designed low cost PV
analyzer system, various components are used such as, • EEPROM- 1 KB (Atmega 328)
Two Arduino (ATmega328P, ATmega16U2), Photo • Clock speed- 16 MHz
resistor Light sensor (VEE00067), Temperature and
Humidity Sensor Module (DHT11), Current sensor (5A 2) Photoresistor Light Sensor
range ACS712), and VoItage sensor module (KG045). A • Photoresistor sense intensity of light
monocrystalline PV module, which comprises 4x4 cell
in series-parallel connection for the system investigation. • Input voItage-3.3V to 6V in DC
The layout of designed system is shown in Fig. 1 as, • Supply current-O.5-3mA
Specifications of System Components and Cost Analysis • Sense irradiation range 0-1023W/m2
In this designed "Low cost PV analyzer using Arduino
UNO" system, various components are used to • Peak wavelength-540nm
investigate the PV performance in terms of 1-V and P-V 3) Temperature and Humidity Sensor
197
• Power supply- 3-5.5V DC Output signal- digital • Modules can be measured plus (+) or minus (-) 5A,
signal via single- bus sensing element corresponding to the analog output 185mV/A. 5)
Voltage sensor
• Polymer resistor measuring range- humidity
• Input DC voItage range- 0-25V
• 20-90% RH
• DC voItage detection range- 0.02445V-25V
• Temperature 0-50°C humidity hysteresis
• VoItage analog resolution- 0.00489V
• +-l%RH
• DC Input: positive terminal connected to VCC, GND
• Long-term sstability- +-0.5% RH/year
negative pole
• Sensing period average: 2s
Output interface: "+" then 5/3.3V, "-" then GND, "s" then
4) Current sensor the AO pin
• Current sensor chip: ACS712ELC-05B • 5V maximum voItage on the ADC side of the module
• Pin 5V power supply, on board indicator • 25V maximum voItage on the input side
DRAFT
198
IT & ITES Trade Theory for Exercise 2.9.217
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
DRAFT
making the electricity usage visible to their consumers
199
IT & ITES Trade Theory for Exercise 2.10.218
Smart City - Demonstarte and deploy responsive Web Application using APIs
and generate reports using templates
Requirement: redistribute the software in any way you see fit (so long
as you retain attribution to the original creator). In the
• System
modern vernacular, open source applies to much more
• Linux than software. Nearly anything can be "open sourced"
these days. The important factor in this is that the original
PROCEDURE:
designs, plans, schematics, etc. must be made available
Linux. What is it? At one point in time it was a niche for the public to use.
operating system run by those who wanted to show off
I can already hear your next question: But if anyone can
their PC prowess and feel more alternative and l33t than
view the source code, how do companies sell their
the rest. But something happened on the way to the
software? You'll be surprised to hear that most open
convention -- Linux became accepted. Not only did this
source software is given away for free. That's right,
platform become accepted, it was adopted as a must-
adopting open source software can mean you're entire
have technology by enterprise-level businesses, where
software library can be had free of charge. And most of
reliability, flexibility, and security are key.
the open source software you can find is very high quality.
But for the masses, those that have really only ever Outside of the operating system, you'll find free software
known either Windows or Mac, the question still remains. such as:
What is Linux?
• LibreOffice - a full-blown office suite
I want to answer that question for you. The answer will
• The GIMP - an image editing tool similar to Photoshop
not be exhaustive (for that you'll need a book) and will
target those that have had zero exposure to the operating • Evolution - a groupware tool similar to Microsoft
system. I'm not going to pull it back so far as to answer Outlook
the question, "What is an operating system?" I'm fairly
• Audacity - a powerful audio recording software
confident the masses have that one down; so we'll focus
DRAFT
on only this one particular operating system. • Open Shot - a user-friendly video editing tool
Linux • Firefox - a widely-used web browser
And with that said, let me dive into the answer. That list goes on and on. Couple that with plenty of music
and video players, even more browsers and email clients,
It's really a kernel
just about every productivity tool you can think of, and
If you ask the question, "What is Linux?" to a purist, they'll you have the making for a computing platform that does
tell answer, "It's a modular kernel, created by Linus everything your current operating system will do.
Torvalds." That's not an answer that helps us much, as
But why bother? If it will only do what my current operating
the average user would then need to understand what a
system will do, what would make me want to use Linux?
kernel is and why it's relevant to the issue at hand.
Therein lies the crux of the issue. There are three ideals
Instead, I want to go by the broader definition of Linux,
that Linux offers that are unmatched by any other
and say it's an operating system powered by the Linux
platform:
kernel.
• Reliability
But what makes it so special?
• Flexibility
To understand why Linux is so special, you have to first
understand what open source is. Open source is software • Security
for which the original source code is made freely available
to the public. With this source code you can modify and
200
IT & ITES Trade Theory for Exercise 2.10.219
Smart City - Demonstarte and deploy responsive Web Application using APIs
and generate reports using templates
DRAFT
boot process and is very flexible, allowing you to with modern hardware.
accomplish whatever you can script.
With these things in mind, our setup should do everything
The most common type of script to pass in is called possible to avoid committing passwords, in any form,
a cloud-config script. This is a YAML formatted file that within the cloud-config file. We can adjust our goals to
provides simple, readable methods of setting up common accommodate the specific needs of our deployment
configuration items by declaration. It also has the ability environment.
to run arbitrary commands for other tasks.
Our adjusted strategy will look something like this:
In this guide, we will get familiar with the DigitalOcean
• Set no password and provide no SSH keys for the
metadata service and cloud-config files by trying out a
root account through cloud-config (any SSH keys
simple example. We will be recreating some of the steps
added though the DigitalOcean interface will still be
outlined in the initial server setup for Ubuntu 14.04 guide
added as usual)
in order to demonstrate.
• Create a new user
Goals
• Set no password for the new user account
In order to successfully replicate the steps in the Ubuntu
14.04 initial server setup guide, our script would have to • Set up SSH access for the new user account
do a number of tasks. • Give the new user password-less sudo privileges to
These are the basic tasks that the above guide make administrative changes.
accomplishes: • (Optional) Change the port the SSH daemon listens
• Change the root user’s password on
• Create a new user • (Optional) Restrict root SSH login (especially if you
do not include SSH keys through the DigitalOcean
• Create the new user’s password
interface)
201
• (Optional) Explicitly permit our new user • Indentation with whitespace indicates the structure
and relationship of the items to one another. Items
Besides removing the passwords for both accounts, the
that are more indented are sub-items of the first item
most drastic change here is that the new account will be
with a lower level of indentation above them.
allowed to use sudo without entering an account
password. This is necessary since we are not allowing • List members can be identified by a leading dash.
root logins and we are not setting an account password
• Associative array entries are created by using a colon
for our new user.
(:) followed by a space and the value.
After the new user logs in, they will have freedom to set
• Blocks of text are indented. To indicate that the block
a password for themselves securely and modify the sudo
should be read as-is, with the formatting maintained,
privileges to require a password, if desired.
use the pipe character (|) before the block.
With these adjusted goals in mind, let’s get started.
The first line of a cloud-config file must contain a special
Using Cloud-Config Files identifier so that the cloud-init program knows that the
file is a cloud-config file. This looks like this:
A cloud-config file is basically a YAML file that
understands certain directives. YAML is a data #cloud-config
serialization format that is meant to be very human
This must be placed alone on the very first line.
readable, making it simple to understand and edit.
The cloud-config file must be provided when the server
YAML files rely on a few rules for formatting: is created. This can be accomplished in a two different
ways.
DRAFT
202
IT & ITES Trade Theory for Exercise 2.10.220
Smart City - Demonstarte and deploy responsive Web Application using APIs
and generate reports using templates
Requirement: code files (for example, c, cpp), links them together into
an executable file (for example, exe, elf), and then the
• Sensor
executable is converted into a portable binary file format
• Micro-controller (for example, bin, hex). At a high level, these file formats
• System contain a sequence of bytes that belong at a specific
address of memory in the microcontroller.
PROCEDURE:
Typically, we conceptualize the information being sent
Introduction: over a wireless link as data, such as a command to
An OTA update replaces the current software on a device change the system’s state or sensor data collected by
with new software, with the new software being the system. In the case of the OTA update, the data is
downloaded wirelessly. In an embedded system, the the new software in binary format. In many cases, the
device that runs this software is typically a microcontroller. binary file will be too large to send in a single transfer
A microcontroller is a small computing device with limited from the server to the client, meaning that the binary file
mem ory, speed, and power consumption. A will need to be placed into separate packets, in a process
microcontroller typically contains a microprocessor (core) called packetizing. To visualize this process better, Figure
as well as digital hardware blocks for specific operations 2 demonstrates how different versions of the software
(peripherals). Ultra low power microcontrollers that will produce different binary files, and thus different
typically consume 30 ?A/MHz to 40 ?A/MHz in active packets to be sent during the OTA update. In this simple
mode are ideal for this type of application. Using specific example, each packet contains 8 bytes of data, with the
hardware peripherals on these microcontrollers and first 4 bytes representing the address in the client’s
placing them into low power modes is an important part memory to store the next 4 bytes.
of the OTA update software design. Figure 2. Binary conversion and packetization process
An example of an embedded system that might require of a software application.
DRAFT
OTA updates is shown in Figure 1. Here we see a
microcontroller connected with a radio and sensor, which
may be used in an IoT application that gathers data about
the environment using the sensor and reports it Major Challenges
periodically using the radio. This portion of the system is
Based on this high level description of the OTA update
referred to as the edge node or client and is the target
process, three major challenges arise that the OTA
of the OTA update. The other portion of the system is
update solution must address. The first challenge relates
referred to as the cloud or server and is the provider of
to memory. The software solution must organize the new
the new software. The server and client communicate
software application into volatile or nonvolatile memory
over a wireless connection using transceivers (radios).
of the client device so that it can be executed when the
Figure 1. Server/client architecture in an example update process completes. The solution must ensure
embedded system. that a previous version of the software is kept as a
fallback application in case the new software has
problems. Also, we must retain the state of the client
device between resets and power cycles, such as the
version of the software we are currently running, and
where it is in memory. The second major challenge
is communication.
What Makes a Software Application? The new software must be sent from the server to the
client in discrete packets, each targeting a specific
Much of the OTA update process is the act of transferring
address in the client’s memory. The scheme for
the new software from the server to the client. The
packetizing, the packet structure, and the protocol used
software is transferred as a sequence of bytes, after it
to transfer the data must all be accounted for in the
has been converted into a binary format from the source
software design. The final major challenge is security.
format. The conversion process compiles the source
With the new software being sent wirelessly from the
203
server to the client, we must ensure that the server is a contains the OTA update-related software, which is
trusted party. This security challenge is known as leveraged to download Application B when requested by
authentication. We also must ensure that the new the server. After this download is complete and
software is obfuscated to any observers, since it may
contain sensitive information. This security challenge is
known as confidentiality. The final element of security is
integrity, ensuring that the new software is not corrupted
when it is sent over the air. The Second-Stage Boot
Loader (SSBL)
Understanding the Boot Sequence
The primary boot loader is a software application that
permanently resides on the microcontroller in read-only
memory. The region of memory the primary boot loader
resides in is known as info space and is sometimes not
accessible to users. This application executes every time
a reset occurs, generally performing some essential
hardware initializations, and may load user software into
memory. However, if the microcontroller contains on-chip
nonvolatile memory, like flash memory, the boot loader Application B has been verified, Application A will transfer
does not need to do any loading and simply transfers control to Application B by performing a branch instruction
control to the program in flash memory. If the primary to the reset handler of Application B. The reset handler
boot loader does not have any support for OTA updates, is a small piece of code that is the entry point of the
it is necessary to have a second-stage boot loader. Like software application and runs on reset. In this case, the
the primary boot loader, the SSBL will run every time a reset is mimicked by performing a branch, which is
reset occurs, but will implement a portion of the OTA equivalent to a function call. There are two major issues
update process. This boot sequence is illustrated in with this approach:
Figure 3. In this section, we will describe why a second-
• Many embedded software applications employ a real-
stage boot loader is necessary and describe how
time operating system (RTOS), which allows the
specifying the role of this application is a key design trade-
software to be split into concurrent tasks, each with
off.
different responsibilities in the system. For instance,
Figure 3. An example of a memory map and boot flow the application presented in Figure 1 may have RTOS
with SSBL. tasks for reading the sensor, running an algorithm on
the sensor data, and interfacing with the radio. The
DRAFT
RTOS itself is always active and is responsible for
switching between these tasks based on
asynchronous events or specific time-based delays.
As a result, it is not safe to branch to a new program
from an RTOS task, since other tasks will remain
running in the background. The only safe way to
terminate a program with a real-time operating system
is through a reset.
• Based on Figure 4, a solution to the previous issue
would be to have the primary boot loader branch to
Application B instead of Application A. However, on
some microcontrollers, the primary boot loader always
runs the program that has its interrupt vector table
Lesson Learned: Always Have an SSBL
(IVT), a key portion of the application that describes
Conceptually, it may seem simpler to omit the SSBL and interrupt handling functions, located at address 0. This
place all the OTA update functionality into the user means that some form of IVT relocation is necessary
application, as it would allow an existing software to have a reset map to Application B. If a power cycle
framework, operating system, and device drivers to be occurs during this IVT relocation, it could leave the
seamlessly leveraged for the OTA process. system in a permanently broken state.
The memory map and boot sequence of a system that These issues are mitigated by having an SSBL fixed at
chose this approach is illustrated in Figure 4. address 0, as illustrated in Figure 3. Since the SSBL is a
non-RTOS program, it can safely branch to a new
Figure 4. Example memory map and boot flow without
application. There is no concern of a power cycle placing
SSBL
the system in a catastrophic state since the IVT of the
Application A is the original application that is deployed SSBL at address 0 is never relocated.
on the microcontroller in the field. This application
204
IT & ITES Trade Theory for Exercise 2.10.221
Smart City - Demonstarte and deploy responsive Web Application using APIs
and generate reports using templates
DRAFT
a Graphical User Interface (GUI), which allows Assembly Line An assembly line is a production system
programmers to deploy and configure an IoT system where different tasks of the production process are
quickly. This way, users do not need to deal with domain- concentrated at different workstations. It consists of
specific frameworks or to begin a project from scratch. various workstations where production tasks are carried
The resulting system generated by AutoIot is a Flask [3] out and a transportation system that moves the
project (a python micro-framework). It can be executed workpieces between the workstations. During the
as it is or developers that need a more complex system production process, a workpiece passes through all the
can extend the generated code to fulfill their needs. The workstations in a given order until the final product comes
resulting system can connect to an MQTT Broker, store out at the last station. The workpieces can be moved
and query information in a database, present data to between the stations by various location systems like
users, and exchange data with another system. conveyor belts or automatic guided vehicles. To
Moreover, AutoIoT also provides a simulator that synchronize the workstations, the assembly line is
communicates with real devices. Therefore, users with organized with prescribed cycle time. The cycle time is
no access to real hardware can research on IoT. The the time a workpiece stays at one workstation. All the
present research work also describes how to create an tasks of the workstation have to be completed in the given
Assembly Line [4] server-side application using AutoIoT. cycle time and each workpiece moves to the next station
This application receives data from RFID readers and after the cycle time is over. The cycle time is the same
shows detailed information about the status of the for all workstations.
assembling process on a GUI.
Figure 2 illustrates an example of an assembly line with
The main contributions of this work are the following: three workstations located along a conveyor belt. The
workpieces are moved along the conveyor belt. They
• A working platform that quickly deploys server-side
pass through station 1, 2 and 3 in the given order. The
IoT applications.
time that they spend on one workstation is exactly the
• A demonstration of how to use AutoIoT in a real-world cycle time
scenario: an Assembly Line.
205
THE AUTOIOT PLATFORM
IoT platforms are the central component of an IoT
system. They provide a set of fundamental applications
that are the building blocks of more complex IoT
applications. AutoIoT is a platform that automatically
generates IoT server-side application through a visual
tool. The generated system can communicate with IoT
devices and third-party software, store information on a
database, and provide visualizations of data. In the
following, we detail four components of the AutoIoT
platform: Modules Manager, Communication Manager,
Database Manager, Builder. Due that the Simulator is
not used in this paper, it will be detailed only in future
works.
DRAFT
206
IT & ITES Trade Theory for Exercise 2.10.222
Smart City - Demonstarte and deploy responsive Web Application using APIs
and generate reports using templates
DRAFT
an IoT gateway. An IoT gateway aggregates sensor data,
translates between sensor protocols, processes sensor
data before sending it onward and more.
The importance of IoT gateways is understandable when
you consider the explosion in connected "things" that
has occurred over the past few years. With scores of
protocols, connectivity models and energy profiles and
the highly dispersed nature of IoT systems, gateways
are needed to manage and control these complex
environments.
Consider the use case of an IoT-connected office
building environment. Sensors are the IoT equivalent of
our five senses. But instead of five senses, there may
be hundreds or thousands of sensors with dozens of
different functions, measuring temperature, light, noise,
A gateway's position in the IoT ecosystem
position of people and equipment, particles in the air,
building systems operations, security systems, factory Traditional network gateways have mostly performed
machines and more. But IoT is not just about sensing; protocol translation and device management functions.
it's also about controlling systems. Turning on and off They were not intelligent, programmable devices that
lights, HVAC, networks and more can be done through could perform in-depth and complex processing on IoT
connected systems. data. Today's "smart" IoT gateways -- delivered by
companies such as Dell Technologies, Wind River/Intel,
Each of these IoT devices may use different protocols to
Nexcom and others -- are full-fledged computing
connect -- such as Wi-Fi; Bluetooth; serial ports (for
platforms running modern operating systems (for
example, RS-232); Ethernet; MQ Telemetry Transport,
example, Linux or W indows). These systems are
or MQTT; Zigbee; and others. And each of them may
207
sometimes also called intelligent gateways or edge critical to its clients, the ability to process the data locally
gateways, but the line is blurring and the nonintelligent and ensure that quality issues are responded to quickly
gateway market is likely to become largely irrelevant in is critical to Eigen's model.
coming years.
While these intelligent edge gateways are just rolling out
Next-generation IoT gateways open up huge to the market, the advantages of having a fully
opportunities to push processing closer to the edge, programmable and manageable platform closer to the
improving responsiveness and supporting new operating IoT devices they support is clear.
models. Consider the building systems use case above:
Bridging the operations/IT gap
A building management company may control millions
of square feet of office and industrial space from a remote According to Wind River's Dinyar Dastoor, vice president
location using a distributed IoT network of sensors and and general manager of operating system platforms and
controllers connected through the cloud. However, IoT, an IoT edge gateway also serves as an important
transmitting every routine packet of information bridge between operations and IT. On the operations side
generated by the sensors from dozens of facilities would -- factory, building management, etc. -- the focus is on
quickly overwhelm the headquarters systems of the delivering the business capability for which they are
management company. They care about serious issues, responsible, meaning getting the data from where it's
out-of-bounds environmental conditions and other factors created into systems that can act on it. IT, on the other
worthy of additional attention. hand, must be concerned with the security and integrity
of the networks, the supportability of the system and how
Adding new IoT edge gateways with full onboard
all of the pieces are managed.
processing would allow the gateways to filter out routine
information and pass through the alerts that are worthy "The huge problem is human beings. On the edge side
of attention. Going even further, these gateways can you have people connected to the device itself -- OT, or
perform their own analytics and operations on the data - operational technology," Dastoor said. "Trying to get
- such as determining that the temperature is too high in these devices securely connected to the world is where
part of the building -- and can then use that insight to the CIO comes in. Who is going to step into the others'
take independent action, such as turning on the air shoes?"
conditioning or opening vents. The IoT gateway's role in security, data, analytics
Recent product announcements from Wind River and and more
Dell show the direction the market is heading. Wind River To successfully bridge the gap between IT and OT, IoT
(an Intel Company) ships a gateway platform -- Wind gateways need to support the following functionality:
River Intelligent Device Platform XT -- as part of its Helix
portfolio of IoT systems. This platform allows OEMs to • Trusted connectivity and security -- ensuring the
build their own gateway devices that are customized for integrity of the network and system in both directions
DRAFT
their needs. • Protocol and data bridge -- being able to translate
The Dell Edge Gateway 5000 Series, announced and transfer data among and between systems
in October 2015, is a turnkey device targeting multiple operating with different communications protocols and
use cases for companies that don't want to build their data formats, often requiring bidirectional
own gateways. Dell's gateways ship with the Wind River communication capabilities
platform, as do many other of the newer IoT gateway • Storage and analysis -- on-board application
platforms. development platforms and storage to drive
Dell believes that its gateways will appeal to users in intelligence and decision-making closer to the edge
three major use cases: industrial automation, building device
automation and transportation. One of Dell's early clients • Management -- the ability to provision, update and
is Eigen Innovations, a supplier of intelligent industrial control access of connected devices to the system
vision systems. Eigen's infrared sensors detect quality as well as policy-based permissions
problems in manufacturing and assembly operations.
The data is transmitted to the Dell IoT gateway which As IoT networks proliferate and use cases expand, the
runs a rules engine and can shut down the factory if demands on IoT gateways for these capabilities will only
issues are discovered. Since speed and availability are intensify.
208
IT & ITES Trade Theory for Exercise 2.10.223
Smart City - Demonstarte and deploy responsive Web Application using APIs
and generate reports using templates
DRAFT
interacting with a Linux shell - specifically, we will be using
• Download the Raspbian image from http:// the bash shell. This is the default shell on many popular
downloads.raspberrypi.org/raspbian_latest Linux distributions. If you have not yet logged in to your
raspberry pi, do so no - the username is pi, and the
• Extract the .zip file
password is raspberry. Plug your raspberry pi into a
• Install Win32DiskImager monitor, power source (USB Cable) and keyboard, and
you will eventually be greeted by a login prompt.
• Run Win32DiskImager as Adminstrator (from right-
click menu) Listing 1 gives some examples on “getting around” in
the shell. The commands used - for example cd, are
• Insert the SD card into your SD card reader, if you
what you would type at the command-line prompt after
have not done so
logging in to the raspberry pi.
• In Win32DiskImager, “Browse” to the extracted .img
file
209
IT & ITES Trade Theory for Exercise 2.10.224
Smart City - Demonstarte and deploy responsive Web Application using APIs
and generate reports using templates
DRAFT
• .doc – a Word document left click on the Edit option on the toolbar. Choose cut to
move or copy to copy!
• .wav – a sound file
At this point the item has been placed onto a clipboard –
• .ppt – animated slides
an area of memory accessible from nearly any application
• .txt – plain text in Windows. Right click (or open Edit in the toolbar) in
• .xls – a spreadsheet an open destination folder and choose “Paste” (or use
drag and drop) .
• .dbf – a database file
When an attempt is made to move an item between
• A shortcut (note the arrow) volumes, it is effectively copied, and the original remains.
• .exe – an application (a program) Creating Files and Folders
Windows allows you to view information about files in This is mercifully easy. Simply right-click on some empty
different ways. the icon view – the default used by space in any suitable folder or the desktop and choose
Windows XP. to create a new object from the choices offered.
To change the icon view, click on View on the menu bar. Be careful not to alter the file extension, as this can render
Select the required view from the available list. the file unreadable. File extensions are usually hidden
By default if a file type is a known one, such as a for this reason.
Microsoft Word Document, Windows won’t display its
210
IT & ITES Trade Theory for Exercise 2.10.225
Smart City - Demonstarte and deploy responsive Web Application using APIs
and generate reports using templates
DRAFT
applications many devices will interact with the physical
world and the consequences of a security breach can • Not high on management’s priority list
cause physical damage and threaten lives. Here are a
• Customers won’t pay a premium for security
couple of examples to get you thinking responsibly about
security and cyber-physical security: Fortunately many of the building blocks required to
secure IoT devices and system are already well
• Johnson & Johnson warns of insulin pump hack risk
established and widely used across the internet,
• Cybersecurity vulnerabilities identified implantable connecting servers, PC’s and mobile devices. There is
cardiac devices no need to ‘invent’ new technology; what’s needed is an
intelligent approach to applying the existing building
• Six cyber-physical attacks the world could live without
blocks in ways that are appropriate to IoT devices and
Security is often considered a ‘cost’ of doing business systems.
but it does not need to be so: in a growing number of
Here we will review some of these building blocks and
applications the quality of the data is important and
where they apply. More detailed reviews of each block
‘trusted data’ can command a premium. Here is one great
will be available in related posts.
example:
Trusted data is the currency of IoT
Companies may be willing to pay for data from Fitbits
For the internet of things to work the data coming from
Here we will discuss three areas to consider when
the edge devices (the Things) must be ‘trusted’ all the
designing an IoT device or system:
way from sensor to subscriber.
• Ensure that data comes from devices of known
Without trust the data is at best useless, perhaps
provenance and is unaltered – trusted data.
misleading and in some cases can result in life-impacting
• Protect devices so they don’t become a host for consequences. Cloud applications, in particular Big Data
malware or an access point into your network. and AI, depend upon trusted data.
211
Fundamental ingredients of trusted data are: Data integrity
• Authenticity – data comes from a known (unique Knowing that data has not been tampererd with is
Identity) and authenticated (verified to match Identity) fundamental to most transactions ( yes there are a few
source. where is does not really matter). If the data represents
currency then integrity seems an obvious requirement.
• Integrity – data has not been changed and can be
If that data represents air quality sensors, then integrity
verified to be so.
matters because it might negatively impact lives if an
• Confidentiality – data cannot be observed by an emergency response is compromised in a material way.
unauthorized party.
Data confidentiality
Let’s explore these terms more detail.
Confidentiality or privacy of data is not required by all
Device authentication applications – municipality transit data should be public
Most data transactions between parties or devices for example – but keeping data confidential is important
assume that you know the data truly came from the in matters ranging from an individual’s privacy rights to a
presumed party or device. But how can you be sure? corporation’s need to protect proprietary information. In
each case the data must be protected from prying eyes
The generally accepted solution comes in two parts: using encryption techniques that extend from the
• Give the device a unique and robust Identity publishing source – the IoT sensor or edge device- to
the cloud and onwards to subscribers.
• Use a cryptographic process to authenticate the
device against its known Identity Using standard encryption algorithms is a simple and
effective way to ensure privacy. See Cryptography
Data that originates from an authenticated device, with section.
the additional requirement of integrity, is sometimes
referred to as ‘authenticated data’. More on that in a
moment.
DRAFT
212
IT & ITES Trade Theory for Exercise 2.11.226
Smart City - Identify and test smart Lightening system and its components
DRAFT
noted earlier, OSS developers generate revenues by
selling hardware that runs open-source software by Before anything else, we first need to set up our
providing customer support for OSS and selling closed Raspberry Pi Linux computer. Setting up RPi desktop is
source software that runs on OSS. Now think about how similar to setting up any desktop computer except that
the Raspberry Pi Foundation generates revenues. we don’t need to assemble CPU. RPi is a single board
computer with on-board RAM, processor, input/output,
and network interfaces
213
IT & ITES Trade Theory for Exercise 2.11.227
Smart City - Identify and test smart Lightening system and its components
DRAFT
214
IT & ITES Trade Theory for Exercise 2.11.228
Smart City - Identify and test smart Lightening system and its components
DRAFT
2. icon. It's in the bottom-right corner of the screen, on back of the router (or modem/router combination).
the right side of the taskbar. Clicking the Wi-Fi icon
• If the network doesn't have a password,
prompts a pop-up menu with a list of available
clicking Connect in the previous step will connect
networks.
you to the network.
• You may first have to click
215
IT & ITES Trade Theory for Exercise 2.11.229
Smart City - Identify and test smart Lightening system and its components
Requirements: Once this is done, start the Imager and open the
“CHOOSE OS” menu.
• Micro SD card
• Computer System
• Raspberry Pi
• Micro USB
• Internet Connectivity
PROCEDURE:
What you’ll learn
• How to create a bootable Ubuntu Server microSD
card
• How to setup internet connectivity on the Raspberry
Pi
• How to access your Raspberry Pi remotely
Scroll down the menu click “Ubuntu”.
What you’ll need
• A microSD card (4GB minimum, 8GB recommended)
• A computer with a microSD card drive
• A Raspberry Pi 2, 3 or 4
• A micro-USB power cable (USB-C for the Pi 4)
• A Wi-Fi network or an ethernet cable with an internet
DRAFT
connection
And optionally:
• A monitor with an HDMI interface
• An HDMI cable for the Pi 2 & 3 and a micro HDMI
cable for the Pi 4
• A USB keyboard
First, insert the microSD card into your computer. You will then be able to see a list of Ubuntu downloads
to choose from. For this tutorial we recommend you
Now you need to install the right Raspberry Pi Imager select the Ubuntu 18.04 download. As indicated in the
for your operating system. You can do this with the imager this will work for the Raspberry Pi 2,3, 3+ and
following links: any of the 4’s.
• Raspberry Pi Imager for Ubuntu
• Raspberry Pi Imager for Windows
• Raspberry Pi Imager for macOS
216
Select the image and open the “SD Card” menu. Select
Finally, click “WRITE” and wait for the magic to happen…
the microSD card you have inserted. (This magic might take a few minutes)
DRAFT
217
IT & ITES Trade Theory for Exercise 2.11.230
Smart City - Identify and test smart Lightening system and its components
DRAFT
commands in the script. Every shell script you create
Shell scripts are great if you need to enter long sequences
will need this on the first line of the script.
of commands into the command line to do something.
Most operations can be accomplished with a single Exit and save the file in Nano by pressing Ctrl-X to save
command if you know how to write a shell script for it. and exit.
For example, they can be used to:
MAKE THE FILE EXECUTABLE
• Control what happens when the computer boots up
Next, we’ll need to make the hello-world.sh file
• Start applications when an event occurs executable. To do that, enter this at the command prompt:
• Use the output of one command as the input for sudo chmod +x hello-world.sh
another command
• Batch rename and move files
218
IT & ITES Trade Theory for Exercise 2.11.231
Smart City - Identify and test smart Lightening system and its components
E x p lo r e D ata b a s e M a n a g e m e n t s y s te m
Objective:
• to explore Database Management system.
Why did Michael Widenius create MariaDB instead of A foundation will then be create, the MariaDB Foundation,
DRAFT
continuing to improve MySQL? to ensure the governance of the project. Since then,
MariaDB develops more and more every day, continuing
To find the answer to this question, you have to make a to ensure compatibility with MySQL and improving it.
small jump back in the history of MySQL.
• In 1995 Michael Widenius founded MySQL AB, an
open source software company, and soon became a
major player in the database industry.
219
IT & ITES Trade Theory for Exercise 2.11.232
Smart City - Identify and test smart Lightening system and its components
DRAFT
Some of the benefits of using an online server and interface will let you restore the VPS to its original
operating it as a proxy for routing messages between configuration by a button click.
users and the devices are:
For this reason, playing around with an online VPS is a
• Enables users on one network to control devices on great way to learn command line Linux. If you get your
another network. For example, a device connected Linux VPS into a state where you are unable to recover
to a home network can be controlled via a smartphone it, log into the VPS web control panel and click the re-
connected to the cellular network. install button. A fresh Linux VPS will then be available in
• Devices operate as network (TCP/IP) clients, thus one to two minutes, and you can start over.
no router port forwarding or other tricks are required Remote Login via SSH
for gaining access to the devices via the online server.
An online VPS enables you to remotely login by using
• Devices acting as network clients operate in stealth SSH (Secure Shell). If your own computer is running
mode, thus greatly improving the security of the Windows, download the SSH client Putty and start the
devices. We will get more into security later. executable from any directory. Mac and W indows
• Small devices typically do not have the resources for computers typically include a command-line SSH client,
providing a direct web interface. The online server thus you can simply type ssh in a command line on Linux
manages all the heavy lifting of providing a web and Mac.
interface for the devices, thus greatly minimizing the When you sign up for a VPS service, such as the budget
code complexity in the devices. securedragon VPS (O64), you will receive an email with
Virtual Private Server instructions for how to remotely log into your VPS by
using SSH. The instructions include the IP address of
Setting up your own VPS may sound complicated and your new VPS and the root (admin) password. The
expensive, but the reality is that setting up a VPS is very following figure shows how to enter the IP address in
easy and the cost can be minimal. It is possible to find Putty and how to log in as user root in the command line
VPS services as low as $8 a year. My favorite site for window.
220
At this point, feel free to try a few Linux commands. Don't
worry about corrupting the VPS since a simple button
click in the VPS control panel will re-install the Linux
operating system.
Installing the IoT Server
To install the server software and the example program,
copy all of the following and paste the commands into
the SSH console window.
wget http://makoserver.net/install/brokerX86/install.sh;
chmod +x install.sh;
./install.sh
DRAFT
221
IT & ITES Trade Theory for Exercise 2.11.233
Smart City - Identify and test smart Lightening system and its components
DRAFT
Pi hardware. For data storage, two databases using Data visualization concerns the area of taking data and
MySQL is implemented. One of these will be used for presenting it in a concise and useful way, depending on
local storage that will save local measurements, and requirements. The simplest example are bar charts to
another database that will be used to store all determine some effect, to more complex visualizations
measurements from multiple local databases. Visualizing such as three-dimensional scatter plots. There are many
the measurements is done using a graphical user tools and frameworks for this available for Python, such
interface (GUI), that will be able to display the as Matplotlib, Chaco or PyQTgraph. There are possibly
measurements in e.g. a graph over time. The user will performance issues to consider when selecting one or
also be able to change which measurements that are more of these. The basic requirement for visualization is
shown by changing time interval, sensor and type of to integrate it in a touch screen GUI.
graph. The Qt framework will be used to design the GUI. Single board computers
Background Single board computers are small computers contained
APR Technologies (henceforth called APRtec), a on a single circuit. They contain one or more CPUs along
company based in Enkoping, is the ¨ external party for with memory and programmable input/output peripherals.
this project. The company develops embedded systems Single board computers are used in embedded
solutions for the space industry. Their primary product applications, in contrast to the microprocessors used in
areas are fire alerts, heat dissipation, sensors and personal computers, ranging from basics such as
surface materials. The main areas that this project will equalizers to more advanced uses like cars or satellites.
incorporate are database m anagem ent, data Their main advantage is cost-effectiveness and ability
visualization, and single board computers, namely the to perform many different tasks depending on user
Raspberry Pi single board computer. A basic requirements. The Raspberry Pi Foundation is a charity
understanding of each of these areas is useful when that was founded in 2009. The foundation has developed
reading this report and therefore a brief introduction will a series of single-board computers to promote computer
be given to each of them. Furthermore, the measuring science in schools.
222
These single-board computers have a high performance/ There are ready-made solutions available for these
cost ratio, are as big as a credit card, and are provided systems, but APRtec is unsatisfied with these due to
by the foundation. Like other single board computers the stability concerns and general clunkiness of Windows.
Pi can be used in many embedded systems areas, such This is due to there being so much pre-installed software
as scientific experiments, home automation and data that comes with each installation. Every manufacturer
analysis. likes to provide their own software for what they consider
added functionality. Even if removing all of it is possible,
Operating system
there exists the possibility that one missed something.
Linux is a Unix-like operating system that contains free This could then interfere with system operation over time.
software. The group has chosen the Linux distribution The company has given examples of some program
called Raspbian for the project. This is the officially installing an update without asking after several weeks
supported operating system for the Raspberry Pi. and thus interrupting the work the unit was doing. A single
Raspbian is a modified version of Debian, which is an board computer would be more appropriate to use in
operating system that uses the Linux kernel. The main terms of the above, physical size and with Linux being
reasons for using Raspbian is threefold: it comes with more stable. Linux also does not include bloatware to
most or all of the software packages needed, built-in the same degree (depending on distribution), and
support for the Raspberry touch screen, and in the automatic software upgrades must be enabled manually
group’s opinion a larger chance of long-term support. by the user. The overall question that this project aims
Measuring unit to answer is how the Raspberry Pi single board computer
can be used to store and visualize different types of
In this project, the measuring unit will be considered a measurement data. The project is important because it
“box” that is a collection of sensors that sends its collected would result in a general purpose solution to the problem
data via USB. In other words, we are not concerned about of storing and visualizing data. Many different solutions
the internal functionality of the unit. The data sent by the exist for the purpose of visualizing and storing data using
measuring unit will be handled by our software, which is conventional computers, but there is a lack of a general
run on the Raspberry Pi’s. In total, sixty measuring purpose solution using a cheap, small, portable system
channels are available. Each channel is connected to a like the Raspberry Pi. Reaching the goal of this project
sensor, that has the ability to measure real world physical would therefore allow individuals with a small budget to
phenomena. visualize and store data, something that is useful in many
Purpose, aims, and motivation different fields of work.
DRAFT
223
IT & ITES Trade Theory for Exercise 2.11.234
Smart City - Identify and test smart Lightening system and its components
Requirements: IFTTT
• Computer System When it comes to home automation, IFTTT provides
robust support to several products. This makes it easy
• Internet Connectivity
to connect and control IoT automation devices.
• Eclipse
M2MLabs Mainspring
• Arduino
http://www.m2mlabs.com
PROCEDURE:
M2MLabs Mainspring is an open source application
IoT Development Tools/Platforms framework to develop machine to machine (M2M)
applications for remote monitoring, fleet management
Eclipse IoT https://iot.eclipse.org
or smart grid. It covers different functionalities needed
Eclipse IoT provides technology needed to build IoT by M2M devices such as flexible modeling of devices,
Devices, Gateways, and Cloud Platforms. Basically, device configuration, communication between devices
Eclipse IoT is an ecosystem of companies and individuals and applications, validation and normalization of data,
collaborating to establish an Internet of Things based on long-term data storage, and data retrieval functions.
open technologies. This collaboration helps to completely
Canopy
focus on the development, promotion and adoption of
open source IoT technology. Many of our members http://canopy.link
provide a wide range of projects and services built on
Canopy simplifies the IoT cloud by acting as a cloud relay
top of Eclipse IoT technology.
between IoT devices and applications. Canopy allows
Node-Red quick and seamless development of IoT solutions for
diverse markets ranging from consumer, commercial and
https://nodered.org
industrial. Canopy’s server-side component (the “Canopy
Node-Red is a browser-based editor which makes it very Cloud Service”) is open source and runs anywhere,
easy to wire together flows using nodes in the palette including the public cloud, private cloud, hybrid cloud,
DRAFT
that can be deployed to its runtime in a single-click. Node- LAN, or even on your laptop.
Red provides a built-in library that let you save helpful
Intel® Edison Development
functions or templates for re-use. With 225,000+ modules
in Node’s package repository, it is easy to extend the https://software.intel.com/en-us/iot/hardware/edison
range of palette nodes to add new capabilities.
Intel® Edison Development Platform is the first in a series
Dronesmith of low-cost, product-ready, general purpose compute
platforms that help lower the barriers to entry for
Drones are one of most emerging areas in the Internet
entrepreneurs of all sizes—from pro-makers to consumer
of Things (IoT) space. This path-breaking technology has
electronics and companies working on the Internet of
the potential to change each and every domain across
Things (IoT).
the world. Dronesmith aims at making use of the drones
much easier. Tessel 2
Arduino https://tessel.io
https://www.arduino.cc Tessel 2 is a robust IoT and robotics development
platform. Leverage all the libraries of Node.JS to create
An Open-source prototyping platform, Arduino is based
useful devices in minutes with Tessel. Interact with the
on easy-to-use hardware and software. Arduino is a
physical world from sensing to actuation to connecting
hardware specification for interactive electronics and a
with other devices. Each module has an open source
set of software which includes an IDE and the Arduino
library on NPM, with instructions and tutorials available
programming language. Arduino is “a tool for making
online. It’s literally plug, npm install, and play.
computers than can sense and control more of the
physical world than your desktop computer.”
224
IT & ITES Trade Theory for Exercise 2.11.235
Smart City - Identify and test smart Lightening system and its components
S e l e c t a n d In s t a l l C a r b o n d i o x i d e s e n s o r
Objective:
• to select and Install Carbon dioxide sensor.
DRAFT
battery powered while the other is AC powered. Do
some research on the best option for your home, and the supplied screws. In case your detector does
office or wherever you may want to install it. It is quite not have a twist off base, place the screws into the
important to stick to AC powered detectors if you anchors and screw then in without tightening. Make
realize you might have a problem remembering to sure that they protrude enough to let the detector fit
change the batteries. You may also want to buy a over them.
detector whose alarm goes louder and faster as 8 Install batteries and fit detector into position.
carbon monoxide levels increase.
9 Test it: You need to make sure that your detector is
2 Decide the installation location: Deciding on the working by testing it. this will also give you an
location of your detector is quite crucial. Since carbon opportunity to familiarize with the way it sounds.
monoxide is less dense than air, it tends to rise. This
10 Schedule battery replacement: You will need to
makes the best location to be near the ceiling and
mark on your calendar or schedule an electronic
away from fuel burning appliances. It should at least
reminder on your computer, mobile etc. for the
15 feet (4.6 m) away from heating and cooking
replacement of the batteries twice every year. You
appliances and humid areas. Care should also be
will also need to check the chemical that enables the
taken to ensure that it is not covered by drapery,
detection process. It should be replenished
furniture or anything else. Recommendations by the
periodically as well.
consumer product safety commission (CPSC) are that
the detector should be placed near your bedroom so
225
IT & ITES Trade Theory for Exercise 2.11.236
Smart City - Identify and test smart Lightening system and its components
Requirement:
• Grove board
• Raspberry Pi
• Oxygen sensor
• Computer system
PROCEDURE:
we talked about Grove connectors and how to use them
with the Raspberry Pi. You will be using three Grove
devices for this great experiment to create a sophisticated
Oxygen sensor. We have previously used an ADC with
the Raspberry Pi in our Air Quality Sensor column in
Raspberry Pi.
Interface Board
The Pi2Grover board (Figure 1) provides 15 Grove
Figure 2: Grove 4 Channel 16 Bit ADC Board.
connectors: 10 Grove Digital, 4 Grove I2C, and one Grove
UART. Fast prototyping with many, many Grove devices The O2 Grove Gas Sensor (Figure 3) works by outputting
is supported. No software drivers are required, so you voltage values proportional to the current oxygen
are right next to the hardware. concentration in the air around you. You can interpret
these numbers by referring to the oxygen concentration
linear characteristic graph.
DRAFT
Figure 1: The Pi2Grover Board.
The board plugs right into your Raspberry Pi with a
special connector that supports installing other boards
or HATs on top of the Grove board itself.
The Grove 4 Channel 16 Bit ADC Board for the Raspberry Figure 3: Grove Oxygen Sensor.
Pi is based on the industry standard ADS1115 (Figure
This sensor value only reflects the approximate trend of
2). It supports voltages of both 3.3V and 5V and also
gas concentration in a permissible error range, so it is
uses Grove connectors. The board has four 16 bit Analog-
not exact. Detecting the specific makeup components
to-Digital Channels, which can be programmed in many
in the air usually requires a more expensive device, which
different ways.
is far more precise than a simple gas sensor. This sensor
also requires around half an hour to warm up (Figure 4).
226
Figure 4: Grove Oxygen Sensor Curve takes about 30
minutes to reach the correct level.
All of the connections save one Jumper are Grove
connections (Figure 5). All Grove connections use the
same cable to connect to one another.
DRAFT
227
IT & ITES Trade Theory for Exercise 2.11.237
Smart City - Identify and test smart Lightening system and its components
DRAFT
Volatile organic compounds (VOCs) are emitted as gases
from certain solids or liquids. VOCs include a variety of
chemicals, some of which may have short- and long- The STM32 MCU integrated in the USB dongle captures
term adverse health effects. Concentrations of many raw data from the sensor and uses the Bosch's
VOCs are consistently higher indoors (up to ten times proprietary Air Quality calculation algorithms to obtain
higher) than outdoors. VOCs are emitted by a wide array equivalent air-quality (IAQ Index), temperature, relative
of products numbering in the thousands. humidity and atmospheric pressure values. These values
are then output over a simple Virtual Serial Comm on
Organic chemicals are widely used as ingredients in the USB connector in different configurable formats
household products. Paints, varnishes and wax all (JSON, CSV, Human readable or binary).
contain organic solvents, as do many cleaning,
The uThing::VOC can be configured for different output
disinfecting, cosmetic, degreasing and hobby products.
data rates and formats. By default the sensor data is
Since many people spend much of their time indoors, output every 3 seconds in JSON format. We will use the
long-term exposure to VOCs in the indoor environment default settings for this project, but they can be changed
can contribute to serious health issues. easily, check the datasheet for more information.
Good ventilation and air-conditioning systems are helpful
at reducing VOCs in the indoor environment.
228
IT & ITES Trade Theory for Exercise 2.11.238
Smart City - Identify and test smart Lightening system and its components
Identify and install Air temperature, Air humidity, and Atmospheric pressure
and UV sensor
Objective:
• to identify and install Air temperature, Air humidity, Atmospheric pressure and UV Sensor.
DRAFT
Breadboard wire
VEML6075 UV Sensor
Optional
Breadboard
Alongside wiring the UV sensor to the Raspberry Pi we
Raspberry Pi Case
will be showing you how you can interact with the sensor
by utilizing the Python programming language.
229
IT & ITES Trade Theory for Exercise 2.11.239
Smart City - Identify and test smart Lightening system and its components
Select and Install Nitric Oxide (NO), Hydrogen sulphide, Sulphur dioxide, Carbon
Monoxide, Ozone soil Moisture and soil temperature sensor
Objective:
• to select and Install Nitric Oxide (NO), Hydrogen sulphide, Sulphur dioxide, Carbon Monoxide, Ozone soil
Moisture and soil temperature sensor.
DRAFT
which can be damaging. WHO has assessed nature of
air in about 1500 urban territories and Indian capital city
was the one of the most dirtied urban zones the world
over. Delhi is having most raised gathering of particulate
issue which is smaller than 2.5 micrometer .
Air pollution and nonattendance of air quality watching
centers address regular and imaginative troubles for
urban networks and circumstances around the world.
To stand up to this issue, industry has focused its
undertakings in finding an adaptable mechanical elective
that allows the improvement of the air quality evaluating
method and gives reference regards in framework goals
where customary watching fails to cover appropriately.
Appallingly, existing things and the created results don't
address ease courses of action. Indian cultivating portion
speaks to 18% of India's gross local generation (GDP)
and offers work to half of country's workforce. India is
second greatest producer of vegetables and natural items
on the planet .
In India 43% of topographical locale is included by
cultivating region . According to conjecture of FAO, one
out of nine people far and wide need adequate The working of this adroit city application is essentially
sustenance expected to keep up a strong and dynamic established on the remote correspondence between the
lifestyle and says that this number is required to augment sensors and various devices. Along these lines for
as masses continues rising. Not simply that, a couple capability reason we are using LoRa Network system,
230
which will give compelling and streamlined results. The Step 5 Get the data from all the sensors (MQ7, MQ135
objective of this endeavor is to manufacture a smart city and DHT11)
with less multifaceted nature, upgraded power supply,
Step 6 Send the data received from the sensor to LoRa
spending admirably arranged and capable delayed
receiver
consequence of correspondence sort out. Here to
perceive the climatic parameters we are setting remote Step 7 Wait for 10 seconds
sensors which will observe the sullying gases like carbon Step 8 Goto step 4 Transmitter 2 (plantation data
mono oxide, hydrogen sulfide gases, and smoke. We transmitter) Transmitter2 made up of DHT 11, Soil
will use soil soddenness and temperature sensor to moisture sensor, Microcontroller which has a place with
identify the sogginess in the earth. Resulting to recording AVR family and Lora module. DHT 11 and Soil moisture
the data it will send to the entry where the pro is sensors are consolidate called as crop plantation sensor.
accessible. We are utilizing adruino uno stage for
transmitting the information. Atmega328 microcontroller
we are utilizing to gather the information from various
sensors and set it up to transmit to the recipient area.
Esp32 we are utilizing on the collector area to get the
transmitted information. ESP32 is a movement of
negligible exertion, low – control system on chip
microcontrollers with consolidated Wi-Fi and twofold
mode Bluetooth.
Data accumulated from various sensors will be then
arranged to make the results. This made information is
then appeared on the LCD. Above square outline
demonstrates the working of the air checking and crop
ranch framework. The framework is separated mostly
into 3 section to be specific transmitter1 (Tx1),
transmitter2 (Tx2) and beneficiary (Rx). Transmitter1 is
utilized to gather and transmit the information from the
sensors utilized for air checking while transmitter2 is
utilized to gather and transmit information from the yield
estate sensors. Recipient is utilized to get the transmitted
information from the transmitters and procedure the
information to give the ideal outcome. This ideal
information is then shown in LCD. Transmitter 1
DRAFT
(environmental data transmitter) Transmitter1 is blend
of MQ135, MQ7 gas sensor DHT11 Humidity,
Tem perature sensor, Lora module for rem ote
transmission and Microcontroller. It is called as
Environmental sensors. The gas sensor is interface to
the simple stick which is in simple in structure. The
DHT11 works sequentially so it is sequentially interface.
The Lora module utilizes SPI convention to transmit and
get the information. All the three sensors Gas sensors
and temperature and stickiness are giving their
information to the controller. The errand of controller to
process these information and send it to the recipient Microcontroller gathers the information from crop
side for air checking utilizing lora convention. plantation sensors and send it remotely through Lora
module to the Receiver.
Figure 2. Flowchart of Transmitter of Environmental
Sensors Algorithm of Transmitter (Environmental Node Figure 3 Flowchart of Transmitter of Plantation Sensors
Circuit) Algorithm of Transmitter (Plantation Node Circuit)
Step 1. Start the circuit by connecting the power supply Step 1. Start the circuit by connecting the power supply
Step 2. Start the SPI protocol Step 2. Start the SPI protocol
Step 3 detect the LoRa module (868 MHz) Step 3 detect the LoRa module(868 MHz)
Step 4 If LoRa Available start all the sensor otherwise Step 4 If LoRa Available start all the sensor otherwise
goto step 2 goto step 2
231
Step 5 Get the data from all the sensors (DHT11 and
soil moisture sensor)
Step 6 Send the data received from the sensor to LoRa
receiver
Step 7 Wait for 5 seconds
Step 8 Goto step 4 Receiver Recipient comprising of
LCD module 20x4,ESP32 and Lora as a remote collector
module.
The information got from Transmitter1 and Transmitter2
are gathered rem otely process through ESP32
microcontroller and show on LCD. The information
constantly send by crop plantation sensors and Air quality
measure sensors are gotten it and procedure persistently
on continuous premise and show on LCD.
DRAFT
232
IT & ITES Trade Theory for Exercise 2.11.240
Smart City - Identify and test smart Lightening system and its components
Check magnetic field for smart parking and IR for Human presence
Objective:
• to check magnetic field for smart parking and IR for human presence.
DRAFT
heat by human body. It is the most precise characteristic higher than 4x4 pixel sensing array, whereas using visual
for human detection in sensitive locations. It is well known camera at night time required continuous illumination of
that anything that has a temperature above absolute zero light. The characteristic of the thermopile does not allow
emits infrared radiation. energy emitting to the surrounding which keeps the
Another crucial challenge is human body temperature is sensor unaffected. Hence, visual camera and thermopile
not constant which varies from 36.5 to 37.5 °C due to sensor based technologies are failed to achieve human
wearable clothes, external conditions like seasons and privacy and accuracy.
day and night timings. The primary factors for localization APPLICATIONS OF THE SYSTEM
of human presence may include the distance between
the heat source and sensor system. The body surface The thermal sensory system is a new field has many
radiation is absorbed by the sensor can range from 20°C revolutionary capabilities.
to 40°C depending on the external conditions. For indoor Security and Privacy
applications the sensor should be able to differentiate
human from static objects/things like metal objects, The human detection systems are very important in
wooden furniture and plastic objects even though the security and surveillance fields. Due to the limitations of
human is mobile or immobile. The parameters like PIR sensor, now the emerging applications are
distance, angle and coordinates are calculated using the demanding thermal sensor based human/object
position of the sensing device for accurate human detection systems. To further improve the security
location in the field of view (FOV) or targeted location. aspects, thermal sensors can be coupled with PIR and
Therefore, it is highly essential to choose the IR sensors ultrasonic sensor to make the device more perfect for
for concerning range, accuracy, and FOV. detecting each human activity.
233
sensing devices can help to detect the humans buried Activity Recognition and Localization
under the rubble. Currently, these thermal sensors are
Another critical application of Omron D6T thermal sensor
not able to penetrate deeply into the rubble, but they still
deals with assisting older and physically challenged
can provide an extra 3-8m arm to the rescuers which
people. The sensor was successfully able to provide
indeed a significant role for saving the people.
positive results in detecting human activities like sitting,
Medical Treatments and Safety from Radiation lying, falling, and many more. These sensors can also
connect to the home network which can make home and
Thermal imaging plays a key role in medical treatments.
human-activity monitoring by these category people.
If adequately calibrated sensors can detect the variations
found in thermal signature of the patients which helps to F. Advanced driver assistance system (ADAS)
detect the appropriate problem and diagnosis. One of
ADAS involves heterogeneous sensors which are
the most recent utilization of these proposed sensors
installed in vehicle to assist the drivers while driving. The
involves alert the people from radiation exposure.
sensory system accurately alerted the driver about
Energy Management Systems pedestrian near the vehicle through IR sensor.
The automated devices can use the thermal sensors like G. Thermal Cameras and Fire Safety
Omron D6T to detect the presence of the human to
W ell-equipped hardware components and image
control home appliances. Smart thermostats have
processing algorithms results the quality thermal images.
developed to adjust the indoor temperature automatically
A thermal camera provides night vision which most of
and regulate the room environment through the mobile
the visual cameras lack and therefore thermal camera
applications.
is much more suitable for alarm.
DRAFT
234
IT & ITES Trade Theory for Exercise 2.11.241
Smart City - Identify and test smart Lightening system and its components
Measure the Hall Effect (doors and windows opening), Water presence, Liquid
level, Liquid flow, Temperature and Humidity for smart security
Objective:
• to Measure the Hall Effect using water presence, Liquid level, Liquid flow, Temperature and Humidity for
smart security.
DRAFT
leakage sensors can be installed here to prevent water
overflow or any other sink misuse. • Hall effect (doors and windows openings)
• Water presence
• Liquid level
• Liquid flow
• Temperature
• Humidity
• Atmospheric pressure
• Luminosity (Luxes Accuracy) for Smart Lighting
• Ultrasound (distance measurement)
Libelium provides many different sensor probes
depending on what is going to be measured. For Smart
Security model following sensor probes can be used.
Liquid Flow Sensor Probes
Water Flow Small, YF-S402
• Flow rate: 0.3 ~ 6 L/Min
• Working voltage: +5 V ~ +24 V
• Working temperature: 0 ºC ~ 80 ºC
• Pipe connection: 1/8”
235
• Max rated current: 15 mA (DC 5 V) Liquid Level Sensor Probes
PTFA3415 Sensor
DRAFT
The liquid flow sensors output a signal that consists of a
series of digital pulses whose frequency is proportional • Material (box): Polyamide
to the flow rate of the liquid through the sensor. That • Material (float): Polyamide
digital signal, whose frequency is in the range between
0Hz and 100Hz, is directly read through one of the digital • Operating temperature: -10 ºC ~ +80 ºC
input/output pins of the micro-controller. • Minimum consumption: 0µA*
236
PTFA1103 Sensor • Length: 64 mm
• Measurement Level: Vertical • Width: 19 mm
• Liquids: Water • Height: 13 mm
• Material (box): Propylene • Maximum contact resistance (closed): 200 mΩ
• Material (float): Propylene • Minimum contact resistance (open): 100 GΩ
• Operating temperature: -10 ºC ~ +80 ºC • Minimum consumption: 0µA*
• Minimum consumption: 0µA* This is a magnetic sensor based on the Hall effect. The
sensor’s switch remains closed in the presence of a
magnetic field, opening up in its absence. Together with
its complementary magnet it can be used in applications
of monitoring proximity or opening mechanisms.
Water Leakage / Liquid Detection Sensor Probe
(Line)
• Length: 5 meters sensor + 2 meters jumper wire
• Material: PE + alloy lend
• Weight: 18 g/meter
• Pull force limit: 60 kg
• Cable diameter: 5.5 mm
• Core resistance: 3 ohm/100 meters
• Maximum exposed temperature: 75 ºC
There are three liquid level sensors whose operation is • Detectable liquids: Water
based on the status of a switch which can be opened • Minimum consumption: 0µA*
and closed (depending on its placing in the container)
as the level of liquid moves the float at its end. The main
differences between the three sensors, regarding its use
in Waspmote, are to be found in their process for placing
them in the container (horizontal in the case of the
PTFA3415 and PTFA0100 sensors, vertical for the
DRAFT
PTFA1103 sensor) and in the material they are made of
(the PTFA1103 and PTFA3415 sensors recommended
for edible liquids and certain acids and the PTFA0100
for heavy oils and combustibles, more specific
information can be found in the sensors’ manual).
Hall Effect Sensor Probe
237
IT & ITES Trade Theory for Exercise 2.11.242
Smart City - Identify and test smart Lightening system and its components
Test calibration kits for the sensor probes for water quality analysis
Objective:
• to test calibration kits for the sensor probes for water quality analysis.
IMPLEMENTATION ARCHITECTURE
DRAFT
SENSOR SUITE FOR WATER QUALITY SCREENING
Water Quality Parameters
• pH
• Temperature
• Dissolved Oxygen
• Hardness
• Ammonia, Nitrite & Nitrate
Water Quality Parameters
Formers take water samples from pond.
• Get results from Aqua Labs.
• Expensive.
238
Raspberry Pi 2
• Processor
• GPIO Pins
• SD Card Slot
• Ethernet Port
• USB Port
• HDMI Port 7.3.5mm Jack
DRAFT
239
IT & ITES Trade Theory for Exercise 2.12.243
Smart City - Identify, select, install and troubleshoot different module/ devices
used in smart street light based on IoT and cloud Technology
Requirement:
Solar inverter
IoT devices
Computer System
PROCEDURE:
About this Manual
This manual is to provide the explanation and procedures
for installing, operating, maintaining, and troubleshooting Product Label
the below solar inverters: Users can identify the model number and the
RPI M6A/ RPI M8A/ RPI M10A specifications by the information on the product label.
The location for the label please sees Figure 2-2.
Product Description
This device is a 3-phase grid-tied solar inverter which
does not support off-grid functionality.
The operation of solar inverter is shown as figure 1-1.
Inverters convert the DC input power supplied from the
PV Array into 3-phase AC output power to Grid.
DRAFT
Checking Unit and Accessories
Unpredictable damages may occur during shipment.
Check if all the accessories are in the package, the
standard accessories are list as Table 2-1:
Exterior Objects
The Inverter's exterior objects are shown in Figure 2-3.
The detailed input/output interfaces illustration is shown
in Figure 2-4.
240
IT & ITES Trade Theory for Exercise 2.12.244
Smart City - Identify, select, install and troubleshoot different module/ devices
used in smart street light based on IoT and cloud Technology
Integrate solar inverter with serial protocol working on Modbus Master Software
Objective:
• to integrate solar inverter with serial protocol working on Modbus Master Software.
DRAFT
configured in either of the two ways:
Proactive installer maintenance and real time
• Using SetApp
troubleshooting by SolarEdge support, using with the
physical mapping available only in the monitoring platform • Using the LCD
Module-level monitoring All SolarEdge inverters with SetApp configuration are
SunSpec-supported. SolarEdge inverters with the LCD
Communication Technologies that have Firmware version 3.xxxx and above only are
SolarEdge uses an open, industry-standard SunSpec-supported.
communications stack in order to provide efficient To check the inverter firmware versions (for inverters
messaging between SolarEdge and third-party devices with the LCD):
and applications.
• Short press the LCD light button until reaching the
following screen:
241
IT & ITES Trade Theory for Exercise 2.12.245
Smart City - Identify, select, install and troubleshoot different module/ devices
used in smart street light based on IoT and cloud Technology
PROCEDURE:
Introduction:
The following test specification defines the tests used to
declare conform ance to the Modbus protocol
specifications. This test specification defines the criteria
for passing the Conformance Test and being declared
conformant to the published protocol specification. Also
included are the tests the laboratory will use when testing
a Modbus server. At this time, a conformance test
consists of a Protocol Test of a Modbus server only. The
Protocol Test, acting as a Modbus Client, assesses
Modbus conformance by checking the server’s supported
Modbus Function codes. Additionally it will test for
message error handling and message format error
handling. If the Server passes each required Criterion, it
is declared a Conformant Server for the current test
revision. The test setup is based on using Modbus TCP.
For Modbus TCP devices, the connection is made over
TCP/IP. For Modbus Serial devices, a properly configured
Schneider Electric ETG-100 Modbus Ethernet-to-Serial List of Valid Exception Responses
Gateway is used.
Definitions
DRAFT
DUT – Device Under Test. The device being tested for
conformance.
IP v4 Address. Internet Protocol Address. This is the 32-
bit address assigned to a device.
All IP addresses on a network must be unique.
STP (Shielded Twisted-Pair). Cabling used for Ethernet,
where strands of wire are twisted together and are
shielded either individually or in pairs.
List of public Modbus function codes:
242
IT & ITES Trade Theory for Exercise 2.12.246
Smart City - Identify, select, install and troubleshoot different module/ devices
used in smart street light based on IoT and cloud Technology
DRAFT
Tools used-
passing through a load and sends a 16-bit SPI data (13-
bit current value) to the XMC 2Go in which energy, power, Small flat-head screwdriver
and bill calibration takes place. Soldering iron, desoldering braid
XMC 2Go sends the data to the cloud (Thingspeak) using Wire cutters
Nodemcu and it also displays on an OLED.
Dremal or similar tool
For powering up the devices, Buck converter is used to
step down 230v AC to 5v DC Step 2: Install Arduino and Make It Ready to Compile
the Examples
Step 1: Components/hardware & Tools Used
• Install the Arduino IDE. Link
Tli4970 :
• Install the Infineon board package to compile the
The TLI4970 is a high-precision current sensor based example code.
on Infineon's proven Hall technology. Its AC & DC
measurement range up to ±50A and SPI output of 16bit • Follow the installation step one by one. Link
(13-bit current value). It’s an easy-to-use, fully digital • Install the board package for ESP8266.
solution that does not require external calibration or
additional parts such as A/D converters, 0 pAmps or • Follow the installation steps one by one. Link
reference voltage. • Install the extra libraries required to compile the
It's has a ready to use Arduino library. example code-
The XMC 2Go Kit with XMC1100 is maybe the world’s Step 3: Connection Diagram
smallest, fully-featured Microcontroller Evaluation Kit The Connection is as follows:
243
• XMC 2Go ---- > Tli4970 Take the credentials of ThingSpeak Channel and Write
API Key and update the details in the secret file present
Vss --------->GND
along with .ino file that is to be flashed in the NodeMCU.
Vdd --------- > 3.3V
Step 5: Final Steps
P0_6 -------- > MISO
Flash the code given in rar file after replacing the
P0_8 ------- > SCK pins_ardiuno given in the package.
P0_9 ------- > CS Note: Copy pins_arduino.h and replace with the
pins_arduino.h present in path C:\Users\....\AppData\
• XMC 2Go ----- > Nodemcu
Local\ Arduino15\ packages \Infineon\ hardware\
Vss ---------- > GND a r m \ 1 . 4 . 0 \ v a r ia n ts \ X M C 11 0 0 \c o n f ig \
Vdd ---------- > 3.3 XMC1100_XMC2GO\ pins_arduino.h
VP2_0 ------ > D6 Note: From the buck convertor take 5V output and power
up both XMC2Go and NodeMcu.
• Nodemcu ----> OLED
Step 6: Flow Diagram & Circuit Connection
GND -------- > GND
Flash the code check the connections, energy meter is
3.3V --------- > 3.3V ready to calculate the power consumed by any appliance
D1 ------------ > SCK connected to the energy meter.
D2 ------------ > SDA In this project board with fuse is being taken which
increases the price of this maker project, this thing could
Step 4: Setting Up ThingSpeak to Visualize the Data also be done just by using one socket in which load could
Create an account in ThingSpeak be plugged in. But if you are using a single socket without
fuse be double protective while handling the AC power
Create a channel in the ThingSpeak account supply.
DRAFT
244
IT & ITES Trade Theory for Exercise 2.12.247
Smart City - Identify, select, install and troubleshoot different module/ devices
used in smart street light based on IoT and cloud Technology
DRAFT
standards. It is therefore deducted that meters already manufacturer shall start implementing those
use an embedded microcontroller platform with parameters in the metering IC parallel to DLMS
peripherals such as UART, EEPROM. In this backdrop implementation efforts. An example for this could be
the migration from proprietary protocol to DLMS is mainly “Logical device name”.
a matter of proper planning in using right hardware and
b. Parameter supported in a different way - In this case
software components.
meter manufacturers shall tweak his existing
Planning: implementation of one or more parameters to perfectly
As per Indian companion specification there are three align with Indian companion specification. An example
categories of meters: for this situation could be “Activity calendar object”
specified under “TOU metering” section in Indian
1. Energy account and Audit meters companion specification. Meter manufacturer might
2. Boundary (ABT) meters have already implemented TOU in his meter, but the
time zone information and corresponding tariff IDs
3. Consumer meters may be stored in a different way from the DLMS
3.1. Single phase meters model. In this case meter manufacturer only needs
to modify his existing TOU data storage to DLMS's
3.2. Three phase meters Activity calendar format (with season profile, week
Meter manufacturer shall first decide the categories in profile and day profile). The end result of this exercise
which they are going to develop DLMS meters and then is to generate one/ more parameter list tables as
prepare detailed list of parameters and functionality for shown in Table 1.
each category. The table shall be comprehensive capturing the finest
FORM THE PARAMETER, AND FUNCTIONALITY LIST details regarding parameters:
Indian companion specification has well documented the
245
Indian companion specification requires all three
authentication levels to be supported in meters; each
level will be advocated by each type of client (Public client
use lowest level, Meter reader use low level and Utility
will use at High level).
Services - DLMS offers variety of application layer
services which is used by client to access server's (meter)
data. Services mandatory as per Indian companion
specification are:
• Get: Service used to read normal (small) data from
Functionality list meter.
Meter manufacturer shall now decide the DLMS services • Get with block: Service used to read large data from
and other protocol configurations to be used. The choices meter.
offered by DLMS are: • Set: Service used to write normal (small) data into
• Application context meter.
• Security level • Set with block: Service used to write large data into
meter.
• Services
• Action: Service used to execute methods inside
• Communication profile meter.
• Application Context - DLMS offers two referencing • Selective Access: Service used to selectively access
schemes viz., Logical name and Short name. Indian meter data (example – selective reading of load profile
com panion specification has advocated the based on date-time)
mandatory usage of Logical name.
Communication profile – Decide on the communication
• Security Level – DLMS offers three levels of sign on interfaces for the meter. Mandatory choices as per Indian
authentication viz., lowest level, low level and high companion specification are:
level.
• RS485 (allowing multidrop) – primarily for utility
Lowest level has in fact no authentication. Low level software to communicate. This could also be used
involves client sending a plain text password to meter, for remote connection using modem.
based on which meter authenticates client and
accordingly accept or reject Client's associate request. • Optical – for meter reading instrument.
High level involves both parties (Client and Server) Other communication options possible with DLMS are:
DRAFT
exchanging challenges in first round and then exchanging • TCP IP (Ethernet/GPRS modem)
processed challenges in second round. In this method
both parties authenticates each other and also the risk • PLC
of security being hacked is eliminated as password or These communication profiles may require their own
processing key is not exchanged through communication stack (example – TCP IR stack in the meter's
media. communication chip).
246
IT & ITES Trade Theory for Exercise 2.12.248
Smart City - Identify, select, install and troubleshoot different module/ devices
used in smart street light based on IoT and cloud Technology
DRAFT
be an urgent necessity. This directed to the quest for
open communication protocols so that AMR / AMI
systems can become a reality. The need for open protocol
was very much felt. One among the many open protocols
is the DLMS/COSEM which has evolved over a period
of time and is adopted by IEC as IEC 62056 series of
standards and are adopted in India.
DLMS/COSEM is based on a strict client-server structure.
The philosophy is to “model”, “message” and “transport”
with an object oriented approach. The server is meant
to be within the meter while the client accessing the meter
could be a gateway or the central office. Other use cases
where the server is within the gateway and the client is
in the central office are also feasible. Before the actual
metering information can be exchanged an association
has to be build up, which is initiated by the client. The
DLMS client can then access the interface object model
inside the server. Once an association exists the DLMS
The openness of the standard will make the Automatic server is also able to send notifications to the client
Meter Reading (AMR) and interoperability a reality. One without an explicit request.
among the many open protocols is the DLMS/COSEM.
This open protocol based on IEC 62056 helps to DLMS/COSEM supports clock synchronization and
overcome most of the challenges for data acquisition transmission of measurement data and profiles. The
from energy meters. The difficulties faced by the utilities DLMS/COSEM has been improved and the current
to have successful remote metering deployments and version facilitates digital signature and firmware upload.
247
Data objects for firmware updates are already part of neutral. This enables every meter reading system to
the Blue Book Ed. Both are relevant for smart meters. understand a value by its identification system,
irrespective of the meter make. The DLMS/COSEM also
DLMS/COSEM includes authentication and
allows for uploading the Objects supported by a meter,
conf identiality services based on symmetric
and then reading the meter values, which enable any
encryption. The continuous development of DLMS/
DLMS/COSEM Compliant Client software to read any
COSEM open communications protocols for data
manufacturer meter.
retrieval, updation and reconfiguration of metering
devices has enabled diverse operators to access safely Compliance Testing as per is 15959: 2011 Indian
and quickly data from metering equipment provided by Companion Specification
diverse manufacturers.
The ICS standard is intended for use as companion to
Among the many open protocols like MODBUS, ANSI, IEC 62056 series of standards on “Electricity Metering –
DLMS, the DLMS/COSEM (IEC 62056) was chosen by Data Exchange for Meter Reading, Tariff and Load
India.MODBUS was more towards process Control”, adopted from various parts of IEC 62056. The
instrumentation and ANSI the meter protocol used in metering device is evaluated in order to gain confidence
North America. about implementation of declared features of ICS and
generic standards IEC 62056.
The IEC 62056 is an open protocol exclusively evolved
for Metering purpose. It operates at meter level. A wide The compliance testing evaluation is carried out to verify
range of data types can be read either selectively or in whether the DLMS protocol are implemented correctly
groups. The parameters are identified through unique in the metering device. The test setup is as shown in
codes. The protocol can work with many common Fig. 1. Meters claiming compliance to this Companion
communication medium. The protocol implementation Specification will be required to:
can be verified for conformance with the dedicated test
• Conform to DLMS/COSEM (IEC 62056) protocol
tool.
requirements as certified by the Conformance Test
India has been aligning with IEC for standardization. In Tool (CTT)
the present effort to bring in uniform protocol and based
• Parameter verification as a part of this:
on the relative merits and demerits, IEC 62056 protocol
has become the natural choice for metering purposes in • All mandatory parameters applicable to the category
India. of the meter under test are implemented.
The Indian Companion Specification (ICS) was • All data types where specified are conforming to ICS.
formulated and released by Bureau of Indian Standards • All Application Associations are implemented as
(BIS) as IS 15959 : 2011 “Data exchange for electricity specified in ICS with all specified services supported.
meter reading, tariff and load control – Companion
specification”. This standard supplement the IEC 62056 • Association object lists conform to ICS with access
DRAFT
series of standards. This companion specification spelt rights and OBIS codes as specified here and
out the Indian specific requirements for designing open • Event related DLMS objects are implemented with
energy meters based on DLMS/COSEM. With this Event identifiers as specified in the Event reference
standardization a homogeneous environment would tables in ICS.
prevail at metering end for data collection.
The Companion Specification refers to latest updates of
Interface classes and OBIS codes available in 12th
edition (2014) of the Blue Book of DLMS UA. This also
refers to updates of procedures and services available
in 8th edition (2014) of the DLMS UA Green Book. These
revised Technical Reports of DLMS UA, considered as
pre-standards for several parts of IEC 62056, will be
adopted by IEC in due course and subsequently by BIS.
Need for Protocol Testing
Testing of energy meters for communication protocol
unlike any other equipment is very much essential to
make sure that the meter is complying with the said
protocol standards. This is to ensure interoperability and
easy acquisition of data from the meters using any third
party client tool which makes the device operate vendor
248
IT & ITES Trade Theory for Exercise 2.13.249
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
DRAFT
Wired networks use Ethernet over UTP cable and tend • Easy to setup from an end user perspective.
to be faster than wireless networks, which is an important
consideration if you are a gamer. The simple wired home • Allows easy access to smart phones, Tablets and
network diagram below shows a minimum setup with a mobile devices.
switch and broadband router. • No cables to run.
Wired Network Advantages Wireless Network Dis-Advantages
• Fast typically 100 Mbps to 10 Gbps • Not as Secure as wired networks without proper
• Secure and reliable. configuration. and easy to setup insecurely.
• Doesn’t work with devices that don’t have an Ethernet • Not as reliable as wired networks.
port e.g. tablets and smart phones. Main Uses
• Not so easy and fast to setup as it requires running • Connecting peripheral devices like computers, smart
cables. However Homeplug or powerline adapters phone, tablets etc.
can be used instead.
• Most home networks will use a mixture of wired and
• Not so easy for visitors and mobile devices (laptops) wireless.
to connect to.
249
IT & ITES Trade Theory for Exercise 2.13.250
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
DRAFT
between applications running on IBM compatible
& DDE" version.
computers connected via LAN or modem and DDE-
• Server version (ordering number DR 380 11), aware applications running on non-PC based platforms
supporting OPC and DDE protocols; this version under operating environments such as VMS and UNIX.
hereafter is referred to as the "OPC & DDE" version;
SuiteLink uses a TCP/IP based protocol and is designed
The separate installation package is supplied for each by Wonderware specifically to meet industrial needs such
version of the Server. In all cases the name of Server as data integrity, high-throughput, and easier diagnostics.
executable file is MODBUS.EXE. All further information This protocol standard is only supported on Microsoft
in this manual is same for all versions of the Server, with Windows NT 4.0 or higher. SuiteLink is not a replacement
the exception of few points where communication for DDE, FastDDE, or NetDDE. The protocol used
protocol specific features are explained. between a client and a server depends on your network
Communication Protocols connections and configurations. SuiteLink was designed
to be the industrial data network distribution standard
Dynamic Data Exchange (DDE) is a communication and provides the following features:
protocol developed by Microsoft to allow applications in
the Windows environment to send/receive data and Value Time Quality (VTQ) places a time stamp and quality
instructions to/from each other. It implements a client- indicator on all data values delivered to VTQ-aware
server relationship between two concurrently running clients. · Extensive diagnostics of the data throughput,
applications. The server application provides the data server loading, computer resource consumption, and
and accepts requests from any other application network transport are made accessible through the
interested in its data. Requesting applications are called Microsoft Windows NT operating system Performance
clients. Some applications such as Wonderware InTouch Monitor. This feature is critical for the scheme and
and Microsoft Excel can simultaneously be both a client maintenance of distributed industrial networks. ·
and a server. Consistent high data volumes can be maintained
between applications regardless if the applications are
FastDDE provides a means of packing many proprietary on a single node or distributed over a large node count.
250
The network transport protocol is TCP/IP using The FastDDE (Version 2) and DDE support for MODBUS
Microsoft’s standard WinSock interface. Server "OPC & DDE" version is implemented by
Wonderware I/O Server Toolkit ver. 5.0 (008).
OPC (OLE for Process Control) is an open interface
standard to provide data from a data source and Accessing Remote Items via the Server
communicate the data to any client application in a
The communication protocol addresses an element of
common standard way. The OPC is based on Microsoft
data in a conversation that uses a three-part naming
OLE, COM and DCOM technologies and enables simple
convention that includes the application name, topic
and standardized data interchange between the industrial
name and item name. The following briefly describes
or office sector and the production sector. From general
each portion of this naming convention:
point of view many aspects of OPC are similar to DDE,
but main difference is in the implementation by using Application name
Microsoft's COM (Component Object Model) technology. The name of the Windows program (server) that will be
It enables fast exchange with process automation data accessing the data element. In the case of data coming
and OPC open interface allows access to data from OPC from or going to a MODBUS node via this Server, the
Server in same standard way from OPC client application portion of the address is MODBUS.
applications supplied by different developers.
Topic name
For more information on the basics of OPC, please refer
to the OPC Specification. The OPC Data Access Custom Meaningful name of communication entity, that is referred
Interface Specification is maintained by OPC Foundation, also as “Logical device”. Commonly the name considers
the current specification is 2.05a dated June 2002 (3.00 entire MODBUS node but in more intricate applications
dated March 2003). separate data and control item groups on the same node
can be accessed by different topics. For example,
The OPC support for MODBUS MASTER/SLAVE Server NODE5 is an ordinary topic name for the fifth node on
“OPC & DDE” version is implemented based on the MODBUS bus.
FactorySoft OPC Server Development Toolkit and it
conforms to OPC Data Access Custom Interface Note: You can define multiple topic names for
Specification 2.04. The MODBUS MASTER/SLAVE the same device (node) to poll different items
Server “OPC & DDE” version is tested for compliance at different rates.
and is compatible with OPC Foundation OPC Data Item name
Access Compliance Test Tool.
A specific data element within the specified topic. For
The Suite Link, FastDDE (Version 3) and DDE support example, when using this Server, items can be individual
for MODBUS MASTER/SLAVE Communication Server operands (registers, binary inputs, binary outputs) in the
is implemented by Wonderware I/O Server Toolkit ver. MODBUS node. The term "point" is used interchangeably
7,2,1,6. with the term "item" in this User Manual.
DRAFT
251
IT & ITES Trade Theory for Exercise 2.13.251
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
Communicate and configure Modbus devices through GSM and GPRS network
Objective:
• to communicate and configure Modbus through GSM and GPRS network.
DRAFT
resources access channel,
• SNMP.
• data access channel - by using this channel you can
Each protocol describes one of the basic functionalities read the parameter values located in the pre-defined
available on the NPE/iMod device. The following example data source channel,
describes the simplest functionality - access to hardware
resources. By using and analyzing the other examples, • communication channel
you can easily configure the NPE/iMod industrial
computer as an alarm module (notifier), data logger or a
fully functional PLC.
252
IT & ITES Trade Theory for Exercise 2.13.252
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
What is a serial to Ethernet converter and how does So what is a serial Ethernet converter used for?
it work? Most commonly it is used for connecting a serial RS232,
A serial to Ethernet converter is a small electronic device RS485 or RS422 device such as a serial printer, barcode
which can convert Ethernet IP/TCP packets to either scanner, scale, GPS, sensor or any other consumer or
RS232, RS485 or RS422 serial data signals and vice industrial device with a serial interface, to a computer
versa. It is also sometimes called a serial device server over a standard LAN network. The advantage of this is
and it comes in several different shapes and sizes; here obvious; you will be able to control, monitor and
are a few examples of what it can look like: communicate with your serial device remotely from a
central computer. No need to walk all the way down to
the other end of the factory to check your serial device.
DRAFT
How does a serial Ethernet converter work?
As you can see from above images a serial Ethernet
converter can have one serial port or it can have multiple
serial ports, up to 25 ports or more. The standard panel
mount serial Ethernet converter is most common but it
is also available with DIN mounts so it can easily be
installed on a standard DIN rail. It is also available as a
253
IT & ITES Trade Theory for Exercise 2.13.253
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
DRAFT
and needed to be bridged via WiFi. For the sake of the
project is far beyond being a simple serial bridge as it
test, the device here would be a USB-TTL cable (USB-
also manages MQTT client pub/sub and REST HTTP
UART converter) and the data will be sent and received
requests in order to connect the MCU to the internet.
from a console (PUTTY for instance).
Moreover, it can be used to flash the attached MCU.
Esp-link has a very handy web interface stored inside Image Courtesy of ElecFreaks
the ESP.
Now, let’s see some serial data fly over the air!
To make the test, we will use ESP8266 development
Finally, I think a considered amount of time is needed to
board, specifically NodeMCU.
explore the other options of this amazing project!
Prepare The Software
Serial Bridge Using ESP8266 (Simpler)
First, we need to download one of the release images of
The previous project could be too complicated to do the
the project from releases page. The compressed file (A
simple job of converting Serial connection to a WiFi
.tgz file is beside the download word in bold) should have
connection.
254
IT & ITES Trade Theory for Exercise 2.13.254
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
DRAFT
255
IT & ITES Trade Theory for Exercise 2.13.255
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
Set up Ethernet IoT Data Acquisition system, connect to cloud and verify
Objective:
• to setup Ethernet IoT Data Acquisition system, connect to cloud and verify.
DRAFT
The diagram below represents the deploym ent
Model B can be used for a variety of scenarios. We will architecture of an IoT gateway.
use an open source software stack to aggregate, store
and visualize sensor data in real-time.
What is an IoT Gateway?
In an industrial IoT scenario, there are many sensors
and actuators that interact with the machinery. Each
machine would typically have multiple sensors tracking
its health and monitoring the key parameters related to
the production. Each sensor and actuator is attached to
a microcontroller that is responsible for acquiring the data
or controlling a switch through a pre-defined instruction
set. The microcontroller — along with the sensors, power Gateways act as an edge device, obscuring the sensor
and a radio — is called a sensor node. It is a self- nodes from the public internet. Though the sensor nodes
contained, deployable unit that captures the data can make outbound connections to the internet and cloud
generated by sensors. The sensor node doesn’t have through the gateway, they cannot be accessed directly.
enough processing power, memory, and storage to deal Thus, gateways play the dual role of routers and firewall
with the data locally. It uses a low-energy radio securing the sensor nodes and internal network.
communication network to send the data to a central
location. The communication link between the sensors’ Sensor nodes that are capable of connecting to the
nodes and the central hub is based on ZigBee, Bluetooth Internet still need a gateway for data aggregation and
Low Energy (BLE), or Power over Ethernet (PoE). The transformation. They connect to an appliance running in
hub that acts as an aggregator of multiple raw datasets the cloud called a cloud gateway. The local edge device
generated by the sensor nodes is called an IoT gateway. running on-premises is often referred to as a field
gateway.
An IoT gateway has multiple roles to play. One of the
256
IT & ITES Trade Theory for Exercise 2.13.256 & 2.13.257
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
Set up Wi-Fi IoT Data Acquisition system, connect to cloud and verify
Objective:
• to Set up Wi-Fi IoT Data Acquisition system, connect to cloud and verify.
Internet of Things (IoT) is an emerging domain that This sensor works with the HART communication.
promises ubiquitous connection to the Internet, turning Because of industrial sensor, it gives the output in the
common objects into connected devices. The IoT form of current i.e. in between 4 to 20mA. These data
paradigm is changing the way people interact with things can be displayed on computer by using HART
around them. It paves the way to creating pervasively communication device. From that we can see the
connected infrastructures to support innovative services distance, level and temperature of the device.
and promises better flexibility and efficiency. Such I to V Convertor(4-20mA to 1-5V)
advantages are attractive not only for consumer
The main advantage of a two-wire loop is that it minimizes
applications, but also for the industrial domain. Over the
the number of wires needed to run both power and signal.
last few years, we have been witnessing the IoT paradigm
The use of a current loop to send the signal also has the
making its way into the industry marketplace with
advantages of reduced sensitivity to electrical noise and
purposely designed solutions .This paper represents the
to loading effects. The electrical noise is reduced
DRAFT
implementation & result of Liquid or solid objects level
because the two wires are run as a twisted pair, ensuring
monitoring and data acquisition using industrial level
that each of the two wires receives the same vector of
sensor and has been displayed on dashboard as well as
energy from noise sources, such as electro-magnetic
from remote location using wireless network.
fields due to a changing current in a nearby conductor.
Data acquisition is method of gathering and organizing The circuit compliance to handle a given voltage drop
the information. In this, using analog to digital converter from additional loop devices depends on the transmitter
sampled signals are converted into digital form and these output circuit and on the power supply voltage. The typical
signals can be analysed, displayed and stored in power supply for industrial transmitters is +24 VDC.
computer. It is also process of measuring the physical Where the current loop signal is connected to the main
or electrical terms like voltage, current, pressure, receiving equipment or data acquisition system, a
temperature, sound etc. with the help of computer. In precision load resistor of 250 ohms is normally
this project, by using industrial level sensor which is work connected. This converts the 4 to 20 mA current signal
on radar principle, we calculate the level of liquid or solid into a 1 to 5 volt signal, since it is standard practice to
objects and percentage of reservoir filled and distance configure the analog-to-digital converter of the receiving
of medium from sensor device, these distance can be equipment as a voltage-sensing input.
calculated with the help of electromagnetic waves
Emitted by sensor device, as a result of this we get an
exact level of reservoir filled.
Following are the components used in this project:
Level Sensor
This is basically radar sensor which uses the principle of
reflection, but it is slightly different from normal radar
sensor used in industry. This is the first 80GHz radar
developed according to international safety standard. It
is based on frequency modulation continuous wave
257
IT & ITES Trade Theory for Exercise 2.13.258
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
DRAFT
The Cloud Explorer component from Visual Studio Send cloud-to-device messages
Installer for Visual Studio 2017 only supports monitoring To send a message from your IoT Hub to your device,
device-to-cloud and cloud-to-device messages. To use follow these steps:
Visual Studio 2017, download and install the latest Cloud
• Right-click your device and select Send C2D
Explorer.
Message.
Sign in to access your hub
• Enter the message in input box.
To access your hub, follow these steps:
• In Visual Studio, select View > Cloud Explorer to open
Cloud Explorer.
258
IT & ITES Trade Theory for Exercise 2.13.259
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
Requirement:
• Computer system
• Cloud
• IoT devices
PROCEDURE:
Creating registries and devices
Here we will see how to create, edit, and delete device
registries and devices within them.
A device is a "Thing" in "Internet of Things": a processing
unit that is capable of connecting to the internet (directly
or indirectly) and exchanging data with the cloud. A device
registry is a container of devices with shared properties.
For more details about devices and registries, see
Devices.
If you haven't already, complete the Getting Started steps
before proceeding.
Creating a device registry
To use Cloud IoT Core, you must create at least one
DRAFT
device registry. You can create a registry using Cloud
Console, the API, or gcloud.
259
IT & ITES Trade Theory for Exercise 2.13.260
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
Requirement:
• Cloud
• Computer system
• IoT devices
PROCEDURE:
Once you have a grasp of AWS CloudWatch terms and
the basic flow of the tool, you're ready to create a new
metric. To create a new CloudWatch metric, all you need
to do is "put" data into it. There's no separate command
for creating metrics. To begin working with CloudWatch,
input metrics from the command line and view them using
the AWS Management Console.
The following line uses the AWS unified command line
to create a metric and give it an initial value. AWS used
to have separate command-line tools for each product,
but this was confusing and required admins to repeat Figure 2. Create a topic from the AWS Management
the installation and configuration process. Recently, Console.
however, the company introduced a single unified
Give the new topic a Topic Name and DisplayName. If
command line that supports most products.
you decide to send alarms as text messages, the
DRAFT
aws cloudwatch put-metric-data --metric-name myMetric DisplayName you create will be in each text message.
–value 40 –timestamp 2001-12-14 12:30
Figure 1 shows a script for monitoring a Cassandra
cluster. The first four lines determine the number of
servers in the "UN" (up/normal) state and set up a
timestamp variable. The last line puts the value to
CloudWatch.
Note: The first time you create a metric in AW S
CloudWatch, it can take up to 15 minutes.
260
Name the alarm and describe and define when it should
alert an admin. In this example, we create an alarm that
fires if the metric's value is less than six.
Next, select your topic in the Send notification to box and
press Create alarm.
To do this using the command line, enter the following
command:
aws cloudwatch put-metric-alarm –alarm-name myAlarm
–alarm-description "my new alarm" –metric-name
Figure 4. Create a CloudWatch subscription. myMetric –namespace myNameSpace –statistic Average
–period 300 –threshold 6 –comparison-operator
Once you have a metric, a topic and a subscription, you're
LessThanThreshold –evaluation-periods 1 –alarm-
ready to link them to an alarm using Amazon
actions <that ARN you got when you created the topic>
Management Console and the command line.
Although this command has a lot of parameters, each
From the console, select the CloudWatch service,
part makes sense.
then Alarms and then Create Alarm. Next, select the
metric you created earlier and press Next. This brings Essentially, the command says: Create an alarm with a
up the Create Alarm dialog. name and namespace that fires when the average value
of the metric is less than six for a single 300-second
(five minute) time period, and notify my topic if it does.
DRAFT
Figure 5. Set and create alarms.
261
IT & ITES Trade Theory for Exercise 2.13.261 & 2.13.262
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
Explore user management roles and security. Observer devise diagnostics for
troubleshooting
Objective:
• to explore user management roles and security
• observe devise diagnostics for troubleshooting.
DRAFT
• Select Ok. assigned to the Publisher role. Very few users should
be assigned to Content Manager.
To delete or modify a role definition
• When you are ready to assign user and group
• In Object Explorer, expand a report server node. accounts to specific roles, use the web portal. For
• Expand the Security folder. more information, see Grant User Access to a Report
Server.
• To delete or modify an item-level role definition,
expand the Roles folder, then do one of the following Predefined role definitions
actions: Predefined roles are defined by the tasks that it supports.
• To delete a role definition, right-click the item You can modify these roles or replace them with custom
> Delete. The Delete Catalog Items dialog box is roles.
displayed. Select OK to delete the role. Scope defines the boundaries within which roles are
• To modify a role definition, right-click the item used. Item-level roles provide varying levels of access
> Properties. The General page of the User Role to report server items and operations that affect those
Properties dialog box is displayed. items. Item-level roles are defined on the root node
(Home) and all items throughout the report server folder
• Select the tasks that members of this role can do, hierarchy. System-level roles authorize access at the site
and then select OK. level. Item and system-level roles are mutually exclusive
• To delete or modify a system-level role definition, but are used together to provide comprehensive
expand the System Roles folder. Do one of the permissions to report server content and operations.
following actions: The following table describes the predefined scope of
• To delete a system role definition, right-click the item the roles:
262
TABLE 1
Content Manager Role Item May manage content in the Report Server. This includes folders, reports,
and resources.
Publisher Role Item May publish reports and linked reports to the Report Server.
Browser Role Item May view folders, reports, and subscribe to reports.
Report Builder Role Item May view report definitions.
My Reports Role Item May publish reports and linked reports; manage folders, reports, and
resources in a users My Reports folder.
System Administrator Role System View and modify system role assignments, system role definitions,
system properties, and shared schedules, in addition to create role
definitions, and manage jobs in Management Studio.
System User Role System View system properties, shared schedules, and allow use of Report
Builder or other clients that execute report definitions.
Content manager role For example, suppose you have a group of users who
need to manage their content, but shouldn't have the full
The Content Manager role is a predefined role that
set of permissions associated with Content Manager. You
includes tasks that are useful for a user who manages
could create a new role definition called Department
reports and Web content, but doesn't necessarily author
Content Manager. It could include all of the tasks in
reports or manage a Web server or SQL Server instance.
Content Manager, except Set security policies for items.
A content manager deploys reports, manages report
models and data source connections, and makes Similarly, if you are a system or network administrator, it
decisions about how reports are used. All item-level tasks is probably easier for you to manage Active Directory
are selected by default for the Content Manager role group accounts than role assignments in the web portal.
definition. You can reduce the overhead of managing role
assignments by creating a single role assignment for a
The Content Manager role is often used with the System
group account. Then you can modify the group
Administrator role. Together, the two role definitions
membership when users no longer require access to
provide a complete set of tasks for users who require
reports.
full access to all items on a report server. Although
DRAFT
the Content Manager role provides full access to reports, If you determine that modifying or deleting a role
report models, folders, and other items within the folder assignment is the best approach, remember to check
hierarchy, it doesn't provide access to site-level items or for both system role and item role assignments. Each
operations. Tasks such as creating and managing shared type of role assignment is configured through different
schedules, setting server properties, and managing role pages in the web portal.
definitions are system-level tasks that are included in
To modify or delete a system role assignment
the System Administrator role. For this reason, we
recommend that you create a second role assignment • Access the web portal of a report server (SSRS Native
at the site level that provides access to shared schedules. Mode).
A role assignment maps a group or user account to a • Select Site Settings > Security. All system-level role
predefined role that defines the tasks that can be done. assignments currently defined for the server or scale-
It determines the types of tasks that a user does to a out deployment are listed by account name.
folder, report, model, or other content type. To create, • Find the role assignment that you want to modify or
modify, or delete role assignments, you use the SSRS delete.
web portal. After you create a role assignment for a
particular user or group, you can modify it later by • To add or remove the role for a particular user or
selecting a different role. If you want to revoke group, select Edit.
permissions to a report server, you can delete a role • To delete a role assignment, select the check box
assignment from the report server. next to the user or group name, then select Delete.
Depending on your objective, alternative approaches To modify or delete an item role assignment
might be m ore appropriate. Examples include
customizing or creating a new role definition, or modifying • Access the web portal and locate the item for which
the membership of a group account in Active Directory. you want to edit or delete a role assignment.
263
• Hover over the item, and select the drop-down arrow. • To add or remove the role for a particular user or
group, select Edit.
• In the drop-down menu, select Security.
• To delete a role assignment, select the check box
• Find the role assignment that you want to modify or
next to the user or group name, then select Delete.
delete.
DRAFT
264
IT & ITES Trade Theory for Exercise 2.13.263
Smart City - Establish and troubleshoot IoT connectivity of devices to cloud
having multiple communication medium, protocols and networking topology
and device management and monitoring
SCADA stands for Supervisory Control and Data Before discussing about the architecture of SCADA and
Acquisition; it is an industrial computer-based control different types of SCADA systems, primarily we must
system employed to gather and analyze the real-time know a few SCADA basics. Consider the block diagram
DRAFT
data to keep track, monitor and control industrial of SCADA system shown in the figure which consists of
equipments in different types of industries. Consider the different blocks, namely Human-machine Interface
application of SCADA in power systems for operation (HMI), Supervisory system, Remote terminal units, PLCs,
and control. Comm unication infrastructure and SCADA
Programming.
SCADA in power system can be defined as the power
distribution application which is typically based on the
software package. The electrical distribution system
consists of several substations; these substations will
have multiple numbers of controllers, sensors and
operator-interface points.
Basics of SCADA
1. Human-machine Interface (HMI)
It is an input-output device that presents the process data
to be controlled by a human operator. It is used by linking
to the SCADA system’s software programs and
265
databases for providing the management information,
including the scheduled maintenance procedures,
detailed schematics, logistic information, trending and
diagnostic data for a specific sensor or machine. HMI
systems facilitate the operating personnel to see the
information graphically.
DRAFT
SCADA systems and, in case of larger SCADA systems, programming most commercial SCADA systems.
supervisory system comprises distributed software SCADA programming can be done using derived
applications, disaster recovery sites and multiple servers. programming language or C language.
These multiple servers are configured in a hot-standby
formation or dual-redundant, which continuously controls Architecture of SCADA
and monitors in case of a server failure for increasing Generally the SCADA system includes the following
the integrity of the system. components: local processors, operating equipment,
3. Remote Terminal Units PLCs, instruments, remote terminal unit, intelligent
electronic device, master terminal unit or host computers
Physical objects in the SCADA systems are interfaced and a PC with human machine interface.
with the microprocessor controlled electronic devices
called as Remote Terminal Units (RTUs). These units
are used to transmit telemetry data to the supervisory
system and receive the messages from the master
system for controlling the connected objects. Hence,
these are also called as Remote Telemetry Units.
4. Programmable Logic Controllers
In SCADA systems, PLCs are connected to the sensors
for collecting the sensor output signals in order to convert
the sensor signals into digital data. PLCs are used instead
of RTUs because of the advantages of PLCs like
flexibility, configuration, versatile and
affordability compared to RTUs.
Architecture of SCADA
266
The block diagram of SCADA system shown in the figure
represents the basic SCADA architecture. The SCADA
(supervisory control and data acquisition) systems are
different from distributed control systems that are
commonly found in plant sites. When distributed control
systems cover the plant site, SCADA system cover much
larger geographic areas.
Above figure depicts an integrated SCADA architecture
which supports TCP/IP, UDP and other IP based
communication protocols as well as industrial protocols
like Modbus TCP, Modbus over TCP or Modbus over
UDP. These all work over cellular, private radio or satellite
networks. Monolithic or Early SCADA Systems
In complex SCADA architectures, there are a variety of All the remote terminal unit sites would connect to a back-
wired and wireless media & protocols involved in getting up mainframe system for achieving the first generation
data back to the monitoring site. T his allows SCADA system redundancy, which was used in case of
implementation of powerful IP based SCADA networks failure of the primary mainframe system. The functions
over landline, mixed cellular and satellite systems. of the monolithic SCADA systems in the early first
SCADA communications can utilize a diverse range of generation were limited to monitoring sensors in the
wired and wireless media. system and flagging any operations in case of surpassing
programmed alarm levels.
The choice of the existing communication depends on
the characterization of a number of factors. The factors 2. Distributed SCADA Systems
are remoteness, available communications at the remote
In the second generation, the sharing of control functions
sites, existing communications infrastructure, polling
is distributed across the multiple systems connected to
frequency and data rates. These factors impact the final
each other using Local Area Network (LAN). Hence,
decision for SCADA architecture. Therefore, a review of
these were termed as distributed SCADA systems. These
SCADA systems evolution allows us to better understand
individual stations were used to share real-time
many security concerns.
information and command processing for performing
Four types of SCADA systems control tasks to trip the alarm levels of possible problems.
There are different types of SCADA systems that can
be considered as SCADA architectures of four different
generations:
DRAFT
• First Generation: Monolithic or Early SCADA systems,
• Second Generation: Distributed SCADA systems,
• Third Generation: Networked SCADA systems and
• Fourth Generation: Internet of things technology,
SCADA systems Distributed SCADA Systems
1. Monolithic or Early SCADA Systems The cost and size of the station were reduced compared
Minicomputers are used earlier for computing the SCADA to the first generation system, as each system of the
systems. In earlier times, during the time of first second generation was responsible for performing a
generation, monolithic SCADA systems were developed particular task with reduced size and cost. But even in
wherein the common network services were not the second generation systems also the network
available. Hence, these are independent systems without protocols were not standardized. The security of the
having any connectivity to other systems. SCADA installation was determined by a very few people
beyond the developers, as the protocols were proprietary.
But generally the security of the SCADA installation was
ignored.
3. Networked SCADA Systems
267
The current SCADA systems are generally networked
and communicate using Wide Area Network (WAN)
Systems over data lines or phone. These systems use
Ethernet or Fiber Optic Connections for transmitting data
between the nodes frequently. These third generation
SCADA systems use Programmable Logic Controllers
(PLC) for monitoring and adjusting the routine flagging
operators only in case of major decisions requirement.
DRAFT
268
IT & ITES Trade Theory for Exercise 2.14.264
Smart City - Demonstarte and deploy responsive Web Application using APIs
and generate reports using templates
Requirements:
• Computer System
• Web API
• Web application
• Mobile Application
PROCEDURE:
we understand what is Web API, let's see what is an API
(Application Programing Interface).
As per W ikipedia's Definition of API: In computer Web API
programming, an application programming interface
(API) is a set of subroutine definitions, protocols, and ASP.NET Web API Characteristics
tools for building software and applications. • ASP.NET Web API is an ideal platform for building
To put it in simple terms, API is some kind of interface RESTful services.
which has a set of functions that allow programmers to • ASP.NET Web API is built on top of ASP.NET and
access specific features or data of an application, supports ASP.NET request/response pipeline
operating system or other services.
• ASP.NET Web API maps HTTP verbs to method
Web API as the name suggests, is an API over the web names.
which can be accessed using HTTP protocol. It is a
concept and not a technology. We can build Web API • ASP.NET Web API supports different formats of
using different technologies such as Java, .NET etc. For response data. Built-in support for JSON, XML, BSON
DRAFT
example, Twitter's REST APIs provide programmatic format.
access to read and write data using which we can • ASP.NET Web API can be hosted in IIS, Self-hosted
integrate twitter's capabilities into our own application. or other web server that supports .NET 4.0+.
ASP.NET Web API • ASP.NET W eb API framework includes new
The ASP.NET Web API is an extensible framework for HttpClient to communicate with Web API server.
building HTTP based services that can be accessed in HttpClient can be used in ASP.MVC server side,
different applications on different platforms such as web, Windows Form application, Console application or
windows, mobile etc. It works more or less the same other apps.
way as ASP.NET MVC web application except that it
sends data as a response instead of html view. It is like
a webservice or WCF service but the exception is that it
only supports HTTP protocol.
269
ASP.NET Web API Versions
Web API Version Supported .NET Framework Coincides with Supported in
Web API 1.0 .NET Framework 4.0 ASP.NET MVC 4 VS 2010
Web API 2 - Current .NET Framework 4.5 ASP.NET MVC 5 VS 2012, 2013
DRAFT
project using Visual Studio in the next section.
270
IT & ITES Trade Theory for Exercise 2.14.265
Smart City - Demonstarte and deploy responsive Web Application using APIs
and generate reports using templates
DRAFT
A few weeks after the first production release of Angular For following up this new way of developing client
2 being released at the end of September 2016, I programs, it is better to have an ASP.NET Web API
happened to start a major Web application project project. You may use an existing project, or create a
utilizing Angular2, so I have been using pretty much the demo one.
271
IT & ITES Trade Theory for Exercise 2.14.266
Smart City - Demonstarte and deploy responsive Web Application using APIs
and generate reports using templates
Display and Configure graphs, charts and other ready to use controls and
widgets
Objective:
• to display and configure graphs, charts and other ready to use controls and widgets.
DRAFT
To view the content available for your platform, Each team can add and configure multiple dashboards to
make sure that you select the correct version of this share information, view status, progress, and trends, and
article from the version selector which is located above access quick links and other functions. Easily add and
the table of contents. Feature support differs depending rearrange widgets on the dashboard to show recent
on whether you are working from Azure DevOps Services changes made to view build status, bug trends, and more.
or an on-premises version of Azure DevOps Server,
Sequence for adding and customizing a dashboard
renamed from Team Foundation Server (TFS).
Click a box below to open the corresponding article.
To learn which on-premises version you are using,
see What platform/version am I using? Charts: Work tracking status and trends
Key concepts With flat-list queries, you can create various charts to
monitor status, progress, and trends. To get started, you
• Dashboards are customizable interactive signboards
can open a shared query and create a chart based on
that provide real-time information. Dashboards are
your tracking interests. Chart types include status—pie,
associated with a team or a project and display
bar, column, stacked bar, and pivot—and trend—stacked
configurable charts and widgets.
area, line, and area—charts.
272
IT & ITES Trade Theory for Exercise 2.14.267
Smart City - Demonstarte and deploy responsive Web Application using APIs
and generate reports using templates
Generate reports using readily available API, templates and to export it to excel,
word pdf and other required formats
Objective:
• to generate reports using readily available API, templates and to export it to excel, word pdf and other
required formats.
DRAFT
The export option involves simple point-and-click tasks, monthly, or custom). You can configure the generation
schedule for multiple reports from a single screen and
have the reports automatically delivered to specific email
addresses.
273
IT & ITES Trade Theory for Exercise 2.15.268
Smart City - Identify and test smart Lightening system and its components
Requirement: Series/parallel circuit- will cover this more later but you
measure voltage in parallel and current in series with
• 1 light dependent resistor
most multimeters.
• 5 kilo ohm resistor
A lot of stuff in parentheses you can ignore.
• Arduino
The crappiest electrical multimeter you can buy
• 2x16 LCD shield
Why would I talk about the lowest price “junk” meter?
• Breadboard Because a lot of people are on a budget, they're often
given away for free so people may have them laying
• Digital Multimeter (DMM)
around and I want to ensure that people understand the
• Commercial lux meter (for characterizing your LDR) safety risks involved. It's the same way I would
PROCEDURE: recommend generic UFO lights for Space Buckets or
junk Epistar/Epileds LEDs but never for professional use
A multimeter by definition is a meter that can measure (Epistar LED dies are not bad per se, it's the Chinese
multiple parameters. We will be discussing how to choose manufactures making the LED and using the bottom of
an electrical multimeter, the different types and how to the barrel in terms of quality). They're cheap and the
use it safely. I did go through a 5 year union electrical hobbyist is going to use them.
apprenticeship and was an active union electrician for
10 years (IBEW local #46, Seattle) before some nerve Here is an Amazon link (be sure to buy through the
damage caught up to me. I also do a lot of electronics spacebuckets.com website if you can). They have
work so feel well qualified to make this guide. different branding just like cheap UFO lights have
different branding.
Please keep in mind that I have a wide audience outside
of r/spacebuckets to include botany students. Rule#1- don't use these $6 multimeters with line voltage.
DRAFT
Period.
DC= direct current like from a battery or the secondary
side of an LED power supply (the wires that go to the Reason#1- the probes are so cheap that they will easily
LED. The highest I've worked with professionally is 700 snap on you. They are two piece pressure fitted so easily
volts DC when spending 3 months rebuilding the Seattle come apart. This can really suck if you unintentionally
Monorail trains in 1998. just grab the exposed energized connection to get it loose
while perhaps standing on a wet concrete floor. Hopefully
AC= alternating current like you get from you wall you have a GFCI. The proper way is to shut the power
receptacle. All line voltage you will encounter will be AC off at the circuit breaker and then pull the probe out. I
voltage to include the line side of an LED power supply. only say this because despite my warnings some people
480 volts AC is typically the highest the voltage an indoor are going to do what's the cheapest. Plug a lamp or
wireman electrician will work with in the US but there are something in the other sockets to make sure the power
exceptions like doing some high voltage splicing. is actually off.
Linemen do all the high voltage stuff you see on the
streets. Reason#2- they are not fused and have a very thin set
of strands in their leads so they might just melt on you
Line voltage/power= what you get from your receptacles/ for current measurements even though this meter says
plug ins. It's either 120 or 220/240 volts depending on it''s good for 10 amps. More on this below but with most
where you live. What makes it dangerous is it's low meters the max current is only meant to be used
impedance which means a lot of current can flow. Voltage intermittently unless designed otherwise.
hurts, current kills. 20-50mA (milliamps) can be lethal if
you take a direct shot through the heart. With low voltage Reason#3- is your life worth $6? That meter says it's
theses these current levels will never be hit in most rated for 1000 volts DC or 750 volts AC and it has a “CE”
situations through your body. That's why I push people marking. People might be fooled in to thinking that these
to use lower voltage power supplies. meters are actually safe at line voltages. In 120 volt AC
countries the peak voltage is about 170 volts. In 240 volt
Ohm's Law- we will cover this later but is important to countries the peak voltage is about 340 volts. I would
know. not want to be holding on to a $6 meter at these voltages.
274
(BTW, in US/Canada the standard residential line voltage marked which is the same as UL listed that is the gold
is 120 volts +/- 10% per code but typically 115-120 volts. standard in electrical safety and you can just plug a power
This is the RMS voltage or the “effective” voltage. 120 strip in to it. I would not max these out in terms of how
volts DC would heat up a resistor as much as 120 volts much continuous current you put through the device.
AC RMS. RMS means “root mean square”. Higher quality Pinching male socket plugs together can sometimes help
meters will state that they are “true RMS” meters which to create a better connection from a cord to the meter.
means they can accurately measure AC voltages other The 4460 linked to did indeed have less than 0.2% error
than sine waves.) as advertised.
These very low cost meters are OK to use when The Kill A Watt meters are ETL marked. UL listed (US)
measuring low voltage (<60V DC or <30V AC) and when is the same as ETL marked (US) or CSA marked
you are measuring something that is fairly low current (Canadian) but not the same as CE marked (European)
limited (<100 volt-amps or less than 100 watts). Why 60 as far as Washington State electrical code goes and I'm
volts DC or 30 volts AC in particular? I have to say that sure for every other state or Canadian province. UL/ETL/
for liability reasons alone and just a professional CSA are independent test laboratories but CE has self
recommendation to someone just getting started in test provisions which opens up abuse for potential fraud
electrical/electronics. with very low end electrical devices. I don't trust CE
markings alone myself. This can be particularly important
How to use this multimeter:
in commercial grow set ups where lab approved electrical
For measuring voltage make sure that the black lead is devices must be installed in many cases. It costs about
in the “COM” receptacle. COM means common. Have $20,000 or so to get something lab tested and marked
the red lead in the receptacle that says “V” typically with which can be harsh with a start-up making a LED grow
also the omega symbol (the omega symbol is for light.
measuring resistance). Set this multimeter's voltage to
A little better quality multimeter
200 volts DC. It should look like this. You should be good
to go but should not expect stellar accuracy. If measuring A high quality meter will have the fuse and tell you right
below 20 volts then set the meter to 20 volts. on the screen that you're about to make a terrible
mistake. The problem in the picture is that I have the
For measuring current set the meter to 10A (10 amps)
probes hooked up to measure current, but the meter set
and move the red lead to the 10ADC (amps DC)
up to measure voltage and hooked up to the line voltage
receptacle. It should look like this.. So, what does “111”
power source in parallel as you should to measure
mean? With this meter it means 1.11 amps. You get what
voltage. This configuration with the meter actually
you pay for.
electrically in series with no other load in series, such as
And here is where the danger can kick in: you just a power supply, creates which is essentially a dead short
measured current which is done in series with a circuit circuit condition. This is bad.
but voltage readings are done in parallel with a circuit.
DRAFT
The lowest priced multimeter I have seen so far that I
It's can be easy to forget what the meter settings are
would consider line voltage safe is this Amprobe AM-
(just being absent minded or whatever) so you can run
510 that has a high rupture capacity (HRC) fuse (see
in to a dangerous situation like this where you want to
conversation below in comments). In no circumstance
then measure the line voltage but you mater is set to
could I recommend a general purpose electrical
current. This is what it looks like.. That meter has no
multimeter for line voltage work without a HRC fuse.
fuse so what's going to happen if you meter is setup for
current but you try to read voltage? Hopefully the power Rule #2: No HRC fuse means no line voltage electrical
mains circuit breaker trips before anything real bad work (there's a theme here). This axiom will help you
happens and you just damage your meter. What if the select a meter most appropriate for you.
15 amp circuit breaker doesn't react fast enough and
There's a lot of $20 range meters that have a pretty good
the main 200 amp breaker has to catch the short circuit
meter count (a higher resolution). Cheap meters have a
that you just created? I have seen this happen once and
2000 count, high resolution meters perhaps a 50,000
no matter how you look at it something bad is going to
count. As a layman these are just simple ratios in terms
happen particularly if you are holding that meter in your
of resolution but a 50,000 count $20 meter isn't quite the
hand. As we said in the military, “better you than me”.
same as a $600 50,000 count NIST traceable meter
This type of low cost meter would also work well with (NIST traceable means it's been highly calibrated to a
small solar cells to make relative light measurements. very accurate source and costs extra. I can then calibrate
Set the meter up to measure current, short the small cheap meters to a NIST traceable meter). Really high
solar cell in to the meter (just hook it up), and you'll have impedance meters can give different readings than lower
a relative light meter that is cosine correct and linear impedance meters in some cases which is something to
over 7-10 orders or magnitude. These $2-3 solar outdoor keep in mind. (The Fluke 287 has an input impedance
LED lights will have the solar cell needed. of 100GOhm so it can measure down to 1uV, 10nA and
up to 500MOhm. It works well).
Get me off that line voltage
$50 or so is what you can expect to pay for a good
Just use a Kill A Watt for line voltage work. It's ETL
working meter but I don't have a lot of experience with
275
mid level meters so there would be others in a better They are best used back at the electrical panel and are
position to make a credible recommendation based on an important tool in 3 phase load balancing (3 phase
personal experience as to what meters to get. If in doubt, electrical is used in almost all commercial/industrial set
buy a Fluke meter. edit- /u/PedroDaGr8 has some good ups. Beware of the 3 phase delta high leg if you don't
recommendations below. know what you're going. I've installed them, seen them
elsewhere and you should call in an electrician if you
The clamp on meter
have to work with them).
A clamp on meter means you can put that clamp around
Some meters are DC only
a wire and measure the current. This is easy money to a
commercial service truck electrician- you're called in to You can get cheap DC meters that will read volts and
a job because a breaker keeps tripping. You put the amps at the same time. Thou shall not try to read an AC
clamp over the wire/circuit in question and measure about voltage with them particularly line voltage. You must
9 amps. You know this means a “loose” breaker (the measure the current from the load to ground with these
action of the loose breaker will typically also feel different). types of meters and the voltage from the LEDs preferably.
Install a new one and go on to the next job. A 30-45 You can monitor the temperature of the LEDs if using a
minute job was just billed at the standard 2 hour minimum constant current power supply by watching the voltage
rate (you have to factor in travel time but I could bill 10- drop across the LEDS- lower voltage means hotter LEDs.
11 hours on some days. Service truck work sucks
Scope meters
because you have to deal directly with the public instead
of saying “go talk to the foreman” but you learn a hell of Stay away from cheap scope meters. I have one
a lot. 18 months as an apprentice and journeyman was somewhere but never use it. If you need an oscilloscope
enough). Some buildings and a lot of industrial sites have then just buy one. You pay for speed and however fast
maintenance electricians to deal with small stuff. your scope is it's not fast enough (I use an older version
of the Tektronix TDS 2012). Rigol has a good reputation
You generally only measure one wire at a time and is
as far as lower cost oscilloscopes. Save your money and
handy when probing deeper than a Kill A Watt. Notice
get a faster one because the one you're looking at isn't
how a blue wire is the ground wire (actually looking back
fast enough (that's a bit tongue in cheek).
at the picture you can't see it but it is) in this UFO light
and not green or yellow/green? Keep stuff like that in So this is just the basics on how to use a meter. Ohm's
mind and don't assume. law will be covered in my next article on LED power
supplies but you need to know how to use a meter first.
Clamp on meters measures the magnetic field (not the
electric field- voltage ticks warn you if a wire is energized).
The greater the magnetic field the more current that is
flowing which is the principal behind the clamp on meter.
DRAFT
276
IT & ITES Trade Theory for Exercise 2.15.269
Smart City - Identify and test smart Lightening system and its components
Test different types of lighting system such as outdoor and indoor, street light
etc
Objective:
• to Test different types of lighting system such as outdoor and indoor, street light.
DRAFT
• Efficiency is the amount of light that comes out of a
light bulb compared to the electrical energy that goes
into it. Energy efficient bulbs waste less energy in
producing light than less efficient bulbs. Efficiency is
an output over an input.
• Efficacy is related to the efficiency of the light bulb. It
is also an output over an input. The output is the
lumens of light and the input in power in watts. So,
the expression we use to describe the efficacy of our
light is “Lumens Per Watt” or lumens divided by watts. The incandescent light bulb has had the same design
Keep in mind, the bigger the efficacy, the more for over 100 years since Thomas Edison invented it! It
efficient the bulb. produces light when a thin wire called a tungsten filament
is heated by electricity running through it making it so
• Some bulbs make things they are illuminating look a
hot that it starts to glow brightly. This releases a lot of
different color than they really are. This property is
heat and the bulbs get hot to the touch, meaning this
called Color Rendition. Generally, bulbs with good
bulb is very inefficient. Many countries, including the
color rendition are used. Color rendition can be
United States, are currently passing legislation banning
measured by the Color Rendering Index (CRI), which
the sale of these light bulbs because they are so
is a scale ranging from 0 (very poor color rendition)
inefficient. CRI: 100
to 100 (nearly perfect color rendition). In cases of
extremely poor color rendition, that bulb’s CRI value Compact Fluorescent Light Bulbs (CFL):
can be negative. Incandescent bulbs are defined to
Wattage 9 13
have perfect color rendition.
Lumens 550 810
277
These spiraled light bulbs are far more efficient than the
standard incandescent bulb. Compact Fluorescent Light
bulbs (CFLs) work by running electricity through gas
inside the coils, exciting that gas, and producing light.
There is a coating on the spirals, which makes this light
white. These bulbs do not get nearly as hot as the
incandescent bulbs.
CRI: 50-80
Wattage 6 9.5
Lumens 450 800
DRAFT
278
IT & ITES Trade Theory for Exercise 2.15.270
Smart City - Identify and test smart Lightening system and its components
Requirements:
• Computer system
• Lamp
• LED
• Jumper wires
• Arduino
• PIR Sensor
Procedure:
Automatic Room Lights using Arduino and PIR
Sensor
Automatic Room Lights System using Arduino is a very
In this project, we will see the Automatic Room Lights
useful project as you need not worry about turning on
using Arduino and PIR Sensor, where the lights in the
and off the switches every time you want to turn on the
room will automatically turn ON and OFF by detecting
lights. The main components of the Automatic Room
the presence of a human.
Lights project are Arduino, PIR Sensor and the Relay
Such Automatic Room Lights can be implemented in your Module.
garages, staircases, bathrooms, etc. where we do not
Out of the three components, the PIR Sensor is the one
need continuous light but only when we are present. Also,
in focus as it is the main device that helps in detecting
with the help of an automatic room light control system,
humans and human motion. In fact, the Automatic Room
you need not worry about electricity as the lights get
Lights project can be considered as one major application
automatically off when there is no person.
of the PIR Sensor. A similar concept is being already
DRAFT
So, in this DIY project, we have implemented Automatic implemented in automatic toilet flush valves, hand dryers,
Room Lights using Arduino and PIR Sensor. etc.
279
IT & ITES Trade Theory for Exercise 2.15.271
Smart City - Identify and test smart Lightening system and its components
DRAFT
additional capabilities: • alter atmosphere and mood;
• adjust light source color, including shade of white light; • reduce glare; and/or
and/or
• increase user satisfaction by providing users the ability
• generate data via measuring and/or monitoring. to control their lighting.
Based on an update to LCA’s Education Express EE101:
Introduction to Lighting Control, this article provides an
overview of the basic functionality of today’s lighting
controls, benefits and the basic questions to ask when
identifying an appropriate lighting control strategy.
Lighting Control Effects
Lighting controls provide the following basic functions.
End-users harness these functions to support energy
management and/or visual needs.
280
(LBNL) study, popular lighting control strategies produce
24-38% average lighting energy savings, which reduces
building operating costs.
Because of strong energy savings, the majority of state
commercial building energy codes require a wide range
of controls in new construction. In existing construction,
the controllability of LED lighting results in an ideal pairing
with controls, combining to minimize energy costs.
Basic Function
Lighting controls are input/output devices and systems.
The control system receives information, decides what
to do with it, and then adjusts lighting power accordingly. Color and CCT Control
Here we see a basic lighting circuit (switch leg). Power With LED, it is relatively economical to provide users the
travels along the circuit to energize a group of lights. ability to adjust lighting color and CCT.
This lighting system supplies illumination.
With tunable-white LED products, separately dimming
arrays of warm- and cool-white LEDs allows users to
adjust light source CCT. Other colors may be added to
enhance the available color spectrum and ensure good
color rendering.
Dimming
DRAFT
Another basic output is dimming. If a dimmer-switch is
used, in addition to ON/OFF, it can alter current flowing Image courtesy of USAI Lighting.
through the load during the ON state, which raises or
lowers light output. Here we see a dimmer placed on the
line, with the output being continuous dimming over the
load’s dimming range.
281
IT & ITES Trade Theory for Exercise 2.15.272
Smart City - Identify and test smart Lightening system and its components
Requirements: 1-10 V
Dimmer switch With a 1-10 V dimming technique, a signal is transmitted
between 1 V and 10 V. 10 V is the maximum amount
Switch plate
(100%) and 1 V is the minimum amount (10%).
PROCEDURE:
0-10 V
What are the different methods used for dimming?
Transmits a signal between 0 and 10 V. The output of
Several methods are available to dim lighting. These the lamp is scaled such that a voltage of 10 V provides
dimming methods are categorised into three groups: 100% light output. And, 0 V provides the least light output.
• Dimming of electrical potential (decrease in power): DALI
phase control
DALI stands for Digital Addressable Lighting Interface. It
• Dimming of control signal (analogue): 0-10V, 1-10V is an international standard that defines how a lighting
installation should communicate with control and steering
• Dimming of control signal (digital): DALI
systems.
For the first type, dimming of electrical potential, a classic
Important to know is that DALI is independent of
3 core electrical cable will do. For the other two types of
manufacturers. This means that it is possible to use
dimming, a 5 core electrical cable is required.
different brands of components in the same system.
Phase control
Each system consists of a controller and a maximum of
Phase control is a dimming technique based on the 64 lighting components, such as a ballast. Each of these
electric wire that is often used for halogen and components is given a unique address. The controller
incandescent lamps. It “clips” part of the sine wave of can control these components because the DALI system
the alternating current to dim the light. The following can transmit and receive data.
examples will make this clear.
DALI is dimmable from 0-100%.
DRAFT
Leading edge phase control
Built-in dimmers
When a phase is cut (i.e. limited), the voltage will only
There are two types of built-in dimmers: rotary or push
flow at a certain amount of time after the zero crossing
button.
(i.e. the sine wave crossing the horizontal axis). Only
the latter part of the wave is transmitted. This waiting A rotary knob dimmer can be pressed to turn lights on or
time can be determined using a simple resistor-capacitor off. You turn the knob to select the light intensity.
or digital switches. This dimming technique is suitable
A push button works according to the same on-off
for both inductive and resistive loads (traditional magnetic
principle. However, to change the light intensity, you must
ballast).
hold in the button. Some push button dimmers alternate
Trailing edge phase control in their operation (brightness increases during the first
long press, dimming occurs during the second long
With phase control, the voltage is cut off before the end
press). Other push button dimmers reach a specific
of the sine wave so that only the first part is transmitted.
percentage (brightness increases to an specific intensity
This dimming technique is used for capacitive loads
when N percent is reached and then dims again).
(EVSA).
Phase control
Sometimes, both leading and trailing edge phase control
is possible. This wave combines the aforementioned:
282
IT & ITES Trade Theory for Exercise 2.15.273
Smart City - Identify and test smart Lightening system and its components
Rig up the circuit to interface microcontroller, LDR and light to vary brightness
in accordance with illumination of the light. Upload the code to the
microcontroller and test for proper operation
Objective:
• to Rig up the circuit to interface microcontroller, LDR and Light to vary brightness in accordance with
illumination of the light
• to upload the code to the microcontroller and test for proper operation.
LDR
DRAFT
LDR is Light Dependent Resistor. LDRs are made from
semiconductor materials to enable them to have their
light-sensitive properties. There are many types but one
material is popular and it is cadmium sulfide (CdS). These
LDRs or PHOTO RESISTORS works on the principle of
“Photo Conductivity”. Now what this principle says is,
whenever light falls on the surface of the LDR (in this
case) the conductance of the element increases or in
other words, the resistance of the LDR falls when the
light falls on the surface of the LDR. This property of the
decrease in resistance for the LDR is achieved because
We all want our home appliances to be controlled
it is a property of semiconductor material used on the
automatically based on some conditions and that's
surface.
called Home automation. Today we are going to control
the light based of darkness outside, the light turns ON
automatically when it is dark outside and turns off when
it gets bright. For this, we need a light sensor to detect
the light condition and some circuitry to control the Light
sensor. It’s like Dark and light Detector circuit but this
time we are using Arduino to get more control over light.
In this circuit, we are making a Light Sensor using LDR
with Arduino to control a bulb/CFL as per light condition
of the room or outside area.
283
IT & ITES Trade Theory for Exercise 2.15.274
Smart City - Identify and test smart Lightening system and its components
Requirements: • ESP8266
• MQ135 Gas sensor
• Arduino Nano
• LCD
• Breadboard
• 10K potentiometer
• 1K ohm and 220 ohm resistors • LCD Display
• Buzzer
• Jumpers
PROCEDURE:
Introduction
Air pollution sensors are devices that can detect the
presence of air pollution in the surroundings, as the name
suggests. The detection is in terms of a ppm value of
the pollutants the sensor can detect, and then those ppm
values can be used to monitor the environment, based
on standard safety values. There are different types of
sensors, depending on the usage. The major ones are We are making an IOT based Air Pollution Monitoring
specialized for one or more of the following components: System, in which we will monitor the air quality over a
Ozone, PM, Carbon Monoxide, Sulphur Dioxide and computer terminal, and an alarm will be triggered if the
Nitrous Oxide. Our project is a simple demonstration to
DRAFT
air quality goes beyond a certain level. The thresholds
show that it can be easily done. We have used an MQ135 we have used are very general, so they may vary place
Gas Sensor, which is sensitive to gases like Ammonia, to place. For example, as pointed out during evaluation
Benzene and Carbon Dioxide. of the project, concentration of Carbon Dioxide is high in
Required Components: households and closed places, and this may raise the
overall PPM Value. We connect our sensor as an input
• MQ135 Gas sensor
to the arduino (Arduino Nano), and a buzzer, a LCD
display and an ESP8266 as output. The LCD Display
outputs the sensor data (in tangible language, of course).
The voltage levels are converted into appropriate ppm
values by calibration, as there are inbuilt functions in the
MQ135 Library. The buzzer is used as an alarm and the
ESP8266 Wi-Fi Module gives us the access to the Wi-Fi
network. We have also connected a potentiometer along
with the LCD Module so that the brightness can be varied,
and kept less at night.
• Arduino Nano
284
IT & ITES Trade Theory for Exercise 2.15.275
Smart City - Identify and test smart Lightening system and its components
DRAFT
large.
from a single camera), or call-up (meaning operators
Major Target can access multiple cameras at the same time).
To develop the people at grass root level, from the
inception of this institution to August 2017, they have
successful train and graduated over thirty eight thousand
(38,000) people as beneficiaries of training programmes.
It is also become as open door programme policy that
allow it to work with government, individuals, domestic
and international organization that promote human
development especially in the area of skills acquisition
programmes and awareness campaign for the
development of humanity.
Objective
• Promoting human development through coordination
ideas, toward efficient and effective provision of skills
acquisition programmes to the society for self-
sustenance and development.
• Providing measures in discouraging corruption, child
abuse, human trafficking with particular interest on
disaster prevention, accident and emergency rescue
assistance
• Promoting education, budget monitoring and tracking
and volunteerism to the society.
285
Cable DVR
With an analogue system, coaxial cable is required for Most modern CCTV systems incorporate DVRs (digital
transmitting video footage from the cameras. This is one video recorders) which enable operators to reap some
of the drawbacks of analogue CCTV, as the cable can of the benefits of a network-based surveillance setup.
be expensive and difficult to install, especially for larger DVRs convert the analogue footage to digital, which helps
camera networks, and those were cameras must be to extend storage capacity, makes it much easier to
positioned in difficult locations. search archived footage, and also allows users to stream
video over a network for remote viewing from multiple
locations.
DRAFT
Fixed The image detail of an analogue CCTV camera is usually
conveyed in a form of measurement called TVL (or TV
Fixed CCTV cameras point in a single direction, which
Lines). Think of the video picture as being composed of
makes them perfect for monitoring very specific areas
active horizontal lines. These lines are delivered to a
of interest. For this reason, fixed cameras are quite
monitor or recording device in two off-set fields.
effective not only for capturing footage of suspicious
activity, but also for deterring criminals and vandals from One field contains even-numbered lines while the other
carrying out their acts in the first place. contains odd-numbered lines. The viewer sees a
complete picture because the lines are interlaced. Since
PTZ
the picture has a 3×4 aspect ratio, the amount of detail
PTZ cameras are ideal for wide-area surveillance. They you can measure in 3/4 of the picture’s width determines
give operators the ability to remotely control pan, tilt, and the horizontal TVL resolution. Generally, most standard
zoom functions to follow activity and to zoom in for CCTV cameras offer a TVL resolution of around 380,
detailed monitoring. This is an area where analogue while high-resolution cameras will deliver something
CCTV cameras fall behind their IP camera counterparts. closer to 540 TVL.
W ith IP cameras, the pan/tilt/zoom functions are
controlled manually or automatically and delivered over
a single network cable, while analogue cameras require
additional wiring to perform similar functionality.
286
IT & ITES Trade Theory for Exercise 2.15.276
Smart City - Identify and test smart Lightening system and its components
INTRODUCTION IDEA
Street lighting system is the bulkiest energy outlay for In this energy efficient street light project cycle, first the
number of city. A smart street lighting system can requirement of the lightening system in the streets are
minimize the municipal street lighting cost as much as examined. Then a best technology has been
50% to 70%. An intelligent street light system is a system implemented so that a good energy efficient system can
that calibrates the light output on the basis of utilisation designed. The operation and maintenance is required
and abidance. An accurate street light system intends for a system. The values obtained by the mechanism
the installation of the wireless system and overcome the from the sensor can be measured and evaluated from
definite energy consumption which will also control the the values that are already given. The values obtained
intensity of the street light. The proposed smart street from the sensor during the task performance and then
light system is a hardware application in which fog or these values are compared with the given values and
rain sensor detects the fog and according to it the the errors can be found out. The measured values show
DRAFT
intensity of light can be controlled through controller. We the efficiency of system. The projected intellectual LED
are using methodology for intensity control is Arduino system of street light for the detection of fog includes
software and for power consumption MATLAB software ARDUINO software strategy, LED and colour sensor. The
is used to show the graphs that how much energy is inclusive action can be done by using MATLAB software.
consumed. Street lightening systems are important The data is received by sensor. The graph is shown
facilities for modern city. This system will sort night life between time and intensity. The prototype of intelligent
more suitable, safe and eco- friendly. Currently, the LED street light system is developed. Means switching
integrity of the street lights and fog detection has been set of rules is intended to make the selecting system
studied for the road safety and security. Firstly the fog that usage of resources commencing the battery, but it
sensor is made which can detect the fog during winter correspondingly automatically switches to electricity
season and when the fog is detected the intensity of street network resources while battery capability is under the
light can be varied depending on the fog density. The lesser threshold. The resources mechanism medley can
variation of intensity of street light can be done by using be done by using the analog, the digital values and PWM
potentiometer so that led cannot be fused .It is a fully features of the microcontroller. A large no. of serialized
automated system. Automated process is not very easy pile-up accidents takes place when visibility is low due
task to perform but it is very powerful technique .The to fog. The peril of these accidents can be reduced
main purpose of this project to increase the visibility on significantly with a system holding visibility sensors and
the roads so that the road accidents can be reduced. flexible speed-limit. The present system is not very cost
This project firstly develops the night or day fog detection effective. So it is required to make a fog sensor which is
using colour sensor and LED street light. The street light cost effective at low budget and can install at every street
of a country.
287
IT & ITES Trade Theory for Exercise 2.15.277
Smart City - Identify and test smart Lightening system and its components
Test system architecture of smart lighting and identify Wired DALI, GREEN
BUS2, Wireless, Hybrid etc
Objective:
• to test system architecture of smart lighting.
DRAFT
lamps, lighting fixtures and other types of outdoor voltage, current, and power factor; and receive
luminary lighting fixtures is advisable, as is the use of interruption and lighting control commands.
cleaner methods of generating electric energy. This is
not just a profitable investment but can also improve the Regarding the need for uniform lighting, the control
quality of the lighting. systems have two possibilities: light posts with two lamps
or with only one fully controllable lamp. In the first case,
Two-thirds of the public lighting systems currently in use one of the two lamps can be turned off late at night and
are still based on obsolete and inefficient technologies, during the early morning hours. In the second case, the
with higher energy consumption than needed; therefore, lamp needs to be connected to a regulation system. The
there is great technological potential to renovate public last method has two practical options: dimmable ballasts
lighting and reduce energy consumption. According to or centralized control systems as line voltage regulators.
estimates, around 5% of the energy used in lighting is
consumed by public lighting, which is the most important On the other hand, remote management systems also
component of a city or town’s energy consumption. exist that allow the user to control and monitor each lamp
individually. When using these systems, the operator can
The minimum acceptable or legal requirements for monitor the main parameters of any light from a control
controlling lighting are different for industry, offices, room or a mobile unit. The obtained data can be
streets, and public lighting, but the concept is always the processed, allowing for statistical calculation of the
same: a fixed lighting intensity must be always achieved consumption, state of the lamp, voltage, failures, etc. In
with energy efficiency and the lowest possible cost for this way, the average repair time can be reduced. Another
energy consumption to increase the expected lifespan interesting parameter could be the arc voltage level,
of the lamps. As a result, by using available lamps, which entails the change from corrective maintenance
ballasts and control systems, as well as techniques to to predictive maintenance, meaning economic savings
develop an efficient lighting system, it is possible to in maintenance costs.
produce quality energy in a more efficient and profitable
way.
288
To optimize the control, the over-the-air management network that allows for greater distances, such as 3G/
system needs to support bidirectional communication GPRS, WIFI or WIMAX. Lastly, the upper level contains
between the user and the ballast. This management the central control, which groups several sectors of the
system is implemented using a communication system lighting network.
and a control protocol for the lighting. The communication
Figure 1. Architecture of the system.
system can be wired or wireless. The wired
communication systems that are normally used include The local monitoring of a lighting sector is essential, as
Ethernet-based systems and those based on optical fiber the central control may be very far away or have
or power-line carrier (PLC). As wireless standards, we obstacles exceeding the physical capacities of the
can find, among others, GSM/GPRS, RF, Wi-Fi™, IEEE wireless protocol. On the other hand, the local computer
802.15.4™ and ZigBee™. The latter two are responsible for each lighting sector can work in isolation, since it can
for the increase of wireless sensor networks (WSNs). work as a server database. This characteristic ensures
easy deployment and scalability of the telemanagement
Standard IEEE 802.15.4 is aimed at low-rate wireless
system. New sectors of the lighting network that are
personal area networks (WPANs). Its objective is to
added to the central control can be debugged. Then, a
standardize the two lower layers of the communication
more detailed description of each part will be given.
protocols between open protocols, i.e., the physical layer
and the MAC layer. On the other hand, ZigBee defines Network Topology
the upper layers, the network and the application layers. The 802.15.4 standard is framed within the area of the
For the lighting-control protocol, it is possible to choose wireless personal area networks (WPANs), with low
between open protocols, such as TCP/IP, BACNet™, consumption and cost. As a result, it is increasingly
DMX 512™, LONWorks™, X-10™, 0–10 V and DALI™, gaining relevance in the industrial domain. Standard
and proprietary protocols. 802.15.4 only defines the physical and media access
From the previously mentioned protocols, the system control layers. A network and application layer has been
described in this work uses protocol developed on this standard, as shown by Figure 2.
IEEE 802.15.4 for wireless communications and the DALI
protocol to control the lamps. The
Digital
Addressable Lighting Interface (DALI) is designed to
digitally control electronic ballasts and luminaries
equipped with this technology [11]. The interface and
protocol are defined by standard IEC 60929/EN 60929
Section E.4, and were modified by IEC 62386, which
also includes other applications for DALI besides lighting
DRAFT
and expands the types of lamps to high-intensity
discharge (HID) lamps, halogen lamps, incandescent
bulbs, LEDs, etc.
System Architecture
Figure 1 shows the general structure of the tele-
management lighting system described in this work. It is
a three-level hierarchical model that is widely used in
lighting-control systems based on wireless Figure 2. Layers model.
communication. To complete the system, an information
Standard 802.15.4 defines two types of topologies: star
and failure location application was developed for mobile
and peer-to-peer networks. The peer-to-peer topology
devices. This app can be easily used by maintenance
allows each node of the network to communicate with
technicians.
any other node, provided that the node is within its range.
At the lowest level, directly controlling the luminaire, we The star topology allows the establishment of
can find the wireless nodes, which communicate in a communication among the devices and of a sole central
wireless way using IEEE 802.15.4. At the intermediate node that acts as the network coordinator. The network
level, managing the wireless networks of a lighting sector, coordinator is responsible for starting and finishing the
we can find an industrial computer with 802.15.4 connections, and any communication between two nodes
communication that also acts as the network’s must compulsorily pass through the network coordinator.
coordinator. This computer contains an application that
The network layer must take the topology of the lighting
enables the comfortable and user-friendly management
network into account. On the one hand, each luminaire
of a given sector’s lighting network. This local computer
is controlled by a node with 802.15.4 communication
can also act as a gateway towards central control of the
capacities. On the other hand, the luminaires are often
lighting network. The communication with the central
deployed along long streets, which results in a linear
control is executed through another communication
structure with slight branches. Taking this topology
289
formed by the luminaires into account, a tree topology • Failure detection for lamps or electric failures
created from the peer-to-peer connection possibilities
• The ability to take and send data related to the lamp’s
of standard 802.15.4 has been chosen.
status
In the tree topology, the coordinator is located on the
• Level dimming
first level of the network, with several end devices and a
router. The router forms a new network level consisting • Better energy consumption
of several end devices and a new router, and so on until • Information on the lamp’s voltage, current and power
the desired number of levels required in each case is factor
achieved. The number of leaps allowed by the network
layer must be high. This type of structure does not adapt • The ability to execute other actions, such as turning
well to any usual topology in wireless networks or to any the lights on/off, controlling them, etc.
standard. For example, Zigbee Pro has a limited tree- The physical layer of the DALI protocol uses Differential
type number of network layers, with a maximum depth Manchester encoding, in which the logic values are
of 15. The number of network hops allowable within represented by transitions in the signal, as shown by
ZigBee PRO is increased to 30 from the 10 allowed under Figure 3. Each node is attached to the bus line via its
ZigBee. two bus terminals, which provide differential receiving
A tree topology with a high depth entails a serious routing and transmitting capability.
problem, as almost all nodes need to have this ability. A
novel routing algorithm is proposed for streetlight
systems. Additionally, there are few alternatives in the
event of an intermediate node failure. The allocation of
addresses turns into a complex problem as well. A new Figure 3. Differential Manchester encoding.
address-allocation method that improves ZigBee tree
addressing is proposed, which offers some results in The DALI protocol is based on the master/slave model,
simulations. For these reasons, we decided to create in which one master can control up to 64 slaves. The
our own network layer that could adapt to a tree topology master sends frames (forward messages) to any slave
with a high number of levels: the computer that serves device of the system and receives a response frame
as the origin or destination of all exchanged information (backward message) if the forward frame requested a
on the network. That is, we have implemented the response. As shown by Figure 4, a forward master–slave
communication by using IEEE 802.15.4 Std. and by frame (ballast) consists of 19 bits, distributed as follows:
creating our own (ad-hoc) Network layer (NWK). one starting bit, eight bits for routing, another eight bits
for data and two stop bits. Meanwhile, a backward
Each node has two unique identifiers—the radio module’s response frame consists of 11 bits, a start bit, 8 bits for
MAC address and a node identifier data and two stop bits. At the physical layer, DALI uses
DRAFT
(nodeID)—that allow it to be located by the application, an effective data transfer rate of 1.2 kb/s and a tolerance
similar to a lamp address. In this way, when a radio in the timing bit of 10%.
module is replaced, only the same nodeID needs to be
selected in the node. This nodeID is easily set with a
microswitch. The nodeID has a length of 16 bits and can
select up to 65,536 ballasts, which increases the number Figure 4. Format of the DALI frames.
of ballasts that can be routed by a DALI controller. The
The main disadvantage of the DALI protocol is that it is
user application only needs to know the nodeID. The
not implemented in most microcontrollers. In addition,
network layer maintains some tables with the MAC
the logic levels of the physical layer have incompatible
addresses where the frames need to be sent to get to
voltage values with most microcontroller-based systems.
their destination. These tables are dynamically created
when the network is initialised, when a node is connected, 3.3. Wireless Node
etc.
An important aspect of developing streetlight control
Lighting Control: DALI systems is deciding which components to develop and
which ones to purchase from the market. To make this
Most current digital ballasts implement the DALI protocol.
decision, it is important to study whether these
Additionally, it is also implemented in low-voltage
components exist in the market, their price and the
transformers, movement detectors, wall switches, etc.
economic impact on the project, among other factors. In
The main reason for choosing DALI over other lighting the presented system, we have to pay special attention
control protocols is that it allows for bidirectional to the wireless node (mote), as a mote needs to be
communication (unlike X-10, 0-10 V and DMX). On the installed in each luminaire. As a result, a high number of
other hand, its physical interface is very simple, as it motes are needed. All of them show the following
uses only two wires for the control signals. Thanks to disadvantages in our system:
the use of this protocol, the following advantages are
• They do not have a DALI interface.
achieved:
290
• They are not properly powered. The input voltage is obtain a specific mote to control the ballasts at a low
230 VAC; hence, the voltages for the processing part economic cost. The designed mote will be described in
and for the DALI interface must be generated, as detail in Section 4.
explained below.
The decision to design a specific mote is a usual process
• The nodeID cannot be configured in an easy way by in many works related to wireless sensor networks. In
maintenance technicians if a mote needs to be works such as motes were developed for specific
replaced. applications to minimize total consumption. A wireless
sensor mote was designed for precision horticulture
• No robust connectors are available.
applications. In other works, some motes were designed
We decided to design our own mote, since if we had to search for possibilities not offered by commercial
opted to use commercial mote, we would have needed motes. For example, a mote was designed to support
to design an adaptation board to solve the remote hardware modification. Lastly, regarding wireless
aforementioned disadvantages. The designed mote has nodes to control LED lamps in over-the-air lighting-control
two different parts: the processing and radio module, and systems, motes using the XBee module of the Digi
the rest of interfaces, including the DALI interface and MaxStream radio frequency were designed. The
the power supply block. The reason for this division is to Waspmote module was improved by connecting sensors
try different radio modules, so that both parts can later to it and including control over LED lamps.
be integrated into just one board. In this way, we would
DRAFT
291
IT & ITES Trade Theory for Exercise 2.15.278
Smart City - Identify and test smart Lightening system and its components
Requirements: With the meter set on the ohms function, check for
continuity between the white fixture wire and the metal
• A Philips head screw driver
shell inside the light socket. If there is continuity, the meter
• A flat head screw driver will display “0.000” on its LCD. If the socket is bad, the
LCD will display “O.L.” Check for continuity between the
• A smart light switch that fits your wall switch and wiring
black fixture wire and the brass button in the lamp socket.
setup (more on this later)
The LCD will either display “0.000” or “O.L.” If the socket
• Wire cutters checks out OK but the light still does not work, the brass
• Wire connectors contact of the socket is not making contact with the base
of the bulb and needs to be pried away from the base of
• A flashlight or battery-operated lantern the socket.
• Electrical tape Checking Fluorescent Fixtures
PROCEDURE: When it comes to troubleshooting fluorescent lights, your
The day when light fixtures were either incandescent or senses of sight, hearing and will go a long way to helping
fluorescent is a thing of the past. Today the homeowner you locate the problem. If there is voltage present but
will also encounter LED -- light-emitting diode -- fixtures. the light fails to come on, first check to see if the light
Fortunately, the troubleshooting procedures are basically bulbs are burned black at their ends. If they have
the same for all three types. The good news is that all blackened ends, replace the bulbs and your problem will
you will need is a noncontact voltage tester and a digital most likely be solved. If the light flickers but does not
Multimeter. If you need to buy a digital Multimeter, buy come on, the problem again may just be bad bulbs.
an auto-ranging meter instead of a manual-ranging Usually the flickering will be combined with blackened
meter. ends. A buzzing sound and/or a hot, tarry smell is
indicative of a bad ballast that requires replacement. Bad
The Continuity Test contact between the pins on the light bulbs and the brass
DRAFT
The basic test used when troubleshooting any light fixture strips in their sockets is not a common problem, but it
is the continuity test. A continuity test determines when can happen. With bad sockets, replace them; do not try
an electrical circuit is good or bad, continuous or broken. to fix them.
The first test to be performed, before testing the fixture Troubleshooting LED Lights
itself, is to determine whether or not there is voltage
available at the lighting outlet box. A voltage check can Troubleshooting LED lamps is the same as for
be performed with either the AC voltage function on your incandescent lights unless they are LED rope lights. With
digital Multimeter or with the noncontact voltage tester. rope lights, if there is voltage present and the circuit
The noncontact voltage tester is recommended for the connections are good, the only thing you can do is replace
homeowner because it does not require you to actually them.
touch the probe to live, current-carrying wires; all you Bad Circuit Neutral
have to do is bring it near the light fixture when the light
switch is on. A broken neutral wire somewhere between the lighting
outlet box and the neutral bar in the service panel will
Troubleshooting Incandescent Fixtures also keep the light from operating. The noncontact
Turn off the circuit breaker for that branch circuit at the voltage tester will still indicate the presence of voltage
service panel. Check the circuit again with the voltage even if the neutral is bad. To determine if you have a
tester to make sure that you have turned off the right neutral problem, you will have to use your digital
circuit breaker. Lower the light fixture from the outlet box, multimeter. Set the meter's function switch to AC volts,
and then check to see that there is a good connection turn on the circuit breaker and touch the probes to the
between the fixture wires and the branch circuit wires. circuit wires.
Those connections are made using plastic, screw-on wire
nuts and can slip out of them if installed improperly.
Disconnect the fixture wires if you find the connections
were good. You have to disconnect the wires so you can
check the continuity.
292
IT & ITES Trade Theory for Exercise 2.16.279
Smart City - Identify, select, install and troubleshoot different module/ devices
used in smart street light based on IoT and cloud Technology
Requirement: • Controller
• Lamp Installation Procedures for a Solar Street Lamp
• Lamp pole 1. Installation of the Foundation
• Battery To install the foundation of your solar street light, choose
a level and flat ground, with no inclination. Screw and
• Micro controller
secure the Basis Cage to the ground using the four
PROCEDURE: screws. One side of the Basis Cage should be parallel
to the edge of the road. Secure the Basis Cage with
SunMaster solar street lights are easy to install. You will
concrete, and this will serve as the foundation of your
simply need common hand tools to assemble the light.
street lamp.
For bigger projects, however, we can provide onsite
training and technical assistance. For these multiple Secure the Basis Cage with concrete, and this will serve
installations, hiring technicians with professional as the foundation of your street lamp.
certificates, specialising in street lamp installation is
2. Installation of the Battery and Battery Box
recommended.
Place the battery beside the Basis Cage,underground,
What will you need to install a solar street light?
at about 600 mm. Follow the electrical circuit diagram
Before you start a street light installation, prepare the on how the battery will be connected.
following tools:
3. Setup the Street Lamp
• 20m start-up hoist
A. Lift the lamp pole off the ground for 1 meter, with
• Inner hexagon wrench the use of a supporting bench.
• Monkey wrench B. Install and secure the Solar Bracket at the top of
DRAFT
the lamp pole.
What do you need to prepare before installation?
Place the Solar Panel on the Solar Bracket and
Before the start of any installation, make sure to do the
secure it with bolts. Solar Panels should be
following steps.
handled with care. Follow the electrical circuit
1. Surround the construction area with guard lines. Only diagrams on how the Solar Panels will be
installation specialists and personnel must be allowed connected to the battery, the controller, and the
in the construction area. street light.
2. Read the installation manual and familiarize yourself C. Install the Light Fixture on the lamp pole. Place
with the installation procedures, the circuit diagrams, the Light Fixture on the ground, with the back part
and the safety measures you must take before you facing upward. Press the red buttons on both sides
proceed with the installation. of the Light Fixture. Turn the Light Fixture around,
3. Make sure that you have the complete solar street and screw the plastic black lamp holder. Place the
lights kit. Check that you have the following parts: LED light bulb in the holder. If electronic ballast is
• Solar Panel needed, place it inside the light fixture. Follow the
circuit diagram when you connect the light fixture
• Kickstand (Solar Bracket) to the controller. Connect and secure the light
• Light Fixture fixture to the lamp pole.
• Basis Cage
• Battery and Battery Box
293
E. Use a crane to erect the lamp pole. Ensure that controller. Check that the erected street light is
the lamp pole is upright on the bottom plate. Fix working and behaving as expected.
and secure it with bolts.
Congratulations! You have now successfully erected and
F. Place the controller inside the lamp pole, with the installed Your Solar Street Light. Make sure to follow the
correct wires and leads properly connected to the instructions and safety guidelines to ensure a successful
installation.
DRAFT
294
IT & ITES Trade Theory for Exercise 2.16.280
Smart City - Identify, select, install and troubleshoot different module/ devices
used in smart street light based on IoT and cloud Technology
Execute testing of sensors used in street light like dusk to dawn, temperature
sensor
Objective:
• to execute testing of sensors used in street light like dusk to dawn, temperature sensor.
The street light system is one of the major elements in "Things", in the IoT sense, can refer to a wide variety of
every cities and small towns. There is nothing to explain devices such as heart monitoring implants, biochip
the importance of street light, but the present system is transponders on farm animals, cameras streaming live
having number of drawbacks. Primarily, most of the street feeds of wild animals in coastal waters, automobiles
light systems are manually operated which have to be with built-in sensors, DNA analysis devices for
activated by human being either locally or from a environmental/food/pathogen monitoring, or field
centralized point. At the same time, they do not have operation devices that assist firefighters in search and
any feedback system through which it could be identify rescue operations. Legal scholars suggest regarding
the functioning and nonfunctioning street light unit. "things" as an "inextricable mixture of hardware, software,
data and service".
DRAFT
A system will be highly beneficial if the street light can
be controlled from a centralized location remotely without SMART STREET LIGHT
wire connectivity. The wireless connectivity is again Smart street light refers to public street lighting that
distinctly useful if the street lights are powered by battery adapts to movement by pedestrians, cyclists and cars.
back-up and solar energy. In case of street lights in many Intelligent street lighting also referred to as adaptive street
places conventional street lights are replaced by lighting, dims when no activity is detected, but brightens
Automatic Street light which is based on light intensity when movement is detected. This type of lighting is
sensor. This is a noble way to minimize the wastage of different from traditional, stationary illumination, or
power, manpower as well as increase the life of the light dimmable street lighting that dims at pre-determined
unit (indirectly). But these systems are not having in built times. Smart street light system tries to find solution for
monitoring system i.e. whether the light is actually the faster depletion of energy resources due to the
working or not. It is a very common phenomenon where inefficient usage and wastage of these resources.
we have found that street light is installed but many of Increasing electricity bill is something that can be
the units are not in working condition, it is due to lack of witnessed by these practices. This paper helps to
proper maintenance and ignorance about the faulty decrease the wastage of electricity by controlling the
system. A system with self-monitoring system and remote working of street light system that attributes to a good
controlling can be improved a street light system up to amount of electricity. Street lights can be made intelligent
an extent. by placing cameras or other sensors on them, which
enables them to detect. The other advantage of LED is
that the intensity can be controlled easily.
295
IT & ITES Trade Theory for Exercise 2.16.281
Smart City - Identify, select, install and troubleshoot different module/ devices
used in smart street light based on IoT and cloud Technology
DRAFT
characteristic of PV module depends on the cell
temperature, solar irradiation, and output voltage of the
module. The Fig.2 shows the equivalent circuit of a PV
array with a load.
296
IT & ITES Trade Theory for Exercise 2.16.282
Smart City - Identify, select, install and troubleshoot different module/ devices
used in smart street light based on IoT and cloud Technology
Requirements: Advantages
• LED • The operation cost is not so high.
• LCD • This is a pollution free source of producing Electricity.
• Controller • NO external wires are used. so chances of occurrence
of accidents are minimized.
• Photovoltaic cell
• The parts of of this system are easy to carried. so
• Solar cells
remote access is applicable.
PROCEDURE:
• They require less maintenance.
Introduction
Disadvantages
Solar street lights are effective and efficient light sources
• The starting setup cost is high.
in which power is fed with the help of Photo-voltaic
Panels. They are generally mounted on the lighting • Risk of theft is also higher.
structure. There is a Rechargeable battery, which is
• Rechargeable batteries are required to be changed
charged by photo voltaic panels. Then the charge of that
many times.
battery is used to powers a fluorescent or Led Lamp
during the night. There have sensors, through them solar • Not works in cloudy and rainy days.
panels turn on and turn off automatically by sensing
• Snow and moisture effects its working.
outdoor light with the help of light source. They are
designed to work at night. Uses
They are the used for lightning at nights.
DRAFT
Solar street Lights
297
IT & ITES Trade Theory for Exercise 2.16.283
Smart City - Identify, select, install and troubleshoot different module/ devices
used in smart street light based on IoT and cloud Technology
DRAFT
storing electricity received by the solar panel during held at night time due to several reasons. So Solar LED
daytime, and it provides electricity at night. lights are installed in the stadium or playgrounds that
can provide high power lighting inside the field. For any
• Controller: Controller is used to control when to sport, Playground needs high power lighting, called
switch on and switch off the street lights. It also floodlight which can be achieved by the solar panel at
controls battery from undercharging and low cost and minimal maintenance.
overcharging. It consists of MCU, secondary power
supply and battery charger, etc. 4. Industrial lighting and commercial lighting
• Pole: For every street light, 12 Feet pole is required The Solar LED lighting system has exceptional storage
so that some components like batteries, fixtures, and system which allows 3 days continuous illumination
panels can be mounted. without any recharge. Industrial areas are bigger in size;
therefore, they take a large amount of electricity for
• Interconnecting cables: Battery box, LED light, and outdoor lighting. While installing these solar lights, the
the solar panel are mounted on the top of pole and cost for electric wires will reduce and maintenance cost
they are connected through interconnected cables. A will lower. Have a look at some of the Commercial Solar
PV module is connected with a controller and it is Lighting Services we offer.
connected with battery and LED lamps. Size of the
cable depends on current, how much it is used and 5. Outdoor security lighting
the pole size. Solar powered security lights are illuminated by solar
Top 5 Applications of Street Lights and its Uses energy which is converted into electric energy. As a result,
these are a practical choice for security purpose, as
1. Airport Lighting without electricity they can operate at night because the
Many Airports are equipped with solar lights because sun provides needed energy during the day. These lights
they are easy to install with no conventional electricity automatically turn on when it senses any motion. They
cost. These LED lights are installed at the runway and also operate during the cloudy weather conditions and
298
provide reliable lighting anytime. Outdoor lights are very lights require less system for installation and also provide
successful in rural areas and Intelizon’s Zonstreet has high power lighting when compared to conventional
been satisfyingly deployed it at Rural Maharashtra. lighting. It also offers shelf-life and minimal maintenance.
It provides portability facility and comes with 2 years of
There are many areas such as parking lot, Hospital
warranty. These Solar Street lights are Pollution free
parking, and residential lighting where these solar-
lights. Only the cost of the initial investment is high when
powered street lights are used. These Solar LED street
compared to the conventional lights. And only dust, snow,
and moisture can hinder the energy production. These
lights are not a practical option for every application
because the cost is on a higher side.
DRAFT
299
IT & ITES Trade Theory for Exercise 2.16.284
Smart City - Identify, select, install and troubleshoot different module/ devices
used in smart street light based on IoT and cloud Technology
DRAFT
300
Solar street light with solar powered wifi camera is the
newest developed edition of the solar street light system.
The solar street light with solar powered wifi camera has
the following advantages:
DRAFT
301
IT & ITES Trade Theory for Exercise 2.16.285
Smart City - Identify, select, install and troubleshoot different module/ devices
used in smart street light based on IoT and cloud Technology
Apply smart embedded system that controls the street light based on detection
of sunlight
Objective:
• to apply smart embedded system that controls the street light based on detection of sunlight.
DRAFT
light ward resistor, PIR sensor and IR sensors. Road
Today, road lighting ordinarily utilizes high-force release lights are exchanged on relying upon the power of the
lights, regularly HPS (High Pressure Sodium Sun light on LDR. The controller checks top time amid
lamps).Globally 70% of all power is produced by which there is no movement and turn OFF the lights. At
consuming non-renewable energy sources, a wellspring the point when there is any vehicle or human out and
of air contamination and ozone depleting substances, about, it is identified by the PIR sensor and IR sensors.
and furthermore comprehensively there are around 300 At whatever point people or vehicles are detected by the
million road lights utilizing that electricity. Almost those PIR sensor inside its range it shows the Raspberry pi 3
lights are controlled manually. The taken a toll spent is to switch the comparing the road light. At that point lights
huge to the point that all the sodium vapor lights devour are exchanged on for 2 to 3 minutes and turned off
more power. consequently. Additionally, at whatever point people or
vehicles cut the infra-red sensors, it demonstrates the
The inspiration for this project was obtained from the Raspberry pi 3 to switch the relating road light. At that
shortage of power in an ever increasing power demand point lights are exchanged on for 2 to 3 minutes and
scenario in India. Relevant questions such as, “What turned off automatically. The light will be switches on till
can be done in order to reduce the deficit of power?” “Is the vehicle cuts the following IR sensors.
setting up of more power plants the only solution for the
problem?” “Do DSM and other power management • Sensor block
techniques provide lasting results?” “Or is it sensible and • Control block
feasible to set up an autonomous system that can
manage its own power consumption?” cropped up. • Lighting block
Though there are several power management techniques Sensor block
such as smart grid technology, home automation
Sensor block is a block consisting of a PIR motion sensor.
technology, that are in place to reduce wastage of power,
A PIR-based motion detector is used to sense movement
it was intriguing to find out that there is no such system
of people, animals, or other objects. They are commonly
in place for street lights which are switched on for almost
302
used in burglar alarms and automatically-activated Lighting block
lighting systems. They are commonly called simply "PIR",
Lighting piece comprises of a variety of LEDs for lighting,
or sometimes "PID", for "passive infra red detector".
and a LED driver. A light-transmitting diode (LED) is a
Control block two-lead semiconductor light source. It is a p– n
intersection diode, which discharges light when actuated.
The control block consists of Raspberry pi 3 unit.
At the point when a reasonable voltage is connected to
Raspberry pi 3 interprets the inputs from the
the leads, electrons can recombine with electron
sensor and sends out control signals to the LED driver openings inside the gadget, discharging vitality as
in the Lighting Block. photons. This impact is called electro iridescence, and
the shade of the light (comparing to the vitality of the
photon) is controlled by the vitality band hole of the
semiconductor.
DRAFT
303
IT & ITES Trade Theory for Exercise 2.16.286
Smart City - Identify, select, install and troubleshoot different module/ devices
used in smart street light based on IoT and cloud Technology
Configure and Communicate 3 phase Modbus energy meter with IoT based
smart streetlight controller
Objective:
• to configure and communicate 3 phase Modbus energy meter with IoT based smart streetlight controller.
Requirements:
• LED
• LCD
• Controller
• Street light controller
PROCEDURE:
DRAFT
Energy meters with an integrated Serial RS485 Modbus
interface allow direct reading of all relevant data, such Test Setup
as energy , current and voltage , frequency and form
factor for every phase and active and reactive power for
every phase and for the three phases
step 1- Select the required parameter and register
address of the modbus energy Meter as shown in the
below given image.
304
IT & ITES Trade Theory for Exercise 2.17.287
Smart City - Identify, select, install and troubleshoot different module/ devices
used in SMART Parking
O b s e r v e o v er v o lta g e p r o te c tio n a n d o v e r c u r r e n t p r o te c t io n
Objective:
• to observe over voltage protection and over current protection.
DRAFT
These surges may result in the destruction of delicate lightning rods, grounding wires, catching devices and
electronics and semiconductors. Devices known as conductors, as well as the accompanying ground system.
surge protectors (SPD) or transient voltage surge
305
One effect of a direct lightning strike is increased ground
potential – when the lightning strikes a building or a
lightning rod, high current flows to the ground and the
ground potential rises. This creates a potential difference
between ground and external conductors, leading to
surge behavior.
Electrostatic Induction
Thunderclouds contain negative charges in their lower
sections. These high negative charges can induce high
positive charges within nearby cables, especially power
lines and communication cables.
DRAFT
to provide this path, all of the wiring exiting and entering
the system should be coupled to ground through a Surge
Protection Device (SPD), and all conductive surfaces
should be directly grounded. Examples of lines exiting
and entering the system include the AC mains and
communication lines, such as Ethernet cables, RS485
cabling and telephone lines. Note that SPDs on power
lines provide protection that is different from circuit
breakers; breakers protect equipment from overcurrent
while SPDs protect equipment fromover voltage. SPDs
are usually a combination of Metal Oxide Varistors
During discharge of the thundercloud (lightning), the (MOVs), Gas Discharge Tubes (GDT) and/or Zener
positive charge accumulated in the cable is released, diodes, and current limiting devices that act to shunt
resulting in a surge in the cable in both directions. charge to ground and to divert it from entering the
protected system in the event of high voltage or
currentsurges. Both MOVs and GDTs have a limited
lifetime, and can handle a finite number of surge events.
306
IT & ITES Trade Theory for Exercise 2.17.288
Smart City - Identify, select, install and troubleshoot different module/ devices
used in SMART Parking
Monitor smart streetlight management system having with map view based
dash board and individual system details
Objective:
• to monitor smart streetlight management system having with map view based dash board and individual
system details.
DRAFT
and reading data from sensors using arduino boards it
is easy to access the IoT my home lighting devices
remotely and it can be more helpful to every household
and office purposes.
Printed Circuit Board (PCB) Selection
Schematic Circuit Diagram
I am using Dot Printed Circuit Board (PCB) because it is
inexpensive and to beginners it is easy to design for their PCB, bread board and schematic connection are shown
home lighting device. I will cut a small portion on it marked in the following figure for IOT home lighting device.
with pencil at Right hand side corner shown in Fig 1.
307
IT & ITES Trade Theory for Exercise 2.17.289
Smart City - Identify, select, install and troubleshoot different module/ devices
used in SMART Parking
Requirements: pixel consists of three LEDs. One red, one green and
one blue. Each individual LED in a pixel draws
• LED
approximately 20mA when lit up. So each pixel will draw
• LCD around 60mA if all three LEDs are turned on. Multiply
that by the number of pixels in a single row (64 in my
• Screwdrivers, Philips and flat blade
case) and you get a maximum current per row of 3840
• Wire cutters mA or 3.84 Amps. Multiply that by two because two rows
• Wire strippers are driven at the same time and the maximum current
jumps to 7.68 Amps. Bottom line, if every LED on the
• Soldering Iron & solder, preferably with 'No Clean' display is being told to be on then it will draw in the
flux neighborhood of eight Amps. This calculation does not
• HDMI monitor take into consideration the power requirements of the
Raspberry Pi used. An RPiW needs about 180mA when
• mini HDMI adapter using WiFi, So an 8 Amp @ 5V power supply will suffice.
• keyboard A full sized Raspberry Pi 2 or 3 requires around 2.5Amps.
You would need a 10Amp power supply for a full sized
• micro USB adapter Raspberry Pi. Keep in mind that this represents a worst
• 5V power supply case scenario. For a scrolling sign most of the LEDs are
turned off so you should be able to use a lower rated
• SD Card Imager, supply.
• Putty For the Adafruit Hub75 HAT, all you need to do is solder
• WinSCP a few connectors in place. If you decide to build one of
my boards then you will need to be skilled at hand
PROCEDURE:
DRAFT
soldering surface mount components. Or you can decide
RGB LED matrices come in a variety of pixel sizes, pixel to use the schematic of my board to hand wire a Hub75
densities and interface configurations. Pixel size refers interface board. I highly recommend using someone's
to the number of rows and columns of RGB LEDs. Pixel Hub75 interface board because the RGB matrices are
density refers to how close the RGB LEDs are to each 5V and the RPi is 3.3V. Adafruit's board and my board
other. The pixel density of a display is stated by a 'Pn' use level shifters to convert the RPi's 3.3V signals to 5V
designation. P4 refers to a display with 4mm spacing for the matrix.
between the RGB LEDs. Lower 'P' numbers are higher Configuring the RPi for WiFi, auto boot into the Python
density. The lower the 'P' number, the closer you can script, installing the matrix driver library and installing
view the display. If you are too close then your eye will the Python libraries used can be a daunting task. I have
not blend the pixels properly. For this project you will laid out step by step instructions for doing this that should
need an RGB LED matrix with a Hub75 (the most make it fairly easy to do. This project assumes that you
common) interface. The Hub75 interface defines the are familiar with using Putty and WinSCP or equivalent
connector used, the signals used and the wiring. I used programs and working with the Linux command line.
a 32x64 pixel matrix with 4mm density (P4-64x32-16S).
The matrix has 32 rows with 64 columns of RGB LEDs. Step 1: What You Will Need to Build One:
This type of matrix can be purchased from Adafruit or on • A Raspberry Pi Zero W.
Ebay. The driver library used can handle longer displays
(more columns or fewer columns) and can drive up to • If you are using another Raspberry Pi then you will
three displays. I chose to limit it to one display with a also need;
maximum of 32 rows. • A USB WiFi dongle compatible with the Raspberry
The driver for the RGB LED Matrix drives two rows of Pi.
RGB LEDs at a time. All of the rows are time multiplexed • if using a Raspberry Pi Zero, a micro USB to full size
to yield the display. This means that at any given point in USB adapter.
time, only two rows of LEDs are drawing current. Each
308
• A micro SD card with a capacity of at least 4GB.
• A micro SD to full size SD card adapter or an SD
card reader/writer that can accept a micro SD card.
• A USB cable with a micro USB connector on one end.
This is used only during setup and development.
• A 32x64 RGB LED matrix display with a Hub75
interface.
• any RGB LED matrix that has 16 or 32 rows and a
Hub75 interface.
• The power harness that came with the RGB LED
matrix. The flat cable is not used.
• A 5V, 8 Amp minimum power brick.
• 5V, 10Amp power supply if using a full sized
Raspberry Pi.
• Power jack that mates with your power supply.
• A Hub75 interface board that accepts a Raspberry Pi
40 pin connector.
• Adafruit sells one
• I designed my own for this project. Mine has the
unused GPIO broken out to headers as well as
headers for SPI, Serial and I2C. See BOM for my
board or if you hand wire your own
• Four optional 2.5x11mm standoffs.
• Eight optional 2.5x6mm screws for the standoffs.
• Optional, for obtaining environmental information.
• BME280 sensor array board.
• Two, four pin DuPont shells.
DRAFT
• Eight DuPont female crimps.
• Four lengths of 22-28 awg stranded wire.
• Or you could use four female to female jumper wires
309
board from the PDF of the schematic. I also have some
rev 1.1 boards left over from my order and some rev 1.0
boards. Contact me if you are interested in a blank board.
A 32x64 RGB LED matrix requires at least an 8 Amp
power supply. If you decide to daisy chain in a second or
third matrix to extend the length of the display, you will
need an additional 8 Amps for each 32x64 panel that
you add.
Matrix display panels are specified by the pixel (tri-color
LED) density, number of columns and rows. A P4-64x32-
16S display has a pixel spacing of 4mm. A P5-32x16-8S
display has a pixel spacing of 5mm. Displays with a lower
pixel density (higher P number) require a greater viewing
distance for the human eye to blend the pixels. They are
also usually a little less expensive. The display shown
above is a P4-64x32-16S. The pixel density will also
determine the actual physical dimensions of the display.
The -16S indicates the number of rows that can be
selected, 16S indicates 16 rows (four signals), 8S
indicates 8 rows (three signals). It also indicates that the
refresh is done 16 or 8 times for per panel. A panel has
an upper and a lower half with one row from each half
being refreshed simultaneously. So -16S is a 32 row
panel and -8S is a 16 row panel.
Step 2: Hub75 Interface Board BOM:
DRAFT
RGB LED Matrix displays are available on Ebay or from
Adafruit. Just make sure it uses a Hub75 interface. You
can buy a ready to run Hub75 interface board from
Adafruit. They sell one for the Raspberry Pi and one for
the Teensy. As this is a Raspberry Pi project, buy the
one for the Raspberry Pi. I have included the Eagle files
needed to have one of my custom Hub75 interface
boards manufactured. I use AllPCB.com to have my
boards fabricated. As of this writing, AllPCB.com is
charging $5.00 with free shipping to the USA for ten
boards. The last order that I placed took about ten days
from time of order to delivery to my door. Of course, if
you are truly adventurous, you can hand wire your own
310
74AHC245 will all work. The important thing is that it is
74xxx series, 245 (indicates an octal bus transciever)
and that the wide surface mount package is used (DW
indicates SOIC-20W package). CMOS (HC or AHC) is
preferred over TTL (LS or ALS).
If you do the minimum build and leave out the AS1117-
3.3 regulator then you need to solder a jumper wire to
the two holes of J18. Doing this allows the 3.3V from the
Raspberry Pi to connect with the 3.3V pins of the I2C
headers and the 3.3V header associated with the unused
GPIO. Leave the jumper out if you add the AS1117-3.3
regulator. When the jumper is left out the AS1117-3.3
handles the load for the added peripherals. It prevents
overloading the Raspberry Pi's 3.3V regulator.
For the minimum build you should also place a jumper
from the center pin to either of the outer pins of J11. This
jumper selects 32 row or 16 row operation. Place the
jumper to correspond with the RGB LED matrix that you
are using. If you leave out the jumper then your display
will look very weird. In place of a wire jumper, you could
add a three pin post strip and then use a two pin shorting
plug to select 32 or 16 rows.
Tip: You may find that you can save about a dollar by
using two 2x10 sockets for J9 instead of two 1x20 socket
strips.
Adafruit sells several 2x20 female headers. They vary in
height (8.5mm or 13mm) and in the length of the solder
pins. Stacking connectors have extra long pins so that
you can stack another HAT on top. For this project, the
standard 2x20 female header (Adafruit P/N 2222, $1.50)
is the best choice. If you buy the 13mm version then you
will need to get longer standoffs (13mm instead of
11mm).
DRAFT
A 2x10 socket is used to mate with the display because
it fits into the shroud that surrounds the 2x8 post strip on
the display. The extra pins on each side prevent you from
mis-aligning the connectors.
The rest of the parts are optional and add to the minimum
build. You can add what you need for your project. I like
to buy forty pin snap-apart post strips in black, red and
yellow. I then break them apart into the sizes that I need.
Of course you can use all black, but I find it very
convenient to use black for ground, red for power and
yellow or some other color for the signal.
Optionally, you can use three row, right angle post strips
for the I2C and GPIO headers. The advantage of using
the right angle headers is that they will not interfere with
You can ignore this if you purchased the Adafruit Hub75 the USB adapter and WiFi dongle if you are using a
Interface board. If you are hand wiring your own board Raspberry Pi Zero. The right angle headers can be
then you may want to use through hole parts instead of mounted on what ever side of the board is convenient
the surface mount parts called for. In that case consider for you.
this more of a guideline. The BOM is detailed as two Step 3: Tools Needed:
assemblies, a bare minimum and the ad-hoc optional
assemblies. The first picture above shows the minimum The SD card formatter is used to erase & format an SD
parts required. card to give you a 'clean slate' to work with. The SD card
imager is used to put a bootable image of the operating
The BOM calls out for 74HC245DW R. Any part system (a .img file) onto your newly formatted SD card.
74*245DW R will work. So 74LS245, 75ALS245 or Putty allows you to use SSH to talk to your Raspberry Pi
311
through its WiFi or Ethernet connection. With Putty and
SSH you can operate and monitor your Raspberry Pi
from a window on your PC. WinSCP allows you to copy
files from your PC to your Raspberry Pi. WinSCP
provides a drag and drop GUI for you to transfer files
and view the directory structure of your Raspberry Pi
and your PC.
Step 4: Setup the Raspberry Pi:
DRAFT
• A full sized female HDMI to male mini HDMI adapter
• A full sized female USB to male micro USB adapter
• As we will be running headless, a mouse is not
required
• If you are using a Raspberry Pi Zero, a USB WiFi
dongle will be required
• To power your Raspberry Pi you will need either;
• To take power from your computer; a USB cable with
a micro USB plug at one end
• To power from a wall socket; a 5V power pack with a
micro USB on the end of the cable or an old 5V phone
charger with a USB cable with a micro USB plug at
one end.
The first picture above is of two styles of mini HDMI
adapter. One is a simple plug and the other is a short
cable. The second picture is of two styles of micro USB
adapter. The third photo is a picture of a Raspberry Pi
Zero. I have drawn red circles around where to plug in
your power, keyboard, monitor and micro SD card. The
micro USB plug adapter in the photo above works quite
well, but is a little too big to plug in a micro USB cable
312
into the adjacent micro USB power jack (see fourth photo When using raspi-config, Internationalization Options to
above). As a result, I filed down the side of the adapter change your Locale you must first deselect the default
until everything fit nicely (see fifth photo above). The cable locale (en_GB.UTF-8 UTF-8) before you change to your
style micro USB adapter does not have this problem. locale. The selected locale is identified by an asterisk
between square brackets ([*]). You deselect the locale
Step 5: Configure the Raspberry Pi
by using the arrow keys to move the cursor to the
Once you have your Raspberry Pi up and running the currently selected locale and then press the space bar.
Raspbian Stretch Lite operating system it is time to The asterisk should disappear. You select a locale by
configure your system. You need to enable the I2C using the arrow keys to move the cursor to your selection
interface, SSH, select your language and keyboard and then press the space bar. The asterisk should
layout, select your timezone and configure WiFi to access appear. You can select multiple locales. However, if you
your home network and set the WiFi for your country. do then when you exit, you will find that the default locale
Most of this is done using raspi-config. Setting up to work is still selected. Until you deselect the default locale your
with your home network involves editing of a configuration selection of another locale will not 'stick'. If you live in
file. the USA then select en_US.UTF-8 UTF-8.
The easiest way to run raspi-config on your Raspberry Step 6: Configure WiFi for Your Home Network
Pi zero or Raspberry Pi Zero W is to use a keyboard and
If your WiFi network is not using some form of encryption
monitor. If you have a full sized Raspberry Pi you can
(a very bad idea) you will not need a WiFi passkey. The
put the SD card into that Raspberry Pi and then use a
WiFi passkey is not the same as your WiFi router's
keyboard and monitor or plug in an Ethernet cable and
password. One allows you to use your WiFi network and
SSH into the Raspberry Pi using Putty or connect a USB-
the other allows access to your router to configure it.
to-Serial dongle to the console RX & TX pins and use a
terminal program on your computer to run raspi-config.
DRAFT
313
IT & ITES Trade Theory for Exercise 2.17.290
Smart City - Identify, select, install and troubleshoot different module/ devices
used in SMART Parking
DRAFT
the magnetometer changes while walking beside the approaching a vehicle parked beside the street and
vehicles parked beside the street. accelerometer data is used to calculate the speed of
walking. Also, using accelerometer data in company with
magnetometer changes, we will be able to calculate the
length of the cars parked beside the street. We need to
calculate the speed of user walking to be able to decide
about the window size that we need to detect a car and
distinguishing its length. Also we would be able to tell
the number of free spots by calculating the accelerometer
rate. Moreover, GPS data is collected to use later for
uploading the corresponding free parking spot latitude
and longitude on the cloud to be mapped.
314
WALKING SPEED A N D DIRECTION ESTIMATION
This module consists of 2 main sub-modules:
Distance Estimation Module S is the length of a person’s speed, V is the walking
speed, and fa is the frequency of the accelerometer
This module estimates the distance traversed by
samples in the smart phone. After collecting mmax rows
pedestrian at each step. We used accelerometer and
of accelerometer samples, we calculate the magnitude
gyroscope sensors of the user cellphone to detect and
of 3-axis accelerometer sample to be sure that it is
track user steps. It initiates with user moving and in order
independent of the orientation of the cellphone. Next,
to detect the user moving, we utilize the changes in
we apply the Finite Impulse Response low pass filter to
gyroscope sensor. Whenever the gyroscope sensor
remove the noise following by normalization. Then, we
readings reaches above a certain threshold (in our case
feed the samples to the Dynamic Time Wrapping (DTW)
0.3), we infer the user movement. Detecting the user
algorithm. DTW consider a window size of mmax and
walking triggers the application to start capturing
check if a predefined step pattern with size of n is within
accelerometer sensor data. Since the user steps length
this specified window or not. If a step is detected, then
is, to some extent, proportional to his speed, we consider
we shift the window to the next window sample.
2 parameters mmax and mmin to represent the
Regardless of different step length in different users, the
maximum and minimum length of a person’s step in
DTW could detect step. The whole overview of the
terms of number of sample:
algorithm is shown in figure.
Direction Estimation
We need to track the direction of each user walking in
order to avoid the erroneous duplication parking spot
detection, as well as to differentiate between the states
in which the user is standing still beside a parking spot,
and the status in which the user is walking beside multiple
consecutive parking spots. In order to estimate the user
direction, we have to align three different coordinate
system which is shown in figure 4.3: cellphone coordinate
system, users walking coordinate system, and global
coordinate system. As the global coordination is fixed,
we map the user coordinate and the cellphone coordinate
to the global coordinate. After aligning these 3 systems
on the globe, then the highest variation of the linear
acceleration readings will show the users walking
DRAFT
direction. We apply Principal Component Analysis (PCA)
analysis to find out the direction of the user face which
corresponds to one of its coordinate systems.
315
IT & ITES Trade Theory for Exercise 2.17.291
Smart City - Identify, select, install and troubleshoot different module/ devices
used in SMART Parking
Execute installation of proximity sensor for boom barrier, IR sensor for presence
Objective:
• to execute installation of proximity sensor for boom barrier, IR sensor for presence.
DRAFT
Steps involved in this project:
1. Making three devices in Artik Cloud Platform
2. Making one application in Artik Cloud
3. Making one rule in Artik Cloud
4. Preparing & Programming Arduino
5. Connecting the Sensors to Arduino
6. Preparing Raspberry Pi
7. Preparing Intel Edison
8. Developing Web Application
316
DRAFT
Programming Language
1. HTML
2. Java Script
3. Node.js
4. Python
Making a New Device in Artik Cloud Platform
317
DRAFT
318
IT & ITES Trade Theory for Exercise 2.17.292
Smart City - Identify, select, install and troubleshoot different module/ devices
used in SMART Parking
Apply full stack solution to deal with all aspects of parking including high level
tools for management and analytics software down to street level occupation
sensors and enforcing tools
Objective:
• to apply full stack solution to deal with all aspects of parking.
DRAFT
company-based, and pure business-oriented platforms. part of the ITS with a primary purpose to find, allocate,
Figure 2 illustrates these four types of the IoT platforms, reserve, and provide the ‘best’ available car parking lot
which are described in more detail below. to each individual user who is driving a car in a particular
area. Valuable add-on functionality could be the provision
of navigation instructions to the driver for reaching the
lot. These systems may serve as a foundation and a
common business model for a generic IoT operational
platform due to their properties of providing pure
business-oriented services.
Researchers show that more than 66% of drivers do not
mind paying for car parking facilities during their working
hours. This directly adds value to the car parking
business, which is a stimulus for the development of
intelligent car parking services for smart cities.
The existing car parking systems are not very efficient
The eGovernment IoT is the supporting foundation that as they do not provide the ‘best’ service, e.g., finding the
should facilitate the city's/region's/state's economic nearest available car parking lot. At the sensor layer, most
development and management. It is usually funded of researchers today focus on detecting the car-parking-
through a government's public welfare scheme, which lot occupancy. A car-parking-lot detection method is
gradually promotes the development of eGovernment proposed based on an automatic threshold algorithm;
towards the IoT. The eGovernment IoT platform needs as the image processing algorithms are expensive, a
information relevance to prevent the ‘information island’ hardware solution is suggested. Sensors are used for
effect and to ensure network- and information security. intelligent autonomous parking. A laser scanners are
used to retrieve the car-parking-lot position.
319
At the communication layer, an InfoStation-based multi- At the application layer, an information centre provides
agent system facilitating a car parking locator service is cloud-based services, i.e., Platform as a service (PaaS),
proposed; users are provided with a personalized service Software as a service (SaaS), and Infrastructure as a
based on their location and mobile device's capabilities. service (IaaS); i.e., for allocating computing/storage
A wireless sensor network solution is proposed for car resources for different car parking services. An IoT
parking management along with a routing protocol for management centre administrates the smart city via an
improving the transport reliability. IoT integrated services portal. At the bottom, a number
of business services explore a common interface to the
IoT Intelligent Car Parking System
communication layer. These include car parking locator,
ITS and other systems, such as electrical energy supervision, and information services, GIS/GPS services,
systems, water-, heating- and gas supply systems, city vehicle license plate patrolling, car tracking services, etc.
fire protection and security systems, eHealth/mHealth
At the com munication layer, various wireless
systems, etc., provide intelligent IoT services to make
technologies provide connection between the application-
the city smarter. ITS locates in the business layer of IoT,
and the sensor layer, based on the ABC&S
communicates with the cloud-based information centre
communication paradigm. A 3-tier InfoStation-based
of the smart city, and delivers ‘best’ transport-related
network architecture could be integrated in this layer to
services to users, such as traffic monitoring & control,
enable ‘anytime-anywhere-anyhow’ communication
route planning, car parking service, etc. Figure 3 depicts
functionality in smart cities.
a high-level view of a centralized IoT platform, which
could serve as a generic architectural foundation for a Different sensing technologies could be utilized at the
‘smart city’ establishment, operation, administration, and sensor layer for embedded parking solutions, such as
management. This top-level generic architectural design the Radio Frequency Identification (RFID) for car parking
can unify the development of business applications as access control; laser, passive infrared, microwave radar,
an efficient and economical process. For instance, if an ultrasonic, passive acoustic array sensors, or Closed-
ITS service provider wants to deploy a car parking service Circuit Television (CCTV) with video image processing
within a smart city's shared cloud infrastructure, it will for detecting the status of the car parking lots; license
only need to focus on the operating model to realize the plates with installed 3G/4G communication module for
smartness of the car parking. cars' tracking and tracing; etc.
To enable the car parking system to work as an
operational platform in a smart city, different car parking
areas must be distinguished in providing ‘best’ car parking
lots by executing different business roles and
applications. Based on their properties, the car parking
areas could be divided into four main categories (Figure
DRAFT
5): A transportation hub area; a residential/community
area; a ground/street area; and a shopping mall/hotel/
restaurant area. The relevant management and control
entities, including a highway centre, emergency centre,
traffic control centre, and police can get access to the
information managed by the car parking information
centre with high authority. The sensors deployed in the
car parking area periodically send updated information
as regards occupancy of the car parking lots to the car
Here we propose an intelligent car parking system for parking meters, which push this data to the information
integration into a smart-city IoT architecture, which centre.
consists of three layers—A sensor layer, a
communication layer, and an application layer (Figure
4).
320
Users can interact with the system by installing the Design
corresponding car parking application on their mobile
From the high-level view of the IoT-based smart city and
devices. Facilitated by a personal assistant agent, each
the layered intelligent car parking system (Figures 3 and
user can set up a personal profile which will be used by
?and4),4), the car parking service's application layer, e.g.,
the application for finding, allocating, reserving, and
within a university campus, could be deployed with three
paying for the ‘best’ parking lot in each particular scenario.
tiers, as shown in Figure 7. In the cloud tier, web
Stored in the memory-based No-SQL database, the user
applications serialize data into the Hadoop centre; in the
profile will be dynamically updated to reflect changes in
web servers tier, applications—developed as Bundles—
the user's context and behavior, which are analyzed by
dynamically register themselves on the Open Service
the system. With efficient car parking lot allocation
Gateway initiative (OSGi) framework; and in the mobile
algorithms/rules, the system is always able to provide
apps tier, mobile devices access the web applications
the mobile user with the ‘best’ available car parking lot
and provide ‘best’ car parking services to their users.
following the ABC&S paradigm.
Sample Car Parking System for University Campus:
Every big university has a number of different car parking
areas, e.g., for visitors, students, staff members, etc.
University car parking belongs to the category of a
residential/community car parking. Every working day,
students and staff members spend usually a lot of time
just to find an available car parking lot. This is not only a
time-consuming and energy-wasteful process but it may
also cause car traffic jams. With the intelligent cloud-
based car parking service proposed here, an efficient
utilization of available car parking facilities could be
achieved within a ‘smart university’ environment. Cloud Tier
One way to achieve this is to have each car parking lot The cloud provides data storage and computing
equipped with a sensor which is able to sense the resources for the car parking service. It stores the ‘big
presence of a car in it. An information station (InfoStation), data’ of available car parking lots, car parking area, cars'
operating in the car parking area, periodically collects location, users' location and profiles, etc. The most recent
and aggregates the car presence information from all data is usually stored in the Hadoop's Hbase database
sensors deployed in the area, e.g., by means of Wi-Fi, to support real-time queries, whereas the history data is
ZigBee, or other short-range wireless technology. In the serialized to Hive (a warehousing in Hadoop). For
case of paid car parks, optional parking meters could computing, a number of Map/Reduce algorithms are
used, such as a recommendation algorithm for
DRAFT
operate between the InfoStation and the sensors. When
the occupation status of a car parking lot is changed, suggesting the ‘best’ car parking lots to users, a
information about this is pushed by the InfoStation to the recommendation algorithm based on friends' car parking
car parking Information Centre (InfoCentre) in the cloud suggestions, a profile-updating algorithm based on users'
via the university Intranet (Figure 6). Further in this paper, parking history, etc. To build an efficient and scalable
we are focusing only on the software implementation of system, a rule engine Drools is used to make decisions,
this system. based on facts, quickly and reliably.
OSGi Web Servers Tier
This tier acts as a bridge between the mobile apps tier
and the cloud tier. Considering the great number of web
applications/services running in this tier, the deployment
of a new/updated application should be possible without
stopping/restarting the corresponding web container/
server. The OSGi provides an environment to modularize
web applications into bundles, which can dynamically
register themselves in the bundle's execution context.
To provide high-performance and on-demand car parking
services for users, a key-value based NoSQL database—
Redis —is used in this tier to provide scalable and
distributed job queues. To optimize web resources'
utilization, a load balancer distributes the user's requests
across the cluster of web servers. A distributed system
collects the web servers' log data and sends it to the
cloud.
321
Mobile Applications Tier to the user along with a detailed map, e.g., by utilizing
the Google Map app with an Android API.
The Allied Business Intelligence (ABI) Research [27]
reported that the Android operating system played a Figure 8 depicts the system's main components. The
dominant role in the smartphone market in 2013 (with cloud tier includes a real-time stream computing part for
81% share). Thus the first version of the car parking user behavior real-time updating, parking fees charging,
mobile application is developed for Android mobile etc.; and a non-real-time modeling part for data mining
devices. W hen a user approaches the University and warehouse management. The distributed log data
campus, an automatic request is sent by the application collection part acts as a high-speed data pipe in the
(on behalf of the user) to an OSGi car parking web server system. The OSGi web servers tier in the centre acts as
asking for a car parking lot. The server finds the ‘best’ a bridge between the other two tiers. Different car parking
available car parking lot for this particular user, based services could be provided; these are described by their
on his/her preferences specified in the user profile, and service descriptions (SD).
(optionally) reserves it. Driving directions are then sent
DRAFT
322
IT & ITES Trade Theory for Exercise 2.18.293
Smart City - Identify, select, install and troubleshoot different module/ devices
used in Smart Traffic
323
Wi-Fi module ESP8266’s Vcc and GND pins are directly ESP8266
connected to 3.3V and GND of Arduino and CH_PD is
ESP8266 has two LEDs, one is Red, for indicating Power
also connected with 3.3V. Tx and Rx pins of ESP8266
and second is Blue that is Data Communication LED.
are directly connected to pin 2 and 3 of Arduino. Software
Blue LED blinks when ESP sends some data via its Tx
Serial Library is also used here to allow serial
pin. Also, do not connect ESP to +5 volt supply otherwise
communication on pin 2 and 3 of Arduino.Wi-Fi module
your device may damage. Here in this project, we have
ESP8266’s Vcc and GND pins are directly connected to
selected 9600 baud rate for all the UART
3.3V and GND of Arduino and CH_PD is also connected
communications.
with 3.3V. Tx and Rx pins of ESP8266 are directly
connected to pin 2 and 3 of Arduino. Software Serial User can also see the communication between Wi-Fi
Library is also used here to allow serial communication module ESP8266 and Arduino, on the Serial Monitor, at
on pin 2 and 3 of Arduino. the baud rate of 9600:
DRAFT
324
IT & ITES Trade Theory for Exercise 2.18.294
Smart City - Identify, select, install and troubleshoot different module/ devices
used in Smart Traffic
DRAFT
about 50% open space for solar irradiance to pass onto The considered brass material in simulation has
the solar panel, enabling the solar panel to achieve up to 2.74×107 S/m electric conductivity, 109 W/K/m thermal
93.95% of power under of normal conditions. conductivity and 0.38 kJ/K/kg heat capacity. The gap
between ground plane and radiating structure optimized
Antenna design
to 4.6 mm that provides sufficient space to the ground
The design layout of the proposed antenna is illustrated plane to be mounted on the CubeSat body and placement
in Fig. of solar panel, shown in Fig 2. The design parameters of
the proposed antenna are enlisted in Table 1. The
The proposed antenna is designed considering the
shorting wall technique is used to achieve resonance at
following issues.
lower frequency and better reflection coefficient.
325
DRAFT
326
IT & ITES Trade Theory for Exercise 2.18.295
Smart City - Identify, select, install and troubleshoot different module/ devices
used in Smart Traffic
DRAFT
delay, frustration and lack of observation by drivers. A
Where pedestrians and traffic share the same stage,
guide to determining the length of the intergreen period
minimum green times may be governed by the time
is illustrated in Table 4.
required by pedestrians to clear the crossing.
A vehicle which passes over the stop line at the start of
When North-South arms are losing right-of-way if DE-
the amber display must be clear of the potential collision
AE is greater than BG-CG, then x'= DE-AE (or vice versa).
point in relation to a vehicle starting at the onset of the
green of the following stage, when travelling at the normal
327
IT & ITES Trade Theory for Exercise 2.18.296
Smart City - Identify, select, install and troubleshoot different module/ devices
used in Smart Traffic
DRAFT
Your Wi-Fi internet provider offers DNS as part of your
However, while the cage or bag might block your phone
service, which means your provider can also log your
from revealing its location, it doesn’t really prevent it from
DNS traffic — in essence, recording your entire browsing
spying if it is already been hacked with a spyware —
history.
before it got air-gapped.
Any mobile network operator can also precisely calculate
The safest practice is to assume that
where a particular subscriber ’s phone is located
traditional calls and SMS text messages have
whenever the phone is powered on and registered with
not been secured against eavesdropping or
the network. The ability to do this is called triangulation.
recording.
One way the operator can do this is to monitor the signal
The situation can be different when you are using secure
strength that different towers observe from a particular
communication apps to communicate (whether by voice
mobile phone, and then calculate where that phone must
or text), because these apps can apply end-to-end
be located based on the observations. The accuracy with
encryption (E2EE) to protect your conversations. Such
which the operator can figure out a subscriber’s location
apps with reliable E2EE implementation and strong anti-
varies, depending on many factors including the
forensics capabilities can provide more meaningful
technology the operator uses (2G/3G/LTE) and cell tower
protection.
numbers in the vicinity.
The level of protection that you get from using such apps,
Normally only the mobile operator itself can perform this
depends significantly on which apps you use and how
kind of tracking, though, these information might be
they work. One important question is whether there is
328
IT & ITES Trade Theory for Exercise 2.18.297
Smart City - Identify, select, install and troubleshoot different module/ devices
used in Smart Traffic
Detect liquid presence over road by liquid presence sensor for smart security
Objective:
• to detect liquid presence over road by liquid presence sensor for smart city.
DRAFT
of wiper.
329
IT & ITES Trade Theory for Exercise 2.18.298
Smart City - Identify, select, install and troubleshoot different module/ devices
used in Smart Traffic
DRAFT
piezoelectric (PZT) sensors. The piezoelectric sensors
are mounted as a pair in the structure. Data collected
from the piezoelectric sensors will be used to detect the
size and location of damage using a proposed
mathematical model.
Implemented on a Raspberry Pi, the proposed
mathematical model will estimate the size and location
of structural damage, if any, and upload the data to
Internet. This data will be stored and can be checked
remotely from any mobile device. The system has been
validated using a real test bed in the lab.
SHM Damage Detection Techniques:
SHM Technique
Damage detection in SHM systems is classified into two
types: On the other hand, the pulse-echo technique relies on
the reflected wave from the damage, and one PTZ
local-based transducer is used for both transmitting and receiving
global-based damage detection the signal. Figure 1 shows both techniques.
DRAFT
symmetrical, the two waves might reach the sensor at
slightly different times resulting in two Tts, two Hs, and
two P2s to calculate the upper and lower part of the
damage. From the above mathematical model, the
damage location can be detected using (5) and the
damage width can be determined using (7). One unique
Dimensional diagram for SHM technique.
advantage of the proposed mathematical model is that it
does not require high computational processing unit,
allowing for implementation almost anywhere, anytime,
and also easier integration with an IoT platform. Figure
shows the flow chart of the proposed SHM technique.
331
IT & ITES Trade Theory for Exercise 2.19.299
Smart City - Apply IoT Application for Water and Waste Management
Select and install PH, Cupric (Cu2+), Silver (Ag+) , Lithium (Li+), conductivity
and temperature for maintenance of water quality
Objective:
• to select and install PH, Cupric (Cu2+), Silver (Ag+), Lithium (Li+), conductivity and temperature for
maintenance of water quality.
332
IT & ITES Trade Theory for Exercise 2.19.300
Smart City - Apply IoT Application for Water and Waste Management
DRAFT
stature of the dustbin. The threshold stature is set as While these GSM modems are most frequently used to
10cm. Arduino will be programmed in such a way that provide mobile 4 internet connectivity, many of them can
when the dustbin is being filled, the remaining height also be used for sending and receiving SMS and MMS
from the threshold height will be displayed. message. GSM Modem sends and receives data through
Once the garbage reaches the threshold level ultrasonic radio waves. In this project GSM 900 modem is used to
sensor will trigger the GSM modem which will send the messages which is shown in figure 2.[2]
continuously alert the required authority until the garbage It consists of a GSM/GPRS modem with standard
in the dustbin is squashed. Once the dustbin is communication interfaces like RS-232 (Serial Port),
squashed, people can reuse the dustbin. At regular USB, so that it can be easily connected to the other
intervals dustbin will be squashed. devices. The power supply circuit is also built in the
Once these smart bins are implemented on a large module that can be turn ON by using a suitable adaptor.
scale, by replacing our traditional bins present today, Fig 1: GSM
waste can be managed efficiently as it avoids
unnecessary lumping of wastes on roadside. Foul smell The block diagram of transmitter section. Level detector
from these rotten wastes that remain untreated for a long consists of IR sensors which is used to detect the level
time, due to negligence of authorities and carelessness of the garbage in the dustbin. The output of level detector
of public may lead to long term problems.[1] is given to microcontroller.
Breeding of insects and mosquitoes can create Four IR sensors are used to indicate the different levels
nuisance around promoting unclean environment. This of the amount of the garbage collected in the dustbin
may even cause dreadful diseases. which is placed in public area. When the dustbin is filled
up to the highest level, the output of fourth IR receiver
1. Problem Statement becomes active low.
To implement a smart bin built on a microcontroller based This output is given to microcontroller to send the
platform Arduino Uno board which is interfaced with GSM message to the Control room via GSM module as
modem and Ultrasonic sensor which can gives the status shown in below.
333
5 - Fig-2 Transmitter Part from Dustbin using spatial analyst functions of GIS. It is found that all
the dustbins are burnt with wastes and causing pollution
The figure 4 shows the block diagram of receiver
to the environment.
section. At receiver, control room is present where all
the activities are managing. The number of the The results thus obtained would help to understand
control room is depending on the dustbins present in the present situation of the waste management of
the area. Research Article Volume 6 Issue No. 6 International
Journal of Engineering Science and Computing, June
The person sitting in the control room monitors the
2016 7114 http://ijesc.org/ Dhaka city and to optimally
entire system. A GSM Module is connected to the
place the required number of dustbins to prevent
computer of the control room through microcontroller.
further pollution to environment.
The entire system is monitor by the person sitting in the
control room. 8
The same GSM Module is used to send the message to The authors in [5] have equipped the smart bins with
the contractor for cleaning the dustbin. GUI is ultrasonic sensors which measure the level of dustbin
developed using MATLAB software. This GUI will be being filled up. The container is divided into three levels
displayed on the computer screen in the control room to of garbage being collected in it. Every time the garbage
display the status of the garbage level in the dust bin as crosses a level the sensors receives the data of the filled
shown in below. level.
Fig-3: Reception Part to Dustbin This data is further sent to the garbage analyzer as instant
message using GSM module. Placing three ultrasonic
6 2.1 Flow chat of Woking Principle:
sensors at three different levels of the container may be
Fig 4: Flowchart a disadvantage as the cost of the dustbin increases due
to the sensors and also the sensors can be damaged
The PIR sensor will observe a person nearby dustbin. If
due to the rough action by the users.
motion is detected the lid of dustbin is opened, the servo
motor activates and as GSM connected it will send an An IoT-based smart garbage system (SGS) is proposed
alert message to user if dustbin is filled. to reduce the amount of food waste. The authors in
[6]. In an SGS, battery-based smart garbage bins
Dustbin placed in public place, people throw garbage in
(SGBs) exchange information with each other using
dustbin, place the ultrasonic sensor in top of the garbage
wireless mesh networks, and a router and server collect
bin. If dustbin reach in 75% then arduino send message
and analyze the information for service provisioning.
through GSM module.
Furthermore, the SGS includes various IoT skills
When dustbin level is reach threshold level buzzer will considering user convenience and increases the battery
give alert sound for don’t again put waste in dustbin. This lifetime through two types of energy-efficient operations
all process updated in IOT GECKO platform for of the SGBs: stand-alone operation and cooperation
DRAFT
monitoring garbage bin. based operation.
7 The proposed SGS had been functioned as a pilot project
Working of Line Follower Robot using Arduino in Gangnam district, Seoul, Republic of Korea, for a one-
Working of line follower is very interesting. Line year period. The test demonstrated that the normal
follower robot senses black line by using sensor and measure of food waste could be decreased by 33%.
then sends the signal to Arduino. Then Arduino drives The authors in [7] has built a framework in which a
the motor according to sensors' output. Working of line Camera will be set at each garbage collection point
follower Here in this project we are using two IR alongside load cell sensor at base of the trash can. The
sensor modules namely left sensor and right sensor. camera will take continuous snapshots of the garbage
When both left and right sensor senses white then robot can. A threshold level is set which compares theoutput
move forward. of camera and load sensor. The comparison is done with
2.2 Literature survey: help of microcontroller.
The authors in [4] have made a quantitative analysis After analyzing the image an idea about level of garbage
between existing dustbins and their serving population. in the can and from the load cell sensor, weight of
The study first analyses the spatial distribution of dustbins garbage can be known. Accordingly, information is
in some areas of Dhaka city using average nearest processed that is controller checks if the threshold level
neighbor functions of GIS. Remarkably, the spatial is exceeded or not. This is convenient to use but
circulation of the current dustbins has appeared to be economically not reliable.
dominatingly in clustered pattern. 3. Requirement Specification-
Next, an optimal number of additional dustbins were Smart bin is built on Arduino board platform. It is
calculated. It is shown that the number of existing interfaced with a GSM modem (SIM 900A) and the bin
dustbins is insufficient in the study area. The extent of is equipped with Ultrasonic sensor (HC-SR04) and PIR
pollution caused by the existing dustbins was calculated sensor.
334
3.1) Components Used- temperature and fill rates—in order to identify waste
generation patterns. Collected data will help the city
1. Arduino
mitigate container overflow, reduce the number of overall
2. GSM collections, guide bin placement and optimize operational
resources.
3. PIR Sensor
“Nordsense uses best-in-class laser technology that
4. Ultrasonic Sensor
shoots multiple independent laser beams onto the waste
5. Servo Motor surface and calculates the distance for each of those,”
6. Breadboard says Manuel Maestrini, founder and chief technology
officer for Nordsense. “This allows us to be extremely
7. Connecting wires accurate as to when to dispatch someone to pick up the
1. Arduino can and not being sensitive to false positives.”
Arduino is an open source, computer hardware and The city works with Recology, its private sector partner,
software company, project, and user community that to service the cans. Currently, the fill level, temperature
designs and manufactures microcontroller kits for location and position of the bins will be part of the data
building digital devices and interactive objects that can collected by the sensors.
sense and control objects in the physical world. “Our goal is to improve the cleanliness of San Francisco’s
The project's products are distributed as open-source public areas and to gain a better understanding, through
hardware and software, which are licensed under the real-time data, of the usage of our public trash
GNU Lesser General Public License (LGPL) or the receptacles,” says Nuru. “If we can see how they’re being
GNU General Public License (GPL), permitting the used—how quickly they fill up—we can ensure that
manufacture of Arduino boards and software specific cans get prompt attention before they overflow,
distribution by anyone. Arduino boards are available and we can determine whether more trash cans in a
commercially in preassembled form, or as do-it-yourself specific area are needed. At the same time, we can
kits. Arduino board designs use a variety of reduce the amount of servicing of public trash cans that
microprocessors and controllers. get little use, providing more efficiency.”
The boards are equipped with sets of digital and The contract with Nordsense is a direct result of the San
analog input/output (I/O) pins that may be interfaced to Francisco’s Startup in Residence (STIR) program that
various expansion boards (shields) and other circuits. connects governments with startups to solve a broad
The boards feature serial communications interfaces, range of civic challenges.
including Universal Serial Bus (USB) on some models, “San Francisco Public W orks considered several
which are also used for loading programs from personal proposals for smart can technology to help improve the
computers.[3] cleanliness of San Francisco,” says Nuru.
DRAFT
Arduino/Genuino Uno is a microcontroller board based In 2018, as part of the program, Nordsense collaborated
on the ATmega328P (datasheet). It has 14 digital input/ with San Francisco officials to complete a highly
output pins (of which 6 can be used as PWM outputs), successful three-month pilot project.
6 analog inputs, a 16 MHz quartz crystal, a USB
connection, a power jack, an ICSP header and a reset “The pilot gave us the opportunity to see how the
button. technology works and to make necessary adjustments,”
This included installing 48 sensors across the city to
It c ontains everything needed to support the create public “smart” bins that collected real-time data
microcontroller; simply connect it to a computer with a about trash levels and patterns.
USB cable or power it with a AC-to-DC adapter or battery
to get started. You can tinker with your UNO without “The outcome of the pilot was beyond anyone’s
worrying too much about doing something wrong, worst expectation—we saw an 80 percent decrease in
case scenario you can replace the chip for a few dollars overflowing cans, a 64 percent decrease in illegal
and start over again. dumping and a 66 percent decrease in street cleaning
service requests,” The project also generated data
"Uno" means one in Italian and was chosen to mark the revealing how empty or full bins were—on average—
release of Arduino Software (IDE) when they were serviced. This information indicated
1.0. The Uno board and version 1.0 of Arduino increasing the number of bins overall would have less
Software (IDE) were the reference versions of Arduino, impact on the cleanliness of city streets than smarter
now evolved to newer releases. The Uno board is the distribution of bins based on measurable activity.
first in a series of USB Arduino boards, and the Using data collected from the 1,000 smart bins, San
reference model for the Arduino platform; for an Francisco will be able to optimize bin placement and
extensive list of current, past or outdated boards see the identify areas where more recycling options are
Arduino index of boards. necessary to reduce the amount of material transported
The sensors will monitor activity—including bin fullness, to landfills.
335
“Down the road, this data will not only contribute to has before loading up a new program from the Arduino
operational efficiencies and cleaner streets but also in IDE. This information is available on the top of the IC.
identifying what’s the optimal can's placement based on For more details about the IC construction and functions,
actual data instead of assumptions,” you can refer to the data sheet.
(i) Power USB (xii) ICSP pin
Arduino board can be powered by using the USB Mostly, ICSP (12) is an AVR, a tiny programming header
cable from your computer. All you need to do is connect for the Arduino consisting of MOSI, MISO, SCK, RESET,
the USB cable to the USB connection VCC, and GND. It is often referred to as an SPI (Serial
Peripheral Interface), which could be considered as
(ii) Power (Barrel Jack)
an "expansion" of the output. Actually, you are slaving
Arduino boards can be powered directly from the AC the output device to the master of the SPI bus.
mains power supply by connecting it to the Barrel Jack.
(xiii) Power LED indicator
(iii) Voltage Regulator
This LED should light up when you plug your Arduino
The function of the voltage regulator is to control the into a power source to indicate that your board is powered
voltage given to the Arduino board and stabilize the DC up correctly. If this light does not turn on, then there is
voltages used by the processor and other elements. something wrong with the connection.
(iv) Crystal Oscillator (xiv) TX and RX LEDs
The crystal oscillator helps Arduino in dealing with On your board, you will find two labels: TX (transmit)
time issues. How does Arduino calculate time? The and RX (receive). They appear in two places on the
answer is, by using the crystal oscillator. The number Arduino UNO board. First, at the digital pins 0 and 1, to
printed on top of the Arduino crystal is 16.000H9H. It indicate the pins responsible for serial communication.
tells us that the frequency is 16,000,000 Hertz or 16 MHz. Second, the TX and RX led (13). The TX led flashes
with different speed while sending the serial data. The
(v, xvii) Arduino Reset
speed of flashing depends on the baud rate used by
You can reset your Arduino board, i.e., start your program the board. RX flashes during the receiving process.
from the beginning. You can reset the UNO board in
(xv) Digital I/O
two ways. First, by using the reset button (17) on the
board. Second, you can connect an external reset button The Arduino UNO board has 14 digital I/O pins (15)
to the Arduino pin labelled RESET (5). (of which 6 provide PWM (Pulse Width Modulation)
output. These pins can be configured to work as input
(vi, vii, viii, ix) Pins (3.3, 5, GND, Vin)
digital pins to read logic values (0 or 1) or as digital output
3.3V (6) - Supply 3.3 output volt pins to drive different modules like LEDs, relays, etc.
DRAFT
5V (7) - Supply 5 output volt The pins labelled can be used to generate PWM.
Most of the components used with Arduino board works (xvi) AREF
fine with 3.3 volt and 5 volt. AREF stands for Analog Reference. It is sometimes, used
GND (8)(Ground) - There are several GND pins on the to set an external reference voltage (between 0 and 5
Arduino, any of which can be used to ground your circuit. Volts) as the upper limit for the analog input pins.
Vin (9) - This pin also can be used to power the Arduino Microcontroller- ATmega2560
board from an external power source, like AC mains Operating Voltage -5V
power supply.
Input Voltage (recommended)- 7-12V
(x) Analog pins
Input Voltage (limit)- 6-20V
The Arduino UNO board has five analog input pins A0
Digital I/O Pins 54 (of which 15 provide PWM output)
through A5.
Analog Input 16
These pins can read the signal from an analog
sensor like the humidity sensor or temperature sensor 2. Gsm (Global System for Mobile Communication)
and convert it into a digital value that can be read
GSM Modem can accept any GSM network operator SIM
by the microprocessor.
card and act just like a mobile phone with its own unique
(xi) Main microcontroller phone number. Advantage of using this modem will be
that you can use its RS232 port to communicate and
Each Arduino board has its own microcontroller (11). You
develop embedded applications.
can assume it as the brain of your board. The main IC
(integrated circuit) on the Arduino is slightly different from Applications like SMS Control, data transfer, remote
board to board. The microcontrollers are usually of the control and logging can be developed easily using
ATMEL Company. You must know what IC your board gsm. The modem can either be connected to PC
serial port directly or to any microcontroller through
336
MAX232. It can be used to send and receive SMS or PLMN: The area covered by one network operator is
make/receive voice calls. It can also be used in GPRS called the Public Land Mobile Network (PLMN). A PLMN
mode to connect to internet and do many applications can contain one or more MSCs.
for data logging and control. In GPRS mode you can
3. PIR Sensor
also connect to any remote FTP server and upload files
for data logging. PIR sensors allow you to sense motion. They are used
to detect whether a human has moved in or out of the
This GSM modem is a highly flexible plug and play quad
sensor’s range. They are commonly found in
band SIM900A GSM modem for direct and easy
appliances and gadgets used at home or for
integration to RS232 applications. Supports features like
businesses. They are often referred to as PIR,
Voice, SMS, Data/Fax, GPRS and integrated TCP/IP
"Passive Infrared", "Pyroelectric", or "IR motion" sensors.
stack.
Following are the advantages of PIR Sensors ?
A GSM network comprises of many functional units.
These functions and interfaces are explained in this • Small in size
chapter. The GSM network can be broadly divided into: • Wide lens range
• The Mobile Station (MS) • Easy to interface
• The Base Station Subsystem (BSS) • Inexpensive
• The Network Switching Subsystem (NSS) • Low-power
• The Operation Support Subsystem (OSS) • Easy to use
Given below is a simple pictorial view of the GSM • Do not wear out
architecture.
Fig 8: PIR sensor
Fig 6: Architecture of GSM
PIRs are made of pyroelectric sensors, a round metal
The additional components of the GSM architecture can with a rectangular crystal in the centre, which can
comprise of databases and messaging systems detect levels of infrared radiation. Everything emits low-
functions: level radiation, and the hotter something is, the more
• Home Location Register (HLR) radiation is emitted. The sensor in a motion detector is
split in two halves.[4] This is to detect motion (change)
• Visitor Location Register (VLR)
and not average IR levels.
• Equipment Identity Register (EIR)
The two halves are connected so that they cancel out
• Authentication Centre (AuC) each other. If one-half sees more or less IR radiation
than the other, the output will swing high or low. PIRs
DRAFT
• SMS Serving Centre (SMS SC)
have adjustable settings and have a header installed in
• Gateway MSC (GMSC) the 3-pin ground/out/power pads.
• Chargeback Centre (CBC) Fig 9: PIR Sensor Diagram
• Transcoder and Adaptation Unit (TRAU) 4. ULTRASONIC SENSOR
The following diagram shows the GSM network along The HC-SR04 ultrasonic sensor uses SONAR to
with the added elements: determine the distance of an object just like the bats do.
It offers excellent non-contact range detection with high
Fig 7: GSM Network architecture
accuracy and stable readings in an easy-to-use package
The MS and the BSS communicate across the Um from 2 cm to 400 cm or 1” to 13 feet.
interface. It is also known as the air interface or the radio
The operation is not affected by sunlight or black
link. The BSS communicates with the Network Service
material, although acoustically, soft materials like cloth
Switching (NSS) centre across the A interface.
can be difficult to detect. It comes complete with
GSM network areas In a GSM network, the following ultrasonic transmitter and receiver module.
areas are defined:
Fig 10: Ultra sonic sensor
Cell: Cell is the basic service area; one BTS covers one
Technical Specifications
cell. Each cell is given a Cell Global Identity (CGI), a
number that uniquely identifies the cell. Power Supply - +5V DC
Location Area: A group of cells form a Location Area Quiescent Current - <2mA
(LA). This is the area that is paged when a subscriber
Working Current - 15mA
gets an incoming call. Each LA is assigned a Location
Effectual Angle - <15°
Area Identity (LAI). Each LA is served by one or more
BSCs. MSC/VLR Service Area: The area covered by one Ranging Distance ? 2cm – 400 cm/1” – 13ft
MSC is called the MSC/VLR service area.
337
Resolution - 0.3 cm A normal servo is used to control an angular motion
of 0 to 180 degrees. It is mechanically not capable of
Measuring Angle - 30 degree
turning any farther due to a mechanical stop built on to
5. Servo Motor the main output gear.
A Servo Motor is a small device that has an output shaft. The power applied to the motor is proportional to the
This shaft can be positioned to specific angular positions distance it needs to travel. So, if the shaft needs to turn
by sending the servo a coded signal. As long as the a large distance, the motor will run at full speed. If it
coded signal exists on the input line, the servo will needs to turn only a small amount, the motor will run
maintain the angular position of the shaft. at a slower speed. This is called proportional control.
If the coded signal changes, the angular position of the How Do You Communicate the Angle at Which the Servo
shaft changes. [8] In practice, servos are used in radio- Should Turn?
controlled airplanes to position control surfaces like the
The control wire is used to communicate the angle.
elevators and rudders. They are also used in radio-
The angle is determined by the duration of a pulse
controlled cars, puppets, and of course, robots.
that is applied to the control wire. This is called
Fig 11: Servo Motor Pulse Coded Modulation. The servo expects to see a
pulse every 20 milliseconds (.02 seconds).
Servos are extremely useful in robotics. The motors
are small, have built-in control circuitry, and are The length of the pulse will determine how far the motor
extremely powerful for their size. A standard servo such turns. A 1.5 millisecond pulse, for example, will make
as the Futaba S-148 has 42 oz/inches of torque, the motor turn to the 90-degree position (often called as
which is strong for its size. It also draws power the neutral position). If the pulse is shorter than 1.5
proportional to the mechanical load. A lightly loaded milliseconds, then the motor will turn the shaft closer to
servo, therefore, does not consume much energy. 0 degrees. If the pulse is longer than 1.5 milliseconds,
the shaft turns closer to 180 degrees.
The guts of a servo motor is shown in the following
picture. You can see the control circuitry, the motor, a 6. Breadboard
set of gears, and the case. You can also see the 3 wires
A breadboard is a construction base for prototyping of
that connect to the outside world. One is for power
electronics. Originally it was literally a bread board, a
(+5volts), ground, and the white wire is the control wire.
polished piece of wood used for slicing bread. Because
Fig 12: Servo motor parts the solderless breadboard does not require soldering, it
is reusable. This makes it easy to use for creating
Working of a Servo Motor
temporary prototypes and experimenting with circuit
The servo motor has some control circuits and a design. For this reason, solderless breadboards are
potentiometer (a variable resistor, akapot) connected to also extremely popular with students and in
DRAFT
the output shaft. In the picture above, the pot can be technological education. Older breadboard types did not
seen on the right side of the circuit board. This pot allows have this property.
the control circuitry to monitor the current angle of the
A stripboard (Vero board) and similar prototyping printed
servo motor.
circuit boards, which are used to build semi-permanent
If the shaft is at the correct angle, then the motor shuts soldered prototypes or one-offs, cannot easily be reused.
off. If the circuit finds that the angle is not correct, it will A variety of electronic systems may be prototyped by
turn the motor until it is at a desired angle. The output using breadboards, from small analog and digital
shaft of the servo is capable of traveling somewhere circuits to complete central processing units (CPUs).
around 180 degrees. Usually, it is somewhere in the
210-degree range, however, it varies depending on the
manufacturer.
338
IT & ITES Trade Theory for Exercise 2.19.301
Smart City - Apply IoT Application for Water and Waste Management
Requirement:
Hardware Materials Required:
• Grover Base Shield v2
• Arduino 101
• 9v Battery these batteries will power the Arduino board
• Plastic Container
• Ultrasonic Sensor
• Jumper Wires
• Arduino MKR1000
• Electric Drill
• Glue
Software Required:
• Arduino IDE Fig 1
• BLYNK Android App that allows communication with Now remove the lid and trace the two ''eyes'' of the
WiFi compatible micro-controllers. ultrasonic sensor. this will be the side facing the bottom
PROCEDURE: of the bin.
DRAFT
large number of different systems, while providing data
for millions of people to use and capitalize. Building a
general architecture for the IoT is hence a very complex
task, mainly because of the extremely large variety of
devices, link layer technologies, and services that may
be involved in such a system.
What does GPS Tracking of Trashcan can do?
It gives a real time indicator of the garbage level in a
trashcan at any given time. Using that data we can then
optimize waste collection routes and ultimately reduce
fuel consumption. It allows trash collectors to plan their
daily/weekly pick up schedule.
Construct the Model
Look for an old small plastic container and make sure Fig 2
your components fit.
Take your biggest drill bit, mine was 10mm and drill out
the holes. If they still are a bit small lightly file them till
the ultrasonic sensor Fits in.
339
DRAFT
Fig 3
Fig 4
Fig 5
Components in the box
340
IT & ITES Trade Theory for Exercise 2.19.302
Smart City - Apply IoT Application for Water and Waste Management
DRAFT
341
IT & ITES Trade Theory for Exercise 2.19.303
Smart City - Apply IoT Application for Water and Waste Management
Install, test and apply different components like ultrasonic sensor, wifi module
and Thing speak (IoT Platform)
Objective:
• to install, test and apply different components like ultrasonic sensor, Wi-Fi module and Thing speak (IoT
Platform).
Requirements: after calculating the distance arduino will convey this data
to ESP8266 module via UART / serial communication.
• Thing speak
The serial data consists of distance data in cm with 3 to
• Arduino 5 decimal places. The ESP8266 will send this data to
your Thingspeak account via internet.
• Microcontroller
• Internet connectivity Since we are using a generic ESP8266 module we have
to upload an appropriate program code that makes
• Computer system ESP8266 to accept serial data and send it to Thingspeak.
PROCEDURE: We also need to upload another program code to Arduino
board, so that it will convert the measured ultrasonic
We are going to learn how to upload ultrasonic sensor sensor data in serial data.
(HC-SR04) data to Thingspeak using Arduino and generic
ESP8266 Wi-Fi module Now let’s see how to upload the program code to
ESP8266 module.
Sending Measured Data to Thingspeak Using
Arduino and ESP8266 Circuit Diagram
Ultrasonic sensor need no introduction it is one of the You need to wire up the circuit as illustrated above and
first sensors you might have tried. Now you are learning remember that ESP8266 works on 3.3V and 5V will kill
about IoT and you came across Thingspeak and you your module and make sure that ATmega328P is
want to send some data to Thingspeak server and you removed from Arduino board.
chose ultrasonic sensor.
Block Diagram
DRAFT
Here is the block diagram on how we are going to upload
ultrasonic sensor data to Thingspeak. Firstly the Arduino
will trigger the ultrasonic sensor and collects the data,
342