You are on page 1of 14

System on a chip (soc) :- A system on a chip (SoC) combines the required

electronic circuits of various computer components onto a single, integrated chip


(IC). SOC includes both the hardware and software, it uses less power, has better
performance, requires less space and is more reliable than multi-chip systems.
An SoC usually contains various components such as:
1. Operating system
2. Utility software applications
3. Voltage regulators and power management circuits
4. Timing sources such oscillators
5. A microprocessor, microcontroller or digital signal processor
6. Peripherals such as real-time clocks, counter timers and power-on-reset
generators
7. External interfaces such as USB, Ethernet, universal asynchronous
Receiver-transmitter or serial peripheral interface bus
8. Analog interfaces such as digital-to-analog converters and analog-to-digital
converters.
9. RAM and ROM memory

Processor
At the heart of the SoC is its Processor. It usually has multiple processor cores.
Multiple cores allow for different processes to run at the same time, which
increases the speed of the system as it enables your computer to perform
multiple operations at the same time. Basically, the operating system sees the
multiple cores as multiple CPUs, which increases performance. As multiple cores
are fitted onto the same chip, there is less latency, which is because of faster
communication between the cores.

Digital Signal Processor (DSP)


Digital Signal Processor (DSP) is a chip optimized for operations for digital signal
processing. This includes operations for sensors, actuators, data processing, and
data analysis. It can be used for image decoding. The use of DSP saves CPU cycles
for other processing tasks, which increases performance.
Memories on an SoC
SoCs have memories based on the application. The memories are semiconductor
memory blocks for computation purposes. Semiconductor memory usually refers
to Metal Oxide Semiconductor memory cells, which are fabricated on a single
silicon chip. The types of memories are:
Volatile memories: Memories that lose data after power off. In other words, they
need a constant power source to retain information. Volatile memories are faster
and cheaper, which is why they are chosen frequently.
RAM is a type of volatile memory. The most common RAM used are SRAM (Static
RAM) and DRAM (Dynamic RAM). SRAM is made of memory cells which consist of
either 1,3 or 6 transistors (MOSFETs). In contrast, DRAM has only one MOSFET
and a capacitor which is charged and discharged according to the state of the FET.
However, DRAM is prone to capacitor leakage currents. One significant advantage
of DRAM is that its cheaper than SRAM. If an SoC has a cache hierarchy, SRAM is
used for cache and DRAM is used for the main memory. This is because cache
requires a faster type of memory as compared to the main memory.

There are RAM types designed for non-volatile function as well. These are FRAM
(Ferroelectric RAM), MRAM (Magnetoresistive random-access memory), which
stores data in magnetic states, PRAM (Parameter Random Access Memory),
which is used in Macintosh computers to store system settings including the
display and time-zone settings. Other than these, there is RRAM (Resistive
Random Access Memory), which has a component called memristor. A
memristor is a resistor whose voltage varies as per the applied voltage.

Non-volatile memories: Memories that retain information even in the absence


of a power source. ROM (Read Only Memory) is a kind of non-volatile memory.
Types of ROM include EPROM (Erasable Programmable Read-Only Memory),
which is an array of floating-gate transistors. UVROM(Ultra-Violet Erasable
Programmable Read-Only Memory), which is erased using UV light and
reprogrammed with data, EEPROM(Electrically Erasable Programmable ROM)
and flash.
External interfaces
SOC interfaces defer as per the intended application. The external interfaces are
commonly based on communication protocols such as WiFi, USB, Ethernet, I2C,
SPI, HDMI. If required, analog interfaces may be added for interfacing with
sensors and actuators.

Other components
Other components necessary for a fully functioning SOC are timing sources like
clocks, timers, oscillators, phase lock loop systems, voltage regulators, and power
management units.

Microcontroller
A microcomputer made on a single semiconductor chip is called single-chip
microcomputer. Since, single chip microcomputers are generally used in control
applications, they are also called microcontrollers.
Microcontroller contains all essential components of a microcomputer such as
CPU, RAM, ROM/EPROM, I/O lines etc. Some single chip microcontrollers contain
devices to perform specific functions such as DMA channels, A/D converter, serial
port, pulse width modulation, etc.

The Boards
Boards The board selection has two effects: it sets the parameters (e.g. CPU
speed and baud rate) used when compiling and uploading sketches; and sets and
the file and fuse settings used by the burn bootloader command. Some of the
board definitions differ only in the latter, so even if you've been uploading
successfully with a particular selection you'll want to check it before burning the
bootloader. You can find a comparison table between the various boards here.
Arduino Software (IDE) includes the built in support for the boards in the
following list, all based on the AVR Core. The Boards Manager included in the
standard installation allows to add support for the growing number of new boards
based on different cores like Arduino Due, Arduino Zero, Edison, Galileo and so
on.

The Anatomy of an Arduino Board


The major components of Arduino UNO board are as follows:
USB connector, Power port, Microcontroller, Analog input pins, Digital pins, Reset
switch, Crystal oscillator, USB interface chip, TX RX LEDs,
Now let’s take a closer look at each component.
USB connector:
This is a printer USB port used to load a program from the Arduino IDE onto the
Arduino board. The board can also be powered through this port.
Power port:
The Arduino board can be powered through an AC-to-DC adapter or a battery.
The power source can be connected by plugging in a 2.1mm center-positive plug
into the power jack of the board.
The Arduino UNO board operates at a voltage of 5 volts, but it can withstand a
maximum voltage of 20 volts. If the board is supplied with a higher voltage, there
is a voltage regulator that protects the board from burning out.
Microcontroller:
It is the most prominent black rectangular chip with 28 pins. Think of it as the
brains of your Arduino. The microcontroller used on the UNO board is
Atmega328P by Atmel. Atmega328P has the following components in it:
 Flash memory of 32KB. The program loaded from Arduino IDE is stored
here.
 RAM of 2KB. This is a runtime memory.
 CPU: It controls everything that goes on within the device. It fetches
program instructions from flash memory and runs them with the help of
RAM.
 Electrically Erasable Programmable Read Only Memory (EEPROM) of 1KB.
This is a type of nonvolatile memory, and it keeps the data even after
device restart and reset.

Analog input pins:


The Arduino UNO board has 6 analog input pins, labeled “Analog 0 to 5.” These
pins can read the signal from an analog sensor like a temperature sensor and
convert it into a digital value so that the system understands. These pins just
measure voltage and not the current because they have very high internal
resistance. Although these pins are labeled analog and are analog input by
default, these pins can also be used for digital input or output.
Digital pins:
You can find these pins labeled “Digital 0 to 13.” These pins can be used as either
input or output pins. When used as output, these pins act as a power supply
source for the components connected to them. When used as input pins, they
read the signals from the component connected to them.
Reset switch:
When this switch is clicked, it sends a logical pulse to the reset pin of the
Microcontroller, and now runs the program again from the start. This can be very
useful if your code doesn’t repeat, but you want to test it multiple times.
Crystal oscillator:
This is a quartz crystal oscillator which ticks 16 million times a second. On each
tick, the microcontroller performs one operation, for example, addition,
subtraction, etc.
USB interface chip:
Think of this as a signal translator. It converts signals in the USB level to a level
that an Arduino UNO board understands.
TX – RX LEDs:
TX stands for transmit, and RX for receive. These are indicator LEDs which blink
whenever the UNO board is transmitting or receiving data.

THE DEVELOPMENT ENVIRONMENT (ARDUINO IDE)


The Arduino Integrated Development Environment - or Arduino Software (IDE) -
contains a text editor for writing code, a message area, a text console, a toolbar
with buttons for common functions and a series of menus. It connects to the
Arduino hardware to upload programs and communicate with them. Programs
written using Arduino Software (IDE) are called sketches. These sketches are
written in the text editor and are saved with the file extension .ino. The editor has
features for cutting/pasting and for searching/replacing text. The message area
gives feedback while saving and exporting and also displays errors. The console
displays text output by the Arduino Software (IDE), including complete error
messages and other information. The bottom righthand corner of the window
displays the configured board and serial port. The toolbar buttons allow you to
verify and upload programs, create, open, and save sketches, and open the serial
monitor. Upload Compiles your code and uploads it to the configured board. See
uploading below for details. Open Presents a menu of all the sketches in your
sketchbook. Clicking one will open it within the current window overwriting its
content. Save Saves your sketch. Serial Monitor Opens the serial monitor.
Additional commands are found within the five menus: File, Edit, Sketch, Tools,
Help. The menus are context sensitive, which means only those items relevant to
the work currently being carried out are available.

