The measured current has to flow through the package to produce any result.
Therefore, you have to cut the wire, and solder one end to one of the terminals, and the other end to the other terminal.
The nominal output is 1/2 Vcc, assuming you are using the birirectional variant. The datasheet states:
Datasheet, page 15
Quiescent output voltage (VIOUT(Q)). The output of the device when
the primary current is zero. For bidirectional devices, it nominally
remains at VCC ⁄ 2. Thus, VCC = 5 V translates into VIOUT(QBI) = 2.5
V. For unidirectional devices, it nomi- nally remains at 0.1 × VCC.
Thus, VCC = 5 V translates into VIOUT(QUNI) = 0.5 V. Variation in
VIOUT(Q) can be attributed to the resolution of the Allegro linear IC
quiescent voltage trim, magnetic hysteresis, and thermal drift.
QUNI means Quiescent (e.g. no current flow), unidirectional variant. QBI means Quiescent, Bi-Directional variant. VIOUT is the name of the output pin. See the pinout on page 1.
Since you say you are getting ~1.6V, I would guess you're using the bidirectional variant, and powering it from 3.3V.
I don't know how you're having trouble figuring out the current, it's very simple:
Datasheet, page 15
Sensitivity (Sens). The change in device output in response to a 1 A
change through the primary conductor. The sensitivity is the product
of the magnetic circuit sensitivity (G / A) and the linear IC
amplifier gain (mV/G). The linear IC amplifier gain is pro- grammed at
the factory to optimize the sensitivity (mV/A) for the half-scale
current of the device.
There are multiple versions, with different sensitivity.
From page 2 of the datasheet:
The sensitivity is given in mV/A. Therefore, with a device with a 40mV/A sensitivity, 1A of current through the device will result in the output voltage increasing by 40mV.
The overall equation is:
$$V_{IOUT} = ( Vcc * OffsetScaling ) + ( Scaling Factor In Volts * Amps ) $$
\$OffsetScaling\$:
- Bidirectional version = 0.5
- Unidirectional version = 0.1
\$Scaling Factor In Volts\$:
- This is the scaling factor given in the above table, converted to volts.
Therefore, for the bi-directional variant, with 40mv/A sensitivity, the output voltage will be:
$$V_{IOUT} = Vcc*0.5+ 0.040 * A$$
The uni-directional variant with 40mv/A sensitivity would be:
$$V_{IOUT} = Vcc* 0.1 + 0.040 * A$$
0.040 is 40mV in Volts. Change to match your device sensitivity.
The preferred way to set up the Hall Sensor for initial experimentation would be to acquire the evaluation board, and then follow the instructions to use its software for calibration and configuration.
If that is not an option, similar results can be achieved manually, albeit with a bit more effort and some guesswork / empirical data. This is how it goes:
Required parameters:
- Expected magnetic field strength - active range expected?
- Intrinsic, earth's magnetic field at surface = 300 to 600 milliGauss
- Small toy magnet or fridge magnet = 30 to 150 Gauss
- Expected rate of change of field: How many cycles per second?
- Vcc of MSP430?
- MSP430 digitizes from 0 to Vcc, and can tolerate up to Vcc+0.30 Volts
- Permissible Vcc is up to 3.6 Volts
- Expected / desired full-scale range from Hall Sensor (assuming ADC10 of MSP430 is being used)?
- Both upper and lower references can be changed from default GND and Vcc, to external reference voltages, 0 to 1.2 Volts as lower reference, and 1.4 to Vcc as higher
- Internal voltages references of 1.5 Volts and 2.5 Volts are also available, to use as the full-scale limits.
Once the above parameters are determined, a suggested way to proceed would be:
- Program quiescent voltage to around midway between the MSP430 ADC10 reference values you select
- Determine actual sensitivity of your sensor using the magnet of choice, and a good voltmeter: The manufacturing tolerance range is pretty high. For instance, if using strong fridge magnets, the highest sensitivity range,
4.5 - 16 mV/G
, could give a maximum of 4.8 Volts full-scale North-to-South, way more than the MSP430 can handle.
- Program sensitivity based on above tests, don't use the maximum sensitivity mode of the part.
- Don't count on built-in clamping of the device, use an external clamping arrangement if at risk of exceeding MSP430's Vcc+0.30 Volts.
- Opt for ADC reference voltages in between the rail voltages instead of full 0 to Vcc, that way there is margin for error in case the sensor overshoots expected full-scale voltage, e.g. if a mobile phone rings nearby.
- Use a capacitor on the bandwidth FILTER pin such that your bandwidth is limited to perhaps 10 times the expected cycles per second mentioned above - otherwise the output gets too jittery, even if a person with coins in their pockets walks by.
That's what I can recall off the top of my head, but if additional details are required, please edit the question accordingly.
Best Answer
Using VpH as an example the current will be limited to around 90mA by the resistor R7. The datasheet says the minimum current guaranteed to blow a fuse is 300mA and even recommends a 0.1uF capacitor to ensure enough current is available.
A simple solution more likely to work would be to scrap the resistor divider and use something like an LM317 adjustable regulator and switch the voltage set resistor shown as R2 in the typical application circuit instead. Using 1% resistors should keep you well within the tolerances given in the datasheet.
Also take note of markrages answer, switch bounce is likely to be a problem so ideally apart from a more robust supply you should be switching voltages from a microcontroller. The LM317 datasheet shows Iadj is limited to less than 100uA so you could achieve that using any form of transistor or analog switch that doesn't introduce too much resistance.