NoteApplication
User ManualHAL® 83x, HAC 83x
Edition July 3, 2018APN000120_003EN
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 2
Copyright, Warranty, and Limitation of Liability
The information and data contained in this document are believed to be accurate and reli-able. The software and proprietary information contained therein may be protected bycopyright, patent, trademark and/or other intellectual property rights of TDK-Micronas. Allrights not expressly granted remain reserved by TDK-Micronas.
TDK-Micronas assumes no liability for errors and gives no warranty representation orguarantee regarding the suitability of its products for any particular purpose due to thesespecifications.
By this publication, TDK-Micronas does not assume responsibility for patent infringementsor other rights of third parties which may result from its use. Commercial conditions, prod-uct availability and delivery are exclusively subject to the respective order confirmation.
Any information and data which may be provided in the document can and do vary indifferent applications, and actual performance may vary over time.
All operating parameters must be validated for each customer application by custom-ers’ technical experts. Any new issue of this document invalidates previous issues.TDK-Micronas reserves the right to review this document and to make changes to thedocument’s content at any time without obligation to notify any person or entity of suchrevision or changes. For further advice please contact us directly.
Do not use our products in life-supporting systems, military, aviation, or aerospaceapplications! Unless explicitly agreed to otherwise in writing between the parties,TDK-Micronas’ products are not designed, intended or authorized for use as compo-nents in systems intended for surgical implants into the body, or other applicationsintended to support or sustain life, or for any other application in which the failure of theproduct could create a situation where personal injury or death could occur.
No part of this publication may be reproduced, photocopied, stored on a retrieval sys-tem or transmitted without the express written consent of TDK-Micronas.
TDK-MicronasTrademarks
– HAL
Third-Party Trademarks All other brand and product names or company names may be trademarks of theirrespective companies.
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 3
Contents
Page Section Title
4 1. General Information4 1.1. Certification4 1.2. Support
5 2. HAL 83x Programming Environment5 2.1. Overview6 2.2. Running the Application9 2.3. Description of the Tabs for HAL 83x9 2.3.1. The General Tab13 2.3.2. The Two-Point Calibration Sequential Tab14 2.3.3. The Three-Point Calibration Sequential Tab16 2.3.4. The Two-Point Calibration Parallel Tab17 2.4. Lock Function18 2.5. Procedure for checking the Function ID, Variant ID, and Special Procedure ID
19 3. Calibration Procedure19 3.1. General Procedure (two-point calibration)21 3.2. Procedure for a three-point calibration
25 4. Memory25 4.1. Memory Table26 4.2. Data formats
27 5. The Programming Procedure27 5.1. General Programming Procedure28 5.2. The Two-Point Calibration Procedure31 5.3. Check of Lock Function31 5.3.1. Check if the sensor is locked for a HAL 83x with analog output.32 5.3.2. Check if the sensor is locked for a HAL 835 with PWM output
33 6. Application Note History
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 4
Release Note: Revision bars indicate significant changes to the previous edition.
1. General Information
This document is intended as guidance for programming the HAL/HAC 83x sensorusing the HAL83x Programming Environment and an appropriate application kit (HALProgrammer V5.1). Every functionality integrated in the software is described and ref-erenced to the corresponding functionality of the sensor. Additionally all calibration pro-cedures implemented in the programming software are explained in detail. In combina-tion with the data sheet and the application note "HAL/HAC 83x Programming Guide" itrepresents the complete customer documentation of the HAL/HAC 83x.
The type designation used within this document always refers to HAL 83x, whichincludes product version HAL 830 and HAL 835. All given information is also valid forthe product version with integrated capacitors HAC 83x.
1.1. Certification
TDK-Micronas GmbH fulfills the requirements of the international automotive standardISO/TS 16949 and is certified according to ISO 9001:2000. This ISO standard is aworldwide accepted quality standard.
1.2. Support
We advise you to register on https://service.micronas.com in order to obtain access tothe workgroups for our various product families. Here you are able to get support byopening a support ticket in the customer support system. Additionally, once registered,you will receive notifications on software and Application Notes updates.
You are also able to contact the Micronas Support ([email protected]) incase of questions or problems.
TDK-Micronas GmbH - Application Engineering
Hans-Bunte-Strasse 19
D-79108 Freiburg im Breisgau
E-mail: [email protected]
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
2. HAL 83x Programming Environment
2.1. Overview
The HAL 83x Programming Environment is a LabVIEW® application which needs aLabVIEW Run-Time Engine for execution. Each single functionality is also available asSubVI and can easily be modified or adapted to the individual requirements of the cus-tomers application. The LabVIEW Run-Time Engines and the LabView SubVIs are alsodownloadable from https://service.micronas.com.
In addition to some controls and displays, the HAL 83x Programming Environmentapplication shows 4 tabs. These tabs are for faster access to the different functions likemodifying register contents and calibrating the device HAL 83x.
The General Tab allows the user to read, change, and program all programmableparameters such as magnetic range, output clamping, etc.
The 2-Point Calibration Sequential Tab is used for a two-point calibration of oneHAL 83x device.
The 3-Point Calibration Sequential Tab is used for a three-point calibration of oneHAL 83x device.
The 2-Point Calibration Parallel Tab is used for a two-point calibration of two devices.
Detailed explanation of these tabs can be found in the following sections.
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 5
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
2.2. Running the Application
After successful installation of the HAL83x Programming Environment the application can
be started by clicking START >> All Programs >> Micronas >>
When starting the application the window shown in Fig. 2–1 will appear. This is the mainwindow of the HAL 83x, HAC 83x Programming Environment from which all importantfunctions can be controlled. White fields can be changed, grey fields are simple displays.
Fig. 2–1: HAL 83x Programming Environment - Application Window
To run the application click the white arrow in the menu bar (normally the application isalready running after starting). By clicking the red round button or the Close button theapplication will be stopped.
Fig. 2–2: Start / Stop execution
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 6
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
Communication Port
After having started the application, the correct COM-Port where the Application Boardis connected to your PC needs to be selected.
Fig. 2–3: COM port selection
The PC COM-Port can be figured out in the section Ports of the device manager, whichcan be launched by typing the command “devmgmt.msc” in the Windows2000/XP/Vista/7/10 command line as shown below.
Fig. 2–4: How to find the correct COM-port
Select Mode
With the “Select Type” pull-down menu the different members of HAL 83x family can bechosen.
Fig. 2–5: Selection of connected sensor type
Some features are only available for HAL 835. Please refer to the HAL/HAC 83x datasheet for details.
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 7
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
Sensor Selection
The user can program up to four sensors with the HAL Programmer V5.1. In this pull-down menu the connected sensor can be selected.
Power
The Power switch on the General Tab must be switched to the upper position to supplythe HAL device, connected to the Application Board.
VBoard LED
The VBoard LED indicates the VHAL_SUP on/off status.
Error LED
The Error LED indicates if an error in the communication between HAL ProgrammerV5.1 and sensor has happened.
Status Line
In the Board Status display the received status and data from the sensor is shown afterread or write commands.
Fig. 2–6: LED’s and status display
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 8
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
2.3. Description of the Tabs for HAL 83x
2.3.1. The General Tab
Fig. 2–7: HAL 83x Programming Environment - General Tab
2.3.1.1. Area 1
Clamp Low
Defines the low voltage clamping level. This register can be set with values between0 V and 2.5 V, between 0 % and 50 % duty cycle, respectively for PWM output.
The register range is from 0 to 255 (8 bit register).
(1)
CLAMP-LOWLowClampingVoltage 2
VSUP--------------------------------------------------------------- 255=
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 9
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
Clamp High
Defines the high voltage clamping level. This register can be set with values between0 V and 5 V, between 0 % and 100 % duty cycle, respectively for PWM output.
The register range is from 0 to 511 (9 bit register).
Voq
Defines the voltage level at zero magnetic field. This register can be set with valuesbetween 5 V and 5 V, between 100 % and 100% duty cycle, respectively for PWMoutput. A negative value for Voq will be used for unipolar magnetic fields.
The register range is from 1024 to 1023 (11 bit register).
Sensitivity
Defines the gain of the sensors output. This register can be set with values between 4and +4.
The register range is from 8192 to 8192 (14 bit register).
Output Mode
This drop-down menu for the output mode selection is only available for HAL 835 (fordetails please see Table 2–1 and Table 2–2).
HAL 830 is only available with analog output.
The OUTPUTMODE bits define the different output modes of HAL83x.
Table 2–1: OUTPUTMODE for HAL835
(2)
(3)
(4)
Output Format MODE [7:5]
Analog Output (12 bit) 000
Multiplex Analog Output (continuously)
001
Multiplex Analog Output (external trigger)
011
Burn-In Mode 010
PWM 110
PWM (inverted polarity) 111
CLAMP-HIGHHighClampingVoltage
VSUP------------------------------------------------------ 511=
VOQVOQ
VSUP------------- 1024=
SENSITIVITY Sensitivity 2048=
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 10
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
Table 2–2: OUTPUTMODE for HAL830
Magnetic Range
Drop-down menu for the magnetic range selection.
Table 2–3: RANGE for HAL 835
3 dB Frequency
Drop-down menu for the 3 dB frequency selection for the internal low pass filter.
Output Format MODE [7:5]
Analog Output (12 bit) 000
Magnetic Range RANGE
MODE [9] MODE [2:1]
± 15 mT 1 00
± 30 mT 0 00
± 60 mT 0 01
± 80 mT 0 10
± 100 mT 0 11
± 150 mT 1 11
Table 2–4: RANGE for HAL 830
Magnetic Range RANGE
MODE [9] MODE [2:1]
± 30 mT 0 00
± 60 mT 0 01
± 80 mT 0 10
± 100 mT 0 11
± 150 mT 1 11
Table 2–5: FILTER bits defining the 3 dB frequency
3 dB Frequency MODE [4:3]
80 Hz 00
500 Hz 10
1 kHz 11
2 kHz 01
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 11
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
Mode
The register MODE range is from 0 to 1023 and contains the settings for FILTER, RANGE, and OUTPUTMODE:
TC-Range
Drop-down menu for the temperature compensation pre-selection. With this drop-downmenu the customer can switch between the four TC ranges:
Table 2–6: TC-Range Groups
For each range it is possible to set TC and TCSQ values described in the following.
TCSQ
Quadratic temperature coefficient. This register can be set with values between 0 and 7in steps of 1 (3 bit).
TC
Linear temperature coefficient. This register can be set with values between 0 and 31 insteps of 1 (5 bit).
The TC register range is from 0 to 1023.
2.3.1.2. Area 2
The sensor identification number registers (general purpose registers) can be read inthis area. The HAL 83x family has 4 IDs. Only ID 1 is programmable for the customerand can be set with values between 0 and 8191 (13 bit register).
(5)
TC-Range [ppm/K] TC-Range Group
-3100 to -1800 (not for ±15 mT range) 0
-1750 to -550 (not for ±15 mT range) 2
-500 to +450 1
+450 to +1000 3
(6)
MODE RANGE 9 512 OUTPUTMODE 7 5 + 32FILTER 4 3 8 RANGE 2 1 2+
+=
TC TCRange 256 TCValue 8 TCSQValue++=
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 12
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
2.3.1.3. Area 3
In this area, the customer can read out the digital values at the beginning (ADC) andthe end (DAC) of the signal path.
Note: For detailed information of the programmable parameters please refer to theHAL 83x, HAC 83x data sheet.
These registers are read-only and range from 0 to 16383 (DAC), from 3968 to +3968(ADC), respectively.
It is also possible to save all registers to a file by clicking the corresponding button.
2.3.2. The Two-Point Calibration Sequential Tab
Fig. 2–8: HAL 83x Programming Environment - 2-Point Calibration Sequential Tab
The 2-Point Calibration Sequential Tab supports a two-point calibration of the selectedsensor. Details of the calibration procedure and on the relevant calculation algorithmscan also be found in Section 3.1.
2-point sequential calibration procedure
1. Step• Click the “Read” button to read-out the current sensor parameters.• Change one or more parameters if necessary.• Click the “Write and Store” button to write the changed parameters into the sensor.
Note: Step 1 is recommended and necessary for the initialization.
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 13
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
2. Step• Enter the target value for the first calibration point in the field “Nominal Vout1”,
“Nominal Duty Cycle 1” respectively.• Drive the application to the first calibration point.• Click the “D/A Readout1” button.
3. Step• Enter the target value for the second calibration point in the field “Nominal Vout2”,
“Nominal Duty Cycle 2” respectively.• Drive the application to the second calibration point.• Click the “D/A Readout2” button.
4. Step• Click the “Calculate” button.• Click the “Write and Store” button to store the calculated values into the sensor.
2.3.3. The Three-Point Calibration Sequential Tab
Fig. 2–9: HAL 83x Programming Environment - 3-Point Calibration Sequential Tab
The 3-Point Calibration Sequential Tab supports a three-point calibration of the selectedsensor.
Please note that the accuracy of the sensor will be highest at those positions where thecalibration has been done. In some applications the accuracy should be highest at anintermediate position. For such applications, the three-point calibration procedure isrecommended. Therefore, the D/A-Readout is determined at three calibration points.The sensitivity is calculated by a least squares fit to all three measurements. In order todetermine the Voq programming, two options are available:
The Voq can be calculated in two ways– to match the nominal output voltage at the second calibration point or– by a least squares fit to all the three calibration points.
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 14
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
If the first option is selected, the output voltage in the second calibration point will beclosest to the nominal value.
Note: Even for the three-point calibration there are only the two parameters SENSI-TIVITY and VOQ to define the output behavior of the sensor. That means thatthe output of the sensor will have a linear characteristic and it is not possible tohit every calibration point.
Details of the calibration procedure and on the relevant calculation algorithms can alsobe found in Section 3.2.
Three-Point sequential calibration procedure
1. Step
• Click the “Read” button to read-out the sensor parameters.
• Change if necessary one or more parameter.
• Click the “Write and Store” button to save the changed parameter in the sensor.
Note: Step 1 is recommended and necessary for the initialization.
2. Step
• Enter the target value for the first calibration point in the field “Nominal Vout1”, “Nominal Duty Cycle 1” respectively.
• Drive the application to the first calibration point.
• Click the “D/A Readout1” button.
3. Step
• Enter the target value for the second calibration point in the field “Nominal Vout2”, “Nominal Duty Cycle 2” respectively.
• Drive the application to the second calibration point.
• Click the “D/A Readout2” button.
4. Step
• Enter the target value for the third calibration point in the field “Nominal Vout3”, “Nominal Duty Cycle 3” respectively.
• Drive the application to the third calibration point.
• Click the “D/A Readout3” button.
5. Step
• Select the calculation procedure (Match to second setpoint or least squares fit)
• Click the “Calculate” button.
• Click the “Write and Store” button to store the calculated values into the sensor.
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 15
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
2.3.4. The Two-Point Calibration Parallel Tab
Fig. 2–10: HAL 83x Programming Environment - 2-Point Calibration Parallel Tab
The 2-Point Calibration Parallel Tab supports a two-point calibration of two HAL 83xsensors. Details of the calibration procedure and on the relevant calculation algorithmscan also be found in Section 3.1.
Two-point parallel calibration procedure
1. Step• Select the connected sensor (1...4)• Click the “Read” button to read-out both sensor parameters.• Change if necessary one or more parameter.• Click the “Write and Store” button to save the changed parameter into both sensors.
Note: Step 1 is recommended and necessary for the initialization.
2. Step• Enter the target values for the first calibration point in the fields “Nominal Vout1”,
“Nominal Duty Cycle 1” respectively.• Drive the application to the first calibration point• Click the “D/A Readout1” button.
3. Step• Enter the target values for the second calibration point in the fields “Nominal
Vout2”, “Nominal Duty Cycle 2” respectively.• Drive the application to the second calibration point.• Click the “D/A Readout2” button.
4. Step• Click the “Calculate” button.• Click the “Write and Store” button to store the calculated values into both sensors.
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 16
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
2.4. Lock Function
It is mandatory for the customer to lock the EEPROM content at the end of the calibra-tion in its production line. By clicking the LOCK button in the General Tab the corre-sponding bit is set. Please note that the LOCK function becomes effective after apower-on-reset.
Fig. 2–11: Lock button on the General Tab
After setting the Lock bit the user is not able to change or read any registers of theEEPROM.
Checking if the sensor is locked correctly
For the case the sensor has an analog output mode (HAL 830 / HAL 835) the customercan do a check just by reading any register. If the sensor is locked it is not possible to reada register correctly and the programming board returns an error code to the software.
For the case the sensor has a PWM output mode (HAL 835 only) just sending a readcommand is not enough. The programming board will possibly interpret the high levelof the duty cycle as an acknowledge of the sensor and in this case as “no error”. Onepossibility to check if the sensor with PWM output mode is locked is to check the con-tent of a special register. Micronas recommends to read the GP register 3. In this regis-ter two Micronas internal identification numbers are stored amongst others (FunctionID, Variant ID). The customer can compare the result of the read command with theexpected IDs (see Table 2–7). Independent from the duty cycle the result of reading alocked sensor will never be the same as for an unlocked sensor.
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 17
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
2.5. Procedure for checking the Function ID, Variant ID, and Special Procedure ID
• Read out GP register 0 on address 12
• Check bit 9 to 13 and compare with Table 2–8
• Read out GP register 3 on address 8 (consider to read first GP register 0 to 2)
• Check bit 8 to 10 and compare with Table 2–8
• Check bit 11 to 13 and compare with Table 2–8
Please see also the flow chart (Fig. 5–18) in Section 5.3.2.
Table 2–8: Device specific IDs
Table 2–7: General purpose registers
Register DAT3 DAT2 DAT1 DAT0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GP register 0(address 12)
WriteRead
--
--
-SB
SBSB
SBSB
SBSB
SBSB
SBC
CC
CC
CC
CC
CC
CC
CC
C-
GP register 1(address 8)
WriteRead
--
--
-M
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
M-
GP register 2(address 8)
WriteRead
--
--
-M
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
MM
M-
GP register 3(address 8)
WriteRead
--
--
-F
FF
FF
FV
VV
VV
VM
MM
MM
MM
MM
MM
MM
M-
-: ignoreF: Function IDV: Variant IDSB: Special Procedure IDC: Customer programmableM: Micronas programmable
Function ID Variant ID Special Procedure ID
Sensor dec
bit
dec
bit
dec
bit
13 12 11 10 9 8 13 12 11 10 9
HAL 830 3 0 1 1 6 1 1 0 0 0 0 0 0 0
HAL 835 3 0 1 1 4 1 0 0 0 0 0 0 0 0
HAC 830M 4 1 0 0 6 1 1 0 0 0 0 0 0 0
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 18
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
3. Calibration Procedure
The output characteristic is determined by four parameters:
– Clamp Low specifies the lower clamping voltage of the output curve.
– Clamp High specifies the higher clamping voltage of the output curve.
– Voq corresponds to the output voltage at zero magnetic field.
– Sensitivity describes the magnetic sensitivity of the sensor.
The following simple formula relates the analog output voltage to the D/A-Readout(VDD is considered to be 5.0 V):
3.1. General Procedure (two-point calibration)
For calibration in the system environment, the application kit from TDK-Micronas is rec-ommended. It contains the hardware for the generation of the serial telegram for pro-gramming (Programmer Board Version 5.1) and the corresponding software (HAL83xProgramming Environment) for the input of the register values.
For the individual calibration of each sensor in the customer application, a two-pointadjustment is recommended. The calibration shall be done as follows: (Please see also Section 5.2 for further information.)
Step 1: Input of the registers which need not be adjusted individually
The magnetic circuit, the magnetic material with its temperature characteristics, the filterfrequency, the output mode, and the GP (general purpose) register value are given forthis application. Therefore, the values of the following register blocks should be identicalfor all sensors of the customer’s application:
– FILTER (according to the maximum signal frequency)
– RANGE(according to the maximum magnetic field at the sensor position)
– OUTPUTMODE
– TC, TCSQ and TC-RANGE(depends on the material of the magnet and the other temperature dependencies of the application)
– GP(If the customer wants to store own production information. This register has no influ-ence on the sensor performance.)
The clamping levels influence the D/A-Readout value and have to be set therefore afterthe sensor calibration.
Write the appropriate settings into the HAL83x registers.
(7)
VOUTSENSITIVITY
16383---------------------------------------- 2 D/A-Readout VSUP =
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 19
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
Step 2: Initialize DSP
As the D/A-READOUT register value depends on the settings of SENSITIVITY, VOQand CLAMP-LOW/HIGH, these registers have to be initialized with defined values first:
– VoqINITIAL = 2.5 V
– SensitivityINITIAL • 0.464 for 80 Hz 3 dB filter frequency• 0.3 for 500 Hz 3 dB filter frequency• 0.321 for 1000 Hz 3 dB filter frequency• 0.641 for 2000 Hz 3 dB filter frequency
– Clamp-Low = 0 V
– Clamp-High = 4.999 V
Step 3: Define Calibration Points
The calibration points 1 and 2 can be set within the specified range. The correspondingtarget values for VOUT1 and VOUT2 result from the application requirements.
For highest accuracy of the sensor, calibration points near to the minimum and maxi-mum input signal are recommended. The difference of the output voltage between cali-bration point 1 and calibration point 2 should exceed 3.5 V.
Step 4: Calculation of Voq and Sensitivity
Set the system to calibration point 1 and read the register D/A-READOUT. The result isthe value D/A-READOUT1.
Now, set the system to calibration point 2, read the register D/A-READOUT again, andget the value for D/A-READOUT2.
With these values and the target values VOUT1 and VOUT2, for the calibration points 1and 2, respectively, the values for Sensitivity and Voq are calculated:
This calculation has to be done individually for each sensor.
Next, write the calculated values for Sensitivity and Voq into the registers for adjustingthe sensor. At that time it is also possible to store the application specific values forClamp-Low and Clamp-High into the sensors EEPROM.
The sensor is now calibrated for the customer’s application. However, the programmingcan be adapted again if necessary.
Note: For a recalibration, the calibration procedure has to be started at the beginning (step 1).A new initialization is necessary, as the initial values from step 1 are overwritten in step 4.
(8)
(9)
(10)
ClampLow VOUT1,2 ClampHigh
Sensitivity SensitivityINITIALVout2 Vout1–
D/A-Readout2 D/A-Readout1– --------------------------------------------------------------------------------- 16383
VSUP---------------=
VOQ116------ Vout2 16383
VSUP------------------------------------- D/A-Readout2 8192– Sensitivity
SensitivityINITIAL------------------------------------------------–
VSUP
1024-------------=
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 20
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
Step 5: Locking the Sensor
The last step is activating the LOCK function by programming the LOCK bit. Pleasenote that the LOCK function becomes effective after a power-on-reset. The sensor isnow locked and does not respond to any programming or reading commands. See alsoSection 2.4.
Warning: This register can not be reset after becoming effective!
3.2. Procedure for a three-point calibration
Due to the fact that, in reality, the three calibration points do not lie exactly on a straightline, the software provides two procedures to calculate the values for Sensitivity and Voq:
– Match to second setpoint (case 1): The output voltage at the second setpoint will be closest to the nominal value. Thedeviation for the first and the third setpoint will be equal. (see Fig. 3–12)
– Least squares fit (case 2):The overall deviation from the setpoints will be minimized. (see Fig. 3–13)
The steps 1 and 2 are the same as described in Section 3.1.
Step 3: Define the three Calibration Points
The calibration points 1, 2 and 3 can be set inside the specified range. The correspond-ing values for VOUT1, VOUT2 and VOUT3 result from the application requirements.
For highest accuracy of the sensor, calibration points 1 and 3 near the minimum andmaximum input signal are recommended. The difference of the output voltage betweencalibration point 1 and calibration point 3 should exceed 3.5 V.
Step 4: Calculation of Voq and Sensitivity
Drive the system to the calibration points consecutively and read out the D/A-READOUTregister to obtain the values for D/A-Readout1, D/A-Readout2, and D/A-Readout3.
Case 1: Match to second setpoint
With the D/A-Readout values and the target values VOUT1, VOUT2 and VOUT3, for the cali-bration points 1, 2 and 3, respectively, the values for Sensitivity and Voq are calculated:
For calculating the sensitivity a linear fit with all three calibration points with the D/A-Readouts as dependent and VOUT1,2,3 as independent variables has to be conductedfirst to find the new “virtual” D/A-Readouts.
(11)ClampLow VOUT1,2,3 ClampHigh
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 21
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
Fig. 3–12: three-point calibration with “match to second setpoint” method
This calculation has to be done individually for each sensor.
Next, write the calculated values for Sensitivity and Voq into the registers for adjustingthe sensor. At that time it is also possible to store the application specific values forClamp-Low and Clamp-High into the sensor’s EEPROM.
The sensor is now calibrated for the customer’s application. However, the programmingcan be adapted again if necessary.
Note: For a recalibration, the calibration procedure has to be started at the beginning (step 1).A new initialization is necessary, as the initial values from step 1 are overwritten in step 4.
(12)
(13)
slope slope of the linear fit=
offset offset of the linear fit=
D/A-Readout1_new Vout1 slope offset+=
D/A-Readout3_new Vout3 slope offset+=
Sensitivity SensitivityINITIALVout3 Vout1–
D/A-Readout3_new D/A-Readout1_new– ----------------------------------------------------------------------------------------------------------- 16383
VSUP---------------=
VOQ116------ Vout2 16383
VSUP------------------------------------- D/A-Readout2 8192– Sensitivity
SensitivityINITIAL------------------------------------------------–
VSUP
1024-------------=
D/A-Readout 3
D/A-Readout 2
D/A-Readout 1
D/A-Readout
VoutVout 1 Vout 2 Vout 3
Equal deviation in setpoint 1 and 3
Linear output behavior
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 22
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
Case 2: Least squares fit
With the D/A readout values and the target values VOUT1,VOUT2 and VOUT3 for the cali-bration points 1, 2 and 3, respectively, the values for Sensitivity and VOQ are calculated:
For calculating the sensitivity a linear fit with all three calibration points with the D/A-Readouts as dependent and VOUT1,2,3 as independent variables has to be conductedfirst to find the new “virtual” D/A-Readouts.
Fig. 3–13: three-point calibration with “least squares fit” method
This calculation has to be done individually for each sensor.
Next, write the calculated values for Sensitivity and Voq into the registers for adjustingthe sensor. At that time it is also possible to store the application specific values forClamp-Low and Clamp-High into the sensor’s EEPROM.
(14)
(15)
slope slope of the linear fit=
offset offset of the linear fit=
D/A-Readout1_new Vout1 slope offset+=
D/A-Readout3_new Vout3 slope offset+=
Sensitivity SensitivityINITIALVout3 Vout1–
D/A-Readout3_new D/A-Readout1_new– ----------------------------------------------------------------------------------------------------------- 16383
VSUP---------------=
VOQ116------ Vout3 16383
VSUP------------------------------------- D/A-Readout3_new 8192– Sensitivity
SensitivityINITIAL------------------------------------------------–
VSUP
1024-------------=
D/A-Readout 3
D/A-Readout 2
D/A-Readout 1
D/A-Readout
VoutVout 1 Vout 2 Vout 3
Equal deviation in all setpoints
Linear output behavior
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 23
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
The sensor is now calibrated for the customer’s application. However, the programmingcan be adapted again if necessary.
Note: For a recalibration, the calibration procedure has to be started at the beginning (step 1).A new initialization is necessary, as the initial values from step 1 are overwritten in step 4.
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 24
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
4. Memory
4.1. Memory Table
The protocol between the programmer board and the Hall sensor defines fixed lengthsfor the data, command, and address words to be transmitted:
– Command (CMD): 3 bit
– Address (ADR): 4 bit
– Data (DAT): 14 bit
– Command Parity (CP): 1 bit
– Address Parity (AP): 1 bit
– Data Parity (DP): 1 bit
Reminder: For communication with the programmer board, the 14 data bits areencoded in four ASCII characters: DAT3, DAT2, DAT1, and DAT0.
As every register has a different length, not all of the 14 bits are used. Furthermore,there is a difference between the write format (transfer programming device IC) andthe read format (transfer IC programming device). Table 4–9 and Table 4–10 showwhich of the 14 bits are valid for each register (write format and read format).
Table 4–9: Available register addresses
Register Code Data Bits
Format Customer Remark
CLAMP-LOW 1 8 binary read/write/program Low clamping voltage
CLAMP-HIGH 2 9 binary read/write/program High clamping voltage
VOQ 3 11 two’s compl. binary
read/write/program Output quiescent voltage
SENSITIVITY 4 14 signed binary read/write/program
MODE 5 10 binary read/write/program Range, filter, output mode, Offset Correction settings
LOCKR 6 2 binary read/write/program Lock Bit
GP REGISTERS 1..3 8 3x13 binary read/write/program 1)
D/A-READOUT 9 14 binary read Bit sequence is reversed
TC 11 10 binary read/write/program bits 0 to 2 TCSQbits 3 to 7 TCbits 8 to 9 TC Range
GP REGISTER 0 12 13 binary read/write/program 1)
DEACTIVATE 15 12 binary write Deactivate the sensor
1) To read/write this register it is mandatory to read/write all GP registers consecutively starting with GP0. In case of writing the registers it is necessary to first write all registers followed by one store sequence at the end. Even if only GP0 should be changed all other GP registers must first be read and the read out data must be written again to these registers.
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 25
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
4.2. Data formats
Table 4–10: Data formats
Register
Char DAT3 DAT2 DAT1 DAT0
Bit 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
CLAMP LOW
WriteRead
V
V
V
V
V
V
VV
VV
V
V
V
V
V
V
CLAMP HIGH
WriteRead
V
V
V
V
V
VV
VV
VV
VV
V
V
V
V
V
VOQ WriteRead
V
V
V
VV
VV
VV
VV
VV
VV
VV
VV
V
V
V
SENSITIV-ITY
WriteRead
VV
VV
VV
VV
VV
VV
VV
VV
VV
VV
VV
VV
VV
VV
MODE Write
V
V
V
V
VV
VV
VV
VV
VV
VV
V
V
V
V
LOCKR Write V V
GP 1..3Registers
WriteRead
V
VV
VV
VV
VV
VV
VV
VV
VV
VV
VV
VV
VV
V
D/A-READOUT1)
Read V V V V V V V V V V V V V V
TC WriteRead
V
V
V
V
VV
VV
VV
VV
VV
VV
V
V
V
V
GP 0Register
WriteRead
V
VV
VV
VV
VV
VV
VV
VV
VV
VV
VV
VV
VV
V
DEACTI-VATE
Write 1 0 0 0 0 0 0 0 1 1 1 1
V: valid, : ignore, bit order: MSB first1) LSB first
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 26
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
5. The Programming Procedure
5.1. General Programming Procedure
The general programming procedure is described in detail for the HAL83x.
An example of a programming procedure is given in Fig. 5–14.The listed commandsare valid for the HAL Programmer Board V5.1. For details please see the applicationnote No. 46.
First, the programmer board has to be initialized. If more than one sensor is connectedto the same supply line, the sensors have to be addressed sequentially. This is done bythe multiprogramming loop: after deactivating all sensors, the sensor to be pro-grammed is activated again by sending a pulse on the corresponding output line, fol-lowed by a dummy read command.
Note: The flow chart given in Fig. 5–14 is intended as a simple example. The multipro-gramming loop can also be done within the calibration procedure.
Please keep in mind that the board commands “e...”, “q...”, “m...”, and “t” cause theboard to send back an eight character string to the PC. This string must be read out ofthe serial port before sending the next command.
Example:
Fig. 5–14: General procedure
Start
END
Initialize Board
Set Board Mode [STX j 1 ETX]Set Protocol Bittime [STX z CHR$(85) ETX]Switch Vdd on [STX n ETX]Delay 20 ms
Multiprogramming
For SENSOR = 1 to 4:
Deactivate Sensors [STX w 3 1 F 0 0 8 0 F 0 ETX]Delay 100 msSelect SENSOR [STX h SENSOR CHR$(25) ETX]Dummy Read [STX q 2 0 1 1 ETX]
2‐point calibration
End Multiprogramming Loop
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 27
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
5.2. The Two-Point Calibration Procedure
The calibration procedure is shown in Fig. 5–15. The register values are intended as anexample:
Step 1: Programming of the parameters which do not require individual adjustment:
– Filter Frequency, Magnetic Range, Output Mode, TC (TC, TCSQ and TC-Range) and GP.
Step 2: Initialize DSP
As the D/A-READOUT register value depends on the settings of SENSITIVITY, VOQ andCLAMP LOW/HIGH, these registers have to be initialized with defined values, first (seeSection 3.1).
Step 3: Get the DA-Readout value in the first calibration point and assign a nominal output voltage(VOUT1) to that point.
Step 4: Get the DA-Readout value in the second calibration point and assign a nominal outputvoltage (VOUT2) to that point.
Step 5: Calculate and program the values of SENSITIVITY and VOQ according to Eq. 9 andEq. 10 in Section 3.1 on page 19.
Write and program values for Clamp High and Clamp Low.
Step 6: Store the registers permanently.
The “Store” sequence is given in Fig. 5–16. The permanent storing of data into theEEPROM memory is a two-step process. First, all zero bits (ERASE), then all one bits(PROM) are written.
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 28
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
Fig. 5–15: Flowchart - Two-point Calibration procedure
Mechanical activity
Communication with Sensor
Calculation
External Data Storage
2‐point calibration
END
Write Common Register Settings
Write MODE 80 mT, 500 Hz, Analog 12 bit [STX e 3 1 5 0 0 0 1 4 1 ETX]Write TC = 15, TCSQ = 1, TC‐Range = 1 [STX e 3 1 6 1 0 1 7 9 1 ETX]Write GP0 [STX e 3 1 5 0 0 0 0 1 0 ETX]
Initialize DSP
Write Clamp‐High 4.999 V [STX e 3 1 2 1 0 1 F F 0 ETX]Write Sensitivity SensINITIAL [STX e 3 1 4 1 0 4 0 0 0 ETX]Write Voq 2.5 V [STX e 3 1 3 0 0 2 0 0 0 ETX]Write Clamp Low 0 V [STX e 3 1 1 1 0 0 0 0 1 ETX]
STORE
Write Calculated DSP Register Setting
Write Clamp‐High [STX e 3 1 2 1 DATA DP ETX]Write Sensitivity [STX e 3 1 4 1 DATA DP ETX]Write Voq [STX e 3 1 3 0 DATA DP ETX]Write Clamp Low [STX e 3 1 1 1 DATA DP ETX]
STORE
Calculate SENSITIVITY and VOQ
Read D/A‐Readout[STX q 2 0 9 0 ETX]
Read D/A‐Readout[STX q 2 0 9 0 ETX]
MOVEto 2nd Calibration Point
MOVEto 1st Calibration Point
Read D/A‐Readout[STX q 2 0 9 0 ETX]
MOVEto 3rd Calibration Point
Optional for 3-pointcalibration
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 29
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
Fig. 5–16: Store sequence
Store
END
Set programming voltage
Pulse width 100ms [STX u CHR$(100) ETX ]
Erase
acts on all EEPROM registers[STX m 5 1 0 0 ETX]
Prom
acts on all EEPROM registers[STX m 4 0 0 0 ETX]
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 30
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
5.3. Check of Lock Function
5.3.1. Check if the sensor is locked for a HAL 83x with analog output.
Fig. 5–17: Lock function - analog output
Check if sensor is locked
Read any address
Check board response
board status = 0 ?
END
Result:
Sensor locked
Result:
Sensor not locked
yes
no
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 31
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
5.3.2. Check if the sensor is locked for a HAL 835 with PWM output
Fig. 5–18: Lock function - PWM output
Check if sensor is locked
Read address 12GP register 0
Function ID = 3and
Variant ID = 4?
END
Result:
Sensor locked
Result:
Sensor not locked
yes
no
Read address 8GP register 1
Read address 8GP register 2
Read address 8GP register 3
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 32
APPLICATION NOTE HAL 83x, HAC 83xUser Manual
TDK-Micronas GmbH July 3, 2018; APN 000120_003EN 33
TDK-Micronas GmbHHans-Bunte-Strasse 19 D-79108 Freiburg P.O. Box 840 D-79008 Freiburg, Germany
Tel. +49-761-517-0 Fax +49-761-517-2174 www.micronas.com
6. Application Note History
1. HAL 83x, HAC 83x User Manual, Jan. 10, 2017; APN 000120_001EN. First release of the application note.
2. HAL 83x, HAC 83x User Manual, Sept. 13, 2017; APN 000120_002EN. First release of the application note.
Major changes:
• Chapter 2 “Installation” deleted
• Chapter 3.4 “Lock Function” added (now 2.4)
• Chapter 6.3 “Check of Lock Function” with subchapter 6.3.1 and 6.3.2 added (now 5.3, 5.3.1 and 5.3.2)
3. HAL 83x, HAC 83x User Manual, July 3, 2018; APN 000120_003EN. Third release of the application note.
Major changes:
• Table 2–3 and Table 2–4: ±40 mT range removed
• Section 2.3.1.1: TC-Range updated
• Section 2.5: updated
• Section 3.1: Values for SensitivityINITIAL changed