ARDINO IDE OVERVIEW:


Program coded in Arduino IDE is called a SKETCH
1. To create a new sketchFile -> New
To open an existing sketch File -> open ->
There are some basic ready-to-use sketches available in the EXAMPLES section
File -> Examples -> select any program
2. Verify: Checks the code for compilation errors
3. Upload: Uploads the final code to the controller board
4. New: Creates a new blank sketch with basic structure
5. Open: Opens an existing sketch
6. Save: Saves the current sketch
Serial Monitor: Opens the serial console
All the data printed to the console are displayed here
A sketch can be divided into two parts:
Setup () - function setup() is the point where the code starts, just like the main()
function in C and C++ I/O Variables, pin modes are initialized in the Setup()
Loop() - as the name suggests, iterates the specified task in the program
The Arduino Sketch
A sketch is the name that Arduino uses for a program. It's the unit of code that is
uploaded to and run on an Arduino board.

Trying the code on an Arduino Emulator - Extending Arduino


The Arduino simulator is a virtual portrayal of the circuits of Arduino in the real
world. We can create many projects using a simulator without the need for any
hardware. The Simulator helps beginner and professional designers to learn,
program, and create their projects without wasting time on collecting hardware
equipments. There are various simulators available. Some are available for free,
while some require a license to access the simulators.
Some types of simulators are listed below:
Autodesk Tinkercad, Emulator Arduino Simulator, Autodesk Eagle, Proteus
Simulator, Virtronics Arduino Simulator, ArduinoSim
Autodesk Eagle is an advanced simulator, which is used to design 2D and 3D
models of PCB, modular designs, multi-sheet schematics, real-time
synchronization, etc.
How to access simulator?
Tinkercad is an online collection of software tools from Autodesk that enable
complete beginners to create 3D models and building circuits. In addition to it, It’s
completely free of cost. Since it’s a cloud-based platform(Online editor), users
need not install any additional software. Lets learn to simulate a simple led
blinking using arduino.
Configuration steps
1. Open the official website of tinkercad and Create a Free account 
2. Next, choose circuits and select Create the new circuit
3. Furthermore, Select required components from the search tab.
4. Design the circuit
5. Finally, Lets code In tinkercad, there are two ways to code microcontroller. One
is using code blocks another one is code text.
6. Once the code is written, start the simulation. Besides If they are errors in code
it displays else it will execute normally.
7. Finally, you can observe led blinking on the simulator.

Arduino Library
The Library is considered as the advanced feature, which extends the capabilities
of the Arduino IDE. It means that the libraries provide extra functionality to the
programming platform of Arduino. The libraries in Arduino are written in C or C+
+ (.cpp). These libraries allow us to manipulate data and work with the hardware.
To implement any Library in the Arduino IDE, go to the Sketch -> Import Library.
There are several libraries available for download. We can also create our own
library.
The standard libraries are listed below:
EEPROM Library
It stands for Electronic Erasable Programmable Read Only Memory. The EEPROM
is associated with the microcontroller present on the AVR or Arduino Boards. The
EEPROM library allows us to read the bytes stored in the memory when the
power of the board is off.
The size of EEPROM varies in different boards, such as 1KB or 1024 bytes on the
ATmega328P. It can also be of 4KB or 4096 bytes on the Microcontroller
ATmega2560, etc.
The library is declared as:
1. #include <EEPROM.h>  
For example, EEPROM Read, EEPROM Clear, EEPROM Write, EEPROM Get,
EEPROM Update, EEPROM Put, EEPROM Iteration, etc.
Ethernet Library
The Ethernet library works with the Arduino Ethernet shield and other related
devices. The Ethernet library allows us to connect the Arduino board to the
Internet.
The SPI bus acts as an intermediate between the board and the shield.
The associated library is:
1. #include <Ethernet.h>  
2. #include <SPI.h>  
For example, TelnetClient, WebServer, WebClientRepeating, WebClient,
ChatServer, DnsWebClient, UdpNtpClient, UdpSendReceiveString, etc.
Firmata Library
For the programming environment, we can create custom firmware without
producing our own objects and protocols.
It is used to implement the firmware protocol, which communicates with the
software on the host computer.
The associated library is:
1. #include <Firmata.h>  
GSM Library
The GSM library exists on the IDE version 1.0.4 and up.
The GSM library allows us to perform the operations on the Arduino board similar
to the GSM phone, such as internet connection, send and receive messages, and
to place voice calls.
The library is declared as:
1. #include <GSM.h>  
Liquid Crystal Library
It is a library that permits Arduino to communicate with LCDs, which are based on
a compatible chipset called Hitachi HD44780. Such chipsets are found on most
types of text-based LCDs. It works with either an 8-bit mode or 4-bit mode. Here,
the bit mode signifies the data lines in addition to the enable, rs, and rw control
lines (optional).
The library is declared as:
1. #include <LiquidCrystal.h>  
The examples are Hello World, Cursor, Blink, etc.
SD Library
It allows writing to or reading from SD cards. For example, Arduino Ethernet
Shield. The file names include the paths separated by the forward slashes, which
are passed to the SD Library. But, SPI is used for the communication between the
SD card and the Arduino.
The library is declared as:
1. #include <SPI.h>  
2. #include <SD.h>  
The examples are Dump files, List Files, Read Write, etc.
Servo Library
The Servo library permits Arduino to work with servo motors. It allows controlling
the integrated shaft and gears. We can also position shaft at different angles
between 0 and 180 degrees. The servo library on Arduino boards can support
upto 12 motors, while on Arduino Mega board, it can support upto 48 motors.
The library is declared as:
1. #include <Servo.h>  
SPI Library
The SPI (Serial Peripheral Interface) is a serial data protocol.
The microcontrollers use the serial protocol to communicate over short distances
with one or more peripheral devices quickly.
The required connection of SPI is a full-duplex that allows devices to
simultaneously sent and receive data.
The library is declared as:
1. #include <SPI.h>  
The examples are Dump files, List Files, Read Write, etc.
Stepper Library
The Stepper library in Arduino permits to control of bipolar or unipolar stepper
motors.
The library is declared as:
1. #include <Stepper.h>  
The Stepper includes stepper speed control, stepper one revolution, etc.
Software Serial Library
The Software Serial Library permits serial communication over digital
Input/output pins. The 0 and 1 pins are inbuilt on Arduino for the serial interface.
We can include multiple serial ports in our code that can operate with speed upto
115200 bps (bits per second).
The library is declared as:
1. #include <SoftwareSerial.h>  
TFT LCD Library
The TFT LCD library is included in the IDE version 1.0.5 and later. It allows the
Arduino to communicate with the TFT LCD screen. It further helps to draw images,
shapes, lines, and text to the screen.
The SD card slot present on the onboard screen can be used by implementing the
SD library.
The TFT library for communication depends on the SPI library with the SD card
and screen.
The library is declared as:
1. #include <SPI.h>  
2. #include <TFT.h>  
WiFi Library
The WiFi library permits Arduino to establish a connection with the internet. It
can either be a server to receive the incoming connections or a client to perform
outgoing connections.
The personal encryptions supported by the WiFi library are WPA2 and WEP
except for WPA2 Enterprise. Arduino uses the SPI bus to communicate with the
WiFi shield.
The library is declared as:
1. #include <WiFi.h>  
The examples include WiFiWebClient, WiFiWebServer, etc.
Audio Library
The Audio library is compatible with the Arduino Due board only. It enables the
board to playback .wav files from the specific storage devices, such as the SD card.
It plays sounds by using the DAC0 and DAC1 pins.
The library is declared as:
1. #include <Audio.h>  
The example is a Simple Audio Player.
Audio Zero Library
It enables the board (Arduino Zero, MKR1000, and MKRZero) to playback .wav
files from the storage devices, such as the SD card.
Arduino Zero and MKR1000 board play sound by using the DAC0 pin.
The library is declared as:
1. #include <AudioZero.h>  
The example is the Simple Audio Player Zero.
Arduino Sound Library
The Arduino Sound Library permits the board to analyze and play audio data,
which is provided by Arduino on SAMD21 based board using the I2S bus. The
SAMD21 based boards are Arduino Zero, MKR1000, MKRZero, or Genuino Zero.
The library is declared as:
1. #include <AudioSound.h>  
The examples include WavePlayBack, ClapDetector, WhistleDetector, etc.
Now, let's discuss the process to install the library in Arduino.

