Batch - 1 Ece - A Section

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 21

FACIAL

EXPRESSIONS
RECOGINATION
SYSTEM WITH
VOICE ALERT
Using
Raspberry Pi
SRINIVASA INSTITUTE OF
ENGINEERING & TECHNOLOGY
CHEYYURU, AMALAPURAM
BATCH: 1, SECTION – A
Contents:

➢ Aim
➢ Introduction ➢ Features
Hardware
Interfaces
Software
➢ Working of the project ➢ Pi camera module
➢ Technical specifications:
Hardware
Software
Power supply
Applications
➢ Project block diagram
➢ Raspberry Pi 4
➢ Power supply block diagram
➢ Web camera
➢ Display
➢ Software description
➢ Conclusion
➢ References
FACIAL EXPRESSIONS RECOGINATION SYSTEN WITH
VOICE ALERT USING RASPBERRY PI

AIM: To develop a project based on human expressions using smiley symbols in-front of
camera using python

INTRODUCTION:
A Facial Expression Recognition System can be used in a number of applications. It can
be used to study or analyze the sentiments of humans.

In this project we are going to build a system that detects the emotion of people for
further analytics using some smiley imnages infront of camera .

Many companies are implanting a Facial Expression Recognition System to study the
depression level of their workers.
FEATURES:
Hardware
• Quad core 64-bit ARM-Cortex A72 running at 1.5GHz
• 1, 2 and 4 Gigabyte LPDDR4 RAM options
• H.265 (HEVC) hardware decode (up to 4Kp60)
• H.264 hardware decode (up to 1080p60)
• VideoCore VI 3D Graphics
• Supports dual HDMI display output up to 4Kp60

Interfaces
• 802.11 b/g/n/ac Wireless LAN
• Bluetooth 5.0 with BLE
• 1x SD Card
• 2x micro-HDMI ports supporting dual displays up to 4Kp60 resolution
• 2x USB2 ports
• 2x USB3 ports
• 1x Gigabit Ethernet port (supports PoE with add-on PoE HAT)
• 1x Raspberry Pi camera port (2-lane MIPI CSI)
• 1x Raspberry Pi display port (2-lane MIPI DSI)
• 28x user GPIO supporting various interface options:
– Up to 6x UART
– Up to 6x I2C
– Up to 5x SPI
– 1x SDIO interface
– 1x DPI (Parallel RGB Display)
– 1x PCM

Software
• Python

WORKING OF THE PROJECT:


In this project we are going to need the following material in order to achieve our goal

-Raspberry pi 4 + micro SD card 16G with operating system

The Raspberry Pi is a low cost, that plugs into a computer monitor or TV, and uses a standard
keyboard and mouse.

It is a capable little device that enables people of all ages to explore computing, and to learn how to
program in languages like Scratch and Python. It’s capable of doing everything you’d expect a
desktop computer to do, from browsing the internet and playing high definition video, to making
spreadsheets, word-processing, and playing games.

Raspberry Pi needs an operating system to work. Raspberry Pi OS (previously called Raspbian) is


our official supported operating system.
Pi Camera Module
The Camera Module can be used to take high-definition video, as well as stills photographs. It’s
easy to use for beginners, but has plenty to offer advanced users if you’re looking to expand your
knowledge.

There are lots of examples online of people using it for time-lapse, slow-motion, and other video
cleverness. You can also use the libraries we bundle with the camera to create effects.

The camera works with all models of Raspberry Pi 1, 2, 3 and 4. It can be accessed through
the MMAL and V4L APIs, and there are numerous third-party libraries built for it, including the
Picamera Python library. See the Getting Started with Pi camera resource to learn how to use it.

TECHNICAL SPECIFICATIONS:
HARDWARE:
Micro PROCESSOR : Raspberry Pi
WEB CAM : USB TYPE

SOFTWARE:
Python

POWER SUPPLY
Transformer : 12V step down
Filter : 1000uf/25V
Voltage Regulator : 7805, 7812

APPLICATIONS
➢ Facial expressions identification
➢ Human behavior with trained data sets
.

PROJECT BLOCK DIAGRAM:


Power
Supply

R
A
S
P
B DISPLAY
E
R
R
Y
WEB
CAMERA
P
I

RASPBERRY PI 4:
Raspberry Pi, developed by Raspberry Pi Foundation in association with Broadcom, is a
series of small single-board computers and perhaps the most inspiring computer available
today. From the moment you see the shiny green circuit board of Raspberry Pi, it invites
you to tinker with it, play with it, start programming, and create your own software with
it. Earlier, the Raspberry Pi was used to teach basic computer science in schools but later,
because of its low cost and open design, the model became far more popular than
anticipated. It is widely used to make gaming devices, fitness gadgets, weather stations,
and much more. But apart from that, it is used by thousands of people of all ages who
want to take their first step in computer science. It is one of the best-selling British
computers and most of the boards are made in the Sony factory in Pencoed, Wales.
Generations and Models:
In 2012, the company launched the Raspberry Pi and the current generations of regular
Raspberry Pi boards are Zero, 1, 2, 3, and 4. Generation 1 Raspberry Pi had the following
four options: • Model A
• Model A +
• Model B
• Model B +
Among these models, the Raspberry Pi B models are the original credit-card sized
format. On the other hand, the Raspberry Pi A models have a smaller and more compact
footprint and hence, these models have the reduced connectivity options. Raspberry Pi
Zero models, which come with or without GPIO (general-purpose input output) headers
installed, are the most compact of all the Raspberry Pi boards types.
Pin configuration of raspberry pi
Raspberry Pi is a small-sized computer used Linux operating system. It is mini size
computer used mostly to run larger and smart programs to achieve output
quickly.Raspberry Pi 4 B+ (RP4) is the lasted model developed by the company, which
has all the required latest wired and wireless communications systems used in most of the
smart projects. A single Raspberry Pi 4 comes to a Quad-core processor but it has three
different versions which give three different sizes of RAM. Pi 4 uses mini HDMI and it
also has two ports for two 4K displays.
A Raspberry Pi 3 board has 40 pins on it. Among these pins, we have four power pins on
the Raspberry Pi, two of which are 5v pins and another two are 3.3v pins. The 5v power
pins are connected directly to the Raspberry Pi's power input and we can use these pins to
run low power applications.

Then there are the ground pins. There are eight ground pins and all of these are connected
to each other; you can use any of these ground pins for your projects.

That leaves us with 28 GPIO pins, labeled starting from GPIO 0 and going up to GPIO 27.
The GPIO pins, as indicated by their full form, can be programmed to be output pins or
input pins. So we can set values of output pins and we can even read values of input pins.
The GPIO pins can be digitally programmed so that they can be turned ON or OFF. The
output of any GPIO pin is 3.3v and can be used to control output components like an
LED or a motor. These ON/OFF conditions can also be interpreted as a Boolean
True/False, 1/0 or HIGH/LOW.

These are the common types of pins on a Raspberry Pi 4 board. Some of these pins also
have a dual function. For example, pin 3 or GPIO 2 also acts like an I2C pin.

Pin diagram

Power Supply Pins

Power In:
In Raspberry pi, there is two power in method, one is from the USB-C power port
and the second one is from any 5V pin. The 5-volt pin is directly connected to the USB-C
adapter port. The input on the 5V pin should be stable and according to its specifications.
In the case of higher voltage, the device could get burned. 5V input pins will bypass any
fuse and regulator in case of power input, so the power supply from 5V should according
to its specification to avoid any kind of harm. The power input pin of the Raspberry Pi 4
is given below:
• Pin2-6 —> +5V
• Pin6 —–> GND Power Out:

There are two types of power output pin in theRaspberry pi 4 3V3 and 5V. 5V is
directly connected to the USB port but 3V3 is connected to through the regulator which
gives the stable 3 volts output. All power out pins are given below:

• 3V3 – Pin1, Pin17


• 5V – Pin2, Pin6 Ground:
Raspberry Pi 4 has multiple ground pin which is connected internally and any
ground pin can be used by the power supply or external device to make the common
ground. The list of the ground pins is given below:
• Pin6
• Pin9
• Pin14
• Pin20
• Pin25
• Pin30
• Pin34
• Pin39
Digital Input/Output Pins

Almost every device needs to input and output pins to communicate. In this device there
are 28 GPIO pins are available these pins can be used for any digital input and output
operating. The GPIO pins in the controller have some default values. GPIO pins from 0-9
will be at a HIGH state and from 10 to above the pins will be at a LOW state. All those
pins in the Raspberry Pi 4 are given below:

