What Is IoT?

The Internet of Things (IoT) is the network of things (physical devices, vehicles, home appliances, and other items embedded with electronics, software, sensors, actuators)  connected through internet which enables these things to exchange data. This creates opportunities for more direct integration of the physical world into computer-based systems, resulting in efficiency improvements, economic benefits, and reduced human exertions.

We are going to see IoT in everything. As per Gartner By 2020, IoT technology will be in 95% of electronics for new product designs.With the technology evolution surrounding the IoT, it will become increasingly possible to add IoT features to a product at minimal cost. As IoT is going be a major player in market and most of people and enterprise are also worried about security challenges of the internet of things. There are multiple threats and challenges of iot and how to face the iot challenges and solutions are identified.While security challenges in iot need to be sorted,due to challenges in determining security risks and exposure for IoT, current budgets for security spend is minimal.Most organizations already face information risks from Internet of Things (IoT) devices. In fact, almost 20% of organizations have detected an IoT-based attack in the past three years.

IoT Risks And Challenges:

We will list down the top iot security challenges in this tutorial.As all know security is one of the major problems with iot and key IoT adoption barriers for the enterprises.


Security and Privacy:

Security is an essential pillar of the Internet and one that to be equally essential and the most significant challenge for the IoT. As Increase the number of connected devices increases the opportunity to exploit security vulnerabilities, as poorly designed IoT devices can expose user data to theft by leaving data streams inadequately protected.A latest research claims that by 2020, 25% of cyber attacks will target IoT devices.

Major security issues in iot have been raised that the IoT is being developed rapidly without appropriate consideration of the profound security challenges involved.Most of the technical security concerns are similar to those of conventional servers, workstations and smartphones. Security is the biggest concern in adopting Internet of things technology. As the Internet of things spreads widely, cyber attacks are likely to become an increasingly physical threat.The vulnerabilities include weak authentication (IoT devices are being used with default credentials), unencrypted messages sent between devices, lack of verification or encryption of software updates.

In a January 2014 article in Forbes, cyber-security columnist Joseph Steinberg listed many Internet-connected appliances that can already “spy on people in their own homes” including televisions, kitchen appliances,[185] cameras etc.Welcome to the era of the Internet of Things (IoT), where digitally connected devices are encroaching on every aspect of our lives, including our homes, offices, cars and even our bodies. To deal with all these unique challenges, there is a need for strict approach to security. A lot of users are ultimately going to compare the cost against the security.

IoT creates unique challenges to privacy, many that go beyond the data privacy issues, consumer devices such as tracking devices for phones and cars as well as smart televisions are capable of tracking your day today activities .The Internet of things’ potential for major privacy invasion is a concern.Consumers take a more active interest in protecting their privacy and demand IoT devices to be screened for potential security vulnerabilities and privacy violations before purchasing them.Consumers are increasingly worried about privacy risks and security concerns that outweigh the value propositions of IoT devices and they opt to postpone their planned purchases or service subscriptions of IoT devices or soutions. As Security and Privacy are major issues in IoT, Enterprises when developing their IoT systems really need to work on IoT security issues and solutions.

Regulations and Standards:

One of the key drivers of the IoT is data. The success of the idea of connecting devices to make them more efficient is dependent upon access to and storage & processing of data. Companies working on the IoT collect data from multiple sources and store it for further processing.Lack of proper Reguation and standards will open up the possibility for for privacy and security dangers. IoT regulation depends on the country. Several standards for the IoT industry are actually being established relating to automobiles because most concerns arising from use of connected cars apply to healthcare devices as well. Lack of standards and documented best practices have a greater impact than just limiting the potential of IoT devices.These are because of still early days for IoT in government and unclear business models, despite strong value proposition.Without the right standards to guide and regulate manufacturers the developers may design products that operate in disruptive ways and If they are configured or designed poorly, these devices may have huge consequences on resources they connect.

Existing and upcoming privacy laws, including the European General Data Protection Regulation (GDPR), will dramatically impact an organization’s strategy, purpose and methods for processing personal data in IoT.

Lack of Interoperability:

Another one of the main internet of things challenges is IoT devices lacking interoperability.With numerous vendors, OEMs, and service providers in IoT business, it has become really difficult to maintain interoperability between different IoT systems.Sensors and connectivity are the integral components of IoT. But not every IoT soutions are equipped with advanced sensors and networking capabilities to effectively communicate and share data between different builds and manafucturers. It will be really challenging to identify a easy solution for this. However from end user perspective this is a really needed capability in a IoT devices.

In short as part of this artice we have seen the iot security problems and iot challenges in the real world.

In the tutorial Wireless Remote Control Lighting System | Smart Lighting Control Systems I have done the control of AC light using Raspberry Pi and Cayenne App. I got a request from my friend to control the Water Pumping motor at a specific interval. Currently they have to switch on and off the motor manually. So we will be working on AC motor and Raspberry pi which will act as automatic watering system. We are not making any plant watering system here.

You could have seen other articles on controlling DC Motors Using Python With a Raspberry Pi, however here we are using the Raspberry Pi to control AC electric power . The connections are almost similar to the light control system, you need to replace the light with motor and we will be using Python script.

Components Needed:

  1. Raspberry Pi
  2. 5V Relay Module
  3. AC Motor/Water Pump
  4. Connecting wires
  5. Power supply for Pi


Automatic Water Pump Using Raspberry Pi:

For making automate motor control with raspberry pi, first connect the VCC of the Relay to GPIO Pin 2 and Relay GND to GPIO 39 which is GND in Pi. Connect the Raspberry Pi GPIO Pin 19 to Relay IN pin which will control the NO and NC connection of Relay . Connect the AC line 120/230V AC from Plug point to COM of Relay and other wire from NO or NC on relay to the Motor. The neutral from pug point will go directly to Motor.

Raspberry Pi Motor Control

Python Script For Raspberry Pi 3 Automatic Watering System:

The raspberry pi ac motor control will run based on interval we define in the script. What we are doing here is to capture the last run time of the motor in to a notepad and check that with current time. If the motor last run was  1 hour before the motor will start pumping the water for 15 min and will stop.

import RPi.GPIO as GPIO
import os
import sys
import datetime
import time
from time import sleep
GPIO.setup(17, GPIO.OUT)
runhour = (time.strftime("%H%M%S"))
add = 4000
file1 = open("/home/pi/Motor_Running_Project.txt","r",encoding = 'utf-8')
f = file1.read(6)
intrunhour = int (f)
while True:

now = int(time.strftime("%H%M%S"))
x = now - intrunhour

       if x>=0:

         print("program started")
         intrunhour = now + add
         nextrun = str (intrunhour)
         file1 = open("/home/pi/Motor_Running_Project.txt","w")

                print("program not started")


The Python program is also attached Motor Control With Raspberry Pi_Project.py.

For DC Motor Control With Raspberry Pi I will update in new tutorial.

What Is Digital Transformation?

Digital business transformation is the process of exploiting digital technologies and supporting capabilities to create a robust new digital business model. Digital Transformation is not necessarily about digital technology, but about the fact that technology, which is digital, allows people to solve their traditional problems. And they prefer this digital solution to the old solution. Digital transformation helps the organization through integration of digital technology into all areas of a business, fundamentally changing how you operate and deliver value to customers. It is also a cultural change.

Gartner predicts that by 2020, more than 30 billion devices will be connected to the Internet. The advent of digital business expands and evolves as the opportunities, threats and constraints of leveraging a business ecosystem. A digital business ecosystem is a marketplace of functions and information. It is a network construct whereby multiple value forms are exchanged for the benefit of all participants.

Digital transformation will look different for every company. Why digital transformation matters? There are a several reasons for a business may undergo digital transformation, but the most likely reason is also that they have to fight for survival and make their business future proof. Technology has driven this shift, and companies that want to succeed must understand how to merge technology with strategy. In this tutorial we will see what are the main top digital transformation trends which in turns gives you the details of  best technology to learn to keep stay ahead in technology.

Source: Pixabay

Digital Transformation Trends 2019:

The future is going to be exiting and unpredictable. Currently most of the big companies are putting lot of efforts and research on new technologies. The Top 5 future technology predictions 2020 are :

Autonomous Things or Intelligent Things:

Most of the organizations are gathering information to build their AI strategies, The use of AI to enhance decision making, reinvent business models and ecosystems and increase the customer experience will payoff for their digital initiatives. Generally AI systems magically perform any intellectual task that a human can do and dynamically learn much as humans do at best. AI consisting of highly scoped machine-learning solutions that target a specific task that can be optimized.

Autonomous things abbreviated AuT, or the Internet of autonomous things abbreviated as IoAT, is an emerging term for the technological developments that are expected to bring computers into the physical environment as autonomous entities without human direction, freely moving and interacting with humans and other objects.Autonomous things such as robots drones and autonomous vehicles uses Artificial intelligence to automate functions previously performed by humans. As an eg: the autonomous car addresses the main existing safety issues and creates new issues. It is expected to be much safer than existing vehicles, by eliminating the single most dangerous element which is the driver. Intelligent things can respond to real world conditions automatically.Intelligent things use AI and machine learning to interact in a more intelligent way with people and surroundings.

Some other examples are Intel’s use of a drone swarm for the opening ceremony of the Winter Olympic Games in 2018 and a plan for Dubai to use autonomous police vehicles that can deploy their own drones for surveillance.

Digital Twins:

According to Gartner, a digital twin refers to the digital representation of a real-world entity or system.DTO (Digital Twins of Organizations) is a dynamic software model that relies on operational or other data to understand how an organization operationalizes its business model, connects with its current state, deploys resources and responds to changes to deliver expected customer value. Digital twin refers to a digital replica of physical assets (physical twin), processes, people, places, systems and devices that can be used for various purposes.

Below are few definitions of digital twins, Refer the WiKi link and Gartner link.

Definitions of digital twins used in existing literature
Definition Authors
“A Digital Twin is an integrated multiphysics, multiscale, probabilistic simulation of an as-built vehicle or system that uses the best available physical models, sensor updates, fleet history, etc., to mirror the life of its corresponding flying twin” Glaessgen & Stargel, (2012)
“Coupled model of the real machine that operates in the cloud platform and simulates the health condition with an integrated knowledge from both data driven analytical algorithms as well as other available physical knowledge” Lee, Lapira, Bagheri, an Kao, (2013)
“digital twin is a real mapping of all components in the product life cycle using physical data, virtual data and interaction data between them” Tao, Sui, Liu, Qi, Zhang, Song, Guo, Lu & Nee, (2018)
“a dynamic virtual representation of a physical object or system across its lifecycle, using real-time data to enable understanding, learning and reasoning” Bolton, McColl-Kennedy, Cheung, Gallen, Orsingher, Witell & Zaki, (2018)
“Using a digital copy of the physical system to perform real-time optimization” Söderberg, R., Wärmefjord, K., Carlson, J. S., & Lindkvist, L. (2017)
“A digital twin is a real time digital replica of a physical device” Bacchiega (2017)


Digital twins integrate artificial intelligence, machine learning and software analytics  to create living digital simulation models that update and change as their physical counterparts change. A digital twin continuously learns and updates itself from multiple sources to represent its near real-time status, working condition or position.


What is blockchain : Blockchain  is  an encrypted, distributed computer filing system , it is a growing list of records, called blocks, which are linked using cryptography. Block chain certainly is real however may not be completely ready in 2018 for adoption in every industry. Blockchain is going to be technology that will make a real impact across industry sectors along with IoT. Blockchain is the invention from brain of a single person or a group of person know by pseudonym, Satoshi Nakamoto. Digital currency , Bitcoin is first majority used purpose however now industry is finding the potential use of it as technology. Blockchain is getting used in Cybersecurity, healthcare, financial sectors etc. for securing health records, control disease, patient data, cryptocurrency wallets.

