electrical

This is another simple interfacing circuitry with the microcontroller. In this circuit we interface the mechanical relay with the microcontroller. Relay interfacing is very important and common type of interfacing which occurs in most of the microcontroller projects. Relay is basically electrically operated switch and act as a switching device to turn on and off the devices connected to the microcontroller, as well as provide isolation between the microcontroller and the operating device, assume we have to turn on and off the high voltage load then we cannot directly interface the device to the microcontroller as it can burn the microcontroller so we use Relay as a switch and isolator. We can control the high voltage devices with low power control signal. Logical operation can also be obtained by connecting relays in different combinations, In the early ages before the invent of vacuum tubes and transistor relays wee used as an logical element in the early computers.

The working mechanism of the relay is very simple. Relay works electromagnetically when the control signal given to the relay the magnetic flux produces in its coil either made the contacts to get apart or connect with each other. There are many types of Relay available differs in their type of application and working for example:

Latching relay

Reed relay

Mercury-wetted relay

Polarized relay

Machine tool relay

Contactor relay

Solid-state relay

Solid state contactor relay

Buchholz relay

Forced-guided contacts relay

Overload protection relay

etc

In our circuit we are using Latch Relay.

 

For circuit diagram and the coding click the link given below:

Download attachment

16 Segment display is a alphanumeric display segment which helps us to display the English, Thai, Persian and other characters. These segments are now use in many applications and the gadgets having display panel like calculators,telephone Caller ID units, gymnasium equipment, VCRs, car stereos, microwave ovens, slot machines, DVD players and other embedded systems. This circuitry is another simple interfacing of the 16 segment with the microcontroller. Interfacing of the various elements is the basics of the beginners of microcontroller learners.

In this circuit we use microcontroller AT89C51 and 16 segment display. We display the characters from (A to Z) first and then numbers (0 to 9).

For circuit diagram and the coding click the link given below:

Download attachment

Show the following patterns on the 7 Segment display

1) Ascending Order (0-9)

2) Descending Order (9-0)

3) Odd numbers

4) Even numbers

 

This is another simple circuitry to interface the Seven segment to the microcontroller. It is one of the basic circuits which helps the beginners to understand the interfacing of microcontroller with basic elements. In this project we use microcontroller AT89C2051 and 7 segment common anode.

7 Segment consist of 8 LEDs connected in a way that they can display the numbers from zero to nine (0 to 9) with a decimal point . There are basically two types of seven segments Common Anode Seven Segment and Common Cathode Seven Segment, In common anode we connect the common terminal of  the seven segment to 5 volts and to glow any segment we connect it to the ground, while in the common cathode configuration we connect the common terminal of the seven segment to the ground voltage and to glow any segment we connect it to the 5 volts.

In this circuit we first display the number in ascending order then in descending order then the odd numbers and finally the even numbers on the seven segment display

For circuit diagram and the coding click the link given below:

Download attachment

This is another simple circuitry to interface the Seven segment to the microcontroller. It is one of the basic circuits which helps the beginners to understand the interfacing of microcontroller with basic elements. In this project we use microcontroller AT89C2051 and 7 segment common anode.

7 Segment consist of 8 LEDs connected in a way that they can display the numbers from zero to nine (0 to 9) with a decimal point . There are basically two types of seven segments Common Anode Seven Segment and Common Cathode Seven Segment, In common anode we connect the common terminal of  the seven segment to 5 volts and to glow any segment we connect it to the ground, while in the common cathode configuration we connect the common terminal of the seven segment to the ground voltage and to glow any segment we connect it to the 5 volts.

This circuit display the digits from zero to nine on the seven segment.

 

 

For circuit diagram and the coding click the link given below:

Download attachment

Abstract:

Digital signal processing is the fundamental building block of modern digital developments. All types of digital innovations have been possible due to DSP. One of the first and most widely used application of digital signal processing is in the field of modern digital communication means. Due to exact linear phase it has become possible for engineers to design more reliable systems. DSP has deep impacts on modern communication systems. A general DSP processor simply performs functions of addition, multiplication and delay with necessary repetition.

 

Introduction:

Digital signal processing is extensively used in modern digital applications. As compared to analog signal processing, DSP serves us many benefits like phase linearization, easy storage, fast signal processing, cost effective, low frequency operation and general usage for any type of application. It has revolutionized the modern wired and wireless communication systems. Since a DSP processor simply perform repeated addition, multiplication and delay operations  during processing of information, so in this project we have demonstrated these basic operations by implementing them in MATLAB.

Objectives of the Project:

  • To learn the basic operation sequence of DSP processor.
  • Algorithmic approach to implement DSP basic operations.
  • A generalized MATLAB based implementation.