• GPIO0 – Pin27
• GPIO1 – Pin28
• GPIO2 – Pin3
• GPIO3 – Pin5
• GPIO4 – Pin7
• GPIO5 – Pin29
• GPIO6 – Pin31
• GPIO7 – Pin26
• GPIO8 – Pin24
• GPIO9 – Pin21
• GPIO10 – Pin19
• GPIO11 – Pin23
• GPIO12 – Pin32
• GPIO13 – Pin33
• GPIO14 – Pin8
• GPIO15 – Pin10
• GPIO16 – Pin36
• GPIO17 – Pin11
• GPIO18 – Pin12
• GPIO19 – Pin35
• GPIO20 – Pin38
• GPIO21 – Pin40
• GPIO22 – Pin15
• GPIO23 – Pin16
• GPIO24 – Pin18
• GPIO25 – Pin22
• GPIO26 – Pin37
• GPIO27 – Pin13
All GPIO pins in Raspberry Pi 4 are not only for input-output function. Each GPIO pin
can be used as other functions, which will be specified through programming.
Raspberry Pi Serial Communication Modules
Raspberry Pi UART Pins
There are multiple kinds of serial communication and UART is one of them. It is quite
popular because of its simple communication system and dependence on most of the
software. There is multiple UART communication pin in the Raspberry pi 4 and all of
them are given below:
• TXD1 – GPIO14 – Pin8
• RXD1 – GPIO15 – Pin10
• TXD2 – GPIO0 – Pin27
• RXD2 – GPIO1 – Pin28
• TXD3 – GPIO5 – Pin29
• RXD3 – GPIO4 – Pin7
• TXD4 – GPIO8 – Pin24
• RXD4 – GPIO9 – Pin21
• TXD5 – GPIO12 – Pin32
• RXD5 – GPIO13 – Pin33
SPI Communication Pins

Some devices use SPI protocol and it could help the controlling device to control multiple
devices using single data transmissions wire. In Raspberry pi 4 there are multiple SPI pins
that can be used for SPI communication. The SPI pin of Raspberry Pi 4 is given below:
• SPI3 CEO N – GPIO0 – Pin27
• SPI3 MISO – GPIO1 – Pin28
• SPI3 MOSI – GPIO2 – Pin3
• SPI3 SCLK – GPIO3 – Pin5
• SPI4 CEO N – GPIO4 – Pin7
•SPI4 MISO – GPIO5 – Pin29
•SPI4 MOSI – GPIO6 – Pin31
•SPI4 SCLK – GPIO7 – Pin26
•SPI0 CE1 N – GPIO8 – Pin24
•SPI0 CE0 N – GPIO9 – Pin21
•SPI0 MISO – GPIO10 – Pin19
•SPI0 MOSI – GPIO11 – Pin23
•SPI5 CEO N/ SPI0 SCLK – GPIO12 – Pin32
•SPI5 MISO – GPIO13 – Pin33
•SPI5 MOSI – GPIO14 – Pin8
•SPI5 SCLK – GPIO15 – Pin10
•CTS0 – GPIO16 – Pin36
•RTS0 – GPIO17 – Pin11
•SPI6 CEO N – GPIO18 – Pin12
•SPI6 MISO – GPIO19 – Pin35
•SPI6 MOSI – GPIO20 – Pin38
•SPI6 SCLK – GPIO21 – Pin40
I C Communication Pins
2

Raspberry Pi 4 also supports the I2C Protocol. It is a type of serial communication used
by some sensors and motors to communicate. In Pi GPIO pins also gives I 2C support. All
these pins are given below:
• SDA0/SDA6 – GPIO0 – Pin27
• SCL0/SCL6 – GPIO1 – Pin28
• SDA1/SDA3 – GPIO2 – Pin3
• SCL1/SCL3 – GPIO3 – Pin5
• SDA3 – GPIO4 – Pin7
• SCL3 – GPIO5 – Pin29
• SDA4 – GPIO6 – Pin31
• SCL4 – GPIO7 – Pin26
• SDA4 – GPIO8 – Pin24
• SCL4 – GPIO9 – Pin21
• SDA5 – GPIO10 – Pin19
• SCL5 – GPIO11 – Pin23
• SDA5 – GPIO12 – Pin32
• SCL5 – GPIO13 – Pin33
• SDA6 – GPIO22 – Pin15
• SCL6 – GPIO23 – Pin16
RPi PWM GPIO Pins

To generate the desired pulse output signal Raspberry Pi 4 has some PWM pins. Those
pins can be used directly with any low voltage external device to get that signal. To
generate signal first the pins should get the instructions first. All PWM pins are given
below:
• PWM0 – GPIO12 – Pin32
• PWM1 – GPIO13 – Pin33
• PWM0 – GPIO18 – Pin12
• PWM1 – GPIO19 – Pin35
Raspberry Pi SDIO Pins

In Raspberry Pi 4 there is a slot for SD card but GPIO Pins also support the SD card
compatibility. SDIO pins on the device can be used for SD card in case of requirement:
• SD0CLK/SD1 CLK – GPIO22 – Pin15
• SD0 CMD/SD1 CMD – GPIO23 – Pin16
• SD0 DATA0/SD1 DAT0 – GPIO24 – Pin18
• SD0 DAT1/SD1 DAT1 – GPIO25 – Pin22
• SD1 DAT2/SD1 DAT2 – GPIO26 – Pin37
• SD0 DAT3/SD1 DAT3 – GPIO27 – Pin13 Raspberry Pi 4
Features and Specifications

FEATURES &
SPECIFICATIONS

