Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

ADC with AT89C51 Microcontroller

By Saif Ullah Qureshi, Lahore, Pakistan

[[wysiwyg_imageupload:3627:]]

 

This Project is sent by Mr. Saif Ullah Qureshi from UET,Lahore, Pakistan


 Introduction:

In our daily life, anything we deal like sound, pressure, voltage or any measurable quantity, are usually in analog form. So what if we want to interface any analog sensor with our digital controllers? There must be something that translate the analog inputs to digital output, and so Analog to digital convertors come to play. Usually we call them ADC (Analog to digital convertor). Before going to learn how to interface an ADC with a controller we first take a look at basic methods of analog to digital conversion.
 
An analog-to-digital converter (abbreviated ADC, A/D or A to D) is a device which converts a continuous quantity to a discrete timedigital representation. An ADC may also provide an isolated measurement. The reverse operation is performed by a digital-to-analog converter (DAC).Typically, an ADC is an electronic device that converts an input analog voltage or current to a digital number proportional to the magnitude of the voltage or current. However, some non-electronic or only partially electronic devices, such as rotary encoders, can also be considered ADCs.
 
The digital output may use different coding schemes. Typically the digital output will be a two’s complement binary number that is proportional to the input, but there are other possibilities. An encoder, for example, might output a Gray code.
 
Sampling rate:
The analog signal is continuous in time and it is necessary to convert this to a flow of digital values. It is therefore required to define the rate at which new digital values are sampled from the analog signal. The rate of new values is called the sampling rate or samplingfrequency of the converter.
A continuously varying bandlimited signal can be sampled (that is, the signal values at intervals of time T, the sampling time, are measured and stored) and then the original signal can be exactly reproduced from the discrete-time values by an interpolation formula. The accuracy is limited by quantization error. However, this faithful reproduction is only possible if the sampling rate is higher than twice the highest frequency of the signal
Since a practical ADC cannot make an instantaneous conversion, the input value must necessarily be held constant during the time that the converter performs a conversion (called the conversion time). An input circuit called a sample and hold performs this taskin most cases by using a capacitor to store the analog voltage at the input, and using an electronic switch or gate to disconnect the capacitor from the input. Many ADC integrated circuits include the sample and hold subsystem internally as shown in figure in the next page.
 
[header = Components Used]
Components used:
1. AT89c51 microcontroller
2. A Resister    (470 Ohm)
3. A LED (yellow color)
 
Descriptions about components:
AT89C51:
Visit the links for details about the AT89C51 Microcontroller:
AT89C51 Microcontroller
8051 Microcontroller
 
Oscillioscope:
When we give input to the circuit in the form of sinesuidal wave in the form of a.csignal.Then we will take output from circuit through the oscillioscope,it will show the output waveform as a square waveform as shown in above figure.
 
Resistor:
The value of resistor is adjustedso that the rating of the led which is connected in the circuit . If the value of resistance will very high then the blinkness of led is for very short timing and we could not see the output clearly. So we should keep this value very low or of medium value so that the output can see clearly.
 
[header = Circuit Diagram]
Circuit Diagram:
 
[header = Code]
Code:
The C Language Code for the analogue to digital converter is very simple which is give below:
 
sbit output1  = 0xA0; //P2_0;
sbit input1  = 0xA7; //P2_7;        
void test();
void main()
{
test()
}
void test()
{
output1=input1;
test();
}
 
[header = Output]
OutPut :
In this plotting of oscillioscope sine wave is the input and square waveform is the output ,and in circuit diagram led is represented the output.
 
Difficulties faced during this project :-
We have a variety of projects for analogue to digital converter but we prefer this project because in the engineering point of view the cost of the products should be minimum.as in this project we simply used the microcontroller At89c51, one resistor and one led. Further,we can perform this project without microcontroller (At89c51)but the output was of not exact square waveform. So we used it just for the sake of creating pure square waveform.     
 

Filed Under: Electronic Projects

 

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


Featured Tutorials

  • Introduction to Brain Waves & its Types (Part 1/13)
  • Understanding NeuroSky EEG Chip in Detail (Part 2/13)
  • Performing Experiments with Brainwaves (Part 3/13)
  • Amplification of EEG Signal and Interfacing with Arduino (Part 4/13)
  • Controlling Led brightness using Meditation and attention level (Part 5/13)
  • Control Motor’s Speed using Meditation and Attention Level of Brain (Part 6/13)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • What are the battery-selection criteria for low-power design?
  • Key factors to optimize power consumption in an embedded device
  • EdgeLock A5000 Secure Authenticator
  • How to interface a DS18B20 temperature sensor with MicroPython’s Onewire driver
  • Introduction to Brain Waves & its Types (Part 1/13)

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • Measure AC current accurateley (100mA to 10A)
  • Mosfet SSR triac output shunt circuit design
  • Tessent MBIST for memories with dedicated test clock
  • Very low voltage/power Schmitt trigger?
  • Natural Convection Heatsink for 80W power dissipation?

RSS Electro-Tech-Online.com Discussions

  • Best way to reduce voltage in higher wattage system?
  • surge arresters
  • Someone please explain how this BMS board is supposed to work?
  • Need a ducted soldering fan for solder smoke extraction
  • DIY bluetooth speaker
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering