Anda di halaman 1dari 49

TABLE OF CONTENTS

Chapter’s Content Page No.


1 INTRODUCTION 1
1.1 Existing System 3
1.2 Block Diagram 3
1.3 Description 3
1.4 Project Methodology 4

2 LITERATURE REVIEW 5

3 INCEPTION OF RASPBERRY PI 6
3.1 The Idea to create the Raspberry Pi 6
3.2 Initial Design Considerations 7

4 HARDWARE 9
4.1 Hardware Layout 9
4.2 A Brief Description of the Components on the 10
Raspberry Pi
4.3 Specifications 15
4.4 Brief description of System of Chip (SoC) 17
4.5 Accessories 20

5 SOFTWARE 22
5.1 Operating System 22
5.2 Boot Process 22
5.3 The NOOBS Installer 25
5.4 Raspberry Pi Compatible Operating System 26

6 APPLICATIONS 28
6.1 Application 28
6.2 Examples of the Project Raspberry Pi 29
6.3 Comparison of Raspberry Pi with Competitors 32
6.4 Advantages 33
6.5 Disadvantages 34

7 THE CAMERA MODULE 35


7.1 Introduction 35
7.2 Characteristics 36
7.3 Uses 36

8 PROGRAM 40

9 RESULTS AND DISCUSSIONS 42

10 CONCLUSION 44
11 REFERENCES 45
LIST OF FIGURES
Figure’s Figure Content Page No.
Figure 1-1 Block Diagram of Text to Speech Conversion 3

Figure 3-1 A Complete Commodore 64 System 6

Figure 3-2 One of the earliest prototype of the Raspberry Pi 7

Figure 4-1 Block Diagram of Raspberry Pi 9

Figure 4-2 GPIO connector on Raspberry Pi 11

Figure 4-3 RCA Video Connector 12

Figure 4-4 Status LEDs 13

Figure 4-5 Gertboard and Raspberry Pi 20

Figure 5-1 Boot process of Raspberry Pi 24

Figure 6-1 An example of a home automation system using 29


Raspberry Pi
Figure 6-2 Arcade gaming machines using Raspberry Pi 29

Figure 6-3 Raspberry Pi inside the robot 30

Figure 6-4 The robot with the Pi. The R2D2 30

Figure 6-5 Landline using Raspberry Pi and Google Voice 31

Figure 6-6 Raspberry Pi based decoration lights controller 31

Figure 7-1 The Web Camera 35

Figure 9-1 Block Diagram Implementation of TTS system 42

Figure 9-2 Flow Chart Diagram 43


LIST OF TABLES
Table’s Content Page No.
Table 4-1 Specifications 17

Table 5-1 List of Supported Operating Systems 27

Table 6-1 Comparison of Raspberry Pi with chief competitors 32


Introduction
Text to speech is a system which is based on the automatic generation of the new
sentences or words. This is a method where a computer is made to speak. The
dictionaries are often referred for the correct pronunciation of words but for some of the
words the dictionaries cannot give the correct pronunciation. Thus the dictionary is only
limited for a set of words. The proposed system is just limited to some of the audio
conversion that user wants to listen since the dictionary is also limited to some set of
words thus it is not possible to cover entire word string. As the paper discusses about text
to speech conversion speech synthesis comes into frame. Speech synthesis is an artificial
or computer generated human speech. A system which is used for this purpose is called
speech synthesizer. A rule based text-to-speech synthesis system was developed for the
language of Malaysia known as Malay. This speech synthesis system also known as
SMaTTS, was developed with user-friendly graphical user interface (GUI).The
algorithms for SMaTTS system were developed and were compared. The overall
performance of the system is analyzed using categorical estimation (CE) for a
comprehensive analysis. Another speech synthesizer was developed for the Macedonian
language which is based on concatenation of speech segments. A concatenation technique
has overcome the barrier of obtaining the extra-linguistic information by using the actual
voice of a recognizable person as a source, combined with minimal use of signal
processing. But still there is a problem when the person speaks in various prosodies.
Speech synthesis can also be done by utilizing glottal inverse filtering for generating
natural sounding speech. Speech synthetization can be performed in number of ways one
of them is Unit Selection Synthesis which provides with more naturalness and efficiency
based on that unit is used like phoneme, diaphone, syllable etc. A text-to-speech system
was developed for converting Thai text to speech (TTTS). TTTS consists of four modules
including Thai text, text processing, and dictionary lookup and speech synthesis. The
TTTS dictionary contains around 5300 Thai words along with their sound wave. Neural
networks can also be used for text to speech conversion. Use of neural networks can
absorb many of the irregularities in Greek pronunciation. Chinese language is analyzed
based on the analysis of characteristics of Tibetan language SAMPA_ST standard
pronunciation is being used for this purpose. A text-to-speech system for Azerbaijani
1
Turkish language was developed which explains various speech synthesis methods and
some important features of Azerbaijani Turkish language. Corpus based concatenative
speech synthesis is used for this system. According to the input text appropriate units are
selected and then concatenated. Automatic speech recognition (ASR) transforms speech
into text. ASR is developed based on speech coding theory, while simulating certain
spectral analyses performed by the ear. Speech synthesis is the automatic generation of a
speech waveform, typically from an input text. TTS makes use of database of
information, both speech and text. Previously analyzed speech is stored in small units in
the database, for concatenation in the proper sequence at runtime. TTS systems first
perform text processing, including "letter-to-sound" conversion, to generate the phonetic
transcription. The database containing words or sentences gives higher quality of
outputs. Furthermore, a synthesizer can also incorporate human voice characteristics to
create a synthetic but somewhat natural voice. Mainly a speech synthesizer is judged on
the basis of the similarity of output speech obtained with the human voice. Upcoming
day’s Text to speech (TTS) system focuses more on emotional proportion with the speech
i.e. it requires more realistic and natural voice that can be closely matched with the
human voice. Thus there comes a limitation in input text in order to get high quality of
output. The examples for speech synthesis are voice enabled e-mail and unified
messaging. The first step involved in speech synthesis is for the user to speak a word in
microphone than the speech is digitized using Analog to Digital (A/D) converter and it is
stored in memory in the form of database. In order to identify this voice the computer
matches it with the voice sample that has some known meaning. Here comes another
application of controlling any device with voice rather than using keyboard or mouse.
Text to speech conversion basically involves two parts front end and back end. The front
end process involves language related processing like Text tokenization, Text to speech
conversion etc. The back end process involves the speech related signal processing like
pitch estimation, speech synthesis etc. Normally the front end steps remain the same
while back end steps varies because of the different synthesizers involved based on the
output desired by the user. Text tokenization refers to the words of the string separated by
space, commas etc. Text normalization basically refers to the conversion of numbers,
abbreviations into corresponding words, for e.g. Mr., Ms., Dr. etc. Apart from this front

