3D Hall (Magnetic sensor) Forum Discussions
Sort by:
3D Hall (Magnetic sensor)
Hi, I just connected a "3D Hall 2 Click" module to a 3.3v arduino pro and appear to have i2c communication but all I receive is the value "0"."X = 0.0...
Show More
Hi, I just connected a "3D Hall 2 Click" module to a 3.3v arduino pro and appear to have i2c communication but all I receive is the value "0".
"X = 0.00 mT; Y = 0.00 mT; Z = 0.00 mT; Amount = 0.00 mT; Azimuth = 0.00 mT; Polar = 0.00 mT; Temp = -346.50 mT"
I'm using the Tlv493d-a1b6 library. version 1.0.3
and the "cartesian" example sketch.
Can anyone point out where I'm going wrong?
Thanks. Show Less
"X = 0.00 mT; Y = 0.00 mT; Z = 0.00 mT; Amount = 0.00 mT; Azimuth = 0.00 mT; Polar = 0.00 mT; Temp = -346.50 mT"
I'm using the Tlv493d-a1b6 library. version 1.0.3
and the "cartesian" example sketch.
Can anyone point out where I'm going wrong?
Thanks. Show Less
3D Hall (Magnetic sensor)
I am using STM32F303x microcontroller to established the communication with the TLE493D-W2B6 A0. I made the reset commands as said in the manual (Star...
Show More
I am using STM32F303x microcontroller to established the communication with the TLE493D-W2B6 A0.
I made the reset commands as said in the manual (Start -> 0xFF -> Stop -> Start -> 0xFF -> Stop -> Start -> 0x00 -> Stop -> Start -> 0x00 -> Stop), and tried configuring the registers 0x10, 0x11 and 0x13.

I received acknowledgement from the sensor, thus confirming the correct usage of address. Also, I was able to turn ON/OFF the INT mode of the sensor, by changing the bits in 0x11 (MOD1) register.

Having said that, I was not able to read any register values and even if I read, it is giving me plain 0xFF (255) and nothing else. For example, once I configured the registers, I requested for 20 bytes (0x16 is the last register). I got 0xFF in response (20 times). This included the registers that I configured with different values. Each time I receive with an ACK from the sensor, confirming the communication being established.

I tried a working code (arduino) for the magnetic sensor with an Arduino Micro, and the result was same. The sensor that I used with arduino and STM32 are different but the results are quiet the same. I wasn't even able to read out the value from version register.
I even looked into your official GitHub library - https://github.com/Infineon/TLE493D-3DMagnetic-Sensor - where users commented about similar issue (reading 0xFF).
The configuration values that I used for each register are as follows (STM32)
0x10 - CONFIG - 0x10 (no trigger bits), 0x01 (parity bit set).
0x11 - MOD1 - 0x11 (no trigger bits), 0x85 ( Two Byte Master Mode with Clock stretching enabled and INT disabled and parity bit set).
0x13 - MOD2 - 0x13 ( no trigger bits), 0x40 (update rate of 24Hz).
I would like to add that I have tried other configuration settings -
- With and Without Parity bits (Config and MOD1)
- 2-byte and 1-byte mode
- Low power mode and Master mode
- INT enabled and disabled
- Different update rate
I will be glad to provide more information, if required. Thank you. Show Less
I made the reset commands as said in the manual (Start -> 0xFF -> Stop -> Start -> 0xFF -> Stop -> Start -> 0x00 -> Stop -> Start -> 0x00 -> Stop), and tried configuring the registers 0x10, 0x11 and 0x13.
I received acknowledgement from the sensor, thus confirming the correct usage of address. Also, I was able to turn ON/OFF the INT mode of the sensor, by changing the bits in 0x11 (MOD1) register.
Having said that, I was not able to read any register values and even if I read, it is giving me plain 0xFF (255) and nothing else. For example, once I configured the registers, I requested for 20 bytes (0x16 is the last register). I got 0xFF in response (20 times). This included the registers that I configured with different values. Each time I receive with an ACK from the sensor, confirming the communication being established.
I tried a working code (arduino) for the magnetic sensor with an Arduino Micro, and the result was same. The sensor that I used with arduino and STM32 are different but the results are quiet the same. I wasn't even able to read out the value from version register.
I even looked into your official GitHub library - https://github.com/Infineon/TLE493D-3DMagnetic-Sensor - where users commented about similar issue (reading 0xFF).
The configuration values that I used for each register are as follows (STM32)
0x10 - CONFIG - 0x10 (no trigger bits), 0x01 (parity bit set).
0x11 - MOD1 - 0x11 (no trigger bits), 0x85 ( Two Byte Master Mode with Clock stretching enabled and INT disabled and parity bit set).
0x13 - MOD2 - 0x13 ( no trigger bits), 0x40 (update rate of 24Hz).
I would like to add that I have tried other configuration settings -
- With and Without Parity bits (Config and MOD1)
- 2-byte and 1-byte mode
- Low power mode and Master mode
- INT enabled and disabled
- Different update rate
I will be glad to provide more information, if required. Thank you. Show Less
3D Hall (Magnetic sensor)
We were previously using your TLV493d sensor and had that working fine but the power consumption was too high for our needs, therefore, we are trying ...
Show More
We were previously using your TLV493d sensor and had that working fine but the power consumption was too high for our needs, therefore, we are trying to move to the TLE493d with the Wake Up functionality.
It took a while to find the correct I2C sensor address of 0x22 but now I can finally talk to the sensor.
However, when taking readings from the senor it is sending a response of 0xFF for all registers.
I have tried using 2-byte read (supposed default) as well as 1-byte read just in case.
I really need to have this working as soon as possible so any help would be greatly appreciated!
Thank you. Show Less
It took a while to find the correct I2C sensor address of 0x22 but now I can finally talk to the sensor.
However, when taking readings from the senor it is sending a response of 0xFF for all registers.
I have tried using 2-byte read (supposed default) as well as 1-byte read just in case.
I really need to have this working as soon as possible so any help would be greatly appreciated!
Thank you. Show Less
3D Hall (Magnetic sensor)
I am using (or attempting to use) a teensy 3.2 using the Arduino IDE to interact with a 3-axis hall effects sensor (the Infineon TLE493D-A2B6). The se...
Show More
I am using (or attempting to use) a teensy 3.2 using the Arduino IDE to interact with a 3-axis hall effects sensor (the Infineon TLE493D-A2B6). The sensor can only be interacted with via I2C, and it has 2 addresses. The first address (6A Hex) is the write address. 6B Hex is the read address. As an initial test, I am trying to write some configuration data, and then read back some sensor data (initially just 1 register worth of data, essentially the MSB for the x-axis). Here is my Arduino code:
// Define includes
#include // Wire header file for I2C and 2 wire
//
int HallAddressWrite = 0x6A; // Device write address
int HallAddressRead = 0x6B; // Device write address
byte X_Axis_MSB = 0x00; // Bx MSB register
byte Y_Axis_MSB = 0x01; // By MSB register
byte Z_Axis_MSB = 0x02; // Bz MSB register
byte xy_Axis_LSB = 0x04; // Bx, By LSB register
byte z_Axis_LSB = 0x05; // Bz, By LSB register
byte config_Address = 0x10; //config register
byte value=0; //init value
int baudRate = 9600;
The above section is initialisation stuff. Hardcoding register addresses etc.
void setup() {
Serial.begin(baudRate); // Set Serial Port speed
delay(1000);
Wire.begin(); // Join the I2C bus as a master
Wire.beginTransmission(HallAddressWrite); // Address the sensor for writing
Wire.write(config_Address); // Address the Configuration register
Wire.write(0); // write the value to register
Wire.endTransmission(); // Stop transmitting
delay(100);
}
The above section is writing 00000000b register 10H
void loop() {
Wire.beginTransmission(HallAddressRead); // Address the sensor for Reading
Wire.write(X_Axis_MSB); // Write pointer register
Wire.requestFrom(HallAddressRead, 1); // 1 byte from sensor.
value = Wire.read(); // Read byte from register 12
Wire.endTransmission(); // Stop transmitting
Serial.println(value);
delay (500);
}
I find that value always equals 255 (11111111b).
Has anyone got any idea how I should be interacting with this device, or can provide some advice? Show Less
// Define includes
#include
//
int HallAddressWrite = 0x6A; // Device write address
int HallAddressRead = 0x6B; // Device write address
byte X_Axis_MSB = 0x00; // Bx MSB register
byte Y_Axis_MSB = 0x01; // By MSB register
byte Z_Axis_MSB = 0x02; // Bz MSB register
byte xy_Axis_LSB = 0x04; // Bx, By LSB register
byte z_Axis_LSB = 0x05; // Bz, By LSB register
byte config_Address = 0x10; //config register
byte value=0; //init value
int baudRate = 9600;
The above section is initialisation stuff. Hardcoding register addresses etc.
void setup() {
Serial.begin(baudRate); // Set Serial Port speed
delay(1000);
Wire.begin(); // Join the I2C bus as a master
Wire.beginTransmission(HallAddressWrite); // Address the sensor for writing
Wire.write(config_Address); // Address the Configuration register
Wire.write(0); // write the value to register
Wire.endTransmission(); // Stop transmitting
delay(100);
}
The above section is writing 00000000b register 10H
void loop() {
Wire.beginTransmission(HallAddressRead); // Address the sensor for Reading
Wire.write(X_Axis_MSB); // Write pointer register
Wire.requestFrom(HallAddressRead, 1); // 1 byte from sensor.
value = Wire.read(); // Read byte from register 12
Wire.endTransmission(); // Stop transmitting
Serial.println(value);
delay (500);
}
I find that value always equals 255 (11111111b).
Has anyone got any idea how I should be interacting with this device, or can provide some advice? Show Less
3D Hall (Magnetic sensor)
I read data from tlv493 via i2c bus with xilinx fpga spartan6. the setting procedure is:for low power mode:1. write data (0x00 0x80 0x00 0x60) to addr...
Show More
I read data from tlv493 via i2c bus with xilinx fpga spartan6.
the setting procedure is:
for low power mode:
1. write data (0x00 0x80 0x00 0x60) to address 0xBC;
2. write data (0x00 0x85 0x00 0x60) to address 0xBC;
for fast mode:
1. write data (0x00 0x80 0x00 0x60) to address 0xBC;
2. write data (0x00 0x86 0x00 0x60) to address 0xBC;
After mode set, int is produced according power mode, it works well, then I read data follow INT signal after 12us.
For the data read from sensor, Bx is right all the time,but By and Bz and Temp is wrong sometimes,when it is wrong, the register 2 to 6 are 0xff.
The other question is that in low power mode FRAM COUNTER is not increment all the time, It even depends on magnetic field intensity, sometimes normal, sometimes abnormal.
I am totally confused!
test picture

Write to sensor with 4 bytes

Read from sensor with 7 bytes

Read detals
Show Less
the setting procedure is:
for low power mode:
1. write data (0x00 0x80 0x00 0x60) to address 0xBC;
2. write data (0x00 0x85 0x00 0x60) to address 0xBC;
for fast mode:
1. write data (0x00 0x80 0x00 0x60) to address 0xBC;
2. write data (0x00 0x86 0x00 0x60) to address 0xBC;
After mode set, int is produced according power mode, it works well, then I read data follow INT signal after 12us.
For the data read from sensor, Bx is right all the time,but By and Bz and Temp is wrong sometimes,when it is wrong, the register 2 to 6 are 0xff.
The other question is that in low power mode FRAM COUNTER is not increment all the time, It even depends on magnetic field intensity, sometimes normal, sometimes abnormal.
I am totally confused!
test picture
Write to sensor with 4 bytes
Read from sensor with 7 bytes
Read detals
3D Hall (Magnetic sensor)
Hi,Although this question was asked previously by a member in this forum but no one in this forum explain the solution of it.So, i am posting it again...
Show More
Hi,
Although this question was asked previously by a member in this forum but no one in this forum explain the solution of it.
So, i am posting it again so that this type of configuration can be understand clearly.
The Question is:
Is TLE493D able to detect both 3D joystick position and angle rotation at a same application with only one chip and same magnet magnetization?
More specific, one joystick is placed above the sensor. When the joystick is moved to a certain position, then it is rotated. So in this application, could TLE493D be used as implementation of joystick position and angle check at the same time?
If not than what configuration can be used to achieve this type of application.
I hope the expert in this forum will be able to explain this:
Thanks in advanced.
regards,
MK Show Less
Although this question was asked previously by a member in this forum but no one in this forum explain the solution of it.
So, i am posting it again so that this type of configuration can be understand clearly.
The Question is:
Is TLE493D able to detect both 3D joystick position and angle rotation at a same application with only one chip and same magnet magnetization?
More specific, one joystick is placed above the sensor. When the joystick is moved to a certain position, then it is rotated. So in this application, could TLE493D be used as implementation of joystick position and angle check at the same time?
If not than what configuration can be used to achieve this type of application.
I hope the expert in this forum will be able to explain this:
Thanks in advanced.
regards,
MK Show Less
3D Hall (Magnetic sensor)
TLV493D acknowledge problem
Solved
I'm currently testing out a TLV493D magnetic sensor on an arduino. I think I have some problems with the acknowledge bit. It does not pull completely ...
Show More
I'm currently testing out a TLV493D magnetic sensor on an arduino. I think I have some problems with the acknowledge bit. It does not pull completely down, just 2/3 of the way. I have added a picture of the oscilloscope read out and my setup.
So far I have tried with two different TLV493D sensors (one at a time), same problem with both. I have also tried with two different Arduino boards. I have also tried without the logic level converter and a 3.3v arduino board, but still the same problem.
I have tried 3 different codes other people have gotten to to work and one I wrote my self. Still the same problem. I tried using different I2C libraries for arduino, one were a bit faster and made more square looking waves, but still the same problem. I tried hooking
up a MPU6050 with it's own caps and pullup resistors to the I2C bus. The MPU6050 worked as it should but I still had the problem with the TLV493D. It also seems I get the 2/3 acknowledge signal at the 0xF1 address. Any suggestions?

Show Less
So far I have tried with two different TLV493D sensors (one at a time), same problem with both. I have also tried with two different Arduino boards. I have also tried without the logic level converter and a 3.3v arduino board, but still the same problem.
I have tried 3 different codes other people have gotten to to work and one I wrote my self. Still the same problem. I tried using different I2C libraries for arduino, one were a bit faster and made more square looking waves, but still the same problem. I tried hooking
up a MPU6050 with it's own caps and pullup resistors to the I2C bus. The MPU6050 worked as it should but I still had the problem with the TLV493D. It also seems I get the 2/3 acknowledge signal at the 0xF1 address. Any suggestions?
3D Hall (Magnetic sensor)
TLV493D returns NCK
Solved
Hi, I'm using a TLV493D with a power separated by FET from microcontroller power, like Slave #1 in figure 14 of I2C interface note (https://www.infineon.com/dgdl/Infineon-TLV493D-A1B6_UM-UM-v01_02-EN.PDF?fileId=5546d462525dbac401530e81c9db058c...
Show More
Hi,
I'm using a TLV493D with a power separated by FET from microcontroller power, like Slave #1 in figure 14 of I2C interface note (https://www.infineon.com/dgdl/Infineon-TLV493D-A1B6_UM-UM-v01_02-EN.PDF?fileId=5546d462525dbac401530e81c9db058c)
Sometimes my few TLVs return NCK and cannot recover even turn on/off by IO_0 pin.
A difference between the note and my project is SCL pin is high during 200us of after power on by getting IO_0 high.
Does this SCL behavior seriously affect the I2C address setting/communication?
I'm feeling strange since many of my TLVs are successfully work but this happens with few chips beside low frequency. Show Less
I'm using a TLV493D with a power separated by FET from microcontroller power, like Slave #1 in figure 14 of I2C interface note (https://www.infineon.com/dgdl/Infineon-TLV493D-A1B6_UM-UM-v01_02-EN.PDF?fileId=5546d462525dbac401530e81c9db058c)
Sometimes my few TLVs return NCK and cannot recover even turn on/off by IO_0 pin.
A difference between the note and my project is SCL pin is high during 200us of after power on by getting IO_0 high.
Does this SCL behavior seriously affect the I2C address setting/communication?
I'm feeling strange since many of my TLVs are successfully work but this happens with few chips beside low frequency. Show Less
3D Hall (Magnetic sensor)
TLE493D-W2B6What is the correct way to calculate the wake up and configuration parity in order to enable the wakeup feature?I am having issues placing...
Show More
TLE493D-W2B6
What is the correct way to calculate the wake up and configuration parity in order to enable the wakeup feature?
I am having issues placing this part into wakeup mode. The i2c user manual says for the WU register (0x0D), to enable the WU feature, the CP bit HAS to be 1 (register 0x10) and the CF bit in register 0x06 has to be read as 1.
The problem I am having is that I setup the thresholds in registers 0x07 - 0x0F and I then calculate the parity but I end up with a 0 value that is loaded into CP. If I force CP to 1 regardless, the CF is read as 0. In either condition,
the WA flag in the WU register (0x0D) shows the wake up feature is not enabled. Show Less
What is the correct way to calculate the wake up and configuration parity in order to enable the wakeup feature?
I am having issues placing this part into wakeup mode. The i2c user manual says for the WU register (0x0D), to enable the WU feature, the CP bit HAS to be 1 (register 0x10) and the CF bit in register 0x06 has to be read as 1.
The problem I am having is that I setup the thresholds in registers 0x07 - 0x0F and I then calculate the parity but I end up with a 0 value that is loaded into CP. If I force CP to 1 regardless, the CF is read as 0. In either condition,
the WA flag in the WU register (0x0D) shows the wake up feature is not enabled. Show Less
3D Hall (Magnetic sensor)
I have dual TLV493D sensors I've been trying to get working. I've used multiple configurationsMSP430 + TLV493D on perfboardATMEGA (3.3V) + TLV493 on c...
Show More
I have dual TLV493D sensors I've been trying to get working. I've used multiple configurations
In each implementation I can get either of the two sensors to work on either of the two addresses but when I try to run the two concurrently one or the other addresses throw a NAK

My most recent code is attached (using the Arduino IDE 1.0.3 board/libraries front-end provided by Infineon 😞
I assume I have tunnel vision now if you folks can get me out of the tunnel I'd appreciate it.
Thanks much and have a great weekend!
Uily Show Less
- MSP430 + TLV493D on perfboard
- ATMEGA (3.3V) + TLV493 on custom PCB
- XMC1100 2go + TLV493 on 2nd custom PCB
In each implementation I can get either of the two sensors to work on either of the two addresses but when I try to run the two concurrently one or the other addresses throw a NAK
My most recent code is attached (using the Arduino IDE 1.0.3 board/libraries front-end provided by Infineon 😞
#include
#define SECONDARY_PIN 5 // P0.15
void setup() {
Serial.begin(9600);
while(!Serial);
delay(2000);
Serial.println("Initialization...");
delay(500);
pinMode(SECONDARY_PIN, OUTPUT); // Sensor #2 Power Pin
digitalWrite(SECONDARY_PIN, LOW); // Force Sensor #2 off
Serial.println("Starting Sensor #1");
magnetic3dSensor_primary.begin();
delay(100);
Serial.println("Starting Sensor #2");
digitalWrite(SECONDARY_PIN, HIGH);
delay(10);
magnetic3dSensor_secondary.begin();
Serial.println("Setup complete");
}
void loop() {
magnetic3dSensor_primary.updateData();
delay(100);
magnetic3dSensor_secondary.updateData();
delay(100);
}
I assume I have tunnel vision now if you folks can get me out of the tunnel I'd appreciate it.
Thanks much and have a great weekend!
Uily Show Less
Forum Information
3D Hall (Magnetic sensor)
In this forum you can post your questions, comments and feedback about the XENSIX™ 3D Hall sensors, a sensor family (TLx493D) which is using a hall-based technology in order to detect the strength of a magnetic field in all three dimensions, i.e. x-, y- and z-axis. This family fits into industrial and consumer applications such as control elements and joysticks. Furthermore, it is the ideal fit for low-power automotive applications like indicators and gear shifters. Here you can also find the links to the latest board pages, GitHub, documents, simulation tools and FAQs.
Important links
Evaluation Boards
GitHub Libraries
Simulation Tools
Resources
Knowledge Base Articles