Editing Using ADCs

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
'''( this is a fairly early draft, more will come )'''
 
'''( this is a fairly early draft, more will come )'''
 
== Introduction ==
 
  
 
An ADC or analog to digital converter is a useful device to bridge the analog world to the digital world.  For example there is a useful device called the LM35 which outputs a voltage that is directly related to the temperature.  If you have a PIC877A it has an ADC which can convert this voltage to a digital value of 10 bit precision.  At that point you can treat the temperature as any other value in the microcontroller.  Sometimes ADCs are found as components inside a microcontroller, others are packaged by themselves.
 
An ADC or analog to digital converter is a useful device to bridge the analog world to the digital world.  For example there is a useful device called the LM35 which outputs a voltage that is directly related to the temperature.  If you have a PIC877A it has an ADC which can convert this voltage to a digital value of 10 bit precision.  At that point you can treat the temperature as any other value in the microcontroller.  Sometimes ADCs are found as components inside a microcontroller, others are packaged by themselves.
Line 7: Line 5:
 
So this note will discuss some of the ins and outs of ADCs.
 
So this note will discuss some of the ins and outs of ADCs.
  
== Some Theory ==
+
Some Theory
  
 
What does an ADC do: it converts a continuously variable voltage ( in theory any analog quantity, but in practice almost always voltage ) into a digital value.  Normally there are three analog voltages involved. Two of these are normally constant: they are the low reference voltage and the high reference voltage ( typically both must be greater than 0 volts and less than the ADC power supply ).  Often they are 0 and the power supply, but sometimes the ADC has internal voltage references that can be used.  Do not make the mistake of thinking you are not using reference voltages, you are, but they may be defaulting to some value specified in the data sheet or by configuration set up.  Often both voltages may  be set via input pins.
 
What does an ADC do: it converts a continuously variable voltage ( in theory any analog quantity, but in practice almost always voltage ) into a digital value.  Normally there are three analog voltages involved. Two of these are normally constant: they are the low reference voltage and the high reference voltage ( typically both must be greater than 0 volts and less than the ADC power supply ).  Often they are 0 and the power supply, but sometimes the ADC has internal voltage references that can be used.  Do not make the mistake of thinking you are not using reference voltages, you are, but they may be defaulting to some value specified in the data sheet or by configuration set up.  Often both voltages may  be set via input pins.
Line 18: Line 16:
 
where count = digital output of the ADC
 
where count = digital output of the ADC
  
== Hardware ==
+
Hardware
  
There are a few tricks with the ADC.  First ADCs really do not like voltages that are two low or too high.  These voltages are usually 0 and the power supply voltage of the ADC.  So you should make arrangements not to exceed these voltages.  Additionally the equivalent resistance of the voltage source should be reasonable low say 10 K ohms.  So you need to check your input to make sure you stay within this limit.  ( for your device check its data sheet ).
+
There are a few tricks with the ADC.  First ADCs really do not like voltages that are two low or too high.  These voltages are usually 0 and the power supply voltage of the ADC.  So you should make arrangements not to exceed these voltages.  Additionally the equivalent resistance of the voltage source should be reasonable low say 10 K ohms.  So you need to check your input to make sure you stay within this limit.  ( for ;your device check its data sheet ).
  
 
While many people do not use the next feature it can be very useful: it is the ability to set the upper and lower voltage reference ( if you do not set them they usually default to 0 and the power supply voltage ).
 
While many people do not use the next feature it can be very useful: it is the ability to set the upper and lower voltage reference ( if you do not set them they usually default to 0 and the power supply voltage ).
  
So what is the digital value that you read from the ADC? It depends upon the number of bits and the upper and lower voltage reference.   
+
So what is the digital value that you read from the ADCIt depends upon the number of bits and the upper and lower voltage reference.   
  
  
Line 44: Line 42:
  
  
Some examples:
+
Some examples
  
 
for an 8 bit conversion with 0 and 5 volts reference each input bit represents a voltage of .0275 volts
 
for an 8 bit conversion with 0 and 5 volts reference each input bit represents a voltage of .0275 volts
Line 61: Line 59:
  
 
A circuit:
 
A circuit:
 
 
 
 
 
[[category:Microcontroller]][[category:PIC]][[category:Components]]
 

Please note that all contributions to OpenCircuits may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenCircuits:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)