2
end steps also involves parts of speech tagging, phrasing, pause insertion etc. the back
end step involves the tone modulation and the generation of speech based on some
algorithm. The whole process of Text to speech conversion is carried out in Raspberry-pi
which contains an ARM processor which further gives the high performance and accurate
results.

1.1 Existing System

Presents system uses basic patterns or Braille which is a system of reading and writing by
touch used by the blind. It consists of arrangements of dots which make up letters of the
alphabet, numbers, and punctuation marks. To revolutions the braille system we are
going for proposed system.

1.2 Block Diagram

POWER SUPPLY

HEAD PHONES
3.5MM
PI CAMERA RASPBERRY PI 3
MODEL B+ JACK FOR
AUDIO

Figure 1-1: Block diagram of Text to Speech Conversion

1.3 Description

3
In this dissertation we attempt at developing a TTS system a lot of commercial systems
are available but there is yet to be a competitive system available for efficient and
accurate system Although the task of building very high quality, text-to-speech (TTS)
system is still a difficult one, with many open research questions, we believe the building
of reasonable quality voices for many tasks can serve our needs.

This project uses regulated 5V, 1A power supply. 7805 three terminal voltage regulator is
used for voltage regulation. Bridge type full wave rectifier is used to rectify the ac output
of secondary of 230/12V step down transformer.

1.4 Project Methodology

This proposes a system which is used for converting the input string of text into the
corresponding speech using Raspberry-Pi. The fastest and effective way of
communication is language. Limited and proper combination of words with grammar
rules gives a clear picture of the ideas or thoughts that speaker wants to convey. The
system includes Python coding which is done on Raspberry-pi for the generation of
speech signal based on the user defined input text. A simple File Accessing Protocol
(FAP) is adapted to achieve the task of retrieving the audio files on the database. This
paper also throws light on the mechanism and strategy used to convert the text input to
speech output.

4
Literature Review
1.Yee-Ling Lu, Man-Wai and Wan-Chi Siu explains about text-to-phoneme conversion
by using recurrent neural networks trained with the real time recurrent learning (RTRL)
algorithm.
2.Penagarikano, M.; Bordel, G explains a technique to perform the speech to text
conversion as well as an investigational test carried out over a task oriented Spanish
corpus are reported & analytical results also.
3.Sultana, S.; Akhand, M. A H; Das, P.K.; Hafizur Rahman, M.M. explore Speech-to-
Text (STT) conversion using SAPI for Bangla language. Although achieved performance
is promising for STT related studies, they identified several elements to recover the
performance and might give better accuracy and assure that the theme of this study will
also be helpful for other languages for Speech to Text conversion and similar tasks.
4.Moulines, E., in his paper "Text-to-speech algorithms based on FFT synthesis," present
FFT synthesis algorithms for a French text-to-speech system based on diaphone
concatenation. FFT synthesis techniques are capable of producing high quality prosodic
adjustments of natural speech. Several different approaches are formulated to reduce the
distortions due to diaphone concatenation.
5.Decadt, Jacques, Daelemans, Walter and Wambacq describes a method to develop the
readability of the textual output in a large vocabulary continuous speech recognition
system when out-of-vocabulary words occur. The basic idea is to replace uncertain words
in the transcriptions with a phoneme recognition result that is post-processed using a
phoneme-tographeme converter. This technique uses machine learning concepts.

5
Inception of Raspberry Pi

3.1 The Idea to create the Raspberry Pi


The idea behind a tiny and affordable computer for kids came in 2006, when Eben
Upton, Rob Mullins, Jack Lang and Alan Mycroft, based at the University of
Cambridge’s Computer Laboratory, became concerned about the year-on-year decline
in the numbers and skills levels of the A Level students applying to read Computer
Science. From a situation in the 1990s where most of the kids applying were coming
to interview as experienced hobbyist programmers, the landscape in the 2000s was
very different; a typical applicant might only have done a little web design.

Something had changed the way kids were interacting with computers. A number of
problems were identified: majority of curriculums with lessons on using Word and
Excel, or writing webpages; the end of the dot-com boom; and the rise of the home
PC and games console to replace the Amigas, BBC Micros, Spectrum ZX and
Commodore 64 machines that people of an earlier generation learned to program on.

Figure 3-1: A complete Commodore 64 System

6
There isn’t much any small group of people can do to address problems like an
inadequate school curriculum or the end of a financial bubble. But those students
felt that they could try to do something about the situation where computers had
become so expensive and arcane that programming experimentation on them had to
be forbidden by parents; and to find a platform that, like those old home computers,
could boot into a programming environment. Thus came the idea of creating the
device which kids could buy and learn programming or hardware on – The Raspberry
Pi.

3.2 Initial Design Considerations

From 2006 to 2008 they created many designs and prototypes of what we now know
as the Raspberry Pi. One of the earliest prototypes is shown below:

Figure 3-2: One of the earliest prototype of the Pi

7
These boards use an Atmel ATmega644 microcontroller clocked at 22.1MHz, and a
512K SRAM for data and frame buffer storage.

