Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-266.24 just keeps appear in my serial monitor (TLE493D-W2B6A2) #31

Open
ajayrwarrier opened this issue Jan 10, 2024 · 2 comments
Open

Comments

@ajayrwarrier
Copy link

We have made a custom PCB that connects an ESP32 to TLE493D-W2B6 A2. We have made the schematic using the official datasheet. We are getting -256, 0 or -1 as output. we are using the latest GitHub official library, in the constructor we are providing

Tle493d Tle493dMagnetic3DSensor = Tle493d(Tle493d::MASTERCONTROLLEDMODE,Tle493d::TLE493D_A2);

Will attach the schematic as well.

Please help.

/**
* For basic setup just create a Tle493d() object. If you want to use the wake up mode please use Tle493d_w2b6(). Also
* the setUpdateRate() method is slightly different for different variants
*/


#include <Tle493d.h>

Tle493d Tle493dMagnetic3DSensor = Tle493d(Tle493d::MASTERCONTROLLEDMODE,Tle493d::TLE493D_A2);

void setup() {
  Serial.begin(9600);
  while (!Serial);
  Tle493dMagnetic3DSensor.begin();
  Tle493dMagnetic3DSensor.enableTemp();
}

void loop() {
  Tle493dMagnetic3DSensor.updateData();

  Serial.print(Tle493dMagnetic3DSensor.getX());
  Serial.print(" ; ");
  Serial.print(Tle493dMagnetic3DSensor.getY());
  Serial.print(" ; ");
  Serial.println(Tle493dMagnetic3DSensor.getZ());
  
  delay(500);
}

signal-2024-01-10-152712_002

@ajayrwarrier
Copy link
Author

I have seen the resolved issues around A2B6 but we are using W2B6 and none of those solutions nor the official library seems to work.

@ajayrwarrier ajayrwarrier changed the title -266.24 just keeps appear in my serial monitor -266.24 just keeps appear in my serial monitor (TLE493D-W2B6A2) Jan 10, 2024
@9Volts9er
Copy link
Contributor

Not sure if this issue is resolved, yet. It has been quite some time since I last looked into this repository, sorry.
Best way to find out what's going on, is to use an oscilloscope or a logic analyzer at the data pins.
I would guess that the time between setting VDD HIGH and configuring the sensor is too long. So the I²C hardware unit of the ESP might have problems with the Interrupt pulses from the sensor.
Can you try setting VDD HIGH directly before Tle493dMagnetic3DSensor.begin(); ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants