- Home
- Blogs
- Intelligent control
- ADALM2000 Experiment: Magnetic Proximity Sensors
ADALM2000 Experiment: Magnetic Proximity Sensors
Introduction
Simple proximity sensors can detect the distance between objects and can be used for a variety of purposes, ranging from the detection of door and window switches to the detection of complex high-precision absolute position. One design option for proximity sensors entails measuring the intensity of the magnetic field produced by a magnet (typically a permanent magnet, but it could also be an electromagnet). In this experiment, a magnetic field is generated using a ferrite core solenoid. A solenoid is a cylindrical coil of wire wound around a magnetic core (often used to produce an inductor with a specific inductance value) or an electromagnet.
The target
The purpose of this experiment is to construct a simple proximity detector based on the principles of magnetic field generation and detection and to observe how the output voltage of the detector rises as the electromagnet approaches the sensor.
Supplementary information
Simple proximity sensors that detect the distance between objects can be used for a variety of purposes, ranging from the detection of the opening and closing of doors and windows to the detection of the absolute position with high precision. One design option for proximity sensors entails measuring the intensity of the magnetic field produced by a magnet (typically a permanent magnet, but it could also be an electromagnet). In this experiment, a magnetic field is generated using a ferrite core solenoid. A solenoid is a cylindrical coil of wire wound around a magnetic core (often used to produce an inductor with a specific inductance value) or an electromagnet.
Using the 100 H inductor from the ADALP2000 Analogue Parts Kit, a magnetic field strong enough to be detected by the AD22151 magnetic field sensor included in the kit is generated. The output voltage of the AD22151 linear magnetic field sensor is proportional to the magnetic field applied perpendicular to the package's upper surface. The AD22151 magnetic field sensor operates on the basis of the Hall effect. When a current travels through a conductor in the presence of a magnetic field, a voltage (Hall voltage) is generated across the conductor. This occurrence is known as the Hall effect. The Lorentz force in the magnetic field will deflect the moving charge, creating an electric field and generating the Hall voltage.
The material
Active Learning Module for 2000
Breadboard and circuit set without soldering
Quadruple 100 resistors
A 100 microhenry inductor
A magnetic field sensor AD22151
Dual 470 resistors
The 100 k resistance
A capacitor with 0.1 F capacitance
A 10 microfarad capacitor
A 200 k resistance
an LED
Hardware configurations
First, build the electromagnet circuit shown in Figure 1 on a solderless breadboard.

Figure 1. Electromagnet circuit.
Add to the solderless breadboard the Hall-effect sensor circuit (Figure 2) containing the AD22151 magnetic field sensor.

Figure 2. Hall effect sensor circuit.
Figure 3 illustrates the breadboard connections.

Figure 3: Connections for magnetic proximity sensor breadboards.
Procedure stages
Use signal generator W1 to produce a constant 5 V signal for AD22151's VCC input. Power the electromagnet by activating the 5 V positive power supply. When the electromagnet is away from the chip and there is no magnetic field near the sensor, Channel 1 of the oscilloscope will display the output of the AD22151.
Due to the dc bias in the sensor and op amp multiplied by the closed loop gain of the op amp, this voltage is not identical to the midpoint supply voltage, which is 2.5 V with a 5.0 V supply. The supply voltages at the midpoint are distinct.

Figure 4: Offset voltage at the output.
If the electromagnet is moved closer to the semiconductor, the output voltage will increase in proportion to the magnetic field strength. Figure 5 illustrates how the voltage rises as the electromagnet approaches the device. As the electromagnet moves away from the semiconductor, the voltage will decrease until the Gaussian offset voltage reaches zero.

Figure 5: Variation in output voltage.
To adjust the output offset voltage, we can connect a resistor R4 between the 5.0 V supply and the summation node at pin 6 of the operational amplifier. Thus, in the absence of an external magnetic field, the output voltage of the sensor can be brought as close as feasible to its minimum linear range. Next, let's determine the value of R4.
We specify VCC as the supply voltage and VMID as the midpoint supply voltage for the AD22151.
On channel 2, use a voltmeter to measure VCC. To determine R4, the input and output currents at the op amp's aggregating node must be known. IR2 represents the current through resistor R2. Idealistically, this current is zero because the voltage on each side of it is VMID, but there is a small offset voltage between the output voltage of the zero-field internal Hall-effect sensor and the internal buffer voltage VREF. This voltage is often negligible in low-gain circuits, but in high-gain circuits (such as this example), it must be considered.
Measure and record the voltage at pin 7 with a voltmeter, and label it VREF. Measure and record the voltage at pin 6 with a voltmeter, and label it as VCM; this is the common-mode voltage at the input of the op amp, which is near to the output of the internal Hall effect sensor and is driven by negative feedback. Determine the voltage spanning R2:
VR2 = VREF – VCM(1)
The current flowing through R2 is:
IR2 = VR2/235Ω(2)
When calculating the current travelling through the feedback resistor R3, the output voltage of the sensor when the electromagnet is far from the chip, which corresponds to the zero Gauss point of the sensor, can be considered. Define this voltage as VOUT,Z, and then calculate the current using the formula:
(VCM - VOUT,Z)/100k(3) = IR3
Calculate the voltage offset required to lower VOUT,Z from its current level (0.5 V in this example) to a lower level. This is a negative number, calculated as follows:
VSHIFT= 0.5 Volts minus VOUT,Z(4)
Formula for calculating the additional current ISHIFT required to shift VOUT,Z to 0.5 V via feedback resistor R3:
ISHIFT equals VSHIFT/100k(5)
Noting that VSHIFT is negative, this value is negative. The current (IR4) flowing into the summing node through R4 (which generates the desired offset voltage) flows in the opposite direction of ISHIFT, so it can be expressed as IR4 = –ISHIFT, a positive value.
Calculate the value of R4, keeping in mind that the voltage across R4 is the difference between VCC and VCM, using the following formula:
R4 = (VCC - VCM)/IR4(6)

Figure 6: Depicts a circuit with a resistor R4 that modifies the offset voltage.
Select a resistor from the kit whose value is closest to the value calculated for R4. Errors in rounding can result in increased output voltages. Insert R4 into the circuit as shown in Figure 6's schematic. In addition, Figure 8 illustrates how to position this resistor on the breadboard. In this situation, the closest available resistance in the kit is 200 k. On Channel 1 of the oscilloscope, the output offset voltage has decreased to the lower limit of its linear range and is approaching the desired 0.5 V.

Figure 7:Shows that the output offset voltage has decreased.
LED-Indicating Magnetic Proximity Sensor
As a visual indicator, the proximity sensor's output LED can be used. As shown in Figure 8, connections can be made as shown. Place a 100 resistor between the LED's anode and the output of the sensor. This limits the LED's current flow. Connect GND to the cathode. Because the magnetic field increases the output voltage of the sensor, the closer the electromagnet is to the semiconductor, the brighter the LED will be.

Magnetic proximity sensor with LED indicator, as shown in Figure 8.
Articles you may also like
What is a waveform? What types of waveforms are there? And the characteristics of the waveform
Build an intelligent UPS power supply
PIC microcontroller technology and application foresight
Measurement of Air Ionic Conductivity with Double Darlington Tubes
-
nxp-usa-inc
