18CS81 Iot Module 5
18CS81 Iot Module 5
Module – 5
interactive controls, or environments easily adaptive. • It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6
• Arduino boards are able to read inputs - light on a sensor, a finger on a button, analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP
or a Twitter message - and turn it into an output - activating a motor, turning header and a reset button.
on an LED, publishing something online.
• "Uno" means one in Italian and was chosen to mark the release of Arduino
• The hardware consists of a board designed around an 8-bit microcontroller, or a 32-bit
Software (IDE) 1.0.
ARM.
• The Uno board and version 1.0 of Arduino Software (IDE) were the reference
versions of Arduino, now evolved to newer releases.
• Wearable
• A microcontroller board based on the ATmega328P. • A microcontroller board based on the ATmega2560.
• It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 • It has 54 digital input/output pins (of which 15 can be used as PWM outputs), 16
analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP analog inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB
header and a reset button. connection, a power jack, an ICSP header, and a reset button.
• Connect it to a computer with a USB cable or power it with a AC-to-DC adapter or • It is the recommended board for 3D printers and robotics projects.
battery to get started.
21-06-2022
• A microcontroller board based on the ATmega32U4, featuring a built-in USB • It is based on the Atmel ATSAMW25 ARM SoC (System on Chip), that is part of
which makes the Micro recognizable as a mouse or keyboard. the Smart Connect family of Atmel Wireless devices, specifically designed for IoT
projects and devices.
• It has 20 digital input/output pins (of which 7 can be used as PWM outputs and
12 as analog inputs), a 16 MHz crystal oscillator, a micro USB connection, an • The ATSAMW25 is composed of three main blocks:
ICSP header, and a reset button.
SAMD21 Cortex-M0+ 32bit low power ARM MCU
PCB Antenna.
5.2. Exploring Arduino UNO Learning Board 5.2. Exploring Arduino UNO Learning Board
1. Reset Button – This will restart any code that is loaded to the Arduino board.
2. AREF – Stands for “Analog Reference” and is used to set an external reference
voltage
3. Ground Pin – There are a few ground pins on the Arduino and they all work the
same
4. Digital Input/Output – Pins 0-13 can be used for digital input or output
5. PWM – The pins marked with the (~) symbol can simulate analog output
6. USB Connection – Used for powering up your Arduino and uploading sketches
5.2. Exploring Arduino UNO Learning Board 5.2. Exploring Arduino UNO Learning Board
8. ATmega Microcontroller – This is the brains and is where the programs are stored 13. 5V Pin – This pin supplies 5 volts of power to your projects
9. Power LED Indicator – This LED lights up anytime the board is plugged in a 14. Ground Pins – There are a few ground pins on the Arduino and they all work the
power source same
10. Voltage Regulator – This controls the amount of voltage going into the Arduino 15. Analog Pins – These pins can read the signal from an analog sensor and convert
board it to digital
11. DC Power Barrel Jack – This is used for powering your Arduino with a power
supply
12. 3.3V Pin – This pin supplies 3.3 volts of power to your projects
5.2.1. Things that Arduino can do 5.3. Installing the Software (Arduino IDE)
• can control with Arduino is an LED. • The Arduino IDE (Integrated Development Environment) is where we can develop
programs that instructs what Arduino to do.
• Display a message in LCD Display
• We can load new programs onto main chip, the ATmega328p, via USB using
• Control DC or Servo Motors
Arduino IDE.
• Read Data from outside world
• To download Arduino IDE, browse https://www.arduino.cc/en/Main/Software.
• Motion sensor allows us to detect movement
• Select type of OS that we are using and download it.
• Light sensor allows to measure the quantity of light outside world
5.3. Installing the Software (Arduino IDE) 5.3. Installing the Software (Arduino IDE)
• The Arduino Software (IDE) allows you to write programs and upload them to • Install the Arduino Desktop IDE accordingly to operating system.
board. In the Arduino Software page you will find two options:
Windows
1. Online IDE (Arduino Web Editor). It will allow to save sketches in the cloud,
Mac OS X
having them available from any device and backed up.
Linux
2. Offline, should use the latest version of the desktop IDE.
Portable IDE (Windows and Linux)
• Choose board in the list here on the right to learn how to get started with it and
how to use it on the Desktop IDE.
5.3. Installing the Software (Arduino IDE) 5.3.1. Connecting Arduino UNO Learning Board:
• Figure shows Arduino IDE • If you want to program your Arduino Uno while offline you need to install the
Two required functions / methods / routines: • Connect your Uno board with a USB cable; sometimes this cable is called a USB
void loop()
{
// repeats
}
21-06-2022
5.3.1. Connecting Arduino UNO Learning Board: 5.3.1. Connecting Arduino UNO Learning Board:
• You need to select the entry in the Tools > Board menu that corresponds to your • Select the serial device of the board from the Tools | Serial Port menu.
Arduino or Genuino board. (Figure shows layout of Arduino IDE)
• This is likely to be COM3 or higher (COM1 and COM2 are usually reserved for
hardware serial ports).
• To find out, you can disconnect your board and re-open the menu; the entry that
disappears should be the Arduino or Genuino board.
5.3.1. Connecting Arduino UNO Learning Board: 5.3.1. Connecting Arduino UNO Learning Board:
• Open your first sketch
• Figure shows selecting the port
• Open the LED blink example sketch: File > Examples >01.Basics > Blink.
21-06-2022
5.3.1. Connecting Arduino UNO Learning Board: 5.3.1. Connecting Arduino UNO Learning Board:
• Upload the program • Layout of Arduino Uno IDE
• Now, simply click the "Upload" button in the environment. Wait a few seconds - you
should see the RX and TX leds on the board flashing. If the upload is successful, the
message "Done uploading." will appear in the status bar.
• A few seconds after the upload finishes, you should see the pin 13 (L) LED on the board start to blink (in
orange).
5.3.1. Connecting Arduino UNO Learning Board: 5.3.1. Connecting Arduino UNO Learning Board:
• Toolbar buttons and Functions of each button as shown in figure Breadboard for prototyping Arduino Uno Circuits
Verify / Compile Checks the code for Errors • The breadboard allows you to connect components together by plugging them
Stop Stop the serial monitor or un highlight other buttons into the little holes.
New Creates a new blank sketch,
Enter a name and a location for your sketch
• The key is to understand how the holes are connected.
Open Shows the list of sketches in your sketch book • As shown in figure, the holes in a column (When oriented as shown in figure) are
Upload Uploads the current sketch to the Arduino. connected together.
Need to make sure that you have current board and port selected (Tools menu)
before uploading • So to connect components together you need to plug the leads you want to
Serial Monitor Display serial data being sent from the Arduino connected into the same column.
Verify/Compile Button used to check that your code is correct, before upload it to Arduino • Note that columns are not connected across the “trench” in the center of the
Stop Button Will stop the serial monitor from operating. If you need to obtain a snapshot of board.
the serial data so far examined.
21-06-2022
5.3.1. Connecting Arduino UNO Learning Board: 5.3.1. Connecting Arduino UNO Learning Board:
Breadboard for prototyping Arduino Uno Circuits Breadboard for prototyping Arduino Uno Circuits
• These are typically used to create “rails”. • In order to keep circuit organized you need to use a breadboard, pictures below
Figure.
• These are typically used for ground and supply voltage that need to connect many
components.
• Some rows are marked (+) and Some (-). These are just markings
• The row will set at whatever voltage that we need to connect it.
5.3.1. Connecting Arduino UNO Learning Board: 5.4. Fundamentals of Arduino Programming
Technical Specifications of Arduino UNO
Microcontroller Arduino ATmega328P
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limit) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
PWM Digital I/O Pins 6
Analog Input Pins 6
DC Current per I/O Pin 20 mA
DC Current for 3.3V Pin 50 mA
32 KB (ATmega328P) of which 0.5 KB used by
Flash Memory
bootloader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Clock Speed 16 MHz
LED_BUILTIN 13
Length 68.6 mm
Width 53.4 mm
Weight 25 g
21-06-2022
This function is called once when a sketch starts after power-up or reset. After setup() function exits (ends), the loop() function is executed repeatedly
in the main program.
It is used to initialize variables, input and output pin modes, and other
libraries needed in the sketch It controls the board until the board is powered off or is reset.
void setup ( ) //after calling setup(), loop() function dos its task void loop( ) //after calling setup(), loop() function does its task
{ {
digitalWrite(pin, HIGH); //set pin ON digitalWrite(pin, HIGH); //set pin ON
delay(10000); // pauses for ten thousand milliseconds delay(10000); // pauses for ten thousand milliseconds
digitalWrite(pin, LOW); //set pin OFF digitalWrite(pin, LOW); //set pin OFF
delay(10000); // pauses for ten thousand milliseconds delay(10000); // pauses for ten thousand milliseconds
} }
21-06-2022
A function is a piece of code that has a name and set of statements executed
int delayvar( )
when function is called.
{
Functions are declared by its type followed with name of a function. int var; //create temporary variable
var=analogRead(potent); //read from potentiometer
Syntax:
var=var/4; //convert the value of variable var
type functionName (parameters)
return var; //return var
{ }
Statement(s);
They define beginning and end of function blocks, unbalanced braces may Multiline comments begins with /* with a description of the block and ends
leads to compilation errors. with */
A variable is defining by its value type as an int, long, float etc by setting a int var; //global variable {
specified name and optionally assigning an initial value. void setup() local++;
{ //local variable & visibility is with in for loop
A global variable can be seen in every part of the program which is declared }
// nothing is required;
at the beginning of the program before setup() function } float local_f;
A local variable is defined inside a function in which it was declared. //local variable & visibility is with in loop
void loop() {
assignment digitalWrite(greenLED, HIGH);
Type “becomes” delay(delayTime); Use delayTime
digitalWrite(greenLED, LOVWa)ri;able
value delay(delayTime);
variable name
}
21-06-2022
Arithmetic Operators x=x+5; y=y-6; z=z*2; p=p/q; TRUE/FALSE Boolean constants true=2 and false=0 defined in logic levels
(+, -, /, *) If(b==true)
while While loop executes until the expression inside parenthesis becomes false. pinMode(pin, mode) Before using a pin as a digital input or output, must first configure
while(condition) the pin, which is done with pinMode().
{
Used in setup() method to configure pin to behave as Input/Output
//Statement(s); //evaluates till comparison results in a false value
pinMode(pin, INPUT) //pin set to INPUT
}
pinMode(pin, OUTPUT) //pin set to OUTPUT
do while Bottom evaluated loop, works same way as while loop but condition is tested
DigitalRead(pin) Read value from a specified pin with result being HIGH/LOW
at the end of loop.
do Val=DigitalRead(pin); //val will be equal to input pin
Example int x=13; //connect x to pin 13 Read value from a specified analog pin works on pins 0 -5.
int p=7 //connect push button to pin 7 val = analogRead(pin); //value equal to pin
int val=0; //variable to store the read value analogRead() reads the voltage value on a pin and returns int value
void setup() The pin argument denotes the analog pin you want to read from. When
{ referring to an analog pin, call them as A0, A1, A2,…A6.
pin MODE(x, OUTPUT); //sets ‘x’ as OUTPUT This function takes approximately 100 microseconds to perform.
} Writes an analog value using pulse width modulation (PWM) to a pin
analogWritanalogRead(
void loop() marked PWM works on pins 3,5,6,9,10.
pin,value)
{ It uses a simple technique to “emulate” an analog output.
val=digitalRead (p); //sets ‘value’ to 0 It relies on two things:
digitalWrite(x, val); //sets ‘x’ to button value a pulse width and a duty cycle.
Example int x=10; //connect ‘x’ to pin 13 delay(ms) Pauses for amount of time specified in miliseconds.
int p=0; //connect potentiometer to analog pin 7
millis() Returns the number of milliseconds since Arduino is running
int val;
val = millis(); //val will be equal to millis()
void setup( ) { }
void loop()
{
val=analog Read(p);
val /=4;
analog Write(x, val); //outputs PWM signal to ‘x’
}
21-06-2022
min(x, y) Calculates minimum of two numbers randomSeed(value) Sets a value/seed as starting point
val=min(val, 10) // sets ‘val’ to smaller than 10 or equal to 10.
random(min, max) Allows to return numbers within a range of specified by min and max values
max(x,y) Calculates maximum of two numbers Val=random(100, 200) //sets ‘val’ to random number between 100 to 200.
random(max)
val=max(val, 10) // sets ‘val’ to larger than 10 or equal to 10.
Example int num; int x=10;
void setup(){
randomSeed(millis()); //set millis() as seed
num = random(200); //random number 0 – 200
analogWrite(x, number); //outputs PWM signal
delay(500);
}
Serial.begin(rate) Opens serial port and sets the baud rate fro serial data transmission }
void setup() {
void loop()
Serial.begin(9600); //sets default rate to 9600 bps {
}
digitalWrite(10, HIGH);
delay(500); // Wait for 1000 millisecond(s)
//exit(0); //to exit from simulation (only once LED will blink
}
https://www.tinkercad.com/ https://www.tinkercad.com/things/53AHrLloDKL-frantic-jaiks-lahdi/editel?tenant=circuits
21-06-2022
Writes the digital value (HIGH or LOW) to a pin set for output
21-06-2022
• The Raspberry Pi launched in 2012, and there have been several iterations and Reset PI Ethernet Controller
• The main price point for Raspberry Pi has always been $35 and all models have
been $35 or less, including the Pi Zero, which costs just $5.
o The Broadcom BCM2835 SoC used in first generation Raspberrypi used in o Power to Raspberrypi is via micro USB port on the side of the unit.
first generation smartphones which includes 700MHz ARM 1176JZF-S
o Recommended voltage is +5V and recommended input current 2A.
processor, Video Core IV graphics Processing Unit (GPU) and RAM.
o Raspberrypi can function on lower current power (5V @1A)
o Raspberrypi 2 uses BCM2836 SoC with 900MHz 32-bit quad core ARM Cortex
A7 processor with 256KB shared L2 cache
• SD Card
o Raspberrypi 3 uses BCM2837 SoC with 1.2GHz 64-bit quad core ARM Cortex
o Raspberrypi does not have locally available storage.
A53 processor with 512KB shared L2 cache
o Framework is stacked on SD card which is embedded on SD card space on
Raspberrypi
21-06-2022
o GPIO is a non specific pins on a coordinated circuit to know is an input or o The Rasberrypi Connector S2 is a display serial interface (DSI) for
output pin which can be controlled by a client at run time. connecting a liquid crystal display (LCD) panel using a 15-pin ribbon cable.
o GPIO Capabilities o The mobile industry processor interface (MIPI) inside the Broadcom
BCM2835 IC feeds graphics data display panel through this connector.
GPIO pins can be designated to be input or output
o OK – SDCard Access (GPIO16) o Camera Serial Interface (CSI) is a serial interface connector outlines by
MIPI (Mobile industry Processor Interface) for interfacing computerized
o Power - 3.3V Power “PWR”
cameras with portable processor.
o FDX - Full Duplex (LAN) (Model B)
• HDMI
o LNK - Link/Activity (LAN) (Model B)
o High Definition multimedia interface (HDMI) to give both video and Sound
o 10M/100 - 10/100Mbit (LAN) (Model B) yield.
• JTAG Headers
• Ethernet Port o JTAG is acronym for Joint Test Action Group used for accessing to gadget
o Ethernet port is accessible on model B and Model B+ (LAN9512 LAN) pins by means of a serial port.
21-06-2022
• The Raspberry Pi configuration tool in Raspbian, allowing you to easily enable • Configuring your Pi to connect to a wireless network using the Raspberry Pi 3's
features such as the camera, and to change your specific settings such as or Pi Zero W's inbuilt wireless connectivity, or a USB wireless dongle
keyboard layout
• The Raspberry Pi configuration file • Configuring your Pi as a wireless access point using the Raspberry Pi 3 and
Pi Zero W's inbuilt wireless connectivity, or a USB wireless dongle
21-06-2022
Wireless Temperature Monitoring System Using Pi: Wireless Temperature Monitoring System Using Pi:
• Raspberry Pi which having inbuilt wi-fi, which makes Raspberry Pi to suitable for • This basic will teach you to how to work with a cloud by using LM35 as a
IoT applications, so that by using IoT technology this monitoring system works by temperature sensor, to detect the temperature and to upload those values into the
uploading the temperature value to the Thingspeak cloud by this project you can cloud.
able to learn to how to handle cloud-based application using API keys.
• In this monitoring system, we used Thingspeak cloud, the cloud which is suitable
to view the sensor logs in the form of graph plots. Here we created one field to
monitor the temperature value, that can be reconfigurable to monitor a number of
sensor values in various fields.
• This basic will teach you to how to work with a cloud by using LM35 as a
temperature sensor, to detect the temperature and to upload those values into the
cloud.
21-06-2022
• HARDWARE REQUIRED PYTHON LIBRARIES USED • The DS18B20 is a 1-wire programmable Temperature sensor from maxim
• RPi.GPIO as GPIO (To access the GPIO Pins of
• Raspberry Pi integrated. It is widely used to measure temperature in hard environments like
Raspberry Pi)
• SD card
• Time library (For Time delay)
• Power supply • Urllib2 to handle URL using
in chemical solutions, mines or soil etc.
• VGA to HDMI converter Python programming
(Optional) • The constriction of the sensor is rugged and also can be purchased with a
• MCP3008 (ADC IC) waterproof option making the mounting process easy.
• A temperature sensor(LM35)
• It can measure a wide range of temperature from -55°C to +125° with a decent
• SOFTWARE REQUIRED
• Raspbian Stretch OS accuracy of ±5°C.
• SD card Formatter
• Win32DiskImager (or) Etcher
Pin Configuration:
No Pin Description
Name
1 Ground Connect to the ground of thecircuit
2 Vcc Powers the Sensor, canbe 3.3V or5V
3 Data This pin gives output the temperature value which can be read using 1-wire method
21-06-2022
• The Raspberry Pi will act as a remote device: you can connect to it using a client on another machine.
2. Enable SSH
Accessing Temperature from DS18B20 sensors: Accessing Temperature from DS18B20 sensors:
• The DS18B20 is a digital thermometer that allows to get 9-bit to 12-bit Celsius temperature • The sensor communicates using the OneWire protocol, which means it only requires a pin
measurements (programmable resolution). from a microcontroller to be connected to it.
• The temperature conversion time depends on the resolution used. For a 9-bit resolution it • Furthermore, each sensor has a unique 64-bit serial code, allowing multiple DS18B20
takes at most 93.75 ms and for a 12-bit resolution it takes at most 750 ms. devices to function on the same OneWire bus.
• The device is able to measure temperatures from -55°C to +125°C and has a ±0.5°C • In terms of power supply, the device can operate with a voltage between 3.0 V and 5.5 V,
accuracy in the range from -10°C to +85°C. which means it can operate with the same voltage of the ESP32 without the need for level
conversion.
• Additionally, it has an alarm functionality with programmable upper and lower temperature
trigger points.
• These thresholds are stored internally in non-volatile memory, which means they are kept
even if the device is powered off .
21-06-2022
Remote Log Into Your Raspberry Pi’s Full Operating System Using VNC Connect:
Remote access to RaspberryPi:
• To access a Raspberry Pi (or any home computer for that matter) from outside • VNC has long been the best way to access any computer remotely on the same
your home network, you’d usually need to jump through a lot of hoops, get an network. Recently, VNC Connect came out to make it easy to access your Raspberry Pi
IP address, and tweak a few settings on your home router. If you just need to from anywhere using a cloud connection. Once it’s set up, you can access your
control a few simple things on your Raspberry Pi, that’s overkill. We’re going to Raspberry Pi’s graphic interface from any other computer or smartphone using the VNC
outline two methods that skip all of that. Viewer app.
• The first thing you need to do is get your Raspberry Pi set up and connected to
your home network. Since you’re exposing your Raspberry Pi to the internet, be
sure you change your default password during the set up process. Once that’s
done, come back here to set up everything else.
Serial: The serial interface on Raspberry Pi has receive (rx) and transmit (tx) pins for communication with serial
RaspberryPi OS: (Not RaspberryPi OS: RaspberryPi OS: RaspberryPi OS:
peripherals.
linux) (Linux based) (Media center based) (Audio based)
SPI: Serial Peripheral Interface (SPI) is a synchronous serial data protocol for communicating with one or more
1. RISC OS Pi 1. Xbean 1. OSMC 1. Volumio
peripheral devices. In an SPI connection, there is one master device and one or more peripheral devices. There are
five pins on raspberry Pi for SPI interface 2. Free BSD 2. Open SUSE 2. OpenELEC 2. Pimusixbox
o MISO (Master In Slave Out): Master line for sending data to the peripherals
3. NetBSD 3. Arc OS 3. LitreELEC 3. Runeaudio
o MOSI (Master out Slave In): Slave line for sending data to the master.
4. Plan 9 4. Kano OS 4. Xbian
o SCK (Serial Clock): Clock generated by master to synchronize data transmissions.
o CE0 (Chip Enable 0): To enable or disable devices. 5. Haiku 5. Nard SDX 5. Rasplex
Data flows from devices at the street layer to the city network layer and connect to the
data center layer, where the data is aggregated, normalized, and virtualized.
The data center layer provides information to the services layer, which consists of
the applications that provide services to the city.
In smart cities, multiple services may use IoT solutions for many different purposes. These
services may use different IoT solutions, with different protocols and different application
languages
Street Layer: A variety of sensors are used at the street layer for variety of smart city use cases. Here is a short
representative list
The street layer is composed of devices and sensors that collect data and take action
o A magnetic sensor can detect a parking event by analyzing changes in the surrounding magnetic
based on instructions from the overall solution, as well as the networking components field when a heavy metal object such as a car or a truck comes close to it (or on top of it).
needed to aggregate and collect data. o A lighting controller can dim and brighten a light based on a combination of time based and
ambient conditions.
A sensor is a data source that generates data required to understand the physical o Video cameras combined with video analytics can detect vehicle faces and traffic conditions for
world. Sensor devices are able to detect and measure events in the physical world. various traffic and security use cases.
o An air quality sensor can detect and measure gas and particulate matter concentrations to give a
ICT connectivity solutions rely on sensors to collect the data from the world around hyper-localized perspective on pollution in a given area.
them so that it can be analyzed and used to operationalize use cases for cities. o Device counters give an estimate of the number of devices in the area which provides a rough
idea of the number of vehicles moving or parked in a street or public parking area of pedestrians
on a sidewalk, or even of birds in public parks or on public monuments.
21-06-2022
At the city layer, which is above the street layer, network routers and switches must be However, one key consideration of the city layer is that it needs to transport multiple
deployed to match the size of city data that needs to be transported. types of protocols, for multiple types of IoT applications. Some applications are delay-
and jitter sensitive, and some other applications require a deterministic approach to
This layer aggregates all data collected by sensors and the end-node network into a frame delivery.
single transport network.
A missed packet may generate an alarm or result in an invalid status report. As a result,
The city layer may appear to be a simple transport layer between the edge devices the city layer must be built around resiliency, to ensure that a packet coming from a
and the data center or the Internet. sensor or a gateway will always be forwarded successfully to the headend station
City Layer:
In this model, at least two paths exist from any aggregation switch to the data center
layer. A common protocol used to ensure this resiliency is Resilient Ethernet Protocol
(REP).
21-06-2022
Ultimately, data collected from the sensors is sent to a data center, where it can be The cloud model is the chief means of delivering storage, virtualization, adaptability, and
processed and correlated. the analytics know-how that city governments require for the technological mashup and
synergy of information embodied in a smart city.
Based on this processing of data, meaningful information and trends can be derived, and
information can be provided back. Traditional city networks simply cannot keep up with the real-time data needs of
smart cities; they are encumbered by their physical limitations.
For example, an application in a data center can provide a global view of the city traffic
and help authorities decide on the need for more or less common transport vehicles. At The cloud enables data analytics to be taken to server farms with large and
the same time, an automated response can be generated extensible processing capabilities.
Service Layer:
Ultimately, the true value of ICT connectivity comes from the services that the
measured data can provide to different users operating within a city.
Smart city applications can provide value to and visibility for a variety of user types,
including city operators, citizens, and law enforcement.
The collected data should be visualized according to the specific needs of each
consumer of that data and the particular user experience requirements and
individual use cases.
21-06-2022
A serious concern of most smart cities and their citizens is data security. A security architecture for smart cities must utilize security protocols to fortify each layer
of the architecture and protect city data.
Vast quantities of sensitive information are being shared at all times in a layered, real-
time architecture, and cities have a duty to protect their citizens’ data from unauthorized Figure shows a reference architecture, with specific security elements highlighted.
access, collection, and tampering.
Security protocols should authenticate the various components and protect data
In general, citizens feel better about data security when the city itself, and not a transport throughout.
private entity, owns public or city-relevant data.
It is up to the city and the officials who run it to determine how to utilize this data.
Starting from the street level, sensors should have their own security protocols.
Smart City Security Architecture: The city layer transport data between the street layer and the data center layer. It acts as the network layer.
The following are common industry elements for security on the network layer.
Sensor identification and authorization typically requires a pre-installed factory X.509
o Firewall: A firewall is located at the edge, and should be IPsec and VPN ready and include user and role based
certificate and public key infrastructure (PKI) at the organization level, where a new
access control. It should also be integrated with the architecture to give city operators remote access to the city
certificate is installed through a zero-touch deployment process. data center.
o VLAN: A VLAN provides end to end segmentation of data transmission. Further, protecting data from rogue
This additional processing may slow the deployment but ensures the security of the
intervention. Each service / domain has a dedicated VLAN for data transmission.
exchanges.
o Encryption: Protecting the traffic from the sensor to the application is a common requirement to avoid data
Another consideration may be the type of data that the sensor is able to collect and tampering and eavesdropping. In most cases, encryption starts at the sensor level. In some cases, the sensor to
process. For example, a roadside car counter may include a Bluetooth sensor that gateways link uses on type of encryption and the gateway to application connection used another encryption
(Ex: VPN).
uniquely identifies each driver or pedestrian