0% found this document useful (0 votes)
15 views26 pages

IoT Cloud and Arduino Board Overview

PYTHON PROGRAMMING
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)
15 views26 pages

IoT Cloud and Arduino Board Overview

PYTHON PROGRAMMING
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

IoT cloud enablement

An IoT cloud is a pinnacle of the IoT platforms evolution. Sometimes these two terms are
used interchangeably, in which case the system at hand is typically an IoT platform-as-a-
service (PaaS). This type of solution allows you to rent cloud infrastructure and an IoT
platform all from a single technology provider. Also, there might be ready-to-use IoT
solutions (IoT cloud services) offered by the provider, built and hosted on its infrastructure.
However, one important capability of a modern IoT platform consists in a private IoT cloud
enablement. As opposed to public PaaS solutions located at a provider’s cloud, a private IoT
cloud can be hosted on any cloud infrastructure, including a private data center. This type of
deployment offers much greater control over the new features development,
customization, and third-party integrations. It is also advocated for stringent data security
and performance requirements.

Arduino is a prototype platform (open-source) based on an easy-to-use hardware and software.


It consists of a circuit board, which can be programed (referred to as a microcontroller) and a
ready-made software called Arduino IDE (Integrated Development Environment), which is
used to write and upload the computer code to the physical board.
The key features are −
• Arduino boards are able to read analog or digital input signals from different sensors
and turn it into an output such as activating a motor, turning LED on/off, connect to
the cloud and many other actions.
• You can control your board functions by sending a set of instructions to the
microcontroller on the board via Arduino IDE (referred to as uploading software).
• Unlike most previous programmable circuit boards, Arduino does not need an extra
piece of hardware (called a programmer) in order to load a new code onto the board.
You can simply use a USB cable.
• Additionally, the Arduino IDE uses a simplified version of C++, making it easier to
learn to program.
• Finally, Arduino provides a standard form factor that breaks the functions of the micro-
controller into a more accessible package.

Board Types

Various kinds of Arduino boards are available depending on different microcontrollers used.
However, all Arduino boards have one thing in common: they are programed through the
Arduino IDE.
The differences are based on the number of inputs and outputs (the number of sensors, LEDs,
and buttons you can use on a single board), speed, operating voltage, form factor etc. Some
boards are designed to be embedded and have no programming interface
(hardware), which you would need to buy separately. Some can run directly from a
3.7V battery, others need at least 5V.
Here is a list of different Arduino boards available.
Arduino boards based on ATMEGA328 microcontroller
Board Operati Clock Digital Ana PW UART Programmin
Name ng Volt Speed i/o i/o M Interface
Arduino USB vi a
Uno R3 5V 16MHz 14 6 6 1
ATMega16U2
ArduinoUn USB vi a
oR3SMD 5V 16MHz 14 6 6 1
ATMega16U2

Red Board 5V 16MHz 14 6 6 1 USB via FTDI

Arduino FTDI-
Pro 3.3v/8 3.3V 8MHz 14 6 6 1 Compatible
MHz Header
ArduinoPro FTDI-
5V/16MHz 5V 16MHz 14 6 6 1 Compatible
Header
Arduino FTDI-
mini 05 5V 16MHz 14 8 6 1 Compatible
Header
ArduinoPro FTDI-
mini 3.3V 8MHz 14 8 6 1 Compatible
3.3v/8mhz Header
ArduinoPro FTDI-
mini 5V 16MHz 14 8 6 1
Compatible
5v/16mhz Header
Arduino Ethernet FTDI-
5V 16MHz 14 6 6 1 Compatible
Header
FTDI-
Arduino Fio 3.3V 8MHz 14 8 6 1 Compatible
Header
LilyPad Arduino FTDI-
328 main board 3.3V 8MHz 14 6 6 1 Compatible
Header
LilyPad Arduino FTDI-
simple board 3.3V 8MHz 9 4 5 0 Compatible
Header
Arduino boards based on ATMEGA32u4 microcontroller

