an218 vehicle detection using amr sensors

Upload: indra-panggalo

Post on 03-Apr-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 AN218 Vehicle Detection Using AMR Sensors

    1/10

    Application Note AN218Vehicle Detection Using AMR Sensors

    ABSTRACT

    The ever increasing need for automated vehicle sensing

    has brought about interest in Honeywells AnisotropicMagneto-Resistive (AMR) sensors as an upgrade fromolder and simpler vehicle detection systems. With thesmall size and simplicity of these wheatstone bridgebased sensors, many applications are now able todeploy many of these sensors cost-effectively, and gainmore information on nearby vehicles. This applicationnote shall describe the various applications of vehicledetection, the various hardware and software techniquesof vehicle detection, and a couple example designsdescribing AMR sensor integration and operation forpotential designers.

    VEHICLE DETECTION APPLICATIONS

    Vehicle detection technology has evolved quite a bit inthe last couple decades. From air hoses to inductiveloops embedded in roadways, most legacy detectionmethods were concentrated on getting vehicle presenceinformation to a decision making set of control systems.

    Today we want so much more information; andinformation such as speed and direction of traffic, thequantity of vehicles per time on a stretch of pavement, or

    just very reliable presence or absence of a class ofvehicles.

    Appealing to the fact that almost all road vehicles havesignificant amounts of ferrous metals in their chassis(iron, steel, nickel, cobalt, etc.), magnetic sensors are agood candidate for detecting vehicles. Today, mostmagnetic sensor technologies are fairly miniature in size,and thanks to solid state technology, both the size andthe electrical interfacing have improved to makeintegration easier.

    But not all vehicles emit magnetic fields that magneticsensors could use in detection. This fact eliminates mosthigh field magnetic field sensing devices like Hall Effectsensors. But mother-nature provides us with earths

    magnetic field that permeates everything between thesouth and north magnetic poles. The earths magneticfield is around a half-gauss in magnetic flux density; solow field magnetic sensors are used to pickup this field,and also the field disturbances that nearby vehicles willcreate. Figure 1 shows a good graphical example of thelines of flux from the earth between the magnetic poles,and the bending they receive as they penetrate a typicalvehicle with ferrous metals.

    As the lines of magnetic flux group together(concentrate) or spread out (deconcentrate), a magnetic

    sensor placed nearby will be under the same magneticinfluence the vehicle creates to the earths fieldHowever because the sensor is not intimate to the

    surface or interior of the vehicle, it does not get the samefidelity of concentration or deconcentration. And withincreasing standoff distance from the vehicle, theamount of flux density change with vehicle presencedrops of at an exponential rate. This is good and baddepending on your design concerns. If detectiondistance is highest priority, a high drop-off in flux densityis bad. However, if not false detecting an adjacent laneor vehicle in the adjacent parking spot, a high drop-off influx density change is very good news.

    Typical vehicle detection applications using magneticsensors and earths field are:

    Railroad Crossing Control (for trains) Drive Through Retail (Banking, Fast-Food, etc.)

    Automatic Door/Gate Opening

    Traffic Monitoring (Speed, Direction)

    Parking Lot Space Detection

    Parking Meters

    Figure 1 - Earths Magnetic Field Through Vehicle

    MAGNETIC SENSOR HARDWARE

    Low field magnetic sensors come in two categoriesmagnetoresistive bridges, and coils. While coils cancreate magneto-inductive and flux-gate magneticsensors, in general they tend to be larger in size, andrequired active oscillator circuits to determine theamount of magnetic flux influencing the coil(s). With

    magnetoresistive sensors, two types are availablecalled AMR and GMR. AMR or Anisotropic MagnetoResistive sensors are directional sensors and provideonly an amplitude response to magnetic fields in theisensitive axis. By combining AMR sensors into two othree axis configurations, a two or three dimensionameasurement of the magnetic fields passing through thesensors is possible with excellent linearity.

    GMR or Giant Magneto-Resistive sensors can also beused for low magnetic field sensing, but have a broadsensitivity to amplitudes with little directionality. Fo

  • 7/28/2019 AN218 Vehicle Detection Using AMR Sensors

    2/10

    AN218

    2 www.honeywell.com

    vehicle detection, GMR sensors must have a nearbymagnetic bias field, from either a permanent magnet orDC driven solenoid to gain improved linearity. In thefollowing discussions, we will confine discussion to AMRsensors for vehicle detection applications.For AMR sensors, the sensor resistive elements areoriented as a resistive wheatstone bridge that variesresistance slightly as the magnetic field changes uponeach element. The resistive elements are made ofpermalloy thin films and have around 1000 ohms ofresistance, but each element is precision matched towithin an ohm of each other when no magnetic fields arepresent. Figure 2 shows a typical AMR sensorwheatstone bridge electrical diagram.

    Figure 2 - AMR Sensor Bridge

    Each bridge has four resistive elements with oppositeelements being identical. For example, if the bridgereceives a positive magnetic field or lines of magneticflux in the sensitive axis, the Vb to Out+ and Out- toGND elements will slightly decrease in resistance whilethe other two elements will increase in resistance. Theresult will be that the voltage at Out+ increases aboveVb/2 and the voltage at Out- decreases from Vb/2. If thebridge voltage, or Vb, equals 5 volts and the applied

    magnetic flux is 0.5 gauss, the nominal voltage at Out+is 2.5012 volts and the nominal voltage at Out- is 2.4988volts.

    The amount output voltage from the AMR sensor ismeasured from Out+ to Out- and is a function of thesensor sensitivity equation, or:

    Out+- Out- =S * Vb * Bs with,S =Sensitivity (nominally 1mV/V/gauss)Vb =Bridge Supply Voltage in voltsBs =Bridge Applied Magnetic Flux in gauss

    In the above example, a 5 volt supplied bridge with a 0.5gauss magnetic flux in the sensitive axis, creates 2.5milli-volts of bridge output voltage.

    By combining two AMR sensors together, the parbecomes a 2-axis sensor and when mountedhorizontally, is able to break any horizontal magneticfields into X and Y vector components. Figure 3 showsthis sensor combination in the Honeywell HMC1022sensor product.

    Figure 3 - 2-Axis Magnetic Field Sensing

    If magnetic field, Bs, is the earths magnetic field in thehorizontal direction, the sensors in the HMC1022integrated circuit package break the field down into Bxand By vector components. This way Bx and Byrepresent both the direction and amplitude of Bs. Fovehicle detection, the direction and amplitude of Bs

    could change as the vehicle approaches the sensors inthe HMC1022 package. While a single AMR sensor (likethe HMC1021) could note a shift of a single axis, having2-axis sensors could more reliably detect vehicles at theedge of the detection range and provide an alorientation assurance in detection.

    As you will see in succeeding sections, the choice oone, two, or three-axis magnetic field sensing is a tradeoff in performance versus cost. The single axis systemwill require only one sensor, one set of sensor interfaceelectronics, and one input to digitize and place into athreshold detection algorithm. Using parts like the

    HMC1022, or the HMC1052 and HMC1053 multi-axissensors provides extra axis for mounting flexibility.

    MAGNETIC SENSOR INTERFACE CIRCUITS

    Because the AMR sensor outputs are in small millivollevels given earths magnetic field strengths, thesewheatstone bridge sensors require follow-onamplification to make vehicle induced field changeseasier to detect. With the differential output of thesensors, each sensor requires a differential o

    Vb

    GND

    Out+ Out-

    Magnetic

    Sensitive

    Ax is

    Magnetic

    Easy

    AxisPermalloy

    Thin Film

    Bridge

    Current

    AMR

    Bridge

    Vb

    GND

    Out+ Out-

    Magnetic

    Sensitive

    Ax is

    Magnetic

    Easy

    AxisPermalloy

    Thin Film

    Bridge

    Current

    AMR

    Bridge

    X Y

    HMC1022

    Applied Magnetic Field

    Arrows IndicateSensor Sensitive

    Axis

    Bs Bx

    By

    X YX Y

    HMC1022

    Applied Magnetic Field

    Arrows IndicateSensor Sensitive

    Axis

    Bs Bx

    By

  • 7/28/2019 AN218 Vehicle Detection Using AMR Sensors

    3/10

    AN218

    www.honeywell.com 3

    instrumentation amplifier stage compatible with thesensor output voltages and the sensor bridge supplyvoltage. Typically, these amplifier stages will operatefrom either 4.8 to 5.2, or 2.7 to 3.3 volt power supplyrails to conserve energy in battery applications, or highervoltages if supplied from non-portable sources. As youcan see from the sensitivity equation, bridge supplyvoltages help amplify the signal. But running the sensorsbeyond 5 volts also puts more milliwatts of heat onto thebridge elements making thermal drift effects morenoticeable. Figure 4 shows a typical sensor interfacecircuit schematic.

    Figure 4 - AMR Sensor Amplification

    As shown, a common low voltage operational amplifier(LMV358 op-amp) is depicted with four 1% tolerancemetal film resistors to create a 200V/V gain differenceamplifier. A dedicated instrumentation amplifier canreplace the op-amp and resistors for simpler control overgain and offset voltage at the expense of a bit more costfor the amplifier. This circuit takes the difference in

    voltage of the sensor OUT+and OUT- nodes, and thenamplifies the result as a bias voltage value from theoffset voltage reference. The offset voltage reference willbe node voltage on the wiper of the offset trimpotentiometer.

    As an example, let the sensitive axis field of the sensorin Figure 4 be 0.5 gauss with a bridge and amplifierpower supply rail (Vcc) be 3.0 volts. Because of the1.0mV/V/gauss sensitivity of the HMC1021, thedifferential output voltage of the sensor will be +1.5millivolts. As applied to the amplifier with a gain of 200,the amplifier output will be 300 millivolts positive from theoffset reference voltage. Given an offset voltage of halfsupply (1.5 volts), the measured output voltage at theamplifier would be about 1.80 volts.

    Because the AMR sensors are not perfectly matched atthe resistive elements, a bridge offset voltage results;and is different for each sensor manufactured. Howeverthe good news is that this offset is fixed for the parts lifewith the remaining drift due to temperature changing theresistance of the bridge elements. This bridge offsetvoltage is dependant on the bridge supply voltage and isscaled on a millivolts per bridge voltage (mV/V). For the

    HMC102X family of sensors, the specified range obridge offset is about 2mV/V with normal distribution ounder the 0.5mV/V range. Using the Figure 4 circuiexample previously, a -0.5mV/V bridge offset on a 3 volpower supply provides a -1.5 millivolt output offset, or a 300 millivolt offset at the amplifier. To null this offset, onemethod is move the offset reference voltage from 1.5volts to 1.8 volts to counter the bridge offset. For furtheoffset reduction methods, see application note AN212 onthe magneticsensors.com website.

    Honeywell AMR sensors also have patented coilsinterleaved with the bridge elements for many purposes

    These coils are intended for creating a magnetic offsetfield, or to re-align the magnetic domains of thepermalloy thin film with the easy axis after excessivemagnetic fields upset the sensor magnetic domaindirection. These coils are called the offset strap and theset/reset strap as they have minimal inductance andelectrically thought of as resistive elements with theamp-turns aspect of the coils applying localized fields onthe sensors. Figure 5 shows the schematicrepresentation of the HMC1022 sensor with its straps.

    Figure 5 - HMR1022 With Straps Shown

    The offset straps convert currents through the strapresistance into a local magnetic field upon the bridgeelements in the sensitive axis direction. By creatingmagnetic offset fields, the sensor bridges will sum both

    the desired magnetic far field and the offset strapproduced field to buck, boost, or just center up thesummed fields for best amplification and signaprocessing. A majority of vehicle detection applicationsdo not use the offset straps, and may be left opencircuited if not used.

    The set/reset straps are intended for pulsed currents todegauss or de-perm the sensor bridges as required toavoid sensor performance degradation after exposure toaccidental high magnetic fields. These high fields are

    HMC1021

    U1Vcc

    Vcc

    4.99k

    4.99k

    1.00M

    1.00M

    LMV358

    .01f

    U2

    5.0v

    +-

    output

    OUT+

    OUT-

    Vb

    GND

    10k 10k10k

    Offset trimHMC1021

    U1Vcc

    Vcc

    4.99k

    4.99k

    1.00M

    1.00M

    LMV358

    .01f

    U2

    5.0v

    +-

    output

    OUT+

    OUT-

    Vb

    GND

    10k 10k10k

    Offset trim

    HMC1022

    U1

    Vb(A)

    offset

    strap

    set/reset strap

    Vb(B)

    GND(A)

    GND(B)

    offsetstrap

    set/reset strap

    OFF+(A)

    OFF+(B)

    OFF-(A)

    OFF-(B)

    S/R+(A)

    S/R+(B)

    S/R-(A)

    S/R-(B)

    OUT+(A)

    OUT+(B)

    OUT-(A)

    OUT-(B)

    A and BSensor Bridg

    Denoted by

    (A) Or (B) Su

    HMC1022

    U1

    Vb(A)

    offset

    strap

    set/reset strap

    Vb(B)

    GND(A)

    GND(B)

    offsetstrap

    set/reset strap

    OFF+(A)

    OFF+(B)

    OFF-(A)

    OFF-(B)

    S/R+(A)

    S/R+(B)

    S/R-(A)

    S/R-(B)

    OUT+(A)

    OUT+(B)

    OUT-(A)

    OUT-(B)

    A and BSensor Bridg

    Denoted by

    (A) Or (B) Su

  • 7/28/2019 AN218 Vehicle Detection Using AMR Sensors

    4/10

    AN218

    4 www.honeywell.com

    generally in excess of 10 gauss at the bridges, andtypically caused by magnetized hand tools, permanentmagnets, portable electric motors, and high current wiressuch as welding cables. By periodically sendingmoderate current pulses at convenient intervals, thepermalloy thin film magnetic domains get re-aligned inthe easy axis directions and the memory of the upsetfield direction is erased. This process is much likeerasing audio recording tape since they both employpermalloy films.

    Application note AN213 describes the set/reset strapfeature in detail with typical pulse drive circuits. Forvehicle detection applications, a periodic repetition ofreset followed by set pulses is recommended at onesecond to minute intervals. Should the sensors bemagnetically upset via high field exposure, the exposurecould result in reduced sensitivity, or no change insensor voltages (stuck sensors), until the set/resetstraps are pulsed. Figure 6 shows a typical singleset/reset strap drive circuit optimized for 5 volt suppliesand a HMC1021 set/reset strap.

    Figure 6 - Set/Reset Strap Driver Circuit

    VEHICLE DETECTION SIGNATURES

    Using the earths magnetic field provides a magneticbackground or bias point that stays substantially

    constant with a fixed sensor installation. With the earthsmagnetic field strength at about 0.5 gauss and furtherreduced to just a single axis amount from a possiblethree-axis orientation, each sensor may have signalranging from near zero gauss to 0.7 gauss in naturalearth signal dynamic range. As vehicles come intoproximity to the sensor, the shift from the earths fieldlevels comes from both soft and hard-iron sources fromthe vehicle. Soft-iron is ferrous materials thatconcentrate magnetic flux into the material and do nothave any remnant flux generated within the material.Hard-iron sources are materials that have flux

    concentration abilities and can have remnant fluxgeneration abilities. While the flux density could be in thehundreds of gauss, most vehicles with hard-iron carrymuch less than 2 gauss of remnant flux due tostamping of the chassis metals.

    Soft-irons will concentrate the earths magnetic flux, butypically will only increase the flux amplitude less thanhalf the residual bias value at the sensor location. And ithe fields are concentrated in the soft-iron, then theytend to de-concentrate the flux perpendicular to the fielddirection as shown in Figure 1. So the magnetic sensorswill likely see a few tens to hundreds of milligauss oearths field bias with up to 3 gauss of spikes asstatistically typical vehicles come into proximity with thesensors. Vehicle detection product designers are nolikely to care about the dynamic peaks of the vehicleinduced magnetic signatures, but are likely to design in a1 gauss dynamic range and use sudden shifts from thebias values as vehicle detection criteria.

    Figure 7 - Vehicle Signature

    The above figure shows a typical North Americanmagnetic field direction with the truck movingsouthbound. The green boxes represent possible sensolocations near the roadbed and the relative amounts oflux concentration they could sense. The adjoining graphshows what a signal axis sensor bridge might see whenit has the sensitive axis also pointing southbound and asthe truck drives past the sensor. Since the naturaearths magnetic field would bias the sensors with aslight negative voltage output, increasing fluxconcentration would further lower the voltage, anddecreasing concentration would raise the voltage.

    Sensors oriented sideways (horizontal, across theroadbed) and vertical would likely also shift during the

    vehicle passage, but the bias values and signature shiftswould be different. For most applications, the amplitudeand direction of voltage shift is not important, but thedetection of a significant shift in output voltage is whawould matter most. For vehicle presence applicationsthe vector magnitude shift from the earths magneticfield would be the most reliable method. Using digitizedmeasurements of three-axis sensor outputs afteamplification, the vector magnitude would be:

    A =SQRT ( X2+Y

    2+Z

    2)

    1

    3

    4

    X1IRF7509P

    X2IRF7509N

    2

    C10.1U

    C2

    0.1U

    5

    R1220 Vdd

    C3

    1U

    Rsr17.5

    Rsr27.5

    Vsr

    0

    5vR S

    +

    -

    0

    5vR

    S-5v

    =5v

    set/resetstrap

    4.6 ohms

    S/R-

    S/R+

    Roadbe

    SENSOR LOCATION EFFECTS

    Normal NormalDeconcentrated DeconcentratedConcentrated ConcentratedDeconcentrated

    PositionSensor Signature of Vehicle

    Earths Field Bias

    Roadbe

    SENSOR LOCATION EFFECTS

    Normal NormalDeconcentrated DeconcentratedConcentrated ConcentratedDeconcentrated

    PositionSensor Signature of Vehicle

    Earths Field Bias

  • 7/28/2019 AN218 Vehicle Detection Using AMR Sensors

    5/10

    AN218

    www.honeywell.com 5

    As a vehicle parks alongside or overtop the magneticsensor location, the magnitude would shift suddenly fromthe earths bias (no-vehicle) magnitude. This would bemost applicable for parking meters, parking spaceoccupancy, door openers, and drive through serviceprompting.

    Note that the amount of sensor output shift has a largedependance on proximity of the sensors to the vehicle.As the vehicle is within inches of the sensor, such as onthe middle of the roadbed lane at the surface; thesignature will have quite a bit detail and will pickup theintricacies of the ferrous construction of the vehiclechassis. Further away, such as one meter, the vehiclesignature may be a tenth in magnitude depending on thevehicle size and the signature bandwidth looks more asa flux contration hump than a squiggle. As the distanceincreases the signature changes from flux concentrationto deconcentration to returning to the baseline. Table 1shows a typical automotive magnitude (flux density)versus sensor standoff distance.

    Standoff Distance Flux Density Shift1 foot 270 milligauss3 foot 75 milligauss5 foot 10 milligauss10 foot 2 milligauss12 foot

  • 7/28/2019 AN218 Vehicle Detection Using AMR Sensors

    6/10

    AN218

    6 www.honeywell.com

    sensor areas, most falsing concerns come from nature-made stimuli or adjacent lane vehicles

    From Table 1 earlier in this document, adjacent lanefalsing may be a matter of just setting magnetic shiftthreshold to the optimum amount of milligauss, andchoosing a middle of lane location. One of worst-casetraffic detection problems is a large truck in an adjacentlane creating enough flux bending in an empty lanesensor to cause falsing. Figure 10 depicts this scenario.

    Figure 10 - Adjacent Lane Falsing

    If the road is only two lanes wide, you may be able toslightly locate the sensor assemblies toward the outerlane edges to gain a bit of falsing rejection. The otherchallenge in setting the flux shift threshold is that toolarge of a threshold may prevent desired vehicles, suchas motorcyles and a small autos with a lot of compositechassis from being detected.

    Another falsing scenario comes form the fact that mothernature will vary the earths field amplitude by smallamounts day-to-day and minute-to-minute. While acouple of milligauss shift is fine with magnetic sensors

    used as a compass, vehicle detection systems maytrigger falsely if they can not discriminate for naturaldrifts. Either via analog signal processing, or detectionalgorithm software; small, slow changes in earthsmagnetic field values should be rejected. Softwarealgorithms should be able to continuously update thebias values to ensure the threshold stays the correctamount apart from the bias values for each axis. Analogcircuits can implement slow time-constant thresholdvoltages in the vehicle detect comparator signalprocessing to reject slow signature shifts and trigger onlyon fast rising voltages.

    A third falsing scenario occurs when temperature on theAMR sensor changes rapidly. The worst-case scenariois on summer partly cloudy days when the sun comesout of the clouds and suddenly begins baking thehousing containing the sensors. While reasonablethermal design of enclosures will help, other electricaltechniques will additionaly help prevent falsing.

    The temperature falsing occurs when the AMR sensobridge offsets change as the sensor permalloy thin filmschange temperature. This tempco is nominally -3100parts per million per degree celsius (-3100ppm/C). So a1.5 millivolt bridge offset at 25C, becomes 1.48millivolts bridge offset at 30C. The 20 microvolt shifwith 5C change in temperature may not seem aproblem, but it could result in a 20 milligauss equivalenshift with a 3 volt bridge supply voltage. And with anamplifier section gain of 200, that temperature changecould be a 4 millivolt change in analog output voltage.

    As mentioned earlier in this application note, you canuse the set/reset function for many uses. By takingmagnetic field measurements after the reset pulse(reverse polarity), and the set pulse (normal polarity); thesum of the measurements subtracts off the externamagnetic field influences, leaving twice the bridge offsevoltage. Then dividing by two retrieves the most recenbridge offset at the current temperature. By doing theset/reset pulses at every few second intervals, suddenheating or cooling effects on sensor bridge offset aredetected and corrected. Figure 11 shows the typica

    scenario.

    Figure 11 - Thermal Falsing Effects

    SIMPLE VEHICLE DETECTION CIRCUIT

    As a way to ease into vehicle detection circuit design, asimple one-axis, all analog circuitry example will bedescribed below. Choosing a HMC1021S for simplesprototyping, Figure 12 shows the typical schematicdiagram for this circuit.

    Taking recommendation from earlier in this applicationnote, a 1 gauss dynamic range is recommended, and

    with a 5 volt bridge supply on the HMC1021S, a 5mVoutput would result. To span a 5 volt supply, a gain o500 would permit 2.5 volts outputs centered at 2.5 volts(zero gauss point). The HMC1021S can be substitutedwith any of the HMC102X, HMC104X, and HMC105Xfamilies of magnetic sensor components; as all have the1mV/V/gauss sensitivity specification.

    Bridge Offset Voltage

    Sensor Housing Temperature

    Thermal Lag Time

    Clouds Clouds CloudsSunny Sunny Sun

    A PARTLY CLOUDY DAY

    Bridge Offset Voltage

    Sensor Housing Temperature

    Thermal Lag Time

    Clouds Clouds CloudsSunny Sunny Sun

    Bridge Offset Voltage

    Sensor Housing Temperature

    Thermal Lag Time

    Clouds Clouds CloudsSunny Sunny Sun

    A PARTLY CLOUDY DAY

    Earths F ield

    Sensor 1

    Sensor 2

    Potential Falsed Sensorfrom Adjacent Lane Truck

    Earths F ield

    Sensor 1

    Sensor 2

    Potential Falsed Sensorfrom Adjacent Lane Truck

  • 7/28/2019 AN218 Vehicle Detection Using AMR Sensors

    7/10

  • 7/28/2019 AN218 Vehicle Detection Using AMR Sensors

    8/10

    AN218

    8 www.honeywell.com

    be factory adjusted once for bridge offset. Once set, alldrifts for thermal and earths magnetic field bias will behandled by the PIC16XX microcontroller and itsmultiplexed 10-bit ADC.

    This circuit is assumed to be operating at 5 volts, so the1 gauss input range equates to 5mV at the sensors,and 1.5 volts at the PIC16XX ADC inputs. The 10k potwill then be set for 2.5 volts, given a zero field on thesensor bridges. Then the remaining volt to the supplyrails is for thermal drift, amplifier rail backoffs, andmagnetic signature peaks. The reference of PIC16XX isshown generically since the designer could use anyvariant of the PIC 16 series family, or any otherequivalent brand or series microcontroller.

    With a microcontroller, vehicle detection now becomesdiscontinuous, or sampled for a signal beyond the upperand lower thresholds. So the sampling interval must befast enough to catch the fastest expected vehicle speedpast the sensors. And this can become interesting fortraffic and drive-up service applications as multiplesensors are likely to be used with each fed into a

    multiplexed input of a microcontrollers internal ADC.

    Writing firmware for the vehicle detection algorithmsbecomes an application specific and usually aproprietary piece of code that may be patent protected.However, most designs will have the common issue ofdigitizing the sensor input voltages from the amplifiers,and comparing the latest data point with the thresholdnumbers. As a classic example, Figure 14 shows adetection algorithm plot with drift compensation.

    Figure 14 - Detection Algorithm

    A simple detection algorithm could just measure theearths field bias value and set upper and lowerthresholds based on a fixed amount for a desired

    detection range on a reference vehicle. But thermal driftsand magnetic field drifts could trigger a false detection,unless the thresholds are allowed to drift by an ADCcount or two with each sensor measurement. As avehicle approaches the sensor, the amount of ADCchange in counts will change faster than the driftcompensation algorithm can be allowed to shift, thusresulting in a valid vehicle detection.

    To better show how this works, a 10-bit ADC has 1024ADC counts, and typically count 512 is the nominal

    zero gauss trim value. Thus counts below 512 arenegative numbers and are likely represented by twoscomplemented digital values. So a typical firmwareroutine will make the sensor data acquisitions, subtrac512 counts to zero the latest data, and compare againsthe threshold values for a vehicle detection decision(yes/no). After the decision, new thresholds arecomputed based on new to previous sensor sampledcounts.

    Figure 15 - Digital Detection

    Using Figure 15 above, if the earths magnetic field biasis at 632 counts, or 120 counts above zero gauss; thenthreshold limits of 10 counts could be a reasonablegiven about 5mV per count, 300 counts per gauss, for a33 milli-gauss band of thresholds shown in the bluedots. Depending on the system noise, the thresholdbands are bandwidth limited by preventing no more thana certain amounts of counts shift per number of samples

    This permits real vehicle magnetic signatures to out-racethe change in thresholds to discriminate between driftsand and vehicles. The green logic output trace showsthe logical result when using adaptive or drifcompensating threshold detection.

    MIXED-SIGNAL VEHICLE DETECTION

    In the previous example circuit, the downside of usingdigital logic detection algorithms is that the continuoussensor output is broken into samples and applied to afirmware detection algorithm. But if your vehicles aremoving at high speeds, the detection is as only as goodas the slowest process, and that maybe too slow for thereaction time needed.

    To keep the detection continuous, an analog system canbe designed much like the simple detection circuit, buwith analog drift compensation for falsing rejectionFigure 16 shows a typical design example using aninstrumentation amplifier, op-amps, and comparators tocontinuously monitor the magnetic signal. Also amicrocontroller can be used to handle maintenancefunctions like periodic set/reset function, offset bias andgain adjustments, and detection distance adjustment.

    X

    t

    Threshold Tracking Algorithm Vehicle MagneticSignature

    Lower ThresholdBoundary

    Upper ThresholdBoundaryTU

    TLtracksdrift

    detection

    X

    t

    Threshold Tracking Algorithm Vehicle MagneticSignature

    Lower ThresholdBoundary

    Upper ThresholdBoundaryTU

    TLtracksdrift

    detection

    X

    t

    642

    622632

    512

    No Detect

    Detect

    ADCcounts

    0 gauss

    X

    t

    642

    622632

    512

    No Detect

    Detect

    ADCcounts

    0 gauss

  • 7/28/2019 AN218 Vehicle Detection Using AMR Sensors

    9/10

  • 7/28/2019 AN218 Vehicle Detection Using AMR Sensors

    10/10

    AN218

    10 www honeywell com

    The output of the comparator is the normally high logicvehicle detect signal can be used to trigger furthercontrol system inputs for the chosen application. Notethat the microcontroller only is used to handlemaintanance functions, and does not have a lag timeother than the filters chosen in the circuits. Whilecomplex in implementation, the Figure 16 circuit is infairly common usage for traffic detection and railroadcrossing type applications.

    LOW POWER VEHICLE DETECTION

    While the bridge element resistance in the sensors ismoderately low impedance and difficult to constrainpower consumption, some tactics are available to keeppower or energy consumption low for battery operateddesigns. The tactic is to lower power supply voltage tothe 2.7 to 3.3 volt battery supply range. This can beaccomplished by careful selection of amplifiers, ADCs,and microcontrollers optimized for low current draw aswell as low voltage operation.

    Another tactic is to determine a sampling method forvehicle detection by using the microcontroller examplecircuit and by choosing the minimum amount of samplesper second. Since the AMR sensors have a 5MHzbandwidth and are almost completely resistive, thesettling time for snapshot measurments are in thenanoseconds. By powering-on the vehicle detectionamplifers and sensors, and letting them settle for amillisecond or less, you can duty cycle down the totalenergy expended and still have quality magneticsignature measurements without expending muchbattery capacity.

    SUMMARY

    The need for smart sensors in Intelligent Traffic Systems(ITS) and related applications makes these AMRsensors very good candidates for vehicle presence,speed, and direction data gathering. Compared tooptical, ultrasonic, and inductive loop solutions, thesensors offer the possibility of very small sizeinstallations into and onto roadway structures for reliablefunction.

    In the railroad crossing application, AMR sensors caneasily detect locomotives from 20 meters away. Thismeans very reliable detection from track roadbed

    positions.

    The drive-through retail application for vehicle detectionand tracking has been exploding in recent years, and theamount of data precision is forcing better technology

    usage. Figure 17 shows a typical depiction of in-roadbedsensor locations to track customer vehicles from ordertaking, to payment, to service delivery positions.

    Figure 17 - Fast Food Vehicle Detection Example

    Automatic door and gatekeeping can be made simpleand low cost using AMR sensors by recordingbackground field levels and controlling for vehiclewaiting and vehicle parked logical decisions. A classicexample is overhead door lifting for factory forklift transthrough door thresholds.

    With Traffic Monitoring, vehicle detection ranges fromsimple inductive loop replacement to multi-lane speedand direction sensing for ITS networks. Both wired andwireless sensor mounts would apply in this application.

    Parking space and parking meter applications havesimilar constraints for low-cost and reliablepresence/absence detection of stationary vehiclesFigure 18 shows a typical parking meter arrangemenwith three possible sensor locations.

    Figure 18 - Parking Meter Sensing

    Honeywell provides extensive application engineeringsupport for customers using the HMC family of magneticsensors. For further questions, please call fo

    applications support at 800-323-8295 (USA toll free) o763-954-2474 or visit our website awww.magneticsensors.com.

    PurchaseWindow

    FoodService

    MenuBoard

    Driveway

    Intercom

    1

    2

    3 4 5 6

    Sensor Positions

    PurchaseWindow

    FoodService

    MenuBoard

    Driveway

    Intercom

    1

    2

    3 4 5 6

    Sensor Positions

    Preferred VehicleSensor Location

    Parking Meter

    Curb

    Pavement2nd Choice

    3rd Choice

    Preferred VehicleSensor Location

    Parking Meter

    Curb

    Pavement2nd Choice

    3rd Choice

    Aerospace Electronics SystemsDefense and Space Electronics SystemsHoneywell International Inc.12001 Highway 55Plymouth, MN 55441Tel: 800-323-8295

    www.honeywell.com

    Form #900325August 2005

    2005 Hone well International Inc.