By 2008, processors designed for mobile devices were becoming more affordable,
and powerful enough to provide excellent multimedia, a feature which would make
the board desirable to kids who wouldn’t initially be interested in a purely
programming-oriented device. The project started to look very realizable and feasible.
Eben (now a chip architect at Broadcom), Rob, Jack and Alan, teamed up with Pete
Lomas, MD of hardware design and manufacture company Norcott Technologies,
and David Braben, co-author of the BBC Micro game Elite, to form the Raspberry Pi
Foundation to make it a reality. Three years later, the Raspberry Pi Model B entered
mass production through licensed manufacture deals with Element 14/Premier Farnell
and RS Electronics, and within two years it had sold over two million units.

8
Hardware
4.1 Hardware Layout

Figure 4-1: Block Diagram of Raspberry Pi

9
4.2 A brief description of the components on the Pi.

1) Processor / SoC (System on Chip)


The Raspberry Pi has a Broadcom BCM2835 System on Chip module. It has a
ARM1176JZF-S processor

The Broadcom SoC used in the Raspberry Pi is equivalent to a chip used in an old
smartphone (Android or iPhone). While operating at 700 MHz by default, the
Raspberry Pi provides a real world performance roughly equivalent to the 0.041
GFLOPS. On the CPU level the performance is similar to a 300 MHz Pentium II of
1997-1999, but the GPU, however, provides 1 Gpixel/s, 1.5 Gtexel/s or 24 GFLOPS
of general purpose compute and the graphics capabilities of the Raspberry Pi are
roughly equivalent to the level of performance of the Xbox of 2001. The Raspberry Pi
chip operating at 700 MHz by default, will not become hot enough to need a heatsink
or special cooling.

2) Power source
The Pi is a device which consumes 700mA or 3W or power. It is powered by a
MicroUSB charger or the GPIO header0. Any good smartphone charger will do the
work of powering the Pi.

3) SD Card
The Raspberry Pi does not have any onboard storage available. The operating system
is loaded on a SD card which is inserted on the SD card slot on the Raspberry Pi. The
operating system can be loaded on the card using a card reader on any computer.

4) GPIO
GPIO – General Purpose Input Output
General-purpose input/output (GPIO) is a generic pin on an integrated circuit whose
behavior, including whether it is an input or output pin, can be controlled by the user
at run time.

10
GPIO pins have no special purpose defined, and go unused by default. The idea is
that sometimes the system designer building a full system that uses the chip might
find it useful to have a handful of additional digital control lines, and having these
available from the chip can save the hassle of having to arrange additional circuitry
to provide them.

GPIO capabilities may include:


 GPIO pins can be configured to be input or output
 GPIO pins can be enabled/disabled
 Input values are readable (typically high=1, low=0)
 Output values are writable/readable
 Input values can often be used as IRQs (typically for wakeup events)
The production Raspberry Pi board has a 26-pin 2.54 mm (100mil) expansion header,
marked as P1, arranged in a 2x13 strip. They provide 8 GPIO pins plus access to I²C,
SPI, UART), as well as +3.3 V, +5 V and GND supply lines. Pin one is the pin in the
first column and on the bottom row.

Figure 4-2: GPIO connector on Raspberry Pi

11
5) DSI Connector
The Display Serial Interface (DSI) is a specification by the Mobile Industry Processor
Interface (MIPI) Alliance aimed at reducing the cost of display controllers in a mobile
device. It is commonly targeted at LCD and similar display technologies. It defines a
serial bus and a communication protocol between the host (source of the image data)
and the device (destination of the image data).

A DSI compatible LCD screen can be connected through the DSI connector, although
it may require additional drivers to drive the display.

6) RCA Video
RCA Video outputs (PAL and NTSC) are available on all models of Raspberry Pi.
Any television or screen with a RCA jack can be connected with the Raspberry Pi.

Figure 4-3: RCA Video Connector


7) Audio Jack
A standard 3.5 mm TRS connector is available on the Raspberry Pi for stereo audio
output. Any headphone or 3.5mm audio cable can be connected directly. Although
this jack cannot be used for taking audio input, USB mics or USB sound cards can be
used.

8) Status LEDs
There are 5 status LEDs on the Raspberry Pi that show the status of various activities
as follows:

“OK” - SDCard Access (via GPIO16) - labelled as "OK" on Model B Rev1.0 boards
and "ACT" on Model B Rev2.0 and Model A boards

12
“POWER” - 3.3 V Power - labelled as "PWR" on all boards

“FDX” - Full Duplex (LAN) (Model B) - labelled as "FDX" on all boards “LNK” -
Link/Activity (LAN) (Model B) - labelled as "LNK" on all boards
“10M/100” - 10/100Mbit (LAN) (Model B) - labelled (incorrectly) as "10M" on
Model B Rev1.0 boards and "100" on Model B Rev2.0 and Model A boards.

Figure 4-4: Status LEDs

9) USB 2.0 Port


USB 2.0 ports are the means to connect accessories such as mouse or keyboard to the
Raspberry Pi. There is 1 port on Model A, 2 on Model B and 4 on Model B+. The
number of ports can be increased by using an external powered USB hub which is
available as a standard Pi accessory.

10) Ethernet
Ethernet port is available on Model B and B+. It can be connected to a network or
internet using a standard LAN cable on the Ethernet port. The Ethernet ports are
controlled by Microchip LAN9512 LAN controller chip.

11) CSI connector

13
CSI – Camera Serial Interface is a serial interface designed by MIPI (Mobile Industry
Processor Interface) alliance aimed at interfacing digital cameras with a mobile
processor.

The Raspberry Pi foundation provides a camera specially made for the Pi which can
be connected with the Pi using the CSI connector.

12) JTAG headers


JTAG is an acronym for ‘Joint Test Action Group', an organization that started back
in the mid 1980's to address test point access issues on PCB with surface mount
devices. The organization devised a method of access to device pins via a serial port
that became known as the TAP (Test Access Port). In 1990 the method became a
recognized international standard (IEEE Standard 1149.1). Many thousands of
devices now include this standardized port as a feature to allow test and design
engineers to access pins.

13) HDMI
HDMI – High Definition Multimedia Interface
HDMI 1.3 a type A port is provided on the Raspberry Pi to connect with HDMI
screens.

14
4.3 Specifications

Model A Model B Model B+

Target price: US$25 US$35

SoC: Broadcom BCM2835 (CPU, GPU, DSP, SDRAM, and single USB
port)

CPU: 700 MHz ARM1176JZF-S core (ARM11 family, ARMv6


instruction set)

GPU: Broadcom VideoCore IV @ 250 MHz

Memory 256 MB (shared 512 MB (shared with GPU) as of 15 October


(SDRAM): with GPU) 2012

USB 2.0 ports: 1 (direct from 2 (via the on-board 3- 4 (via the on-board 5-
BCM2835 chip) port USB hub) port USB hub)

Video input: 15-pin MIPI camera interface (CSI) connector, used with the
Raspberry Pi Camera Add on.

Video outputs: Composite RCA (PAL and NTSC) –in model B+ via 4-pole 3.5 mm
jack, HDMI (rev 1.3 & 1.4), raw LCD Panels via DS

Audio outputs: 3.5 mm jack, HDMI, and, as of revision 2 boards, I²S audio (also

potentially for audio input)

15
Onboard SD / MMC / SDIO card slot (3.3 V card MicroSD

storage: power support only)

16
Onboard None 10/100 Mbit/s Ethernet (8P8C) USB adapter

network: on the third/fifth port of the USB hub


Low-level 8× GPIO, UART, I²C bus, SPI bus with 17× GPIO
two
peripherals:
chip selects, I²S audio +3.3 V, +5 V,
ground
Power ratings: 300 mA (1.5 700 mA (3.5 W) 600 mA (3.0 W)
W)
Power source: 5 V via MicroUSB or GPIO header
Size: 85.60 mm × 56 mm (3.370 in × 2.205 in) – not including
protruding

Connectors
Weight: 45 g (1.6 oz)

Table 4-1: Specifications

4.4 Brief description of System on Chip (SoC)

Since smartphones and tablets are basically smaller computers, they require pretty
much the same components we see in desktops and laptops in order to offer us all the
amazing things they can do (apps, music and video playing, 3D gaming support,
advanced wireless features, etc.)

But smartphones and tablets do not offer the same amount of internal space as
desktops and laptops for the various components needed such as the logic board, the
processor, the RAM, the graphics card, and others. That means these internal parts
need to be as small as possible, so that device manufacturers can use the remaining
space to fit the device with a long-lasting battery life.

17
Thanks to the wonders of miniaturization, SoC manufacturers, like Qualcomm,
Nvidia or Texas Instruments, can place some of those components on a single chip,
the System on a Chip that powers smartphones.

A system on a chip or system on chip (SoC or SOC) is an integrated circuit (IC) that
integrates all components of a computer or other electronic system into a single chip.
It may contain digital, analog, mixed-signal, and often radio-frequency functions—all
on a single chip substrate. SoC’s are very comman in the mobile electronics market
because of their low power consumption. A typical application is in the area of
embedded systems.
The contrast with a microcontroller is one of degree. Microcontrollers typically have
under 100 kB of RAM (often just a few kilobytes) and often really are single-chip-
systems, whereas the term SoC is typically used for more powerful processors,
capable of running software such as the desktop versions of Windows and Linux,
which need external memory chips (flash, RAM) to be useful, and which are used
with various external peripherals. In short, for larger systems, the term system on a
chip is a hyperbole, indicating technical direction more than reality increasing chip
integration to reduce manufacturing costs and to enable smaller systems. Many
interesting systems are too complex to fit on just one chip built with a process
optimized for just one of the system's tasks.
A Typical SoC consists of:

 A microcontroller, microprocessor or DSP core(s). Some SoCs—called


Multiprocessor system on chip (MPSoC)—include more than one processor
core.
 Memory blocks including a selection of ROM, RAM, EEPROM and flash
memory
 Timing sources including oscillators and phase-locked loops
 Peripherals including counter-timers, real-time timers and power-on reset
generators
 External interfaces, including industry standards such as USB, FireWire,
Ethernet, USART, SPI
 Analog interfaces including ADCs and DACs

18
 Voltage regulators and power management circuits
 A bus - either proprietary or industry-standard such as the AMBA bus from
ARM Holdings - connects these blocks. DMA controllers route data directly
between external interfaces and memory, by passing the processor core and
thereby increasing the data throughput of the SoC.

19
4.5 Accessories

Raspberry Pi being a very cheap computer has attracted millions of users around the
world. Thus it has a large user base. Many enthusiasts have created accessories and
peripherals for the Raspberry Pi. This range from USB hubs, motor controllers to
temperature sensors. There are some official accessories for the Raspberry Pi as
follows:

Camera – On 14 May 2013, the foundation and the distributors RS Components &
Premier Farnell/Element 14 launched the Raspberry Pi camera board with a firmware
update to support it. The Raspberry Pi camera board contains a 5 MPixel sensor, and
connects via a ribbon cable to the CSI connector on the Raspberry Pi. In Raspbian
support can be enabled by the installing or upgrading to the latest version of the OS
and then running Raspi-config and selecting the camera option. The cost of the
camera module is 20 EUR in Europe (9 September 2013). and supports 1080p, 720p,
640x480p video. The footprint dimens io ns are 25 mm x 20 mm x 9 mm.

Gertboard – A Raspberry Pi Foundation sanctioned device designed for educational


purposes, and expands the Raspberry Pi's GPIO pins to allow interface with and
control of LEDs, switches, analog signals, sensors and other devices. It also includes
an optional Arduino compatible controller to interface with the Pi. The Gertboard can
be used to control motors, switches etc. for robotic projects.

Figure 4-5: Gertboard (left) & Raspberry Pi


(Right)
20
USB Hub – Although not an official accessory, it is a highly recommended accessory
for the Pi. A powered USB Hub with 7 extra ports is available at almost all online
stores. It is compulsory to use a USB Hub to connect external hard disks or other
accessories that draw power from the USB ports, as the Pi cannot give power to them.

21
Software

5.1 Operating System

The Raspberry Pi primarily uses Linux kernel-based operating systems. The ARM11
is based on version 6 of the ARM which is no longer supported by several popular
versions of Linux, including Ubuntu. The install manager for Raspberry Pi is
NOOBS. The OSs included with NOOBS is:
 Archlinux ARM
 OpenELEC
 Pidora (Fedora Remix)
 Raspbmc and the XBMC open source digital media center
 RISC OS – The operating system of the first ARM-based computer
 Raspbian (recommended) – Maintained independently of the Foundation;
based on ARM hard-float (armhf)-Debian 7 'Wheezy' architecture port, that
was designed for a newer ARMv7 processor whose binaries would not work
on the Raspberry Pi, but Raspbian is compiled for the ARMv6 instruction set
of the Raspberry Pi making it work but with slower performance. It provides
some available deb software packages, pre-compiled software bundles. A
minimum size of 2 GB SD card is required, but a 4 GB SD card or above is
recommended. There is a Pi Store for exchanging programs. The 'Raspbian
Server Edition (RSEv2.4)', is a stripped version with other software packages
bundled as compared to the usual desktop computer oriented Raspbian.

5.2 Boot Process

The Raspberry Pi does not boot as a traditional computer. The VideoCore i.e. the
Graphics processor actually boots before the ARM CPU.
The boot process of the Raspberry Pi can be explained as follows:

22
 When the power is turned on, the first bits of code to run is stored in a ROM
chip in the SoC and is built into the Pi during manufacture. This is the called
the first-stage bootloader.
 The SoC is hardwired to run this code on startup on a small RISC Core
(Reduced Instruction Set Computer). It is used to mount the FAT32 boot
partition in the SDCard so that the second-stage bootloader can be accessed.
So what is this ‘second-stage bootloader’ stored in the SD Card? It’s
‘bootcode.bin’. This file can be seen while mount process of an operating
system on the SD Card in windows.

 Now here’s something tricky. The first-stage bootloader has not yet initialized
the ARM CPU (meaning CPU is in reset) or the RAM. So, the second-stage
bootloader also has to run on the GPU. The bootloader.bin file is loaded into
the 128K 4 ways set associative L2 cache of the GPU and then executed. This
enables the RAM and loads start.elf which is also in the SD Card. This is the
third-stage bootloader and is also the most important. It is the firmware for
the GPU, meaning it contains the settings or in our case, has instructions to
load the settings from config.txt which is also in the SD Card. We can think of
the config.txt as the ‘BIOS settings’.

 The start.elf also splits the RAM between the GPU and the ARM CPU. The
ARM only has access the to the address space left over by the GPU address
space. For example, if the GPU was allocated addresses from 0x000F000 –
0x0000FFFF, the ARM has access to addresses from 0x00000000 –
0x0000EFFF.

 The physical addresses perceived by the ARM core is actually mapped to


another address in the VideoCore (0xC0000000 and beyond) by the MMU
(Memory Management Unit) of the VideoCore.

 The config.txt is loaded after the split is done so the splitting amounts cannot
be specified in the config.txt. However, different.elf files having different

23
splits exist in the SD Card. So, depending on the requirement, the file can be
renamed to start .elf and boot the Pi. In the Pi, the GPU is King.

 Other than loading config.txt and splitting RAM, the start.elf also loads
cmdline.txt if it exists. It contains the command line parameters for whatever
kernel that is to be loaded. This brings us to the final stage of the boot process.
The start.elf finally loads kernel.img which is the binary file containing the
OS kernel and releases the reset on the CPU. The ARM CPU then executes
whatever instructions in the kernel.img thereby loading the operating system.

 After starting the operating system, the GPU code is not unloaded. In fact,
start.elf is not just firmware for the GPU, It is a proprietary operating system
called VideoCore OS (VCOS). When the normal OS (Linux) requires an
element not directly accessible to it, Linux communicates with VCOS using
the mailbox messaging system.

Power On

Hardwired First Stage Bootloader

Second Stage Bootloader

Mount bootcode.bin from FAT32 boot partition from SD Card to L2 cache of GPU.

Third Stage Bootloader


bootcode.bin starts start.elf which splits the ram. Then load kernel.img. Operating
System is now loaded.

Figure 5-1: Boot process of Raspberry Pi

24
5.3 The NOOBS Installer

The Raspberry Pi package only comes with the main board and nothing else. It does not
come shipped with an operating system. Operating systems are loaded on a SD card from
a computer and then the SD card is inserted in the Pi which becomes the primary boot
device.

Installing operating system can be easy for some enthusiasts, but for some beginners working
with image files of operating systems can be difficult. So the Raspberry Pi foundation made
software called NOOBS – New Out Of Box Software which eases the process of installing
an operating system on the Pi.

The NOOBS installer can be downloaded from the official website. A user only needs to
connect a SD card with the computer and just run the setup file to install NOOBS on the SD
card. Next, insert the card on the Raspberry Pi. On booting the first time, the NOOBS
interface is loaded and the user can select from a list of operating systems to install. It is
much convenient to install the operating system this way. Also once the operating system is
installed on the card with the NOOBS installer, every time the Pi boots, a recovery mode
provided by the NOOBS can be accessed by holding the shift key during boot. It also allows
editing of the config.txt file for the operating system.

25
5.4 Raspberry Pi Compatible Operating System
Distribution Type Memory Packages
footprint
Arch Linux ARM Linux 8,700
BerryTerminal Linux
Bodhi Linux Raspbian 35,000+

ARMHF
Debian ARM Linux 20,000+
Fedora Remix Linux 16,464?
Gentoo Linux Linux ~23 MiB
IPFire Linux ~20 MiB 144
I2PBerry Linux 20,000+

Meego MER + XBMC Linux (embedded) ~34 MiB + ~320 (core)


XBMC
Moebius Raspbian ~20 MiB (core) + Raspbian
Repositories
nOS Linux ~90 MiB 35,000+
openSUSE Linux 3.11 28 MiB (inc. 6300
X11)
OpenWRT Linux 3,3MiB 3358
PiBang Linux Linux_3.6.11

& SystemD
PwnPi Linux 20,000+
QtonPi Linux
VPNbian Linux ~40 MiB w/o 35,000+

Desktop
Raspbian Linux ~30 MiB w/o 35,000+