Blockchain technology holds the promise to change industries, and although mosty we see often around financial opportunities. Blockchain has many potential applications in government, healthcare, content distribution, supply chain and more. However, many blockchain technologies are immature and unproven, and are largely unregulated.

How bitcoin works?

Bitcoin, probably the most well-known example of blockchain, records cryptocurrency transactions in a chain-of-blocks data structure where a block is a group of transaction records added every few minutes in a never-ending series. The ledger records the sequence of each transaction and every “coin” (virtual currency stored as information bits).

Immersive Experience:

Immersion into virtual reality is a perception of being physically present in a non-physical world. The perception is created by surrounding the user of the VR system in images, sound or other stimuli that provide an engrossing total environment.An immersive experience is an illusory environment that completely surrounds you such that you feel that you are inside it and part of it. Augmented reality (AR), virtual reality (VR) and mixed reality are changing the way that people perceive and interact with the digital world.Whether we are playing a video game on our smartphone, video conferencing on our tablet, or watching sports on our Virtual Reality (VR) headset Immersion enhances everyday experiences, making them more realistic, engaging, and satisfying on all our devices.

Over the next years the focus will be on mixed reality, which is emerging as the immersive experience of choice, where the user interacts with digital and real-world objects while maintaining a presence in the physical world.

Augmented Analytics:

Augmented analytics focuses on a specific area of augmented intelligence, using machine learning (ML) to transform how analytics content is developed, consumed and shared. Augmented analytics is the future of data and analytics. As per Gartner Augmented analytics automates the process of data preparation, insight generation and insight visualization, eliminating the need for professional data scientists in many situations.

In this tutorial we will go through on how to turn on or off a AC lamp, or any other AC electrical device with a Raspberry Pi, Cayenne and a relay module.


Everyone wants to have use best home automation systems in their home , which is really expensive at times, Can I build my own home automation system to control your AC devices like lamp, Fan? . Yes we can, In this project we will work on simple way on how to control AC 230V lights. We can do this using Raspberry Pi and Arduino which are the two devices I have spoke in my previous IoT devices article. Controlling AC Light Using Arduino With Relay Module is one way, however we will be using Raspberry pi and Cayenne for building remote control wireless lights in your home.

Components Needed:

  1. Raspberry Pi
  2. 5V Relay Module
  3. AC Bulb
  4. Connecting wires
  5. Power supply for Pi
  6. Smartphone or Tablet for Cayenne.

Refer the article to understand the basics of Relay module and connections.

Controlling AC Light Using Raspberry Pi With Relay Module and Cayenne:

For making automated lighting system for home and controlling AC Devices with Raspberry Pi, first connect the VCC of the Relay to GPIO Pin 2 and Relay GND to GPIO 39 which is GND in Pi. Connect the Raspberry Pi GPIO Pin 19 to Relay IN pin which will control the NO and NC connection of Relay . Connect the AC line 120/230V AC from Plug point to COM of Relay and other wire from NO or NC on relay to the bulb. The neutral from pug point will go directly to bulb.


Connecting a light bulb with a Raspberry Pi

Make sure Cayenne is connected to your Raspberry Pi and create a LED or Toggle switch to control the Relay connection.

Once you login in cayenne , you will be able to see the dashboard page which gives the details of your raspberry pi. The dashboard gives you on the left the connected Raspberry Pi devices, if you have more than one devices connected it show all of them. If the device is online the color will be Red , if not it will be grey. Once you select your Raspberry Pi which is online, on the top right you will see the details of your device.

Now we have to add the device LED and it should be connected to the GPIO PIN 19. Kindly check the link for GPIO pin details.

Click on Add New -> Device/Widgets which will take it to the screen to select the device.

Add Widgets

Select Actuators -> Click on Generic -> Digital Output.

Digital Output Widget

Once you click on Digital Output, we will get the options to configure the widget.

Select the Device --> Raspberry Pi

Connectivity -> Integrated GPIO

Channel -> Channel 17

Choose Widget -> Button

Choose Icon -> LED

And click on Add Actuator

