0% found this document useful (0 votes)
101 views6 pages

Interfaces Uart Peripheral:: Vunit

The document discusses building IoT projects with Arduino and Raspberry Pi. It describes that Arduino can be used for standalone projects or those communicating with a computer via USB. Raspberry Pi is a credit card-sized computer that runs Linux and has GPIO pins to control electronics. It discusses Raspberry Pi models, components, interfaces including SPI, I2C and serial communication. Examples applications mentioned include home automation, robotics, security monitoring and more.

Uploaded by

Ponraj Park
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views6 pages

Interfaces Uart Peripheral:: Vunit

The document discusses building IoT projects with Arduino and Raspberry Pi. It describes that Arduino can be used for standalone projects or those communicating with a computer via USB. Raspberry Pi is a credit card-sized computer that runs Linux and has GPIO pins to control electronics. It discusses Raspberry Pi models, components, interfaces including SPI, I2C and serial communication. Examples applications mentioned include home automation, robotics, security monitoring and more.

Uploaded by

Ponraj Park
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

V Unit – Building IoT With Arduino &Raspberry Pi

6. We can develop an Arduino based project which can be completely stand alone or
projects which involve direct communication with the software loaded in the computer.

7. It comes with an easy provision of connecting with the CPU of the computer using serial
communication over USB as it contains built in power and reset circuitry.

Interfaces

UART Peripheral:
 A UART (Universal Asynchronous Receiver/Transmitter) is a serial interface.
 It has only one UART module.
 The pins (RX, TX) of the UART are connected to a USB-to-UART converter circuit and
also connected to pin0 and pin1 in the digital header.

SPI Peripheral:
 The SPI (Serial Peripheral Interface) is another serial interface. It has only one SPI
module.
TWI:
 The I2C or Two Wire Interface is an interface consisting of only two wires, serial data,
and a serial clock: SDA, SCL.
 You can reach these pins from the last two pins in the digital header or pin4 and pin5 in
the analog header.

5.2 Building IOT with RASPERRY PI


Internet of Things

The Internet of Things (IoT) is a scenario in which objects, animals or people are provided with
single identifiers and the capability to automatically transfer and the capability to automatically
transfer data more to a network without requiring human-to-human or human-to-computer
communication.

Raspberry Pi

 The Raspberry Pi is a very cheap computer that runs Linux, but it also provides a set of
GPIO (general purpose input/output) pins that allow you to control electronic
components for physical computing and explore the Internet of Things (IoT).
 Raspberry Pi was basically introduced in 2006.
 It is particularly designed for educational use and intended for Python.
 A Raspberry Pi is of small size i.e., of a credit card sized single board computer, which is
developed in the United Kingdom(U.K) by a foundation called Raspberry Pi.

6
V Unit – Building IoT With Arduino &Raspberry Pi

 There have been three generations of Raspberry Pis: Pi 1, Pi 2, and Pi 3


 The first generation of Raspberry (Pi 1) was released in the year 2012, that has two types
of models namely model A and model B.
 Raspberry Pi can be plugged into a TV, computer monitor, and it uses a standard
keyboard and mouse.
 It is user friendly as can be handled by all the age groups.
 It does everything you would expect a desktop computer to do like word-processing,
browsing the internet spreadsheets, playing games to playing high definition videos.
 All models feature on a broadcom system on a chip (SOC), which includes chip graphics
processing unit GPU(a Video Core IV), an ARM compatible and CPU.
 The CPU speed ranges from 700 MHz to 1.2 GHz for the Pi 3 and on board memory
range from 256 MB to 1 GB RAM.
 An operating system is stored in the secured digital SD cards and program memory in
either the MicroSDHC or SDHC sizes.
 Most boards have one to four USB slots, composite video output, HDMI and a 3.5 mm
phone jack for audio. Some models have WiFi and Bluetooth.
 Several generations of Raspberry Pis have been released.
 All models feature a Broadcom system on a chip (SoC) with an integrated ARM-
compatible central processing unit (CPU) and on-chip graphics processing unit (GPU).
 Processor speed ranges from 700 MHz to 1.4 GHz for the Pi 3 Model B+ or 1.5 GHz for
the Pi 4; on-board memory ranges from 256 MB to 1 GB with up to 4 GB available on
the Pi 4 random-access memory (RAM).
 Secure Digital (SD) cards in MicroSDHC form factor (SDHC on early models) are used
to store the operating system and program memory.
 The boards have one to five USB ports. For video output, HDMI and composite video are
supported, with a standard 3.5 mm tip-ring-sleeve jack for audio output.
 Lower-level output is provided by a number of GPIO pins, which support common
protocols like I²C. The B-models have an 8P8C Ethernet port and the Pi 3 and Pi Zero W
have on-board Wi-Fi and Bluetooth.

7
V Unit – Building IoT With Arduino &Raspberry Pi

Components and Peripherals

 Voltages: Two 5V pins and two 3V3 pins are present on the board, as well as a number
of ground pins (0V). The remaining pins are all general purpose 3V3 pins
 A GPIO pin designated as an output pin can be set to high (3V3) or low (0V). A GPIO
pin designated as an input pin can be read as high (3V3) or low (0V).
 Processor & RAM: Raspberry based on ARM11 processor. Latest version supports
700MHz processor and 512MB SDRAM. The Central processing unit is the brain of the
raspberry pi board and that is responsible for carrying out the instructions of the computer
through logical and mathematical operations.
 Ethernet: The Ethernet port of the raspberry pi is the main gateway for communicating
with additional devices. The raspberry pi Ethernet port is used to plug your home router
to access the internet.

8
V Unit – Building IoT With Arduino &Raspberry Pi

 USB Ports: It has 2 USB ports. USB port provide current upto 100mA. For connecting