Desktop

26
Raspbmc Raspbian 20,000+
RISC OS RISC OS
Aros hosted on Mixed Debian6 and <~50 MiB

Raspbian Limit ed Aros


Demo
Plan9 Plan 9
SlaXBMCRPi Linux 3.10.36+ 476

(+ Officia l
SlackwareARM 14.1
Packages)
PiMAME Linux
PiBox Linux/Buildroot
pipaOS Raspbian ~32 MiB 37.500
Raspberry WebKiosk Raspbian
Volumio Raspbian
Nard SDK Embedded Linux ~40 MB

Table 5-1: List of supported Operating Systems

27
Applications

6.1 Applications

The major aim behind the Raspberry Pi was to educate people, especially children and
teenagers, towards programming and basic hardware interfacing. The open body
structure of the Raspberry Pi makes it a machine on which one can learn computer
concepts.

Applications of the Raspberry Pi can be given as follows:

 Teaching programming concepts.

 Teaching hardware interfacing.

 Raspberry Pi being very cost effective can be deployed in large numbers in


underdeveloped and developing countries like Africa, India, China, Brazil etc. To
schools and colleges and to everyone who is interested in computers and
electronics.
 It can be used in robotics for controlling motors, sensors, etc.

 It can be used as a downloading machine replacing desktop computers. It


consumes very low power and also can be accessed remotely.
 It can be used as a media center at home. Any television can be converted to a
smart TV with internet capabilities with the Raspberry Pi.
 It can be used for designing prototypes of DIY projects and certain embedded
devices. It becomes very cheap option for testing and evaluation purpose.
 Can be used in creating and handling small servers.

 It can be used for making digital photo frames, tablets etc. at home

28
6.2 Examples of projects using Raspberry Pi

1) Home Automation
With a Raspberry Pi, switches, web server, enthusiasts have created home
automation systems that can control fans and lights of a home from the Pi or
even a smartphone.

Figure 6-1: An example of a home automation system using Raspberry Pi


2) Arcade gaming machine
Since the games of the 80’s and 90’s are forgotten today, people created retro style
arcade gaming machines using simple switches, a screen and the Raspberry Pi.

Figure 6-2: Arcade gaming machines using Raspberry Pi

29
3) Robot
While robotics has a great fan base, creating a star wars robot from Raspberry Pi
deserves a mention here.

Figure 6-3: Raspberry Pi inside the Robot

Figure 6-4: The robot with the Pi. The R2D2

30
4) Landline
Why pay for your landline when you can use your internet and your old landline
phone with the Pi!

Figure 6-5: Landline using Raspberry Pi and Google


Voice

5) Diwali lights / Decoration lights controller


The Raspberry Pi can be used to make a remote control for all the decoration lights in
the house!

Figure 6-6: Raspberry Pi based decoration lights controller

31
6.3 Comparison of Raspberry with the Competitors
The chief competitors of the Raspberry Pi are the Arduino and the Beagleboard. Both
are single board computers and have applications similar to the Raspberry Pi. A brief
comparison of the three of them is shown below:

Table 6-1: Comparison of Raspberry Pi with chief Competitors

32
6.4 Advantages

Advantages of the Raspberry Pi:

It is important for customers and business owners that want to get the Raspberry Pi to
consider whether it fits with their business strategy and are willing to go through the
process of putting it together and tailoring the product to their own needs. The
benefits that this products offers beside the low price point are:

 This microcomputer is useful for small or home based businesses that run on a
smaller budget than bigger companies for you are not required to purchase
any special licenses from the Raspberry Pi Foundation to use their product or
if you invent new technology that embeds the product. Small business
owners can use it to automate any small task, such as using the Pi to run a
website ( as long as it does not have a lot of traffic), or use it as a small
database and media server... pretty much anything that doesn't require the
Windows operating system or other systems that does not support Linux and
lots of traffic). Businesses can also save money on buying cooling systems
that are required to cool servers.
 The product does not require the user to have extensive programming
experience since it is aimed for the younger generation to learn about
programming. Python, the programming language that the Pi uses, is less
complex than other languages available. For example, it has better code
readability and allows the user to type concepts using fewer amounts of lines.
Python also has an automatic memory management function.
 The product also gives you a lot of room to experiment and turn it into
something else that is entirely different. The SD cards on the board can be
easily switched, which allows you to change the functions of the device
without spending a lot of time re-installing the software.
 The Raspberry Pi is perfect for adaptive technology: it is able to display
images or play videos at 1080p high definition resolution to building systems
such as digital jukeboxes or prototyping embedded systems. This product
makes it possible to build complex and effective products at a cheaper price.

33
 The product is energy efficient and provides a greener ethical alternative to
small businesses. This small credit card sized product makes it easy to recycle
and does not release as much carbon dioxide emissions into the environment,
unlike big servers that require lots of energy and extensive cooling systems.

6.5 Disadvantages

Disadvantages of Raspberry Pi:

 It does not replace your computer, since the Ethernet is only a 10/100 and the
processor is not as fast, it is time consuming to download and install software
and is unable to do any complex multi-tasking.
 Not compatible with other operating systems such as Windows (There are
currently 1.3 billion Windows users around the world.)
 To use the Raspberry Pi, it will take more than just 35$ to get it to do what
you need through buying extra accessories such as the SD card, USB power
supply, keyboard etc. and if you take into account the acquisition cost of the
product. This is only fit for those who want a gadget that they can tailor to
their own needs and tastes, not for those who just wants to get a job done fast.
Business owners need to consider if the extra hassle is worth it.
 This product will not be useful for bigger businesses that already have big
servers, which would already do everything that the Raspberry Pi does, so it
would not be worth it to take the time to get someone to put it together.

34
The Camera Module