The Widget is added to the home dashboard now & we are done. You can click on the Widget and the AC bulb i will Turn On and you can click again the bulb will Turn OFF. We can control any AC LED Lamp Controlled Through a Relay and Cayenne now through your mobile or smartphone.

We have seen few IoT projects in my previous tutorials like Lighting LED with Raspberry PiHome Security email alert using Raspberry PiSecurity System Using Raspberry Pi With Motion Detection Camera in which we have not yet used any AC devices. We have controlled DC devices in the home automation projects. I would like to share home automation's for AC devices in my coming tutorials, however before that I would like to introduce you to the device 5 Volt Relay Module which is an necessary part to control AC device as Raspberry Pi  cannot control high voltage . In this section we will understand how to control Relay switch via GPIO, which is the first step of interface a Relay with Raspberry Pi and see how to setup a 5V Relay with the Raspberry Pi.

What is a Relay?

A relay is an electrically operated switch.Relays control one electrical circuit by opening and closing contacts in another circuit.Many relays use an electromagnet to mechanically operate a switch, but other operating principles are also used, such as solid-state relays.Relays are used where it is necessary to control a circuit by a separate low-power signal where the output is a high voltage, or where several circuits must be controlled by one signal.In our IoT home automation projects using Raspberry Pi it can control ow voltage devices of 3.3 V, however when we speak about 220 V of AC Raspberry Pi cannot handle it. So we uses a Relay switch which have Normally Open (NO) and Normally Closed (NC) Pins which is controlled by low voltage. Refer the below diagram to understand Raspberry Pi Relay Control.

1) Normally Open (NO) : The circuit is disconnected when the relay is inactive.

2) Normally Closed (NC) : The circuit is connected when the relay is inactive.


The relay switch is utilized by means of a low-voltage to control the AC connected in NO or NC pins. Since the Pi only tolerates a maximum of 5V and the GPIOs only 3.3V without relays the Pi could burn out if you use direct connections to GPIO pins. We will not controlling ac with raspberry pi in this relay raspberry pi tutorial tutorial however we will be controlling led with relay and raspberry pi.

How to use a relay with a Raspberry Pi:

This will be the base for your home automation using relay and raspberry pi, as part of home automation's you may want to control an electrical load like a light bulb or a ceiling fan or a water pump etc. Once you know the control of Relay we will implement the same in the upcoming projects.

The components needed:

  1. Raspberry Pi
  2. 5V Relay Module
  3. LED
  4. Connecting wires
  5. Power supply for Pi
  6. Bread Board
  7. Resistor -220 ohm


The connections is pretty simple refer the below simple Relay circuit. Connect the VCC of the Relay to GPIO Pin 2 and Relay GND to GPIO 39 which is GND in Pi. Connect the Raspberry Pi GPIO Pin 19 to Relay IN pin which will control the NO and NC connection of Relay .

Connect the 5 V from GPIO Pin 2 to the Normally Open connector in Relay and connect the Common port in Relay to the LED Anode. Connect the 220 Ohm resistor from cathode and other end of the resistor to the GND.

Lets write a simple script to bring the GPIO PIN 19 to high and low so that Relay will get activated when the voltage is high.

Raspberry pi relay python script:

import time

import RPi.GPIO as GPIO

GPIO.setup(19, GPIO.OUT)
GPIO.output(19, GPIO.HIGH)

GPIO.output(19, GPIO.LOW)


GPIO.output(19, GPIO.HIGH)


I have used Raspberry Pi for most of my IoT projects. Both arduino and raspberry pi is used for Home automations and IoT projects, I got of lot of queries on why not using Arduino boards. In this post I would like to cover difference between Arduino and Raspberry Pi, what differentiate between Arduino and Raspberry Pi.

Arduino and Raspberry Pi are the most popular IoT devices among the students, professionals and IoT project DIY peoples.Are you confused between them, like which board is easy to learn or which board to use for what projects or why should they use Arduino over Raspberry Pi? when to use Arduino vs Raspberry Pi?.In this article we will discusses all the features that can make you easy to choose the decision over Arduino and Raspberry Pi, Arduino vs Raspberry Pi which is better for your projects.

