0% found this document useful (0 votes)
92 views

Chapter-8: Types of Networks

Networked embedded systems allow embedded devices to connect and exchange information over various network types. This improves performance by enabling resource sharing between devices and remote access to data. Common network types for embedded systems include bus networks, which connect devices to transfer data, and Ethernet networks, which use TCP/IP protocols. Examples show how networked embedded systems are used in applications like home automation and remote data acquisition. Analog to digital converters (ADCs) and digital to analog converters (DACs) also allow embedded systems to interface with the physical world by converting between analog and digital signals.

Uploaded by

Elias Yeshanaw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views

Chapter-8: Types of Networks

Networked embedded systems allow embedded devices to connect and exchange information over various network types. This improves performance by enabling resource sharing between devices and remote access to data. Common network types for embedded systems include bus networks, which connect devices to transfer data, and Ethernet networks, which use TCP/IP protocols. Examples show how networked embedded systems are used in applications like home automation and remote data acquisition. Analog to digital converters (ADCs) and digital to analog converters (DACs) also allow embedded systems to interface with the physical world by converting between analog and digital signals.

Uploaded by

Elias Yeshanaw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

CHAPTER-8

NETWORKED EMBEDDED SYSTEMS AND ADC-DAC

What is a Network in Embedded Systems? – Different 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:

 Provides resource sharing (sharing of files, applications or hardware, an Internet connection,


etc.)
 Provides Communication support (email, live discussions, etc.)
 Processes Communication (communication between industrial computers)
 Provides access to information: Guarantees full access to information for a specified group of
people through networked databases
 Supports Multiplayer video games

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

Different types of networks generally have the following points in common:

 Servers: These are basically computers that provide main information.


 Clients: These are computers or other devices that get access to the shared resources.
 Connection medium: Connection medium defines the inter linking of different devices.
 Shared data: It refers to the information that is transmitted in a network and received by the
clients.
 Printers and other shared peripherals: Peripherals (devices) that are connected to the client
machines for processing and obtaining the information.

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.

FIG 1.Data acquisition system USING WEB SERVER

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).

ANALOG TO DIGITAL AND DIGITAL TO ANALOG (ADC AND DAC) CONVERSION


In electronics, an analog-to-digital converter (ADC, A/D, A–D, or A-to-D) is a system that converts
an analog signal, such as a sound picked up by a microphone or light entering a digital camera, into a
digital signal. An ADC may also provide an isolated measurement such as an electronic device that
converts an input analog voltage or current to a digital number proportional to the magnitude of the
voltage or current.

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

LIMITATIONS OF ANALOG SIGNALS


Analog signals pick up noise as they are being amplified.
Analog signals are difficult to store.
Analog systems are more expensive in relation to digital systems.
ADVANTAGES OF DIGITAL SYSTEMS (SIGNALS)
6
Noise can be reduced by converting analog signals in 0s and 1s.
Binary signals of 0s/1s can be easily stored in memory.
Technology for fabricating digital systems has become so advanced that they can be produced at low
cost.
WHY CONVERT BETWEEN ANALOG AND DIGITAL VALUES?
In the world of computers, which we are dealing with in this course, the situation is another. Here we
are restricted to digital values not by choice but by the properties of the system. Even if the signal span
could be large and the number of steps big the resolution is always limited.
This means that we have to convert a value from analog to digital if we want to move it from the analog
world to our world of computers. In the same way we will often convert our values back to analog
when we move the values out of the computer again and into the real world. We do this to get a
smooth transition between signal levels.
Analog-to-digital converters (ADCs) translate analog quantities, which are characteristic of most
phenomena in the "real world," to digital language, used in information processing, computing, data
transmission, and control systems. Digital-to- analog converters (DACs) are used in transforming
transmitted or stored data, or the results of digital processing, back to "real-world" variables for control,
information display, or further analog processing. The relationships between inputs and outputs of
DACs and ADCs are shown in Figure 2.1.

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

Successive Approximation Register (SAR) converters

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

Now VA = 11V < VD = 12V = [1100]2


Here now, the unknown analog input voltage VA is lower than the equivalent digital voltage VD. As

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

DIGITAL TO ANALOG CONVERSION

 To convert digital values to analog voltages


 Performs inverse operation of the Analog-
to-Digital Converter (ADC)

Relation between analog signal and digital equivalent

• AD conversion – Va -> bi (encoder) ex) Transducer interface


• DA conversion – bi -> Va (decoder) ex) motor, heater control.

DIGITAL TO ANALOG CONVERSION TYPES

 Binary Weighted Resistor


 R-2R Ladder
9
 Multiplier DAC
 The reference voltage is constant and is set by the manufacturer.
 Non-Multiplier DAC

The reference voltage can be changed during operation

Binary weighted ladder

Fig: binary weighted ladder for dac

 Weighted Resistors” based on bit


 Reduces current by a factor of 2 for each bit

N-bit binary weighted Example

• 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

Drawbacks of binary weighted resistor

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

R-2R LADDAR NETWORK BASED DAC

 Simplest type of DAC


 •Requires only two precision resistance value (R and 2R)

Fig: R-2R ladder network

11
Binary Weighted R-2R

Only 2 resistor values


Easier implementation
Pros Easily understood
Easier to manufacture
Faster response time

Limited to ~ 8 bits
Large # of resistors
Cons Susceptible to noise More confusing analysis
Expensive
Greater Error

General DAC Characteristics


There are six key parameters you should consider when choosing a DAC.
• Reference Voltage Resolution
• Linearity Speed
• Settling Time Error
Full Scale Voltage

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

// LCD module connections


sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB3_bit;

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()
{

unsigned int result;


float volt,temp;

trisc=0x00;
trisa=0xff;
adcon1=0x80;

Lcd_Init(); // Initialize LCD


Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
Lcd_Out(1, 1, "COAL MINE HELMET");
Lcd_Out(2, 1, "PROJECT");
Delay_ms(500);
while(1)
{
result=adc_read(0);
volt=result*4.88;
temp=volt/10;

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

You might also like