Sample Run:

%%%%%%%%%%%%%%%%%% DIGITAL SIGNAL PROCESSING PROJECT %%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%% SOFTWARE IMPLEMENTATION OF %%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%% DIGITAL SIGNAL PROCESSOR USING MATLAB %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PROJECT BY:
IRZAM SHAHID
ANSAR SHARIF
M.NAEEM KHAN
FAHAD SABAH
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

T1 =

Columns 1 through 15

0     1     2     3     4     5     6     7     8     9    10    11    12    13    14

Columns 16 through 30

15    16    17    18    19    20    21    22    23    24    25    26    27    28    29

Columns 31 through 45

30    31    32    33    34    35    36    37    38    39    40    41    42    43    44

Columns 46 through 51

45    46    47    48    49    50

T2 =

Columns 1 through 15

0     1     2     3     4     5     6     7     8     9    10    11    12    13    14

Columns 16 through 30

15    16    17    18    19    20    21    22    23    24    25    26    27    28    29

Columns 31 through 45

30    31    32    33    34    35    36    37    38    39    40    41    42    43    44

Columns 46 through 51

45    46    47    48    49    50

Please enter delay…

 

 

For simulation code click the link given below

Download attachment

Envelope Detection

This demo implements two common methods of envelope detection and tests them with a sample speech signal and a modulated sine wave.

The envelope of a signal is the outline of the signal. It can be think of an envelope detector as a system that connects all of the peaks in the signal. Envelope detection has numerous applications in Signal Processing and Communications, including amplitude modulation (AM) detection.

Method 1: Squaring and Low Pass-Filtering

 

Method 2: The Hilbert Transform

Squaring and Low Pass-Filtering

The first method works by squaring the input signal and sending it through a low-pass filter. Squaring the signal effectively demodulates the input by using itself as the carrier wave. This means that half the energy of the signal is pushed up to higher frequencies and half is shifted towards DC. The envelope can then be extracted by keeping all the DC low-frequency energy and eliminating the high-frequency energy. In this demo, a simple minimum-phase low-pass filter is used to get rid of the high-frequency energy.

In order to maintain the correct scale, two more operations are included. The first is to place a gain of 2 on the signal. Since we are only keeping the lower half of the signal energy, this gain boosts the final energy to match its original energy. Finally, the square root of the signal is taken to reverse the scaling distortion from squaring the signal.

This method is useful because it is very easy to implement and can be done with a low-order filter, minimizing the lag of the output.

Method 2: The Hilbert Transform

The second method works by creating the analytic signal of the input by using a Hilbert transformer. An analytic signal is a complex signal, where the real part is the original signal and the imaginary part is the Hilbert transform of the original signal.

The Hilbert transform of the signal is found using a 32-point Parks-McClellan FIR filter. The Hilbert transform of the signal is then multiplied by i (the imaginary unit) and added to the original signal. The original signal is time-delayed before being added to the Hilbert transform to match the delay caused by the Hilbert transform, which is one-half the length of the Hilbert filter.

The envelope of the signal can be found by taking the absolute value of the analytic signal. In order to eliminate ringing and smooth the envelope, the result is subjected to a low-pass filter.

Envelope Detector Model

The all-platform floating-point version of the model is shown below. When we run the demo, we will see the original signal and the results of both envelope detectors.

Envelope Detector Results

This demo shows the results of the two different envelope detectors for two different types of input signals. The input choices are a sample speech signal or a 100 Hz sine wave that turns on and off.

The model has a switchable input and two outputs which are routed to scopes for easy viewing. If a signal is not visible, double-click on the Scope block to open it.

The input scope plot shows the original signal. The signal lasts a total of 5 seconds, with 1 second of data being shown at a time.

 

The first output scope plot shows the output of the first envelope detector. This is the result of squaring the original signal and sending it through a low-pass filter. You can clearly see that the envelope was successfully extracted from the speech signal.

The second output scope plot shows the output of the second envelope detector, which employs a Hilbert transform. Though the output of this envelope detector looks very similar to the first method.

 

For Simulink model and the block diagram of the above project click the link below:

Download attachment

Blinking LEDs in Sequence:

This is another basic introductory circuit of micrcontroller. In this circuit we turn on and off the leds in sequence bu using microcontroller AT89C2051, one LED is on at one time then after some delay it becomes off and another LED turns on and so on. There are two ways to do this sequence in assembly language. First way is to turn on one port and keep other ports off at one time then turn on second port and keep other ports off and so on. Second way to do it is by load the value 01111111(07FH in hexadecimal) to the register and then rotating the value in the register, every time after one rotation the rotated value is moved to the port 1.

For circuit diagram and the coding click the link given below:

Download attachment