IoT Designusing Pi Arduino
IoT Designusing Pi Arduino
Raspberry Pi and
Arduino
Content
• Raspberry Pi
• Arduino
• Sensors
• Physical Connection
• Programming/ Coding
• Data Collection
• Data Transmit
• Data analysis and visualisation
• Open source hardware with
Raspberry Pi 64-bit quad-core processor for
simple computing and
comparable to entry level
desktop computers
• Equipped with dual display,
dual band wireless LAN,
Bluetooth 5.0
• Backword compatible with
prior generation of Raspberry
Pi
• SD card support for OS and
Raspberry Pi 4 Model B
data storage
• Operating voltage is 5V and
minimum 3A current
•A microcontroller based on
Arduino ATmega328P
• 14 digital input/output pins
• USB connector, power jack
• Power input is 5V, can be given
with PC-USP port, AC-DC adaptor
or battery, operates on minimum
20mA current
• PWM (Pulse Width Moduclation)
Digital I/O Pins: 6
• Arduino has its native language
Arduino Uno
analogous to C++ to write code
called sketch
• The program files can be uploaded
with the help of its IDE
Sensors • Sensors are used in the
architecture of IOT devices
• These sensors provide usable
output to a specific measurement
• It uses different materials which
changes its state and these
changes are converted into
readable signals
• Different kind of sensors are
available for different purpose like
light sensor, IR sensor,
temperature sensor, pressure
sensor etc.
• Sensors are compatible with micro
controller and can directly
connected to receive data
• Microcontroller, sensors
Physical Connection and power source can be
connected either directing
with connecting wire or
using bread board and
jumper wires
• A proper connection for
power input, data out and
other connections is
required
• A wi-fi module can be
connected if it is not in-
build on the board
Programming/ Coding
• Arduino IDE can be used to write code (similar to C++)
for defining pins to connect and collect data, duration,
timing, frequency etc.
• Upload the code in microcontroller
• A loop() function can execute the repeated code
multiple times
• Data can be viewed on serial port display
• Data can also be transmitted and collected at server
end for further processing
• Native library files may be included for proper
functioning of sensors/ actuators
Data Collection
• Usually sensors generate analog signals based upon the
material properties used and changing pattern of
sensing object
Example: Temperature change in the environment changes the
resistance of some temperature sensitive material used in
sensors, so the signal produced also deviated which is
measured as temperature reading
• Some sensors also uses radio wave mixed with sensor
data which is filtered at the receiving end
• Infrared radiation are also used in some sensors to
detect the obstacles
Data Transmission
• Data transmission includes
• Device registration at data receiving end
• Pre-setting for the device to connect data receiving network –
Provisioning
• Device connection/ authentication
• Device setup as per the receiver’s configuration
• Data send and receive the command signals
• Updation – to update the device for any changes
• Bug fixes to save devices for any kind of failures
• Securely closing the connection when not required
• Disconnecting device when device is no more required
• Data Collection at the receiver end – either on central
server or cloud based infrastructure
• Protocols: MQTT, CoAP, HTTP, WebSockets.
Data Analysis and Visualization
• Processing the stored data/ historic data and extract the
meaningful results
• Also includes – preprocessing of data and storage of data
• Data analytic tools can be used for insight results
• Trends can be produced based upon historical data
• Future trends can also be generated using machine learning
models
• The data can be visualize to produce the results pictorially
• Statistical methods can be used to find the relation of
various parameters of the sensor data
• Some time it is required to analyse real-time data to prevent
any eventuality
Health monitoring system – a case
study
Pulse
Sensor
(Heart Command signals
rate) Data
Temperatur Output
e Sensor DB/ Doctor’s
Arduino Wi-Fi Raspberry Pi Centr visual
(Microcont module (OSI layers) al device/
Blood
roller) (ESP8266) Serve Patient
pressure
r reports
Sensor
Respiratory
Sensor