AN213 Set Reset Function of Magnetic Sensors
AN213 Set Reset Function of Magnetic Sensors
SENSOR PRODUCTS
APPLICATION NOTE
Pulse Source
S/R-
Given: HMC1021 sensor and an industrial temperature
range of –40°C to +85°C.
Or
C1
.15U
Rsr
E = 39.6 erg (1 Joule = 1E7 erg) 3 5 Ireset
1 2
Note this is not power (Watts), but energy (Watt- 3 3
C2 0
second or Joules). This small number means that the 0
V2
.15U
V1
0
circuit is delivering many hundreds of milli-amperes,
but the duration of the pulses are so small that the 6
energy required is very small on a per pulse basis. H Bridge Drive Circuit
Figure 5
To show how a designer could allocate the set/reset Simple Bridge Circuit
pulse energy, take the 3.96 micro-Joule number and
work through some energy budget assumptions. For From the figure, sources V1 and V2 are combinations
example, a typical 3.0 volt lithium watch battery has a of charged capacitors and transistor switches that are
150mA-hour rated capacity. By multiplying the voltage timed to change voltage levels at the same moment,
by the capacity and converting hours to seconds, creating a double supply voltage swing across C1, C2,
1620 Watt-seconds or Joules is the result. A prudent and the set/reset strap resistance (Rsr). Since the
budget would be to allocate 10% of this capacity (162 capacitors can not suddenly change their voltage, all
Joules) to set and reset pulses. Also, an assumption of the voltage change is across Rsr until C1 and C2
can be made that a watch battery in a watch/compass begin to store a charge. With 3 volts as the supply,
application would be replaced in a nominal 2 year then 6 volts is theoretically available for the strap.
increment. So 162 Joules divided by the 3.96 micro-
0
of the pulse decay is 0.8 microseconds and is close to
the one microsecond or more guideline. In actuality,
-5
the resistive losses in the 2N2222 BJT and the C1 and
-10 Bridge
Offset C2 capacitors will accrue with the strap resistance to
-15
Voltage
make the time constant greater than one microsecond.
-20
-6.0 -3.0 0.0 3.0 6.0 The speed of which this circuit can repeat the set
Applied Field (gauss) pulses is driven by the resistor R4 and capacitors C1
Figure 6 and C2. These set up a 44 millisecond time constant,
Sensitivity Graph so that five time constants (220 milliseconds) would
allow the capacitors to fully recharge before dumping
Figure 7 shows a simple set – set – set, or set only again into the set/reset strap. During this recharge
circuit implementation using a single Bipolar Junction period non-critical sensor measurements could be
Transistor (BJT). When driven by a microcontroller made, but it is recommended that the recharge be
logic line, a low to high logic transistion will strongly completed before making precise measurements. With
bias on (saturate) the BJT bringing its collector down 220 milliseconds between measurements, R4’s value
to within 200 mill-volts of its grounded emitter. This permits only about five measurements per second.
sudden collector swing from Vcc (~3.0 volts) to 0.2 This value also limits the peak circuit current draw to
volts level shifts fully charged capacitors C1 and C2 only about 14mA, which is a reasonable maximum
causing a voltage across the set/reset strap until the current when using coin cell lithium batteries.
capacitors discharge down to the BJT saturation
voltage. The resulting strap voltage results in a current The remaining components C3 and R3 have their
spike that decays as a function of the total capacitance values derived from the microcontroller interface and
Solid State Electronics Center • www.magneticsensors.com • (800) 323-8295 • Page 5
AN213
SENSOR PRODUCTS
the input current needs of the BJT. With a nominal
beta of the 2N2222 being 200 and about a 600mA The IRF7509 part has a couple amperes continuous
peak pulse current from the BJT collector, a 3mA peak drain current rating, appropriate drain-to-source
pulse is needed into the 2N2222’s base. With a voltage rating (Vds >= 5.5 volts), a 5-volt logic gate
nominal microcontroller logic state rise-time of 100 drive compatibility, and on-resistances of 270 milli-
nanoseconds or better, the 0.1uf value of C3 looks like ohms or less. The set/reset strap load in figure is
a near short compared to BJT base current running chosen as two HMC102X straps at nominal
through it. R3’s resistance is chosen in combination resistances of 7.5 ohms for a 3.75-ohm total load
with C3’s capacitance to turn off the BJT completely resistance, and each strap requiring at least 0.5
after the set pulse. A wide range of values could be amperes of peak current.
used, but 220-ohms is chosen to create a 22
microsecond shutoff time constant, or five time With the input logic voltage source (Vsr) initially held at
constants later (110Psec) to complete base drive a high logic level state (Vsr >= 4.5 volts), the N-
shutoff. This value is chosen to be very small in channel MOSFET X2 is fully “on” and effectively
comparison to the C1, C2 recharge time, but large grounding the series circuit of C1, C2, Rsr1, and Rsr2.
relative to the set pulse duration. As the input logic source transitions to a low logic level
(Vsr <= 0.5 volts) MOSFET X2 turns off opening up
TOTEM POLE SET/RESET CIRCUIT the strap resistances, while MOSFET X1 goes from its
“off” state to its “on” state pulling the series R-C circuit
The next circuit implementation is the classic set/reset suddenly toward the Vdd level kept by the node of
design in which a push-pull output stage (totem pole X1’s source and C3-R1. Again because C1 and C2
stage) drives one end of the set/reset strap, with the have near zero voltage initially, the sudden pull from
other end grounded. Figure 8 shows this circuit. ground to Vdd causes all the voltage to be presented
to the straps Rsr1 and Rsr2 less any series resistance
C3
voltage drop on P-channel MOSFET X1. This
R1
1U 220
Vdd = 5v
becomes the reset spike and the current flows into the
5 negative pins of Rsr1 and Rsr2.
4
X1
As the reset pulse decays, capacitor C3 dumps part of
IRF7509P
5v
R its charge down through MOSFET X1 and into C1, C2,
3
C1
0.1U 0
Rsr1, and Rsr2. Eventually capacitors C1 and C2
R S
5v
1 2 -5v S
accumulate a full charge of near Vdd and C3 begins to
0 Y1
volts recharge as well. During the stable time of all three
- -
Vsr Rsr1 Rsr2 capacitors, a sensor measurement can be taken with
C2 7.5 7.5
0.1U the knowledge that the result will be in the opposite
X2 + +
IRF7509N polarity of bridge output voltage to direction of
magnetic field input (sensitive axis component).
10U Vdd
with selecting C1 and C2 for the pulse time constant 1000
Q1
with total strap load resistance provided. The choice of 3 2N2222 2
R2 Rsr3
Values for C3 and R1 are driven by C3 having many C3
1N 1000
0.22U
1.8