Chapter-8: Types of Networks
Chapter-8: Types of Networks
You must have gone through these words: LAN, WAN, and MAN; more often, all these refer to
networks. So, what is a network? A “network” is a generic term that refers to a group of entities like
objects, peoples, etc., that are connected to one another.
Thus, a network allows material or immaterial elements to be spread among all of these entities, based
on well-defined rules. There are different types of networks that are commonly used in
communication.
As embedded systems are becoming more and more complex, the knowledge about various disciplines
like data processing, electronics, telecommunications and networks becomes mandatory for all.
Nowadays, “network” plays a prominent role in embedded systems. Proper understanding of networks
is also equally important.
For example – routers, gateways, remote process controllers, and sensor networks interact with the
networks.
What is a network and networking?
Network: In a network, a group of computers and peripheral devices are connected to each other. The
smallest possible network is the one in which two computers are connected together.
Networking: Networking is nothing but implementing tools and tasks for linking computers so that they
can share resources over the network.
Computer Network
A computer network is a group of computers linked together with physical lines exchanging
information as digital data (binary values, i.e., values encoded as a signal – which may represent either
1
0 or 1). The links (connections) between nodes are established using either a cable media or wireless
media. The best example of a computer network is internet.
Computer Network
Computer network devices initiating, routing and terminating data are called network nodes. The nodes
include hosts such as servers and personal computers. The computer network supports different types
of applications such as access to World Wide Web, shared use of applications, and messaging
applications and so on.
Why networks are important?
A computer is a machine used to manipulate and process data. Linking of computers is essential for
exchanging information in communication. So, this explains our query about what is a network in terms
of computers.
A computer network can serve several different purposes like the ones given below:
Networks are also used for standardizing applications. The term groupware is generally used to refer to
the tools that let multiple people work over a network. For example, email and group Scheduling can be
used to communicate more quickly and efficiently.
Such systems offer the following advantages:
Lower costs due to sharing of data and peripherals
Standardize applications
2
Provide timely access to data
Offer more efficient communication and organization
What is network’s importance in embedded system?
The embedded system was originally designed to work on a single device. However, in the current
scenario, implementation of different networking options has increased the overall performance of the
embedded system in terms of economy as well as technical considerations.
The most efficient types of network used in the embedded system are BUS network and Ethernet
network.
A BUS is used to connect different network devices and to transfer a huge range of data, for example,
serial bus, I2C bus, CAN bus, etc.
The Ethernet type network works with the TCP/IP protocol.
Examples of embedded networking include CAN, I2C, Component, sensor, and serial bus networking.
Embedded Networking
These types of embedded systems are related to a network to access the resources. The connected
network can be LAN, WAN or the internet. The connection can be any wired or wireless. This type of
embedded system is the fastest growing area in embedded system applications. The embedded web
3
server is a type of system wherein all embedded devices are connected to a web server and accessed
and controlled by a web browser. Example for the LAN networked embedded system is a home
security system wherein all sensors are connected and run on the protocol TCP/IP.
EXAMPLE-1
Embedded Data Acquisition System Using an Internet
Data acquisition systems with remote accessibility are getting popular in industry and consumer
applications Internet has become the faster way for integrated multimedia such as voice, video,
graphics or data communications.
The traditional data acquisition system transmits Images through GPRS connection. The requested
image can be transmitted to the client via central server. A typical data-acquisition system is made up
of three components connected to each other via the Internet, as shown in Fig. 1. The data-acquisition
system needs to transmit the acquired information to the requesting clients. The clients also need to
send commands. If necessary, this is implemented through a server, and then, an enormous amount of
data transfer time would be consumed. Thus, alternative methods need to be explored.
EXAMPLE-2
Design and Implementation of a Wi-Fi Based Home Automation System
This project presents a design and prototype implementation of new home automation system that uses
WiFi technology as a network infrastructure connecting its parts. The proposed system consists of two
main components; the first part is the server (web server), which presents system core that manages,
controls, and monitors users’ home. Users and system administrator can locally (LAN) or remotely
(internet) manage and control system code. Second part is hardware interface module, which provides
appropriate interface to sensors and actuator of home automation system. Unlike most of available
4
home automation system in the market the proposed system is scalable that one server can manage
many hardware interface modules as long as it exists on WiFi network coverage. System supports a
wide range of home automation devices like power management components, and security components
The proposed system is a distributed home automation system, consists of server, hardware interface
modules. Server controls hardware one interface module, and can be easily configured to handle more
hardware interface module. The hardware interface module in turn controls its alarms and actuators.
Server is a normal PC, with built in Wi-Fi card, acts as web server. The webserver software is
developed using asp.net technology, so web server should support asp application and.net frame work
4.0, like IIS7.0 for windows OS. System can be accessed from the web browser of any local PC in the
same LAN using server IP, or remotely from any PC or mobile handheld device connected to the
internet with appropriate web browser supports asp.net technology through server real IP (internet IP).
WiFi technology is selected to be the network infrastructure that connects server and hardware interface
modules.
The main functions of the server is to manage, control, and monitor distrusted system components, that
enables hardware interface modules to execute their assigned tasks (through actuators), and to report
server with triggered events (from sensors).
For example, take the below DSP illustration, an ADC converts the analog data collected by audio
input equipment such as a microphone (sensor), into a digital signal that can be processed by a
computer. The computer may add sound effects. Now a DAC will process the digital sound signal back
into the analog signal that is used by audio output equipment such as a speaker.
5
Audio Signal Processing
Analog Signal
An analog signal is a continuous wave denoted by a sine wave (pictured below) and may vary in signal strength
(amplitude) or frequency (time). The sine wave's amplitude value can be seen as the higher and lower points of
the wave, while the frequency (time) value is measured in the sine wave's physical length from left to right. for
example zero (0) to +10 Volts or a symmetrical span, for example from -10 Volts to +10 Volts.
There are many examples of analog signals around us. The sound from a human voice is analog,
because sound waves are continuous, as is our own vision, because we see various shapes and colors in
a continuous manner due to light waves.
DIGITAL SIGNAL
A digital signal - a must for computer processing - is described as using binary (0s and 1s), and
therefore, cannot take on any fractional values. As illustrated in the graphic below, digital signals retain
a uniform structure, providing a constant and consistent signal. Because of the inherent reliability of the
digital signal, technology using it is rapidly replacing a large percentage of analog applications and
devices
Figure 2.1: Digital-to-Analog Converter (DAC) and Analog-to-Digital Converter (ADC) Input and
Output Definitions
TYPES OF ADCS
These are the most common ways of implementing an electronic ADC:
1. Flash ADCs
2. Pipelined ADCs
3. Successive Approximation Register (SAR) converters
4. Integrating or Dual-slope converters
5. Sigma-Delta converters
7
a. Oversampling
b. Noise shaping
A Successive Approximation Register converter evaluates each bit at a time, from the most to the least
significant bits. They successively approach the output of a digital-analog converter (DAC) in them to
the input voltage. The input of the DAC is stored in a N bit register, which is also the output of the
ADC.
The principle of successive approximation process for a 4-bit conversion is explained here. This type of
ADC operates by successively dividing the voltage range by half, as explained in the following steps.
(1) The MSB is initially set to 1 with the remaining three bits set as 000. The digital equivalent voltage
is compared with the unknown analog input voltage.
(2) If the analog input voltage is higher than the digital equivalent voltage, the MSB is retained as 1 and
the second MSB is set to 1. Otherwise, the MSB is set to 0 and the second MSB is set to 1. Comparison
is made as given in step (1) to decide whether to retain or reset the second MSB.
The above steps are more accurately illustrated with the help of an example.
Let us assume that the 4-bit ADC is used and the analog input voltage is VA = 11 V. when the
conversion starts, the MSB bit is set to 1.
Now VA=11V>VD=8V=[1000]2
Since the unknown analog input voltage VA is higher than the equivalent digital voltage VD, as
discussed in step (2), the MSB is retained as 1 and the next MSB bit is set to 1 as follows
VD = 12V = [1100]2
8
discussed in step (2), the second MSB is set to 0 and next MSB set to 1 as
VD = 10V = [1010]2
Now again VA = 11V > VD = 10V = [1010]2
Again as discussed in step (2) VA>VD, hence the third MSB is retained to 1 and the last bit is set to 1.
The new code word is
VD = 11V = [1011]2
Now finally VA = VD, and the conversion stops.
Strengths
It uses only one comparator
Low power consumption
Weaknesses
The DAC grows with the number of bits
They take as many cycles to convert the signal as the number of bits
The component mismatch in the DAC limits its linearity (and therefore of the ADC) to around
12bits
• Find output voltage, current, and resolution for a binary weighted resistor DAC of 4 bits- given
condition R = 10 kΩ, Rf= 5 kΩ, VR= -10 V
10
Applied binary word is 1001
1. Op-amps that can handle those currents are rare and expensive.
2. This current is more than a typical op-amp can handle.
This approach is not satisfactory for a large number of bits because it requires too much precision in
the summing resistors. This problem is overcome in the R-2R network DAC
11
Binary Weighted R-2R
Limited to ~ 8 bits
Large # of resistors
Cons Susceptible to noise More confusing analysis
Expensive
Greater Error
12
Applications of Digital to Analog Converter
DACs are used in many digital signal processing applications and many more applications. Some of the
important applications are discussed below.
Audio Amplifier
DACs are used to produce DC voltage gain with Microcontroller commands. Often, the DAC will be
incorporated into an entire audio codec which includes signal processing features.
Video Encoder
The video encoder system will process a video signal and send digital signals to a variety of DACs to
produce analog video signals of various formats, along with optimizing of output levels. As with audio
codecs, these ICs may have integrated DACs.
Display Electronics
The graphic controller will typically use a lookup table to generate data signals sent to a video DAC for
analog outputs such as Red, Green, Blue (RGB) signals to drive a display.
Data Acquisition Systems
Data to be measured is digitized by an Analog-to-Digital Converter (ADC) and then sent to a processor.
The data acquisition will also include a process control end, in which the processor sends feedback data
to a DAC for converting to analog signals.
Calibration
The DAC provides dynamic calibration for gain and voltage offset for accuracy in test and
measurement systems.
Motor Control
Many motor controls require voltage control signals, and a DAC is ideal for this application which may
be driven by a processor or controller.
13
Motor Control Application
Data Distribution System
Many industrial and factory lines require multiple programmable voltage sources, and this can be
generated by a bank of DACs that are multiplexed. The use of a DAC allows the dynamic change of
voltages during operation of a system.
Digital Potentiometer
Almost all digital potentiometers are based on the string DAC architecture. With some reorganization
of the resistor/switch array, and the addition of an I2C compatible interface, a fully digital
potentiometer can be implemented.
Software Radio
A DAC is used with a Digital Signal Processor (DSP) to convert a signal into analog for transmission in
the mixer circuit, and then to the radio’s power amplifier and transmitter.
EX:::INTERFACING LM35 TEMPERATURE SENSOR WITH PIC16F877A CONTROLLER
14
sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;
// End LCD module connections
char display[16]="";
void Move_Delay()
{ // Function used for text moving
Delay_ms(500); // You can change the moving speed here
}
void main()
{
trisc=0x00;
trisa=0xff;
adcon1=0x80;
lcd_out(1,1,"Temp = ");
floattostr(temp,display);
lcd_out_cp(display);
lcd_out(2,1,"STRENGTH ");
//delay_ms(1000);
//Lcd_Cmd(_LCD_CLEAR);
PORTC.F0=0;
PORTC.F1=0;
PORTC.F2=0;
PORTC.F3=0;
PORTC.F4=0;
if (temp<=50.0&&temp>=10.0)
15
{
PORTC.F0=0; //redled;
PORTC.F1=1;
PORTC.F2=0;
PORTC.F3=1; //greenled;
PORTC.F4=0; //greenled;
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
Lcd_Out(1, 1, "NORMAL&BEARABLE");
Lcd_Out(2, 1, "TEMPERATURE");
Delay_ms(500);
}
if (temp<=100.0&&temp>=51.0)
{
PORTC.F0=1; //redled;
PORTC.F1=0;
PORTC.F2=0;
PORTC.F3=0;
PORTC.F4=1;
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
Lcd_Out(1, 1, "HIGH TEMP");
Lcd_Out(2, 1, "CAUTION");
Delay_ms(500);
}
if (temp<=150.0&&temp>=101.0)
{
PORTC.F0=0;
PORTC.F1=0;
PORTC.F2=1; //greenled;
PORTC.F3=0; //greenled;
PORTC.F4=0; //greenled;
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
Lcd_Out(1, 1, "VERY HIGH TEMP");
Lcd_Out(2, 1, "DANGEROUS");
Delay_ms(500);
16