CPU Quad core Cortex-A72 (64-bit) @ 1.5GHz

H264 (1080p60 decode, 1080p30 encode)


GPU
OpenGL ES 3.0 graphics, H.265 (4kp60 decode)

RAM 1GB, 2GB, 4GB.

Operating Voltage Range 5V with 3A minimum

GPIO PORTS 28 I/O Pins

LAN Available

PoE Enable

WIFI Available

Bluetooth 5.0

SD Card Available
HDMI 2- Port with 4k Display (mini-HDMI)

PWR Exp Header Not Available

Power Source DC Power Jack, mini USB-C Port


Expansion Connectors 40 Pins (SPI, I2C, LCD, UART, PWM, SDIO)

USB 2×2.0, 2×3.0

Camera CSI

Display DSI

Operating Temperature 0 – 50 degree


Raspberry Pi Applications

• Raspberry Pi can be used as a hub in Home Automation.


• It can be used as a server for a small network.
• Pi also uses in robotics and other embedded systems.
Raspberry pi 4 Board Description

There is multiple peripheral support by Raspberry Pi 4 which can be used:

Rpi HDMI Interface Feature

In previous Pi devices, there was only one HDMI port and it also has low graphics, but in
the latest model there two mini HDMI ports that can be used at the same time for multiple
desktop views. Both ports give a 4K ULTRA HD view to the user. It never feels that the
user is viewing a mini-size computer.

• GPU SPECS – H264 (1080p60 decode, 1080p30 encode) OpenGL ES 3.0


graphics, H.265 (4kp60 decode)

Rpi other Main Peripherals

USB:
There are four USB ports in Raspberry Pi 4. Two ports have 2.0 support only but the
remaining two are 3.0. These 3.0 support givens users to transfer data quickly.
PoE Header:
Due to increase the usage of Raspberry Pi in IoT and other smart projects the PoE
Header has also come within the Pi. The one board PoE allows the users to pass the
power to the device through Ethernet Wire. In the case of PoE, an external PoE HAT will
be required.

Camera:
The device has camera support. It has a two-lane MIPI CSI camera port which can be
used to connect the pi directly with the cameras and use them without any third interface.

Display:
The Raspberry Pi 4 can be connected to an external LCD. It doesn’t use the expansion
header to communicate with LCDs like other devices. It has a separate 2 lane MIPI DSI
port which can be used to communicate with external compatible LCD.

Audio:
The audio data can be travel from pi to the display device through HDMI but it has a
separate 4 pole audio port that can be used to send and receive an audio signal. The signal
from the device can be used by the internal program or any other device at the expansion
header.

SD CARD:
It is the most required part of the Raspberry Pi. The OS of the Pi will be placed within
the SD card and then the card will be used through the SD Card slot.
Raspberry Pi 2D Diagram
These two pictures are physical 2D model diagrams of RPi. You might need these
dimension pictures for your PCB design.

POWER SUPPLY BLOCKDIAGRAM:


This project uses regulated 5V, 500mA power supply. 7805 three terminal voltage
regulator is used for voltage regulation. Full wave bridge rectifier is used to rectify the ac
output of secondary of 230/12V step down transformer.
Step down Bridge
Filter Regulator Output
Transformer Rectifier

WEB CAMERA:

A webcam attached to the Pi monitors the area and sends a notification when
any trespassing or obtrusion is detected. The camera also possesses face recognition
algorithm which will possess the ability to identify the person responsible for the motion
triggering. Pi Camera module is a camera which can be used to take pictures and
high definition video. Raspberry Pi Board has CSI (Camera Serial Interface) interface to
which we can attach PiCamera module directly. This Pi Camera module can attach to the
Raspberry Pi's CSI port using 15-pin ribbon cable

DISPLAY:
The Raspberry Pi Touch Display is an LCD display which connects to the
Raspberry Pi through the DSI connector. In some situations, it allows for the use of both
the HDMI and LCD displays at the same time (this requires software support).
Simply connect the HDMI cable to your Raspberry Pi on one end and PC monitor
to another end. After the connection has been established, you will see the booting
options with the usual graphical interface. If your PC monitor doesn't support HDMI, you
can use the alternate option of HDMI to VGA adapter.
Raspberry Pi devices from the Model A to the Raspberry Pi 3 Model B include a
ribbon connector, the Display DSI port. This is intended to connect to a dedicated
Raspberry Pi display, standard and touchscreen.
To generate an image, the LCD uses liquid crystal sandwiched between two panes
of polarized glass, with a backlight illuminating the glass. LCDs work by blocking light
rather than creating it. The display's pixels are switched on or off electronically as the
liquid crystals rotate the polarized light.

SOFTWARE DESCRIPTION:
PYTHON:
CONCLUSION:
REFERENCES:

You might also like