Magnetic-Field Sensor
The final sensor we'll look at is the AD22151 magnetic-field sensor by Analog Devices. Its primary use is for position and proximity sensing. A magnetic source is used as a reference point, and the sensor's distance from that source may be easily determined by the measured field strength. The sensor has inbuilt temperature compensation and amplification.
The circuit for this sensor is shown in Figure 13-21. It's a little bit more complicated than the other sensors we've looked at so far.
Figure 13-21. AD22151 magnetic-field sensor circuit
The sensor operates off a 5 V supply, decoupled to ground using a 100 nF capacitor. There are four resistors required for correct operation. R1 is the temperature compensation resistor, which should be connected between pins 1 and 3, or pins 2 and 3, depending on the applied magnetic field. For large external fields, R1 connects pins 1 and 3, as shown in Figure 13-21. For smaller fields, connect R1 between pins 2 and 3. The AD22151 datasheet has plots of values for R1 versus required compensation levels. Check with the manufacturer of your magnetic source[*] as to the required compensation value, and use this in conjunction with the datasheet to determine R1.
For magnet data, try http://www.magtech.com.hk, http://www.eastindustries.net, or http://www.millennium.com.hk as places to start.
R2 and R3 set the signal gain of the internal ...
Get Designing Embedded Hardware, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.