How to install a library in Arduino?


The steps are listed below:
Arduino Library Manager
o We need to open the library manager to install a new library in Arduino.
Click on Sketch -> Include Library -> Manage Libraries.
o A dialog box containing various libraries will appear.
o A list of libraries will appear that are ready to install. We need to select the
specific library -> select the version -> click on Install button.
Sometimes there is only one version available for download. In such case, the
dropbox of the version will not appear. We need to wait for the library to
download. The downloading will depend on the connection speed. The
'INSTALLED' tag will appear in front of the library that is already installed on our
computer.
Importing a .zip Library
If we want to add our own library, we can select the desired folder from our
computer. The particular zip file containing the library can be imported in the
Arduino.
We can also recheck from the option Sketch -> Include library to see that the
added libraries are present or not on the list.
We are not required to unzip the downloaded library. The file will remain in
the .zip format.
We can download the 3rd party libraries starting with the Arduino IDE version
1.0.5.

RASPBERRY PI :
Raspberry Pi is a credit card sized micro processor available in different models
with different processing speed starting from 700 MHz. Whether you have a
model B or model B+, or the very old version, the installation process remains the
same. People who have checked out the official Raspberry Pi website, But using
the Pi is very easy and from being a beginner, one will turn pro in no time. So, it's
better to go with the more powerful and more efficient OS, the Raspbian. The
main reason why Raspbian is extremely popular is that it has thousands of pre
built libraries to perform many tasks and optimize the OS. This forms a huge
advantage while building applications.

GPIO
GPIO is an acronym for General Purpose Input/Output. A Raspberry Pi has 26
GPIO pins. These allow you to send and receive on/off signals to and from
electronic components such as LEDs, motors, and buttons.

Interfacing Raspberry Pi
You can link devices and components to your Raspberry Pi using a lot of different
types of connections. The Interfaces tab is where you turn these different
connections on or off, so that your Raspberry Pi recognises that you’ve linked
something to it via a particular type of connection.
o Camera — enable the Raspberry Pi Camera Module
o SSH — allow remote access to your Raspberry Pi from another computer
using SSH
o VNC — allow remote access to the Raspberry Pi Desktop from another
computer using VNC
o SPI — enable the SPI GPIO pins
o I2C — enable the I2C GPIO pins
o Serial — enable the Serial (Rx, Tx) GPIO pins
o 1-Wire — enable the 1-Wire GPIO pin
o Remote GPIO — allow access to your Raspberry Pi’s GPIO pins from another
computer

Programming in Raspberry Pi
Programming in Raspberry Pi is done with the help of python programming concepts.

Feature of Python :
 Easy to code: With the clear syntax developers get an idea on code
identification instead of {};
 Simple Syntax: Python has a simple syntax similar to the English Language
Interpreted Language: Python runs on interpreter system. The code can be
executed as soon as it is written. Prototyping can be very quick.
 Embeddable: Python allows integration with other languages. It is possible
to put our code in other programming languages like C++ etc.
 Extensible: Python is extensible language. It allows developers to write
programs with fewer lines than some other programming languages.
 Portable: Python code is portable there is no need to change the code for
different machines. You can run one code in many machines.
 Free and open-source: Python is open-source language. Its source code is
freely available to the public you can download it, change and distribute it.
 Community supports: Python has already got its huge response in the
market with the above-mentioned features thus provides many users
grouped into community to support the advancements further.
 Easy to learn: Learning and implementation of python is relatively simple
and easy when compared to other native languages like C++ and java.
 Easy to debug: Python scripting language is one of the better language to
debug than C++ and C. In this source code is executed line by line.
 Library support: Python supports large standard libraries. Installation of the
libraries is easy, and it saves time.

You might also like