devices that draw current more than 100mA, an external USB powered hub is required.
 Ethernet Port: It has standard RJ45 Ethernet port. Connect Ethernet cable or USB wifi
adapter to provide internet connectivity.
 HDMI Output: It supports both audio and video output. Connect raspberry Pi to monitor
using HDMI cable.
 Composite video Output: Raspberry comes with a composite video output with an RCA
jack that supports both PAL and NTSC video output.
 Audio Output: It has 3.5mm audio output jack. This audio jack is used for providing
audio output to old television along with RCA jack for video.
 GPIO Pins: It has a number of general purpose input/output pins. These pins are used to
connect other electronic components. For example, you can connect it to the temperature
sensor to transmit digital data.
 Display Serial Interface (DSI): DSI interface are used to connect an LCD panel to
Raspberry PI.
 Cameral Serial Interface(CSI): CSI interface are used to connect a camera module to
Raspberry PI.
 SD Card slot: Raspberry does not have built in OS and storage. Plug in an SD card
loaded with Linux to SD card slot.
 Power Input: Raspberry has a micro USP connector for power input.
 Memory: The raspberry pi model A board is designed with 256MB of SDRAM and
model B is designed with 51MB.Raspberry pi is a small size PC compare with other PCs.
The normal PCs RAM memory is available in gigabytes. But in raspberry pi board, the
RAM memory is available more than 256MB or 512MB
 Status LEDs: Raspberry has 5 status LEDs.

Status LED Function


ACT SD card Access
PWR 3.3V power is present
FDX Full duplex LAN Connected
LNK Link/Network Activity
100 100 Mbit LAN connected

Raspberry PI Interfaces:

 It supports SPI, serial and I2C interfaces for data transfer.


 Serial : Serial Interface on Raspberry has receive(Rx) and Transmit(Tx) pins for
communication with serial peripherals.
 SPI: Serial Peripheral Interface (SPI) is a synchronous serial data protocol used for
communicating with one or more peripheral devices. In an SPI connection, there is one
master device and one or more peripheral devices. There are 5 pins Raspberry for SPI
interface.
o MISO(Master In Slave Out): Master line for sending data to the peripherals.
o MOSI(Master Out Slave In): Slave Line for sending data to the master.
o SCK(Serial Clock): Clock generated by master to synchronize data transmission.
o CE0(Chip Enable 0): To enable or disable devices.

9
V Unit – Building IoT With Arduino &Raspberry Pi

o CE1(Chip Enable 1): To enable or disable devices.


 I2C: I2C Interface pins are used to connect hardware modules. I2C interface allows
synchronous data transfer with two pins: SDA(data line) and SCL (Clock Line)

Features of Raspberry PPI

1. Where the system processing is huge. They can process high end programs for applications
like Weather Station, Cloud server, gaming console etc. With 1.2GHz clock speed and 1 GB
RAM RASPBERRY PI can perform all those advanced functions.

2. RASPBERRY PI 3 has wireless LAN and Bluetooth facility by which you can setup WIFI
HOTSPOT for internet connectivity.

3. RASPBERRY PI had dedicated port for connecting touch LCD display which is a feature that
completely omits the need of monitor.

4. RASPBERRY PI also has dedicated camera port so one can connect camera without any
hassle to the PI board.

5. RASPBERRY PI also has PWM outputs for application use.

6. It supports HD steaming

Applications

 Hobby projects.
 Low cost PC/tablet/laptop
 IoT applications
 Media center
 Robotics
 Industrial/Home automation
 Server/cloud server
 Print server
 Security monitoring
 Web camera
 Gaming
 Wireless access point

5.3 IoT Systems - Logical Design using Python


5.3.1 Introduction
Characteristics of Python:
 Multi-paradigm programming language: Python supports more than one programming
paradigms including object oriented programming and structured programming.

10
V Unit – Building IoT With Arduino &Raspberry Pi

 Interpreted Language: It is an interpreted language and does not require an explicit


compilation step. Python interpreter executes the program source code directly and
statement by statement interpreted.
 Interactive Language: user can submit commands at the python prompt and interact
with the interpreter directly.
 Easy to Learn and Use: Python is easy to learn and use. It is developer-friendly and
high level programming language.
 Object and procedure oriented: python supports both procedure and object oriented
programming. It allows programs to be written around procedures or functions that allow
reuse of code.
 Extendable: It is an extendable language and allows integration of low level modules
written in languages such as C/C++.
 Scalable: It provides a manageable structure for large programs.
 Portable: Python programs are executed directly from source code and copy from one
machine to other without worry about portability. Python interpreter converts source code
to an intermediate form called byte code and then translate this into the native language
of your specific system and then runs it.
 Broad Library support: It supports and works on different platforms such as windows,
Linux, Mac etc. Large number of packages are available for various applications such as
machine learning, image processing, network programming, cryptography etc.
 Databases − Python provides interfaces to all major commercial databases.
 GUI Programming − Python supports GUI applications that can be created and ported
to many system calls, libraries and windows systems, such as Windows MFC,
Macintosh, and the X Window system of Unix.

Uses / Applications of Python


 Python can be used on a server to create web applications.
 Python can be used alongside software to create workflows.
 Python can connect to database systems. It can also read and modify files.
 Python can be used to handle big data and perform complex mathematics.
 Python can be used for rapid prototyping, or for production-ready software development.
5.3.2 Installing Python
It is highly portable language that works on different platforms such as windows, Linux, Mac
etc.
Windows
Python 2.7 can be downloaded from http://www.python.org/ftp/python/2.7.5/python-2.7.5.msi
Linux
Install python in Ubuntu Linux like:
#download python
wget http://python.org/ftp/python/2.7.5/python-2.7.5.tgz

11

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy