0% found this document useful (0 votes)
5 views85 pages

UNIT II - Controllers and Relay Crop

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 85

U21EEX04

HOME AUTOMATION

UNIT - II

CONTROLLERS AND RELAY

Nov 19, 2024 1


U21EEX04 - HOME AUTOMATION

UNIT II – CONTROLLERS AND RELAY

Arduino Uno, Node MCU and Raspberry Pi controller: Construction, pin details, board descriptions and
applications - Construction and working principle of relay

DR.C.PAZHANIMUTHU
ASSISTANT PROFESSOR (SL.G)/EEE
KPR INSTITUTE OF ENGINEERING AND TECHNOLOGY
COIMBATORE

Nov 19, 2024 2


U21EEX04 - HOME AUTOMATION
UNIT II – CONTROLLERS AND RELAY
Arduino Uno, Node MCU and Raspberry Pi controller: Construction,
pin details, board descriptions and applications - Construction and
working principle of relay.

Nov 19, 2024 3


CLASSIFICATION OF CONTROLLERS
Board Types

Nov 19, 2024 4


MICROPROCESSOR VS MICROCONTROLLER
 Microprocessor
 A microprocessor is an IC that contains only a central processing unit (CPU).
 The IC does not contain RAM, ROM or other peripherals.
 The IC may contain cache memory but it is not designed to be usable without any external memory.
 Microprocessors cannot store programs internally and therefore typically load software when
powered on, this usually involves a complex multi-stage "boot" process where "firmware" is loaded
from external ROM and eventually an operating system is loaded from other storage media (e.g. hard
disk).
 It is typically found in a personal computer.

Nov 19, 2024 5


MICROPROCESSOR VS MICROCONTROLLER
 Microcontroller
 A small computer on a single integrated circuit.
 A standalone single-chip IC that contains a CPU, read-only memory to store the program, RAM
to store variables used in the execution of the program, and various I/O buses to connect to
the outside world such as SPI, I2C, UART and others.
 By itself, it cannot execute any programs without being programmed via an external interface to a PC.
A microcontroller may also need an external crystal to provide a clock, however some have an
internal clock.
 Arduino
 A board, and contains a microcontroller, typical an 8-bit AVR such as the ATmega8, ATmega168,
ATmega328, ATmega1280, and ATmega2560, plus power supplies, crystal, and female headers to
interface with various peripheral boards.

Nov 19, 2024 6


MICROPROCESSOR VS MICROCONTROLLER

Nov 19, 2024 7


MICROPROCESSOR VS MICROCONTROLLER

Nov 19, 2024 8


MICROPROCESSOR VS MICROCONTROLLER

Nov 19, 2024 9


MICROPROCESSOR VS MICROCONTROLLER

Nov 19, 2024 10


MICROPROCESSOR VS MICROCONTROLLER
 Single-board Microcontrollers/Single-board Computers
 Single board computers (SBCs), such as the Raspberry Pi, are small computing devices that can
be used for a variety of purposes that include experimentation, learning how to program, building a
media player or NAS drive, robotics and home automation, and performing computing tasks such as
web browsing or word processing.
 SBCs are also increasingly used for a wide range of industrial applications in areas that
include robotics and the Internet of things (IoT).
 Many SBCs are now available, with lots of their specifications and applications having been covered.

Nov 19, 2024 11


ARDUINO CONTROLLERS
 Arduino is an open-source prototyping 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, and turn it into an
output - activating a motor, turning on an LED, publishing something online.
 A microcontroller board, contains on-board power supply, USB port to communicate with PC,
and an Atmel microcontroller chip.
 What is Arduino?
 Arduino is an open-source electronics platform based on easy-to-use hardware and software. It's
intended for anyone making interactive projects.
 Arduino Board
 Arduino senses the environment by receiving inputs from many sensors, and affects its surroundings
by controlling lights, motors, and other actuators.
 Arduino Software
 Arduino what to do by writing code in the Arduino programming language and using the Arduino
development environment.
 Because of it’s flexibility and low cost, Arduino has become a very popular choice for makers
Nov 19, 2024 12
ARDUINO CONTROLLERS
 Arduino Types:
 Arduino Uno(R3)
 Arduino Mega (R3)
 Arduino Nano
 Arduino Leonardo
 Arduino Due
 LilyPad Arduino
 Arduino Micro
 Arduino Pro Mini

Nov 19, 2024 13


ARDUINO CONTROLLERS
Arduino Types:

Nov 19, 2024 14


ARDUINO CONTROLLERS
 Pin Description

❖ Microcontroller: ATmega328
❖ Operating Voltage: 5V
❖ Input Voltage (recommended): 7-12V
❖ Input Voltage (limits): 6-20V
❖ Digital I/O Pins: 14 (of which 6 provide
PWM output)
❖ Analog Input Pins: 6
❖ DC Current per I/O Pin: 40 mA
❖ DC Current for 3.3V Pin: 50 mA
❖ Flash Memory: 32 KB of which 0.5 KB
used by bootloader
❖ SRAM: 2 KB (ATmega328)
❖ EEPROM: 1 KB (ATmega328)
❖ Clock Speed: 16 MHz

Nov 19, 2024 15


ARDUINO CONTROLLERS
 Pin Description

Nov 19, 2024 16


ARDUINO CONTROLLERS
 Board Specifications

MCU ATmega328P
Architecture AVR
Operating Voltage 5V
Input Voltage 6V – 20V (limit)
7V – 12V (recommended)
Clock Speed 16 MHz
Flash Memory 32 KB (2 KB of this used by bootloader)
SRAM 2 KB
EEPROM 1 KB
Digital IO Pins 24 (of which 6 can produce PWM)
Analog Input Pins 6

Arduino UNO Pinout, Specifications, Board Layout, Pin Descripti


on (electronicshub.org)
Nov 19, 2024 17
ARDUINO CONTROLLERS
 PIN Details:
 Vin: This is the input voltage pin of the Arduino board used to provide input supply from an external
power source.
 5V: This pin of the Arduino board is used as a regulated power supply voltage and it is used to give
supply to the board as well as onboard components.
 3.3V: This pin of the board is used to provide a supply of 3.3V which is generated from a voltage
regulator on the board
 GND: This pin of the board is used to ground the Arduino board.
 Reset: This pin of the board is used to reset the microcontroller. It is used to Resets the
microcontroller.
 Digital Pins: 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.

Nov 19, 2024 18


ARDUINO CONTROLLERS
 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.
 Serial Pins: These pins are also known as a UART (universal asynchronous receiver-transmitter) pin.
It is used for communication between the Arduino board and a computer or other devices. The
transmitter pin number 1 and receiver pin number 0 is used to transmit and receive the data.
 External Interrupt Pins: This pin of the Arduino board is used to produce the external interrupt and
it is done by pin numbers 2 and 3.
 PWM Pins: This pins of the board is used to convert the digital signal into an analog by varying the
width of the pulse. The pin numbers 3,5,6,9,10 and 11 are used as a PWM pin.
 SPI Pins: This is the Serial Peripheral Interface (SPI) pin, it is used to maintain SPI communication
with the help of the SPI library. SPI pins include:
 SS: Pin number 10 is used as a Slave Select
 MOSI: Pin number 11 is used as a Master Out Slave In
 MISO: Pin number 12 is used as a Master In Slave Out
 SCK: Pin number 13 is used as a Serial Clock

Nov 19, 2024 19


ARDUINO CONTROLLERS
 LED Pin: The board has an inbuilt LED using digital pin-13. The LED glows only when the digital pin
becomes high.
 AREF Pin: This is an analog reference pin of the Arduino board. It is used to provide a reference
voltage from an external power supply.
 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. Arduino
calculate time 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.

Nov 19, 2024 20


ARDUINO CONTROLLERS
 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 - : TX (transmit) and RX (receive). 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.

Nov 19, 2024 21


NODEMCU
 NodeMCU is open source low cost IOT platform. Since NodeMCU is open open source platform
their hardware design is open for edit, modify and build. It includes firmware which runs on the
ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which is based on the ESP-12 module. The
firmware (non-volatile memory) uses the Lua scripting language (Fast programming language).
 The NodeMCU (Node MicroController Unit) is an open-source software and hardware
development environment built around an inexpensive System-on-a-Chip (SoC) called the
ESP8266.
 The ESP8266, designed and manufactured by Espressif Systems, contains the crucial elements of a
computer: CPU, RAM, networking (WiFi), and even a modern operating system and SDK. That
makes it an excellent choice for Internet of Things (IoT) projects of all kinds.
 NodeMCU is an open-source Lua based firmware and development board specially targeted for IoT
based Applications. It includes firmware that runs on the ESP8266 Wi-Fi SoC from Espressif Systems,
and hardware which is based on the ESP-12 module.

Nov 19, 2024 22


NODEMCU ESP8266
 NodeMCU Development Board Pinout Configuration

Nov 19, 2024 23


NODEMCU ESP8266
 NodeMCU Development Board Pinout Configuration

Nov 19, 2024 24


NODEMCU ESP8266
 NodeMCU Development Board Pinout Configuration

Nov 19, 2024 25


NODEMCU ESP8266
 NodeMCU Development Board Pinout Configuration
Pin Category Name Description
Power Micro-USB, 3.3V, GND, Micro-USB: NodeMCU can be powered through the USB port
Vin 3.3V: Regulated 3.3V can be supplied to this pin to power the board
GND: Ground pins
Vin: External Power Supply

Control Pins EN, RST The pin and the button resets the microcontroller
Analog Pin A0 Used to measure analog voltage in the range of 0-3.3V
GPIO Pins GPIO1 to GPIO16 NodeMCU has 16 general purpose input-output (GPIO) pins on its board
SPI Pins SD1, CMD, SD0, CLK NodeMCU has four pins available for serial peripheral interface (SPI)
communication.
UART Pins TXD0, RXD0, TXD1, NodeMCU has two UART interfaces, UART0 (RXD0 & TXD0) and UART1 (RXD1 &
RXD1 TXD1). UART1 is used to upload the firmware/program.
I2C Pins NodeMCU has I2C (Inter-Integrated Circuit protocol) functionality support but due
to the internal functionality of these pins, you have to find which pin is I2C.

Nov 19, 2024 26


NODEMCU ESP8266
 Power Pins There are four power pins.
 VIN pin and three 3.3V pins.
 VIN can be used to directly supply the NodeMCU/ESP8266 and its peripherals. Power delivered on
VIN is regulated through the onboard regulator on the NodeMCU module – you can also supply 5V
regulated to the VIN pin
 3.3V pins are the output of the onboard voltage regulator and can be used to supply power to
external components.
 GND are the ground pins of NodeMCU/ESP8266
 I2C Pins are used to connect I2C sensors and peripherals. Both I2C Master and I2C Slave are
supported. I2C interface functionality can be realized programmatically, and the clock frequency is
100 kHz at a maximum. It should be noted that I2C clock frequency should be higher than the slowest
clock frequency of the slave device.
 GPIO Pins NodeMCU/ESP8266 has 17 GPIO pins which can be assigned to functions such as I2C, I2S,
UART, PWM, IR Remote Control, LED Light and Button programmatically. Each digital enabled GPIO
can be configured to internal pull-up or pull-down, or set to high impedance. When configured as an
input, it can also be set to edge-trigger or level-trigger to generate CPU interrupts.
Nov 19, 2024 27
NODEMCU ESP8266
 ADC Channel The NodeMCU is embedded with a 10-bit precision SAR ADC. The two functions can be
implemented using ADC. Testing power supply voltage of VDD3P3 pin and testing input voltage of
TOUT pin. However, they cannot be implemented at the same time.
 UART Pins NodeMCU/ESP8266 has 2 UART interfaces (UART0 and UART1) which provide
asynchronous communication (RS232 and RS485), and can communicate at up to 4.5 Mbps. UART0
(TXD0, RXD0, RST0 & CTS0 pins) can be used for communication. However, UART1 (TXD1 pin)
features only data transmit signal so, it is usually used for printing log.
 SPI Pins NodeMCU/ESP8266 features two SPIs (SPI and HSPI) in slave and master modes. These
SPIs also support the following general-purpose SPI features:
 4 timing modes of the SPI format transfer
 Up to 80 MHz and the divided clocks of 80 MHz
 Up to 64-Byte FIFO
 SDIO Pins NodeMCU/ESP8266 features Secure Digital Input/Output Interface (SDIO) which is used
to directly interface SD cards. 4-bit 25 MHz SDIO v1.1 and 4-bit 50 MHz SDIO v2.0 are supported.

Nov 19, 2024 28


NODEMCU ESP8266
 PWM Pins The board has 4 channels of Pulse Width Modulation (PWM). The PWM output can be
implemented programmatically and used for driving digital motors and LEDs. PWM frequency range
is adjustable from 1000 μs to 10000 μs (100 Hz and 1 kHz).
 Control Pins are used to control the NodeMCU/ESP8266. These pins include Chip Enable pin (EN),
Reset pin (RST) and WAKE pin.
 EN: The ESP8266 chip is enabled when EN pin is pulled HIGH. When pulled LOW the chip works at
minimum power.
 RST: RST pin is used to reset the ESP8266 chip.
 WAKE: Wake pin is used to wake the chip from deep-sleep.
 Tiny Sine Wave Control Pins are used to control the NodeMCU/ESP8266. These pins include Chip
Enable pin (EN), Reset pin (RST) and WAKE pin.

Nov 19, 2024 29


NODEMCU ESP8266
 NodeMCU ESP8266 Specifications & Features
 Microcontroller: Tensilica 32-bit RISC CPU Xtensa LX106
 Operating Voltage: 3.3V
 Input Voltage: 7-12V
 Digital I/O Pins (DIO): 16
 Analog Input Pins (ADC): 1
 UARTs: 1
 SPIs: 1
 I2Cs: 1
 Flash Memory: 4 MB
 SRAM: 64 KB
 Clock Speed: 80 MHz
 USB-TTL based on CP2102 is included onboard, Enabling Plug n Play
 PCB Antenna
 Small Sized module to fit smartly inside your IoT projects
Nov 19, 2024 30
NODEMCU ESP8266
 The NodeMCU ESP8266 development board comes with the ESP-12E module containing the
ESP8266 chip having Tensilica Xtensa 32-bit LX106 RISC microprocessor. This microprocessor
supports RTOS and operates at 80MHz to 160 MHz adjustable clock frequency. NodeMCU has 128 KB
RAM and 4MB of Flash memory to store data and programs. Its high processing power with in-built
Wi-Fi / Bluetooth and Deep Sleep Operating features make it ideal for IoT projects.
 NodeMCU can be powered using a Micro USB jack and VIN pin (External Supply Pin). It supports
UART, SPI, and I2C interface.
 NodeMCU ESP8266 has 128Kb of Ram, 4 MB of Flash memory, and a maximum clock speed of
160MHz(80 -160). The operating current is 80mA(average).
 The ESP8266 Integrates 802.11b/g/n HT40 Wi-Fi transceiver chip for WiFi connectivity and gives it
the additional advantage of creating its own network thus allowing other devices to connect directly
to it.

Nov 19, 2024 31


NODEMCU ESP8266

Nov 19, 2024 32


NODEMCU ESP8266

Nov 19, 2024 33


NodeMCU ESP8266 Vs. Arduino UNO Board - Makerguides.com
NODEMCU ESP8266
 ESP8266 Wifi Module board layout
 The Nodemcu wifi module comprises of ESP12E chip(the brain of the module), GPIO pins for easy
interfacing, 3.3 Volt Voltage regulator, onboard LED, USB to serial converter IC, USB port, and more.
 ESP8266-12E Wifi Chip with Antenna:
 This esp8266-12E or simply esp-12E chip is a member of the esp-xx series. There are 15 modules
ranging from esp01 to esp15. These are mostly used for IoT applications due to their small form
factor and low price.
 Processor: The latest ESP12E board integrates a Tensilica LX106 32-bit RISC processor, which
achieves extra-low power consumption and reaches a maximum clock speed of 160 MHz.
 Uploading a program in ESP-12E using the micro USB cable is difficult as it requires a separate 3.3
voltage regulator, reset button, some resistors, and a USB to TTL converter IC.
 Voltage Regulator AMS1117:
 The esp12e chip works on 3.3 Volts. But since a micro USB cable provides 5 Volts, the Nodemcu has
an on-board 3.3 V voltage regulator which is AMS1117.

Nov 19, 2024 34


NODEMCU ESP8266
 USB to TTL/Serial Converter:
 In order to program the board using a USB cable, the USB to TTL/UART converter IC is needed.
Nodemcu ESP8266 has CP2102 USB to UART bridge controller IC (in SMD QFN-28 package). Some
old ESP8266 boards use CH340G USB to TTL converter IC (in SMD SOP-16 package).
 Usually, the Lolin Nodemcu has CP2102 and Amica Nodemcu has CH340G USB to TTL converter IC.
 Flash button: The boot or flash button is used while uploading the program. If you hold it down and
press the EN/RST, the ES8266 will restart in flashing/uploading mode

Nov 19, 2024 35


NODEMCU ESP8266

Microcontroller ESP-8266 32-bit


NodeMCU Model Amica(official)
Clock Speed 80-160 MHz
USB to Serial CP2102
USB Connector Micro USB
Operating Voltage 3.3V
Input Voltage 4.5V-10V
Flash Memory/SRAM 4 MB / 128 KB
GPIO Pins 17
Digital I/O Pins 11
Analog In Pins 1
PWM Pins 4
ADC Range 0-3.3V
UART/SPI/I2C 2/1/1
WiFi Built-In 802.11 b/g/n
Temperature Range -40C – 125C

Nov 19, 2024 36


NODEMCU ESP8266
Function Description (NodeMCU ESP8266) Description (Arduino UNO)
Microcontroller Tensilica 32-bit Xtensa LX106 ATmega328P
Flash Memory 4 MB 32 KB (0.5 KB is used for Bootloader)
SRAM 128 KB 2 KB
EEPROM Not Available512 bytes (Software) 1 KB
CLOCK Speed 80 MHz or 160 MHz 16 MHz
Operating Voltage 3.3V DC 5V DC
Input Voltage 7-12 DC 6V-20V DC
Current consumption 15 µA – 400 mA 45 mA – 80 mA
DC Current per I/O Pin 12 mA 40 mA
Digital IO Pins 17 14
Analog Input Pins 1 6
UARTs 2 1
SPI 2 1
I2C 1 1
PWM 4 6
WiFi Yes No
Bluetooth No No

Nov 19, 2024 37


RASPBERRY PI
 Raspberry Pi is a credit card sized single computer board. It can be used for many of the things
that your desktop PC does, like spreadsheets, word-processing, games and it can also play high
definition video. It was developed by Raspberry Pi foundation from UK.
 The raspberry pi is ready for public consumption since 2012 with the idea of producing a cheep
educational microcomputer for students and children. The raspberry pi is created to be something
to encourage learning, innovation and experimentation. The raspberry pi computer is portable
and less expensive.
 PI board is specifically designed for hobbyist and engineers who are interested in LINUX
systems and IoT (Internet of Things).
 Board Types: Raspberry Pi – 0, Raspberry Pi – 1, Raspberry Pi – 2, Raspberry Pi – 2 B+, Raspberry Pi
3 Model A and B, and Raspberry Pi 4.
 Raspberry Pi 3 Model B is a single-board computer developed by the Raspberry Pi
Foundation. The board not only has tons of features it also has terrific processing speed making it
suitable for advanced applications. This board consists of a 1.2Ghz 64-bit quad-core ARM
processor and an 802.11n Wireless LAN, Bluetooth 4.1, and Bluetooth Low Energy. Like the previous
version (the Pi 2) it consists of 1 GB of RAM, 4 USB ports, and full HDMI support.
Nov 19, 2024 38
RASPBERRY PI

Nov 19, 2024 39


RASPBERRY PI
 Raspberry Pi platform is most used after ADRUINO, most preferred when developing advanced
applications. Raspberry Pi is an open source platform, customize the system depending on the
need.
 Few examples where Raspberry Pi 3 is chosen over other microcontrollers and development boards:
 1. Where the system processing is huge. Most ARDUINO boards all have clock speed of less than
100MHz, so they can perform functions limited to their capabilities. They cannot 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. For Internet of Things this feature is best suited.
 3. Dedicated port for connecting touch LCD display which is a feature that completely omits the
need of monitor.
 4. 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 and like HD steaming features.

Nov 19, 2024 40


RASPBERRY PI
 PI is simply a computer on a single board so it cannot be used like ARDUINO development boards.
For the PI to start working we need to first install operating system. This feature is similar to our
PC. The PI has dedicated OS for it; any other OS will not work.
 The programming of PI in step by step below.
 Take the 16GB micro SD card and dedicate it specifically for PI OS.
 Choose and Download OS software. [https://www.raspberrypi.org/downloads/] (‘NOOBS’
recommended for beginners )
 Format the SD card and install OS on to the SD memory card using convenient methods.
 Take the SD card after OS installation and insert it in PI board.
 Connect monitor, keyboard and mouse
 Power the board with micro USB connector
 Once the power is tuned ON the PI will run on the OS installed in the memory card and will start from
boot.

Nov 19, 2024 41


RASPBERRY PI

Nov 19, 2024 42


RASPBERRY PI
 Once all drivers are checked the PI will ask for authorization, this is set by default and can be
changed.
 After authorization you will reach desktop where all application program development starts.
 On the PI you can download application programs required for your use and can directly install as
you do for your PC. After that you can work on developing required program and get the PI run the
developed programs.

Nov 19, 2024 43


RASPBERRY PI
 Comparison of Boards

Raspberry Pi Zero, introduced in 2015


Raspberry Pi 3 B+, introduced in 2018 Raspberry Pi 4 B, introduced in 2019

Raspberry Pi Pico, introduced in 2021 Raspberry Pi Zero 2 W, introduced in 2021

Nov 19, 2024 44


RASPBERRY PI
 Comparison of Boards
Family Model SoC Memory Ethernet Wireless GPIO Released Discontinued
B 256 MB | 512 MB Yes 2012 Yes (????)
26-pin
A 256 MB No 2013
Raspberry Pi BCM2835 No
B+ Yes
512 MB 2014
A+ No
Raspberry Pi 2 B BCM2836 / 7 1 GB Yes No
2015
Zero No
BCM2835 No
Raspberry Pi Zero W / WH 512 MB No 2017
Yes
2W BCM2710A1 2021
B BCM2837A0 / B0 1 GB Yes Yes 2016
Raspberry Pi 3 A+ 512 MB No 40-pin 2018
BCM2837B0 Yes
B+ 1 GB Yes 2018

1 GB 2019 & 2021 Yes (2020)

B Yes 2019
Raspberry Pi 4 BCM2711 2 GB | 4 GB Yes

4 GB | 8 GB 2020 No
400
Pico No 2021
Raspberry Pi Pico RP2040 264 KB No
W Yes 2022
Nov 19, 2024 45
RASPBERRY PI
 Specifications of Raspberry PI 3 board:
 Quad-Core 1.2GHz Broadcom BCM2837 64bit CPU
 1GB RAM
 BCM43438 wireless LAN and Bluetooth Low Energy (BLE) on board
 100 Base Ethernet
 40-pin extended GPIO
 4 USB 2 ports
 4 Pole 3.3mm stereo output and composite video port
 Full-size HDMI CSI (Camera Serial Interface) camera port for connecting a camera
 DSI (Display Serial Interface) display port for connecting a touchscreen display
 Micro SD port
 Micro USB power port (up to 2.5A)
 Size – 85 x 56 x 17 mm
Nov 19, 2024 46
RASPBERRY PI
 Raspberry Pi-3 Technical Specifications
Microprocessor Broadcom BCM2837 64bit Quad Core Processor
Processor Operating Voltage 3.3V
Raw Voltage input 5V, 2A power source
Maximum current through each I/O pin 16mA
Maximum total current drawn from all I/O pins 54mA
Flash Memory (Operating System) 16Gbytes SSD memory card
Internal RAM 1Gbytes DDR2
Clock Frequency 1.2GHz
GPU Dual Core Video Core IV® Multimedia Co-Processor. Provides Open GLES
2.0, hardware-accelerated Open VG, and 1080p30 H.264 high- profile
decode.
Capable of 1Gpixel/s, 1.5Gtexel/s or 24GFLOPs with texture filtering and
DMA infrastructure.
Ethernet 10/100 Ethernet
Wireless Connectivity BCM43143 (802.11 b/g/n Wireless LAN and Bluetooth 4.1)
Operating Temperature -40°C to +85°C

For More Details Visit: Raspberry Pi - Wikipedia


Nov 19, 2024 47
RASPBERRY PI
 Board Descriptions

Nov 19, 2024 48


RASPBERRY PI
 Board Descriptions

Nov 19, 2024 49


RASPBERRY PI
 Board Descriptions

Nov 19, 2024 50


RASPBERRY PI
 Board Descriptions
 CPU: The CPU is the main component of the raspberry pi. It is responsible for carrying out the
instructions of a computer via mathematical and logical operations. The raspberry pi is a good
company using the ARM11 series processor. It has joined the ranks of phone, Samsung galaxy.
 GPU: The graphics processing unit (GPU) is a specialized chip in raspberry pi. It is designed to speed
up the manipulation of image calculations. The raspberry pi comes equipped with a Broadcom video
core IV and it is supported for OpenGL.
 Ethernet Port: The raspberry pi Ethernet port is main gateway for communicating with other
devices. You will able to use raspberry pi Ethernet port to plug your home router to access the
internet.
 GPIO Pins: The general purpose input and output pins on the raspberry pi are used to connect with
the other electronic boards. The GPIO pins can accept input and output commands based on
programmed raspberry pi.
 The raspberry pi provides digital GPIO pins. These pins are used to connect other electronic
components. For example you can connect it to the temperature sensor which transmitts digital data.

Nov 19, 2024 51


RASPBERRY PI
 XBee Socket: The raspberry pi proves two XBee socket for wireless communication purpose.
 Power Source Connector: The power source selector is a small switch it is located on side of the
shield that can be used to enable an external power source.
 UART: The UART are a serial input and output port. This can be used to transfer the serial data such
as text and it is useful for transforming the debugging code.

Nov 19, 2024 52


RASPBERRY PI
 Board Connectors

Name Description
Ethernet Base T Ethernet Socket
USB 2.0 (Four sockets)
Audio Output 3.5mm Jack and HDMI
Video output HDMI
Camera Connector 15-pin MIPI Camera Serial Interface (CSI-2)
Display Connector Display Serial Interface (DSI) 15 way flat flex cable connector with two data
lanes and a clock lane.

Memory Card Slot Push/Pull Micro SDIO

Nov 19, 2024 53


RASPBERRY PI
 Pin Details – Pi 2 Model B

Nov 19, 2024 54


RASPBERRY PI
 Pin Details – Pi 2 Model B

Nov 19, 2024 55


RASPBERRY PI
 Pin Details – Pi 2 Model B

Nov 19, 2024 56


RASPBERRY PI
 Pin Details – Pi 3+ Model

Nov 19, 2024 57


RASPBERRY PI
 Pin Details – Pi 3+ Model

Nov 19, 2024 58


RASPBERRY PI
 Pin Details
 The board consists of two 5V pins, two 3.3V pins, and 9 ground pins (0V), which are unconfigurable.
 5V: The 5v pins directly deliver the 5v supply coming from the mains adaptor. This pin can use to
power up the Raspberry Pi, and it can also use to power up other 5v devices.
 3.3V: The 3v pin is there to offer a stable 3.3v supply to power components and to test LEDs.
 GND: Ground is commonly referred to as GND. All the voltages are measured with respect to the GND
voltage.
 Input/Outputs pins:
 A GPIO pin that is set as an input will allow a signal to be received by the Raspberry Pi that is sent by
a device connected to this pin. A voltage between 1.8V and 3.3V will be read by the Raspberry Pi as
HIGH and if the voltage is lower than 1.8V will be read as LOW.
 PWM (pulse-width modulation) pins:
 Software PWM is available on all pins
 Hardware PWM is available on these pins only: GPIO12, GPIO13, GPIO18, GPIO19

Nov 19, 2024 59


RASPBERRY PI
 SPI pins:
 SPI (Serial Peripheral Interface) is another protocol used for master-slave communication. It is used
by the Raspberry pi board to quickly communicate between one or more peripheral devices. Data is
synchronized using a clock (SCLK at GPIO11) from the master (RPi) and the data is sent from the Pi
to our SPI device using the MOSI (Master Out Slave In) pin. If the SPI device needs to communicate
back to Raspberry Pi, then it will send data back using the MISO (Master In Slave Out) pin. There are
5 pins involved in SPI communication:
 GND: Connect all GND pins from all the slave components and the Raspberry Pi 3 board together.
 SCLK: Clock of the SPI. Connect all SCLK pins together.
 MOSI: It stands for Master Out Slave In. This pin is used to send data from the master to a slave.
 MISO: It stands for Master In Slave Out. This pin is used to receive data from a slave to the master.
 Chip Enable (CE):. We need to connect one CE pin per slave (or peripheral devices) in our circuit. By
default, we have two CE pins but we can configure more CE pins from the other available GPIO pins.

Nov 19, 2024 60


RASPBERRY PI
 SPI pins on board:
 SPI0: GPIO9 (MISO), GPIO10 (MOSI), GPIO11 (SCLK), GPIO8 (CE0), GPIO7 (CE1)
 SPI1: GPIO19 (MISO), GPIO20 (MOSI), GPIO21 (SCLK), GPIO18 (CE0), GPIO17 (CE1), GPIO16 (CE2)
 I2C pins: I2C is used by the Raspberry Pi board to communicate with devices that are compatible
with Inter-Integrated Circuit (a low-speed two-wire serial communication protocol). This
communication standard requires master-slave roles between both devices.
 I2C has two connections: SDA (Serial Data) and SCL (Serial Clock). They work by sending data to