Board Name Operatin Clock Digita Analog PWM UART Programming


g Volt Speed l i/o Inputs Interface

Arduino Native USB


Leonardo 5V 16MHz 20 12 7 1

Pro micro Native USB


5V/16MHz 5V 16MHz 14 6 6 1

Pro micro Native USB


3.3V/8MHz 5V 16MHz 14 6 6 1

LilyPad Arduino Native USB


USB 3.3V 8MHz 14 6 6 1
Arduino boards based on ATMEGA2560 microcontroller

Board Name Operatin Clock Digital Analog PWM UAR Programmin


g Volt Speed i/o Inputs T gInterface
Arduino USBvia
Meg 5V 16MHz 54 16 14 4
ATMega16U2
a2560 R3 B
Mega Pro 3.3V FTDI-
3.3V 8MHz 54 16 14 4 Compatible
Header
Mega Pro 5V FTDI-
5V 16MHz 54 16 14 4 Compatible
Header
Mega Pro Mini FTDI-
3.3V 3.3V 8MHz 54 16 14 4 Compatible
Header
Arduino boards based on AT91SAM3X8E microcontroller
Board Name Oper Clock Digital Analog PW UAR Programmin
ating Speed i/o Inputs M T g Interface
Volt
ArduinoMega USB native
2560 R3 3.3V 84MHz 54 12 12 4

In this chapter, we will learn about the different components on the Arduino board. We will
study the Arduino UNO board because it is the most popular board in the Arduino board
family. In addition, it is the best board to get started with electronics and coding. Some
boards look a bit different from the one given below, but most Arduinos have majority of
these components in common.
Power USB
Arduino board can be powered by using the USB cable from your computer. All
you need to do is connect the USB cable to the USB connection (1).

Power (Barrel Jack)


Arduino boards can be powered directly from the AC mains power supply by
connecting it to the Barrel Jack (2).
Voltage Regulator
The function of the voltage regulator is to control the voltage given to the Arduino
board and stabilize the DC voltages used by the processor and other elements.

Crystal Oscillator
The crystal oscillator helps Arduino in dealing with time issues. How does Arduino
calculate time? The answer is, by using the crystal oscillator. The number printed on
top of the Arduino crystal is 16.000H9H. It tells us that the frequency is 16,000,000
Hertz or 16 MHz.
Arduino Reset
You can reset your Arduino board, i.e., start your program from the beginning. You
can reset the UNO board in two ways. First, by using the reset button (17) on the
board. Second, you can connect an external reset button to the Arduino pin labelled
RESET (5).
Pins (3.3, 5, GND, Vin)
• 3.3V (6) − Supply 3.3 output volt
• 5V (7) − Supply 5 output volt
• Most of the components used with Arduino board works fine with 3.3 volt
and 5 volt.
• GND (8)(Ground) − There are several GND pins on the Arduino, any of
which can be used to ground your circuit.
• Vin (9) − This pin also can be used to power the Arduino board from an
external power source, like AC mains power supply.
Analog pins
The Arduino UNO board has six analog input pins A0 through A5. These pins can
read the signal from an analog sensor like the humidity sensor or temperature sensor
and convert it into a digital value that can be read by the microprocessor.
Main microcontroller
Each Arduino board has its own microcontroller (11). You can assume it as the brain
of your board. The main IC (integrated circuit) on the Arduino is slightly different
from board to board. The microcontrollers are usually of the ATMEL Company. You
must know what IC your board has before loading up a new program from the
Arduino IDE. This information is available on the top of the IC. For more details
about the IC construction and functions, you can refer to the data sheet.

ICSP pin
Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino consisting
of MOSI, MISO, SCK, RESET, VCC, and GND. It is often referred to as an SPI
(Serial Peripheral Interface), which could be considered as an "expansion" of the
output. Actually, you are slaving the output device to the master of the SPI bus.