What is Arduino?

An Arduino is a simple micro-controller board which is capable of running a simple program to accomplish a desired function. Arduino runs on "bare metal". That it runs its software without an operating system.The Arduino boards are micro-controllers, not a full-fledged computer. simply write the code and execute as their firmware interprets it.

Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board.

Arduino Uno

Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast prototyping, aimed at students without a background in electronics and programming. As soon as it reached a wider community, the Arduino board started changing to adapt to new needs and challenges, differentiating its offer from simple 8-bit boards to products for IoT applications, wearable, 3D printing, and embedded environments. All Arduino boards are completely open-source, empowering users to build them independently and eventually adapt them to their particular needs. The software, too, is open-source, and it is growing through the contributions of users worldwide.The Arduino Software (IDE) allows you to write programs and upload them to your board.

Find the step-by-step instructions to Install the Arduino Desktop IDE select one of the following link accordingly to your operating system.

What is a Raspberry Pi?

The Raspberry Pi is a small computer that can do lots of things. You plug it into a monitor and attach a keyboard and mouse. Raspberry Pi is the third best-selling computer brand in the world. The Raspberry Pi is a credit card–sized computer that plugs into your TV or display, and a keyboard and mouse. You can use it to learn coding and to build electronics projects, and for many of the things that your desktop PC does, like spreadsheets, word processing, browsing the internet, and playing games. It also plays high-definition video. The Raspberry Pi is being used by adults and children all over the world to learn programming and digital making. You can learn how to set up and use your Raspberry Pi here.

Raspberry Pi 3 Model B+

Pi 3


Where can I buy a Raspberry Pi, and how much does it cost?

The following are the prices list.

Product Price
Raspberry Pi Model A+ $20
Raspberry Pi Model B+ $25
Raspberry Pi 2 Model B $35
Raspberry Pi 3 Model B $35
Raspberry Pi 3 Model B+ $35
Raspberry Pi Zero $5
Raspberry Pi Zero W $10
Raspberry Pi Zero WH $15


You get the Raspberry Pi board itself. The official power supply and an SD card are not included, but they can be purchased at the same time from most places that sell the Raspberry Pi. You can also purchase pre-loaded SD cards.

Why Arduino and key features of Arduino ?

There are many other microcontrollers and microcontroller platforms available for physical computing. Arduino also simplifies the process of working with microcontrollers,  it also offers some advantage for teachers, students, and interested amateurs over other systems. Below are advantages of Arduino.

  • Cheap and less cost - Arduino boards are relatively inexpensive compared to other microcontroller platforms
  • Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux operating systems.
  • Simple, clear programming environment - The Arduino Software (IDE) is easy-to-use for beginners, yet flexible enough for advanced users to take advantage of as well.
  • Open source and extensible software - The Arduino software is published as open source tools, available for extension by experienced programmers.
  • Open source and extensible hardware - The plans of the Arduino boards are published under a Creative Commons license, so experienced circuit designers can make their own version of the module, extending it and improving it.

Why Raspberry Pi and Advantages of Raspberry Pi:

  • Easy to connect to the internet - Comes with inbuilt WiFi adapter.
  • Runs on Linux operating system - Fully installed operating system in Pi.
  • Can be programmed using a variety of programming languages - Can create own program to run on Python and other languages.

When to Use & Not Use Arduino and Raspberry Pi:

Choosing which IoT board completely depends on the type of project you want to make, and your experience in programming. If you have no experience in programming or electronics, you will find the Arduino easier to learn than the Raspberry Pi.

If you want to make a hardware project, then the Arduino is the best choice,If the project requires you to interact with a lot of external hardware, sensors, analog devices, then you should consider using Arduino.

If the project requires a lot to write a complex software code and complex requirements, then Arduino may not be the best options.

I hope you got a good understanding on arduino vs raspberry pi for IoT and you can also refer some of the discussion in raspberry pi vs arduino quora for more details.