and using the SDA connection, and the speed of data transfer is controlled via the SCL pin.
 Data: (GPIO2), Clock (GPIO3)
 EEPROM Data: (GPIO0), EEPROM Clock (GPIO1)
 UART Pins: Serial communication or the UART (Universal Asynchronous Receiver / Transmitter)
pins provide a way to communicate between two microcontrollers or the computers. TX pin is used
to transmit the serial data and RX pin is used to receive serial data coming from a different serial
device.
 TX (GPIO14), RX (GPIO15)

Nov 19, 2024 61


RASPBERRY PI
 Raspberry Pi-3 Pin Configuration
Pin group Pin name Description
Power source +5V, +3.3V, GND and Vin +5V -power output
+3.3V -power output
GND – GROUND pin
Communication interface UART Interface(RXD, TXD) [(GPIO15,GPIO14)] UART (Universal Asynchronous Receiver
Transmitter) used for interfacing sensors and
other devices.
SPI Interface(MOSI, MISO, CLK,CE) x SPI (Serial Peripheral Interface) used for
2 communicating with other boards or
[SPI0-(GPIO10 ,GPIO9, GPIO11 ,GPIO8)] peripherals.
[SPI1--(GPIO20 ,GPIO19, GPIO21 ,GPIO7)]
TWI Interface(SDA, SCL) x 2 TWI (Two Wire Interface) Interface can be used
[(GPIO2, GPIO3)] to connect peripherals.
[(ID_SD,ID_SC)]
Input output pins 26 I/O Although these some pins have multiple
functionsthey can be considered as I/O pins.
PWM Hardware PWM available on GPIO12, GPIO13, These 4 channels can provide PWM (Pulse
GPIO18, GPIO19 Width Modulation) outputs.
*Software PWM available on all pins
External Interrupts All I/O In the board all I/O pins can be used as
Interrupts.

Nov 19, 2024 62


RASPBERRY PI
 Raspberry Pi 4 Model B

Nov 19, 2024 63


RASPBERRY PI
 Raspberry Pi 4

Nov 19, 2024 64


RASPBERRY PI
 Advantages
 The raspberry pi has a small size of a credit card and it works as normal computer at low price.
 It is possible to work as a low cost server to handle web traffic.

Nov 19, 2024 65


RASPBERRY PI
 Applications
 Hobby projects
 Low cost PC/tablet/laptop
 IoT applications
 Media center
 Robotics
 Industrial/Home automation
 Server/cloud server and Print server
 Security monitoring
 Web camera and Gaming
 Wireless access point
 Environmental sensing/monitoring (e.g. WEATHER STATION)

Nov 19, 2024 66


RELAYS
 What is Relay?
 A relay is an electrically operated switch. It is an electromechanical device that can be used to make
or break an electrical connection.
 The main operation of this device is to make or break contact with the help of a signal without any
human involvement in order to switch it ON or OFF.
 It is mainly used to control a high powered circuit using a low power signal. Generally, a DC signal is
used to control the circuit which is driven by high voltage like controlling AC home appliances with
DC signals from microcontrollers.

Nov 19, 2024 67


RELAYS
 Construction of Relay and its operation

Nov 19, 2024 68


RELAYS
 Construction of Relay and its operation
 Electromechanical relay: It consists of a flexible moving mechanical part which can be controlled
electronically through an electromagnet, can control it with an electronic signal instead of manually
turning it on or off.
 There are four parts in every relay: electromagnet, armature that can be attracted by the
electromagnet, spring, and set of electrical contacts
 A core with copper windings (forms a coil) winded on it is placed. A movable armature consists of a
spring support or stand like structure connected to one end, and a metal contact connected to
another side, all these arrangements are placed over the core such that, when the coil is energized, it
attracts the armature.
 The movable armature is generally considered as a common terminal which is to be connected to the
external circuitry. The relay also has two pins namely normally closed and normally opened (NC and
NO), the normally closed pin is connected to the armature or the common terminal whereas the
normally opened pin is left free (when the coil is not energized).
 When the coil is energized the armature moves and is get connected to the normally opened contact
till there exists flow of current through the coil. When it is de-energized it goes to its initial position.
Nov 19, 2024 69
RELAYS
 Construction of Relay and its operation

Nov 19, 2024 70


RELAYS
 Construction of Relay and its operation

Nov 19, 2024 71


RELAYS
 Construction of Relay and its operation

Nov 19, 2024 72


RELAYS
 What is Relay?
 A relay is an electro-mechanical or solid-state device, used to control a device or a circuit
electrically by applying a control signal to its coil. Thus protects the system from damage.
 The green colour represents the control circuit and the red colour represents the load circuit. A small
control coil is connected onto the control circuit. A switch is connected to the load. This switch is
controlled by the coil in the control circuit.

Nov 19, 2024 73


RELAYS
 Construction of Relay
 The relay operates both electrically and mechanically. It consists electromagnetic and sets of contacts
which perform the operation of the switching. The construction of relay is mainly classified into four
groups. They are the contacts, bearings, electromechanical design, terminations and housing.
 Working Principle of Relay
 It works on the principle of an electromagnetic attraction. When the circuit of the relay senses the