Power LED indicator


This LED should light up when you plug your Arduino into a power source to
indicate that your board is powered up correctly. If this light does not turn on, then
there is something wrong with the connection.
TX and RX LEDs
On your board, you will find two labels: TX (transmit) and RX (receive). They
appear in two places on the Arduino UNO board. First, at the digital pins 0 and 1, to
indicate the pins responsible for serial communication. Second, the TX and RX led
(13). The TX led flashes with different speed while sending the serial data. The
speed of flashing depends on the baud rate used by the board. RX flashes during the
receiving process.
Digital I/O
The Arduino UNO board has 14 digital I/O pins (15) (of which 6 provide PWM
(Pulse Width Modulation) output. These pins can be configured to work as input
digital pins to read logic values (0 or 1) or as digital output pins to drive different
modules like LEDs, relays, etc. The pins labeled “~” can be used to generate PWM.

AREF
AREF stands for Analog Reference. It is sometimes, used to set an external reference
voltage (between 0 and 5 Volts) as the upper limit for the analog input pins.

After learning about the main parts of the Arduino UNO board, we are ready to learn how to
set up the Arduino IDE. Once we learn this, we will be ready to upload our program on the
Arduino board.
2. Raspberry Pi
Raspberry Pi (/paɪ/) is a series of small single-board computers developed in the United
Kingdom by the Raspberry Pi Foundation in association with Broadcom. Early on, the
Raspberry Pi project leaned towards the promotion of teaching basic computer science in
schools and in developing countries.
JTAG
RCA headers
VIDEO
OUT
GPIO AUDIO Status LEDs
headers OUT

DSI display
connector

SD card slot
(back of board) USB 2.0

Micro USB power Broadcom ETHERNET OUT


(5 V 1 A DC) BCM 2835 only on 256 MB models
ARM11 700 MHz
CSI connector
camera
HDMI OUT

USB
LEDs

RCA video Audio


LAN

GPIO 512 MB RAM


CPU and GPU
HDMI

SD card
Power
Raspberry Pi P1 header
PIN # Name Name PIN #
3.3 VDC power 5.0 VDC power
1

8 SDA0 (I2C) DNC


3

9 SCL0 (I2C) 0 V (Ground)


5

7 GPIO 7 TxD 15
7

DNC RxD 16
10 12
9
11

0 GPIO 0 GPIO1 1
25 23 21 19 17 15 13

2 GPIO 2 DNC
14 16 18 20 22 24 26

3 GPIO 3 GPIO4 4
DNC GPIO5 5

12 MOSI DNC

13 MISO GPIO6 6

14 SCLK CE0 10

DNC CE1 11
working
username directory

pi@raspberrypi  $

hostname type
after
this
SCLK

MOSI

SPI Master MISO SPI Slave

SS
Master Slave 1 Slave 2
MOSI

MISO
Clock

SS SS
GPIO 17

GPIO 4
GPIO 27
GPI0 Raspberry Pi Model 2 v1.1
 Raspberry Pi 2014
USB 2x
USB 2x

DSI (DISPLAY)
Audio
HDMI
ETHERNET

Power
CSI (CAMERA)
GPIO pin
VCC 3.3 V
I
Anode
200 
200 
Cathode

V +
_ R

GPIO pin

(a) (b) (c)

Pin 10 ... 6 Common anode


3,8
A
A B C D E F G DP
F B

E G C
DP
D
Pin 1 ... 5 7 6 4 2 1 9 10 5
VCC 3.3 V

GPIO input 10 k
pin

pull up resistor
USB 2x
GPI0 Raspberry Pi Model 2 v1.1
 Raspberry Pi 2014
DSI (DISPLAY)

USB 2x
CSI (CAMERA)

ETHERNET
Audio
HDMI
Power
3.3 V (Pin 1)

R1
2.2 k

LDR

GPIO

C1
1F GND (Pin 6)


You might also like