7.1 Introduction
A webcam is a video camera that feeds or streams its image in real time to or through a
computer to a computer network. When "captured" by the computer, the video stream
may be saved, viewed or sent on to other networks travelling through systems such as the
internet, and e-mailed as an attachment. When sent to a remote location, the video stream
may be saved, viewed or on sent there. Unlike an IP camera (which connects using
Ethernet or Wi-Fi), a webcam is generally connected by a USB cable, or similar cable, or
built into computer hardware, such as laptops.
The term "webcam" (a clipped compound) may also be used in its original sense of a
video camera connected to the Web continuously for an indefinite time, rather than for a
particular session, generally supplying a view for anyone who visits its web page over the
Internet. Some of them, for example, those used as online traffic cameras, are expensive,
rugged professional video cameras.

Figure 7-1: Webcam

35
7.2 Characteristics
Webcams are known for their low manufacturing cost and their high flexibility, making
them the lowest-cost form of videotelephony. Despite the low cost, the resolution offered
at present (2015) is rather impressive, with low-end webcams offering resolutions of
320×240, medium webcams offering 640×480 resolution, and high-end webcams
offering 1280×720 (aka 720p) or even 1920×1080 (aka 1080p) resolution.
They have also become a source of security and privacy issues, as some built-in webcams
can be remotely activated by spyware.

7.3 Uses
The most popular use of webcams is the establishment of video links, permitting
computers to act as videophones or videoconference stations. Other popular uses include
security surveillance, computer vision, video broadcasting, and for recording social
videos.
The video streams provided by webcams can be used for a number of purposes, each
using appropriate software:
1.Health care
Most modern webcams are capable of capturing arterial pulse rate by the use of a simple
algorithmic trick. Researchers claim that this method is accurate to ±5 bpm.

2.Video monitoring
Webcams may be installed at places such as childcare centres, offices, shops and private
areas to monitor security and general activity.

3.Commerce
Webcams have been used for augmented reality experiences online. One such function
has the webcam act as a "magic mirror" to allow an online shopper to view a virtual item
on themselves. The Webcam Social Shopper is one example of software that utilizes the
webcam in this manner.

36
4.Videocalling and Videoconferencing
Further information: Videophone, Videoconferencing, and Videotelephony
Webcam can be added to instant messaging, text chat services such as AOL Instant
Messenger, and VoIP services such as Skype, one-to-one live video communication over
the Internet has now reached millions of mainstream PC users worldwide. Improved
video quality has helped webcams encroach on traditional video conferencing systems.
New features such as automatic lighting controls, real-time enhancements (retouching,
wrinkle smoothing and vertical stretch), automatic face tracking and autofocus, assist
users by providing substantial ease-of-use, further increasing the popularity of webcams.
Webcam features and performance can vary by program, computer operating system, and
also by the computer's processor capabilities. Video calling support has also been added
to several popular instant messaging programs.

5.Video security
Webcams can be used as security cameras. Software is available to allow PC-connected
cameras to watch for movement and sound, recording both when they are detected. These
recordings can then be saved to the computer, e-mailed, or uploaded to the Internet. In
one well-publicised case, a computer e-mailed images of the burglar during the theft of
the computer, enabling the owner to give police a clear picture of the burglar's face even
after the computer had been stolen.

6.Video clips and stills


Webcams can be used to take video clips and still pictures. Various software tools in
wide use can be employed for this, such as PicMaster (for use with Windows operating
systems), Photo Booth (Mac), or Cheese (with Unix systems). For a more complete list
see Comparison of webcam software.
7.Input control devices
Special software can use the video stream from a webcam to assist or enhance a user's
control of applications and games. Video features, including faces, shapes, models and
colors can be observed and tracked to produce a corresponding form of control. For
example, the position of a single light source can be tracked and used to emulate a mouse

37
pointer, a head-mounted light would enable hands-free computing and would greatly
improve computer accessibility. This can be applied to games, providing additional
control, improved interactivity and immersiveness.
FreeTrack is a free webcam motion-tracking application for Microsoft Windows that can
track a special head-mounted model in up to six degrees of freedom and output data to
mouse, keyboard, joystick and FreeTrack-supported games. By removing the IR filter of
the webcam, IR LEDs can be used, which has the advantage of being invisible to the
naked eye, removing a distraction from the user. TrackIR is a commercial version of this
technology.
The EyeToy for the PlayStation 2, PlayStation Eye for the PlayStation 3, and the Xbox
Live Vision camera and Kinect motion sensor for the Xbox 360 and are color digital
cameras that have been used as control input devices by some games.
Small webcam-based PC games are available as either standalone executables or inside
web browser windows using Adobe Flash.

8.Astro photography
With very-low-light capability, a few specific models of webcams are very popular to
photograph the night sky by astronomers and astro photographers. Mostly, these are
manual focus cameras and contain an old CCD array instead of comparatively newer
CMOS array. The lenses of the cameras are removed and then these are attached to
telescopes to record images, video, still, or both. In newer techniques, videos of very faint
objects are taken for a couple of seconds and then all the frames of the video are
"stacked" together to obtain a still image of respectable contrast.

9.Laser beam profiling


A webcam's CCD response is linear proportional to the incoming light. Therefore,
webcams are suitable to record laser beam profiles, after the lens is removed. The
resolution of a laser beam profiler depends on the pixel size. Commercial webcams are
usually designed to record color images. The size of a webcam's color pixel depends on
the model and may lie in the range of 5 to 10µm. However, a color pixel consists of four
black and white pixels each equipped with a color filter (for details see Bayer filter).

38
Although these color filters work well in the visible, they may be rather transparent in the
near infra-red. By switching a webcam into the Bayer-mode it is possible to access the
information of the single pixels and a resolution below 3µm was possible.

39
Program
8.1 TTS Program (Python):
# External module imports:
from num2words import num2words
from subprocess import call

import RPi.GPIO as GPIO


import time
import os

cmd_beg= 'espeak -s100 '


cmd_beg1= 'espeak -s100 -f pagetxt.txt'
cmd_ocr='tesseract tts.jpg pagetxt'
cmd_end= ' 2>/dev/null' # To dump the std errors to
/dev/null

# Pin Definitons:

ledPin = 23 # Broadcom pin 23 (P1 pin 16)


butPin = 18 # Broadcom pin 17 (P1 pin 11)