fault current, it energizes the electromagnetic field which produces the temporary magnetic field.
 This magnetic field moves the relay armature for opening or closing the connections. The small
power relay has only one contacts, and the high power relay has two contacts for opening the switch.

Nov 19, 2024 74


RELAYS
 It has an iron core which is wound by a control coil. The power supply is given to the coil through the
contacts of the load and the control switch. The current flows through the coil produces the magnetic
field around it.
 Due to this magnetic field, the upper arm of the magnet attracts the lower arm. Hence close the
circuit, which makes the current flow through the load. If the contact is already closed, then it moves
oppositely and hence open the contacts.

Nov 19, 2024 75


RELAYS
 Types of Relays (Based on No. of Contacts)

Single Channel Two Channel

Four Channel Eight Channel


Nov 19, 2024 76
RELAYS
 Pole and Throw
 Relays have the exact working of a switch. A relay is said to switch one or more poles. Each pole
has contacts that can be thrown in mainly three ways. They are
 Normally Open Contact (NO) – NO contact is also called a make contact. It closes the circuit when
the relay is activated. It disconnects the circuit when the relay is inactive.
 Normally Closed Contact (NC) – NC contact is also known as break contact. This is opposite to the
NO contact. When the relay is activated, the circuit disconnects. When the relay is deactivated, the
circuit connects.
 Change-over (CO) / Double-throw (DT) Contacts – This type of contacts are used to control two
types of circuits. They are used to control a NO contact and also a NC contact with a common
terminal. According to their type they are called by the names break before make and make before
break contacts.

Nov 19, 2024 77


RELAYS
 Pole and Throw
 A relay switches one or more poles, each of whose contacts can be thrown by energizing the coil .
 Single Pole Single Throw (SPST) – The SPST relay has a total of four terminals. Out of these two
terminals can be connected or disconnected. The other two terminals are needed for the coil to be
connected.
 Single Pole Double Throw (SPDT) – The SPDT relay has a total of five terminals. Out of these two
are the coil terminals. A common terminal is also included which connects to either of two others.
 Double Pole Single Throw (DPST) – The DPST relay has a total of six terminals. These terminals are
further divided into two pairs. Thus they can act as two SPST’s which are actuated by a single coil.
Out of the six terminals two of them are coil terminals.
 Double Pole Double Throw (DPDT) – The DPDT relay is the biggest of all. It has mainly eight relay
terminals. Out of these two rows are designed to be change over terminals. They are designed to act
as two SPDT relays which are actuated by a single coil.

Nov 19, 2024 78


RELAYS
 Solid State Relay (SSR)
 Solid-state relays are considered an excellent alternative to electromagnetic. They are a modular
semiconductor device, which is produced by hybrid technology. The relays have transistors, TRIACs or
thyristors. Compared to electromagnetic devices, solid-state relays have several advantages .
 SSR does not have moving parts. They consist of semiconductors and electronic parts.
 The input circuit consists of a LED which is triggered by the input voltage. Then, there is isolation
between input and output circuits.
 The output circuit consists of a photo-coupler for capturing the light and converting it into electrical
energy for the load drive circuit (consisting of either triac, diodes, transistors, or thyristors).

Nov 19, 2024 79


RELAYS
 When the power supply is applied to the input circuit, current flows through LED which emits light
from it. The photo-coupler detects it and converts it into an electrical voltage which is then fed to the
load drive circuit, for controlling the final output voltage to the load. When the input voltage turns off,
the load too turns off.
 Due to the use of Opto-coupling technology, the switching is swift, sensitive, and has high insulation
levels. The output voltage can be digital or analog, depending upon the input circuit and load drive
circuit used.

Nov 19, 2024 80


RELAYS
 Interfacing Relay to Arduino

Nov 19, 2024 81


RELAYS
 Interfacing Relay to Arduino

Nov 19, 2024 82


RELAYS
 Interfacing Relay to Arduino

Nov 19, 2024 83


RELAYS
 Applications of Relay
 The applications of the relay are limitless, its main function is to control the high voltage circuit
(230V circuit AC) with the low voltage power supply (a DC voltage).
 Used in computer circuits in order to perform the arithmetic and mathematical operations in it.
 Used to control the electric motor switches. To turn ON an electric motor we need 230V AC supply
but in few cases/applications, there may be a situation to switch ON the motor with a DC supply
voltage. In those cases, a relay can be used.
 Automatic stabilizers are one of its applications where a relay is used. When the supply voltage is
other than the rated voltage, set of relays sense the voltage variations and controls the load circuit
with the help of circuit breakers.
 Used for the circuit selection if there exists more than one circuit in a system.
 Used in televisions. An old picture tube television’s internal circuitry works with the DC voltage but
the picture tube needs a very high AC voltage, in order to turn on the picture tube with a DC supply
we can use a relay.
 Used in the traffic signal controllers, temperature controllers.

Nov 19, 2024 84


RELAYS
 Applications of Relay
 Typical application areas of the relays include
 Lighting control systems
 Telecommunication
 Industrial process controllers
 Traffic control
 Motor drives control
 Protection systems of electrical power system
 Computer interfaces
 Automotive
 Home appliances

Nov 19, 2024 85

You might also like