Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
university:courses:engineering_discovery:lab_6 [24 Jun 2016 23:30] – [Procedure] Jonathan Pearsonuniversity:courses:engineering_discovery:lab_6 [04 Sep 2019 20:32] (current) – add alternate inductor options from kit Doug Mercer
Line 1: Line 1:
 ===== A Simple Magnetic Proximity Sensor===== ===== A Simple Magnetic Proximity Sensor=====
-{{ analogTV>VIDEO NUMBER HERE}}+{{ analogTV>5032143786001}}
  
 ==== Introduction ==== ==== Introduction ====
Line 28: Line 28:
   * (1) 0.1 μF capacitor (marked "104") from the ADALP2000 Analog Parts Kit   * (1) 0.1 μF capacitor (marked "104") from the ADALP2000 Analog Parts Kit
   * (1) 10 μF capacitor from the ADALP2000 Analog Parts Kit   * (1) 10 μF capacitor from the ADALP2000 Analog Parts Kit
-  * (1) 100 μH inductor (marked "101"from the ADALP2000 Analog Parts Kit+  * (1) inductor from the ADALP2000 Analog Parts Kit, either 100uH (marked 101), 1mH (102), 10mH (103)
 ==== Procedure ==== ==== Procedure ====
   - Construct the following electromagnet circuit on the solderless breadboard{{ university:courses:engineering_discovery:lab_6_image_1.png?400 }}   - Construct the following electromagnet circuit on the solderless breadboard{{ university:courses:engineering_discovery:lab_6_image_1.png?400 }}
-  - **Note that the 100 Ω resistors get very hot due to Joule heating, so avoid coming in contact with them**+  - **Note that the 100 Ω resistors get very hot due to Joule heating, so avoid coming in contact with them** Using 1mH or 10mH inductor will draw less current and make stronger magnetic field.
   - Refer to the illustration below for one way to install the components in the solderless breadboard{{ university:courses:engineering_discovery:lab_6_assembly_image_1.png?900 }}   - Refer to the illustration below for one way to install the components in the solderless breadboard{{ university:courses:engineering_discovery:lab_6_assembly_image_1.png?900 }}
   - Add the following Hall effect sensor circuit to the solderless breadboard{{ university:courses:engineering_discovery:lab_6_image_2.png?800 }}   - Add the following Hall effect sensor circuit to the solderless breadboard{{ university:courses:engineering_discovery:lab_6_image_2.png?800 }}
Line 77: Line 77:
   - Can you explain why there are two different threshold voltages and how having two threshold voltages provides an advantage in this binary proximity detector?   - Can you explain why there are two different threshold voltages and how having two threshold voltages provides an advantage in this binary proximity detector?
 ==== Theory ==== ==== Theory ====
-Most magnetic-field-based proximity sensors use strong permanent magnets to generate the magnetic fields that are sensed, and therefore the sensors only require modest gains in order to output a reasonable voltage.  In this lab we generate a relatively weak magnetic field using an electromagnet carrying about 150 mA, and thus require a fairly large gain in the op-amp contained in the Hall effect sensor.  Having large op-amp gain introduces a few practical problems.  One problem is that the output noise is large.  This happens because the noise at the input to the op-amp gets multiplied along with the desired signal in the op-amp and appears at the op-amp output.  Another similar problem is DC offset, in which a small offset at the input to the op-amp gets multiplied by the op-amp and appears as a DC offset on the output voltage.  The op-amp itself has an input offset voltage, imperfectly matched input bias currents that get converted to voltages which are reflected to the op-amp output voltage, and the internal Hall effect sensor output offset and internally generated and buffered reference voltage, REF, are not exactly the same.  These all contribute to the output offset voltage, and are the reasons why the output voltage is not exactly at mid-supply when no magnetic field is present.  We can compensate for these offsets, and even shift the output offset voltage wherever we need to (within the limits of the part) by summing in an offset voltage at the op-amp's summing node.+Most magnetic-field-based proximity sensors use strong permanent magnets to generate the magnetic fields that are sensed, and therefore the sensors only require modest gains in order to output a reasonable voltage.  In this lab we generate a relatively weak magnetic field using an electromagnet carrying about 150 mA, and thus require a fairly large gain in the op-amp contained in the Hall effect sensor.  Having large op-amp gain introduces a few practical problems.  One problem is that the output noise is large.  This happens because the noise at the input to the op-amp gets multiplied along with the desired signal in the op-amp and appears at the op-amp output.  Another similar problem is DC offset, in which a small offset at the input to the op-amp gets multiplied by the op-amp and appears as a DC offset in the output voltage.  The op-amp has an input offset voltage, and imperfectly matched input bias currents that get converted to voltages, and these are reflected by the op-amp gain to the op-amp output voltage. Additionally, the internal Hall effect sensor output offset and internally generated and buffered reference voltage, REF, are not exactly the same.  These all contribute to the output offset voltage, and are the reasons why the output voltage is not exactly at mid-supply when no magnetic field is present.  We can compensate for these offsets, and even shift the output offset voltage wherever we need to (within the limits of the part) by summing in an offset voltage at the op-amp's summing node.
  
 The summing node of the op-amp contained in the AD22151 is made available on Pin 6, and the non-inverting op-amp input is internally biased at approximately +2.5 V, so it is possible to inject positive or negative current into the summing node in order to shift the output offset level.  In this case we desire to shift the output offset down, which requires an injection of current into the summing node.  This can also be viewed as summing a positive voltage into an inverting op-amp summing amplifier configuration.  With zero magnetic field applied, the voltage across the op-amp gain resistor R2 is ideally zero since the reference voltage VREF and the output of the Hall effect sensor would be the same -- note that the voltage on the op-amp inverting input is driven to be essentially the same as the voltage no the non-inverting input by negative feedback, so the voltage on the inverting input can be viewed as essentially the same as that of the Hall effect sensor output, neglecting the op-amp input offset voltage.  The voltage that is essentially common to both op-amp inputs is referred to as the "input common-mode voltage."  There is, however, a small voltage across R2 due to the mismatch between VREF and the op-amp input common-mode voltage.  Even though this is a small voltage, it is applied across a small resistance and produces an appreciable current that flows through a large-valued feedback resistor to produce an appreciable shift in output voltage.  This is how op-amps work to amplify signal voltages, and why the inverting gain of an op-amp is proportional to the feedback resistance and inversely proportional to the gain resistance.  We can determine the current flowing though R2 by measuring the voltage across it and dividing by its value.  Most of this current flows through the feedback resistor R3, but a small amount flows into the op-amp inverting input; this small current is the input bias current, and is the reason why the current through R2 is not exactly equal to the current through R3. The summing node of the op-amp contained in the AD22151 is made available on Pin 6, and the non-inverting op-amp input is internally biased at approximately +2.5 V, so it is possible to inject positive or negative current into the summing node in order to shift the output offset level.  In this case we desire to shift the output offset down, which requires an injection of current into the summing node.  This can also be viewed as summing a positive voltage into an inverting op-amp summing amplifier configuration.  With zero magnetic field applied, the voltage across the op-amp gain resistor R2 is ideally zero since the reference voltage VREF and the output of the Hall effect sensor would be the same -- note that the voltage on the op-amp inverting input is driven to be essentially the same as the voltage no the non-inverting input by negative feedback, so the voltage on the inverting input can be viewed as essentially the same as that of the Hall effect sensor output, neglecting the op-amp input offset voltage.  The voltage that is essentially common to both op-amp inputs is referred to as the "input common-mode voltage."  There is, however, a small voltage across R2 due to the mismatch between VREF and the op-amp input common-mode voltage.  Even though this is a small voltage, it is applied across a small resistance and produces an appreciable current that flows through a large-valued feedback resistor to produce an appreciable shift in output voltage.  This is how op-amps work to amplify signal voltages, and why the inverting gain of an op-amp is proportional to the feedback resistance and inversely proportional to the gain resistance.  We can determine the current flowing though R2 by measuring the voltage across it and dividing by its value.  Most of this current flows through the feedback resistor R3, but a small amount flows into the op-amp inverting input; this small current is the input bias current, and is the reason why the current through R2 is not exactly equal to the current through R3.
  
-Additional current can be added through the feedback resistor in order to shift the output voltage down to the lower end of its linear range of 0.5 V.  The amount of current necessary for this can be calculated by taking the difference between the existing output voltage and the desired output voltage and dividing by the feedback resistance.  This value of current is then injected into the op-amp summing node through an offset injection resistor R4.  The value of R4 is calculated as the difference between the voltage on the input side of R4 (we used 4.8 for this) and the op-amp input common-mode voltage divided by the required injection current.+Additional current can be added through the feedback resistor in order to shift the output voltage down to the lower end of its linear range of 0.5 V.  The amount of current necessary for this can be calculated by taking the difference between the existing output voltage and the desired output voltage and dividing by the feedback resistance.  This value of current is then injected into the op-amp summing node through an offset injection resistor R4.  The value of R4 is calculated as the difference between the voltage on the input side of R4 (V<sub>SUPPLY</sub>) and the op-amp input common-mode voltagedivided by the required injection current.
  
 The op-amp is set up as a non-inverting amplifier to the voltage that is output from the Hall effect sensor element.  The gain of a non-inverting op-amp, A<sub>V,NI</sub>, is the ratio of the feedback resistance to the gain resistance plus one.  In terms of the reference designators used in the lab, this is A<sub>V,NI</sub> = 1 + R3/R2.  Note that VREF is also summed in an inverting fashion in order to place the output nominally at mid-supply (it is close to mid-supply for the typical small gains that are used when permanent magnets are used as the sources of the magnetic fields).  The gain of an inverting op-amp, A<sub>V,I</sub>, is the negative of the ratio of the feedback resistance to the gain resistance, or A<sub>V,I</sub> = -R3/R2.  The output level with no magnetic field present has been defined by the gain, circuit offsets, VREF, and the offset injection circuitry.  The AD22151 output voltage, V<sub>O</sub>, due to the Hall effect sensor element output voltage, V<sub>H</sub>, is therefore simply The op-amp is set up as a non-inverting amplifier to the voltage that is output from the Hall effect sensor element.  The gain of a non-inverting op-amp, A<sub>V,NI</sub>, is the ratio of the feedback resistance to the gain resistance plus one.  In terms of the reference designators used in the lab, this is A<sub>V,NI</sub> = 1 + R3/R2.  Note that VREF is also summed in an inverting fashion in order to place the output nominally at mid-supply (it is close to mid-supply for the typical small gains that are used when permanent magnets are used as the sources of the magnetic fields).  The gain of an inverting op-amp, A<sub>V,I</sub>, is the negative of the ratio of the feedback resistance to the gain resistance, or A<sub>V,I</sub> = -R3/R2.  The output level with no magnetic field present has been defined by the gain, circuit offsets, VREF, and the offset injection circuitry.  The AD22151 output voltage, V<sub>O</sub>, due to the Hall effect sensor element output voltage, V<sub>H</sub>, is therefore simply
Line 116: Line 116:
   * Operational amplifiers should not be used as comparators   * Operational amplifiers should not be used as comparators
   * Hysteresis can be added to a comparator to prevent chattering that occurs with noisy slow-moving input signals   * Hysteresis can be added to a comparator to prevent chattering that occurs with noisy slow-moving input signals
 +
 +**Return to [[university:courses:engineering_discovery|Engineering Discovery Index]]**
university/courses/engineering_discovery/lab_6.txt · Last modified: 04 Sep 2019 20:32 by Doug Mercer