#pin setup:
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM) # Broadcom pin-numbering scheme
GPIO.setup(ledPin, GPIO.OUT) # LED pin set as output
GPIO.setup(butPin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
# Button pin set as input w/ pull-up

# Initial state for LEDs:


GPIO.output(ledPin, GPIO.LOW)

40
x = “ welcome to text to speech project " #Enter the
text

text = x #print(count)
text = text.replace(' ', '_')#Replacing ' ' with '_'

print("Please press the button to TTS to begin or press


Ctrl+c to exit")
#Calls the Espeak TTS Engine to read aloud a Text

call([cmd_beg+text+cmd_end], shell=True)

while 1:
if GPIO.input(butPin): # button is released
GPIO.output(ledPin, GPIO.LOW)
else: # button is pressed:
print("CAMERA READY")
GPIO.output(ledPin, GPIO.HIGH)
time.sleep(0.075)
GPIO.output(ledPin, GPIO.LOW)
time.sleep(0.075)
#os.system('fswebcam -r 1028x240 -S 3 --jpeg 50
--save /home/pi/%H%M%S.jpg') # uses Fswebcam to take
picture
os.system('fswebcam -r 1028x240 -S 3 --jpeg 50
--save /home/pi/tts.jpg') # uses Fswebcam to take picture
time.sleep(5) # this line creates a 15 second
delay before repeating the loop
call([cmd_ocr], shell=True) #jpeg to text file
time.sleep(10)
call([cmd_beg1+cmd_end], shell=True) #reading
the TEXT
41
Results and Discussions

The existing project consists of Raspberry-Pi, PC and a speaker. Python language is used
for coding the Raspberry-Pi. There are number of ways though which the input text can
be converted into speech like string matching, frequency matching etc. Initially, the
GPIO pins should be initialized in order to use them as input or output. This can be coded
in python by importing GPIO module. At first the coding is done for matching the
English alphabets with the user defined alphabets and playing the corresponding audio
file. Audio files can be database or voice recordings. Python coding provides one more
logic called frequency matching. In this method the frequencies on the basis of repetition
of alphabets for each word should be written and then as per the coding logic all the
words having matched frequencies should be called and corresponding audio for that
word should be played.

Figure 9-1: Block Diagram Implementation of


TTS system
Fig. 9-1 shows the block diagram for Text to Speech (TTS) conversion. Another method
for converting the text into speech can be through the ASCII values of English letters. By
using this method the coding length can be decreased.
There are many Text to Speech converters are there but there performance depends on the
fact that the output voice is how much close to the human natural voice. For example,
consider a name pretty, it can be a name of a person as well as it can be defined as
beautiful. Thus, it depends on how the words are pronounced. Many text to speech

42
engines does not give the proper pronunciation for such words thus combining some
voice recordings can give more accurate result.
The TTS system converts an English text into a speech signal with prosodic attributes
that improve its naturalness. There are many systems which include prosodic processing
and generation of synthesized control Parameters. The proposed system provides good
quality of synthesized speech. The text processing component provides reliable
grammatical classification and phonetic transcription. Fig. 9-2 shows the flow chart
diagram for TTS system.

Figure 9-2: Flow Chart Diagram

Observed outcome of project:


 Text is extracted from the image and converted to audio.
 It recognizes both capital as well as small letters.
 It recognizes numbers as well.
 Range of reading distance was 38-42cm.
 Character font size should be minimum 12pt.
 Maximum tilt of the text line is 4-5 degree from the vertical.

43
Conclusion

The proposed Text to speech (TTS) system was designed in order to produce an
equivalent acoustic signal which goes in synchronization with the text which is provided
as an input to the Raspberry-Pi system. The programming strategy involved the GPIO
lines, the database connectivity and the audio amplifiers. This experimental validation
can be extended to conjoined sounds and words of higher complexity also. The scope of
the Raspberry-Pi in speech synthesis and feature extraction is also quite boundless. Text-
to-Speech device can change the text image input into sound with a performance that is
high enough and a readability tolerance of less than 2%, with the average time processing
less than three minutes for A4 paper size. This portable device, does not require internet
connection, and can be used independently by people. Through this method, we can make
editing process of books or web pages easier.

44
References

1. Archana A, Shinde D. Text pre-processing and text segmentation for OCR.


International Journal of Computer Science Engineering and Technology. 2012:810–12.
2. Mithe R, Indalkar S, Divekar N. Optical character recognition. International
Journal of Recent Technology and Engineering. 2013 Mar; 2(1).
3. Smith R. An overview of the Tesseract OCR engine, USA: Google Inc.; 2007.
4. Shah H, Shah A. Optical character recognition of Gujarati numerical.
International Conference on Signals, Systems and Automation. 2009; 49–53.
5. Monk S. Raspberry pi cook.
6. Text localization and extraction in images using mathematical morphology and
OCR Techniques; 2013.
7. Vanitha E, Kasarla PK, Kuamarswamy E. Implementation of text- to-speech for
real time embedded system using Raspberry Pi processor. International Journal and
Magazine of Engineering Technology Management and Research. 2015 Jul:1995.
8. Kumar GS, Krishna MNVLM. Low cost speech recognition system running on
Raspberry Pi to support Automation applications. International Journal of Engineering
Trends and Technology. 2015; 21(5).
9. Bhargava A, Nath KV, Sachdeva P, Samel M. Reading assistant for visually
Impaired. International Journal of current Engineering and Technology. 2015 Apr; 5(2).
10. Gomes LCT, Nagle EJ, Chiquito JG. Text-to-speech conversion system for
Brazilian Portuguese using a formant-based synthesis technique. LPS-DECOM-FEEC-
Unicamp.
11. Sim Liew Fong, Abdelrahman Osman Elfaki, Md Gapar bin Md Johar & Kevin
Loo Tow Aik, Mobile Language Translator, 5th Malaysian Conference in So ware
Engineering (Misses); 2011.
12. Kamesh DBK, Nazma SK, Sastry JKR, Venkateswarlu S. Camera based text to
speech conversion, obstacle and cur-rency detection for blind persons. Indian Journal of
Science and Technology. 2016 Aug; 9(30).

45

Anda mungkin juga menyukai