Professional Documents
Culture Documents
Vb
Bridge Arrows Indicate Y
Current
Sensor Sensitive X
Magnetic Axis’
Easy Permalloy
Axis Thin Film
By
Bs Bx
Out+ Out-
Applied Magnetic Field
Figure 3 - 2-Axis Magnetic Field Sensing
The amount output voltage from the AMR sensor is MAGNETIC SENSOR INTERFACE CIRCUITS
measured from Out+ to Out- and is a function of the
sensor sensitivity equation, or: Because the AMR sensor outputs are in small millivolt
levels given earth’s magnetic field strengths, these
Out+ - Out- = S * Vb * Bs with, wheatstone bridge sensors require follow-on
S = Sensitivity (nominally 1mV/V/gauss) amplification to make vehicle induced field changes
Vb = Bridge Supply Voltage in volts easier to detect. With the differential output of the
Bs = Bridge Applied Magnetic Flux in gauss sensors, each sensor requires a differential or
2 www.honeywell.com
AN218
instrumentation amplifier stage compatible with the HMC102X family of sensors, the specified range of
sensor output voltages and the sensor bridge supply bridge offset is about 2mV/V with normal distribution of
voltage. Typically, these amplifier stages will operate under the ±0.5mV/V range. Using the Figure 4 circuit
from either 4.8 to 5.2, or 2.7 to 3.3 volt power supply example previously, a -0.5mV/V bridge offset on a 3 volt
rails to conserve energy in battery applications, or higher power supply provides a -1.5 millivolt output offset, or a -
voltages if supplied from non-portable sources. As you 300 millivolt offset at the amplifier. To null this offset, one
can see from the sensitivity equation, bridge supply method is move the offset reference voltage from 1.5
voltages help amplify the signal. But running the sensors volts to 1.8 volts to counter the bridge offset. For further
beyond 5 volts also puts more milliwatts of heat onto the offset reduction methods, see application note AN212 on
bridge elements making thermal drift effects more the magneticsensors.com website.
noticeable. Figure 4 shows a typical sensor interface
circuit schematic. Honeywell AMR sensors also have patented coils
interleaved with the bridge elements for many purposes.
These coils are intended for creating a “magnetic offset”
U1
Vcc Vb .01µf
1.00M field, or to re-align the magnetic domains of the
5.0v permalloy thin film with the easy axis after excessive
4.99k magnetic fields upset the sensor magnetic domain
OUT-
- direction. These coils are called the “offset strap” and the
output
OUT+
+ “set/reset strap” as they have minimal inductance and
4.99k U2 electrically thought of as resistive elements with the
LMV358 amp-turns aspect of the coils applying localized fields on
1.00M the sensors. Figure 5 shows the schematic
GND HMC1021 representation of the HMC1022 sensor with its straps.
Offset trim
Vcc
10k
Vb(A) A and B
10k 10k
Sensor Bridges
OFF+(A)
offset
Denoted by
OUT+(A)
Figure 4 - AMR Sensor Amplification strap (A) Or (B) Suffix
OUT-(A)
OFF-(A)
As shown, a common low voltage operational amplifier U1
GND(A)
(LMV358 op-amp) is depicted with four 1% tolerance
metal film resistors to create a 200V/V gain difference S/R+(A)
amplifier. A dedicated instrumentation amplifier can set/reset strap S/R-(A)
replace the op-amp and resistors for simpler control over Vb(B)
gain and offset voltage at the expense of a bit more cost
for the amplifier. This circuit takes the difference in OFF+(B)
offset OUT+(B)
voltage of the sensor OUT+ and OUT- nodes, and then strap OUT-(B)
amplifies the result as a bias voltage value from the OFF-(B)
offset voltage reference. The offset voltage reference will GND(B) HMC1022
be node voltage on the wiper of the offset trim
potentiometer. S/R+(B)
set/reset strap
S/R-(B)
As an example, let the sensitive axis field of the sensor
in Figure 4 be 0.5 gauss with a bridge and amplifier
power supply rail (Vcc) be 3.0 volts. Because of the Figure 5 - HMR1022 With Straps Shown
1.0mV/V/gauss sensitivity of the HMC1021, the
differential output voltage of the sensor will be +1.5 The offset straps convert currents through the strap
millivolts. As applied to the amplifier with a gain of 200, resistance into a local magnetic field upon the bridge
the amplifier output will be 300 millivolts positive from the elements in the sensitive axis direction. By creating
offset reference voltage. Given an offset voltage of half magnetic offset fields, the sensor bridges will sum both
supply (1.5 volts), the measured output voltage at the the desired magnetic far field and the offset strap
amplifier would be about 1.80 volts. produced field to buck, boost, or just center up the
summed fields for best amplification and signal
Because the AMR sensors are not perfectly matched at processing. A majority of vehicle detection applications
the resistive elements, a bridge offset voltage results; do not use the offset straps, and may be left open
and is different for each sensor manufactured. However circuited if not used.
the good news is that this offset is fixed for the part’s life
with the remaining drift due to temperature changing the The set/reset straps are intended for pulsed currents to
resistance of the bridge elements. This bridge offset “degauss” or “de-perm” the sensor bridges as required to
voltage is dependant on the bridge supply voltage and is avoid sensor performance degradation after exposure to
scaled on a millivolts per bridge voltage (mV/V). For the accidental high magnetic fields. These high fields are
www.honeywell.com 3
AN218
generally in excess of ±10 gauss at the bridges, and concentration abilities and can have remnant flux
typically caused by magnetized hand tools, permanent generation abilities. While the flux density could be in the
magnets, portable electric motors, and high current wires hundreds of gauss, most vehicles with hard-iron carry
such as welding cables. By periodically sending much less than ±2 gauss of remnant flux due to
moderate current pulses at convenient intervals, the stamping of the chassis metals.
permalloy thin film magnetic domains get re-aligned in
the easy axis directions and the memory of the upset Soft-irons will concentrate the earth’s magnetic flux, but
field direction is erased. This process is much like typically will only increase the flux amplitude less than
erasing audio recording tape since they both employ half the residual bias value at the sensor location. And if
permalloy films. the fields are concentrated in the soft-iron, then they
tend to de-concentrate the flux perpendicular to the field
Application note AN213 describes the set/reset strap direction as shown in Figure 1. So the magnetic sensors
feature in detail with typical pulse drive circuits. For will likely see a few tens to hundreds of milligauss of
vehicle detection applications, a periodic repetition of earth’s field bias with up to ± 3 gauss of spikes as
reset followed by set pulses is recommended at one statistically typical vehicles come into proximity with the
second to minute intervals. Should the sensors be sensors. Vehicle detection product designers are not
magnetically upset via high field exposure, the exposure likely to care about the dynamic peaks of the vehicle
could result in reduced sensitivity, or no change in induced magnetic signatures, but are likely to design in a
sensor voltages (stuck sensors), until the set/reset ±1 gauss dynamic range and use sudden shifts from the
straps are pulsed. Figure 6 shows a typical single bias values as vehicle detection criteria.
set/reset strap drive circuit optimized for 5 volt supplies
and a HMC1021 set/reset strap.
C3 R1
1U Vdd = 5v
220
5
Roadbed
IRF7509P R
5v Position Sensor Signature of Vehicle
3
C1
Earth’s Field Bias
R S 0.1U 0
5v -5v
1 2 S
0 Figure 7 - Vehicle Signature
S/R-
-
Vsr set/resetRsr2
Rsr1 The above figure shows a typical North American
C2 strap
7.5 7.5
4.6 ohms
magnetic field direction with the truck moving
0.1U
X2 + southbound. The green boxes represent possible sensor
S/R+
IRF7509N locations near the roadbed and the relative amounts of
flux concentration they could sense. The adjoining graph
shows what a signal axis sensor bridge might see when
it has the sensitive axis also pointing southbound and as
the truck drives past the sensor. Since the natural
earth’s magnetic field would bias the sensors with a
Figure 6 - Set/Reset Strap Driver Circuit
slight negative voltage output, increasing flux
concentration would further lower the voltage, and
VEHICLE DETECTION SIGNATURES decreasing concentration would raise the voltage.
Using the earth’s magnetic field provides a magnetic Sensors oriented sideways (horizontal, across the
background or “bias” point that stays substantially roadbed) and vertical would likely also shift during the
constant with a fixed sensor installation. With the earth’s vehicle passage, but the bias values and signature shifts
magnetic field strength at about 0.5 gauss and further would be different. For most applications, the amplitude
reduced to just a single axis amount from a possible and direction of voltage shift is not important, but the
three-axis orientation, each sensor may have signal detection of a significant shift in output voltage is what
ranging from near zero gauss to ±0.7 gauss in natural would matter most. For vehicle presence applications,
earth signal dynamic range. As vehicles come into the vector magnitude shift from the earth’s magnetic
proximity to the sensor, the shift from the earth’s field field would be the most reliable method. Using digitized
levels comes from both soft and hard-iron sources from measurements of three-axis sensor outputs after
the vehicle. Soft-iron is ferrous materials that amplification, the vector magnitude would be:
concentrate magnetic flux into the material and do not
have any remnant flux generated within the material. A = SQRT ( X2 + Y2 + Z2 )
Hard-iron sources are materials that have flux
4 www.honeywell.com
AN218
www.honeywell.com 5
AN218
sensor areas, most falsing concerns come from nature- The temperature falsing occurs when the AMR sensor
made stimuli or adjacent lane vehicles bridge offsets change as the sensor permalloy thin films
change temperature. This tempco is nominally -3100
From Table 1 earlier in this document, adjacent lane parts per million per degree celsius (-3100ppm/°C). So a
falsing may be a matter of just setting magnetic shift 1.5 millivolt bridge offset at 25°C, becomes 1.48
threshold to the optimum amount of milligauss, and millivolts bridge offset at 30°C. The 20 microvolt shift
choosing a middle of lane location. One of worst-case with 5°C change in temperature may not seem a
traffic detection problems is a large truck in an adjacent problem, but it could result in a 20 milligauss equivalent
lane creating enough flux bending in an empty lane shift with a 3 volt bridge supply voltage. And with an
sensor to cause falsing. Figure 10 depicts this scenario. amplifier section gain of 200, that temperature change
could be a 4 millivolt change in analog output voltage.
Earth’s Field
6 www.honeywell.com
AN218
the ±25mV shift sensitivity, which approximately equates
VCC
to a 4 foot automotive detection distance based on
VCC nominal signature data in Table 1.
5
R1 R2
1100 1100 IN+
RG+ V+
VEHICLE DECTECTION USING DIGITAL
3
5 6
R6
X1
OUT
MICROCONTROLLERS
200 AD623 11
REF
R3 R4 4 RG- V-
1
VCC
Both the analog amplifier circuits from Figures 4 and 12
1100 1100 IN-
X3
are good enough for most vehicle detection applications,
1K
but better detection schemes can be implemented when
HMC1021S
the mathematical power of digital microcontrollers are
SR C1 VCC
R5
7.7
0.1U VCC
used. Figure 13 is a typical schematic of digital vehicle
R8 detection system using a HMC1052L and PIC16 micro
10K
R7 X5A
4.7K LM393T
VCC controller.
VCC 10
VOUT 8
VEE
VCC
R13 PIC16XX
R9 1.50MEG
200 R1 R2
X5B VCC 1100 1100 R11
LM393T 4.99K VCC
VCC
R10 5 6
10K 1 VCC
VEE
9 4 A0
VEE
3 X1
R3 R4 R12 TLC2272T1
1100 1100 4.99K
R14
1.5MEG
Figure 12 - Simple Vehicle Detection Circuit HMC1052L X4 8
POT10K
10 VCC
In the figure, the low cost instrumentation amplifier R5
4.5 R15
VCC
(AD623) is gained for 500V/V, and the 1k-ohm 221
VDD
potentiometer on the amplifier’s reference pin permits X6
IRF7509P
11
www.honeywell.com 7
AN218
be factory adjusted once for bridge offset. Once set, all zero gauss trim value. Thus counts below 512 are
drifts for thermal and earth’s magnetic field bias will be negative numbers and are likely represented by two’s
handled by the PIC16XX microcontroller and its complemented digital values. So a typical firmware
multiplexed 10-bit ADC. routine will make the sensor data acquisitions, subtract
512 counts to zero the latest data, and compare against
This circuit is assumed to be operating at 5 volts, so the the threshold values for a vehicle detection decision
±1 gauss input range equates to ±5mV at the sensors, (yes/no). After the decision, new thresholds are
and ±1.5 volts at the PIC16XX ADC inputs. The 10k pot computed based on new to previous sensor sampled
will then be set for 2.5 volts, given a zero field on the counts.
sensor bridges. Then the remaining volt to the supply
rails is for thermal drift, amplifier rail backoffs, and X
ADC
magnetic signature peaks. The reference of PIC16XX is counts
shown generically since the designer could use any
variant of the PIC 16 series family, or any other 642
equivalent brand or series microcontroller. 632
622
8 www.honeywell.com
R11 VCC
10.0K
Q1
A0
12
VCC C1
2N2907
R12 0.1U R18 VCC VDD
42.4K 10K
6 1K IN+
13 X9C102 RG+ V+ R16 R17
R1 R2 3 VCC
28
INC X1x 1K 10K
850 850
OUT
25
U/D AD623 17 21 19
µC
REF VCC
5 27 VREF 20
VEE
26 VCC
Reset RG- V-
4
1
IN- 18
INC
D2 X4 D1
R3 R4 U/D 23
1N914 TLC2272T5 1N914
R14 850 850
7.50 C3
10K Reset 24
1U
15 X9C103
HMC1001
7 7
R5
1.5 D0
C2
0.01U VCC D5
VCC
14 VCC
X10
R7 X5A
VEE
VCC VCC
TLC2272T5
X1 4.7K LM393T
R15 TLC2272T5 10 30
VCC
22.1K
VCC R19
VOUT 8
VEE VEE
1MEG
VREF
VCC 9 29
R13 C4
330 10U R20
R23 10K
1K
VCC
VREF
R21
R24
VCC
10K R22
1MEG
1K VEE
X11 32 VREF
TLC2272T5 X3 D7 VSS
1MEG
VCC
Figure 16 - Mixed Signal Vehicle Detection Circuit implemented by the R16/C3 network to limit bandwidth
to low audio frequency signals that would likely be the
From the figure, several new features are introduced. fastest vehicle signature movement in the sensor.
The first is the constant current source drive of the
HMC1001 sensor bridge. The HMC1001 is Honeywell’s The next new feature is the full wave rectifier circuit after
most sensitive AMR sensor, but has a slightly lower the amplifier stage to fold back any negative shifted
bridge resistance (850 ohms) and has larger permalloy signal with vehicle approach. This allows for a single
elements to provide a nominal 3.2mV/V/gauss threshold detection scheme instead creating a window
sensitivity. By feeding the HMC1001 with about 4.7mA, detector presented in Figure 12.
room temperature voltage across the bridge is about 4
volts from the total 5 volt supply range. The intent of the Following the rectifier, the filtered and rectified vehicle
constant current source is to further stabilize the bridge signature signal is directly placed to the comparator for
offset drift specification from about 3000ppm/°C to threshold detection. The other comparator input comes
600ppm/°C. This reduction in thermal drift allows for less from two op-amp stages that form an analog adaptive
total drift and more drift compensation focus on the threshold circuit. The vehicle signature signal is
earth’s bias field drift. drastically filtered by R-C network R19/C4 to create the
slow drifting baseline bias that will track slow bridge
Another new feature is the implementation of two offset voltage and earth’s magnetic field drifts with a
digitally controlled potentiometers around the several second time constant. This voltage is then
instrumentation amplifier. This allows the microcontroller buffered and then sent to a summing amplifier stage that
to sample the post-amplifier output and make gain and sums the voltage from the slow drift signal plus a DC
offset voltage adjustments for optimum performance. voltage that becomes the milli-volt threshold for vehicle
Part of the amplifier circuitt is the output low-pass filter detection. The one mega-ohm potentiometer is adjusted
for best vehicle detection distance and falsing rejection.
AN218
The output of the comparator is the normally high logic usage. Figure 17 shows a typical depiction of in-roadbed
vehicle detect signal can be used to trigger further sensor locations to track customer vehicles from order-
control system inputs for the chosen application. Note taking, to payment, to service delivery positions.
that the microcontroller only is used to handle
Intercom
maintanance functions, and does not have a lag time
other than the filters chosen in the circuits. While 1
complex in implementation, the Figure 16 circuit is in Menu
Board
Purchase
Window
Food
Service
fairly common usage for traffic detection and railroad
crossing type applications.
Sensor Positions
2
Driveway
While the bridge element resistance in the sensors is
moderately low impedance and difficult to constrain
power consumption, some tactics are available to keep Figure 17 - Fast Food Vehicle Detection Example
power or energy consumption low for battery operated
designs. The tactic is to lower power supply voltage to Automatic door and gatekeeping can be made simple
the 2.7 to 3.3 volt battery supply range. This can be and low cost using AMR sensors by recording
accomplished by careful selection of amplifiers, ADCs, background field levels and controlling for vehicle-
and microcontrollers optimized for low current draw as waiting and vehicle parked logical decisions. A classic
well as low voltage operation. example is overhead door lifting for factory forklift transit
through door thresholds.
Another tactic is to determine a sampling method for
vehicle detection by using the microcontroller example With Traffic Monitoring, vehicle detection ranges from
circuit and by choosing the minimum amount of samples simple inductive loop replacement to multi-lane speed
per second. Since the AMR sensors have a 5MHz and direction sensing for ITS networks. Both wired and
bandwidth and are almost completely resistive, the wireless sensor mounts would apply in this application.
settling time for snapshot measurments are in the
nanoseconds. By powering-on the vehicle detection Parking space and parking meter applications have
amplifers and sensors, and letting them settle for a similar constraints for low-cost and reliable
millisecond or less, you can “duty cycle” down the total presence/absence detection of stationary vehicles.
energy expended and still have quality magnetic Figure 18 shows a typical parking meter arrangement
signature measurements without expending much with three possible sensor locations.
battery capacity. Preferred Vehicle
Sensor Location
Parking Meter
SUMMARY
The need for smart sensors in Intelligent Traffic Systems
(ITS) and related applications makes these AMR
sensors very good candidates for vehicle presence,
speed, and direction data gathering. Compared to Curb
In the railroad crossing application, AMR sensors can Honeywell provides extensive application engineering
easily detect locomotives from 20 meters away. This support for customers using the HMC family of magnetic
means very reliable detection from track roadbed sensors. For further questions, please call for
positions. applications support at 800-323-8295 (USA toll free) or
763-954-2474 or visit our website at
The drive-through retail application for vehicle detection www.magneticsensors.com.
and tracking has been exploding in recent years, and the
amount of data precision is forcing better technology