Giter VIP home page Giter VIP logo

tlv493d-a1b6-3dmagnetic-sensor's People

Contributors

9volts9er avatar djaumann avatar ederjc avatar jaenrig-ifx avatar mhollfelder avatar pandayswarnam avatar sherylll avatar vroni99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tlv493d-a1b6-3dmagnetic-sensor's Issues

Cartesian_low_power example always showing same data

When trying the library with a '3D magnetic sensor 2GO' board, with example 'Cartasian_low_power' is always shows this in serial monitor:

image

I'm using the arduino IDE v1.8.5 and library v1.0.1.
The board itself is working fine in the 3D toGo IDE.

The output of the compiler/uploader:

--------------------------
Infineon XMC Flasher Lite
Copyright Infineon Technologies 2017
--------------------------
Windows 10
Operating System: Windows 10

Initialisation
--------------------------
Windows 10
Loading JLink Library... 
JLink Library Version: V6.44d

Configuring Device
Device Name : XMC1100-0064
Interface   : SWD
Speed       : 4000
File Upload
--------------------------
Uploading C:\Users\xxxxxx\AppData\Local\Temp\arduino_build_506221/Cartesian_low_power.ino.hex
... Done
--------------------------
... Finished Succesfully

TLE493D

Should this library work with new TLE493D sensor? In MagneticSensor3D.h you have some notes about sensor configuration, but according spec this sensor have at least two Fast Mode's (7.5 kHz and 5.7 kHz).

PS: Tried to communicated with TLE493D via this library, no luck.

TLV439D-A1B6 no I2C communication

Anyone got the examples in the repository to work?

I am using TLV493D-A1B6 MS2GO and TLV493D-A1B6-3DMagnetic-Sensor-1.0.3 library. The sensor reading is 0 for all the axis. When I used Infineon's GUI (which confirmed the sensor is TLV not TLE), everything is fine, so l know the hardware is fine.

Do l really need to change

typedef enum Tlv493d_Address
{
TLV493D_ADDRESS1 = 0x1F,
TLV493D_ADDRESS2 = 0x5E
}Tlv493d_Address_t;

to

typedef enum Tlv493d_Address
{
TLV493D_ADDRESS1 = 0x5E
}Tlv493d_Address_t;

What did your guys change to get the example to work?

I did not have issue with the TLE repository for single 3D sensor. The TLE system does work funny when you use two or more sensors. I was hoping TLV will give me better i2c performance.

Thanks.

Regards

Ben

14 15

What are pins 14 and 15
pinMode(14, OUTPUT); SDL SLK ?
pinMode(15, OUTPUT); SDL SLK ?

Sensor2Go not powered

I chose the XMC2Go Board to flash the program. The Sensor does not get 3.3 Volts on the dedicated pin as probably port 15 is not set to HIGH.

#ifdef TLV493D_A1B6_KIT2GO
pinMode(LED2, OUTPUT);
digitalWrite(LED2, HIGH);
delay(50);
#endif

I think the issue is in the above code.

Errors in new library

...\MagneticSensor3D\src\MagneticSensor3D.cpp: In member function 'void Tlv493d::begin()':

C:\Users\xxx\Documents\Arduino\libraries\MagneticSensor3D\src\MagneticSensor3D.cpp:32:32: error: 'TRUE' was not declared in this scope

  begin(Wire, TLV493D_ADDRESS1, TRUE);

How to init using 400kHz clock rate?

I see that the library has a setAccessMode that can switch between various modes, including FASTMODE (1MHz with special clock handling).
But how do you set plain old 400kHz clock rate, and switch between that and even-plainer 100kHz mode?

As a part of this, I would note that considerable confusion is introduced by this library using the enum label "FASTMODE" to refer to the 1MHz clock-rate mode (and having some additional requirements). The I2C user-guide specifies:

  • Standard mode: up to 100 kbit/s
  • Fast-mode: up to 400 kbit/s, with some additional requirements for transmitters and receivers capable of this speed.
  • Fast-mode Plus: up to 1 Mbit/s, with some further requirements for transmitters and receivers capable of this speed.

The most egregious problem is that the library FASTMODE doesn't match the I2C standard "Fast-mode".

Beyond that, it's not clear to me how the mode of TLV493D that's invoked by the library "FASTMODE" does or doesn't correspond to I2C "Fast-mode Plus".

TLE493D-W2B6-a3

Hello,
I just bought this chip.

could i use it with Arduino?

best regards,
Francesco

STM32

Hello,

our project is based on STM32 Plattform. Is the Tlv493d Library also available for STM32?
We get compiling errors for STM32. it is working fine with a ATMEGA328 chip.

Regards,
Armin

Data "freezes" after some time, reseting gets back to work

Hello there,

I am using a Python script with PySerial module to communicate with TLV493D-A1B6 MS2Go V3.2 kit.

With Arduino IDE, I programmed the sensor in MASTER CONTROLLED MODE based on the Cartesian_Fast example. In the loop function I read serial and if there is an specific character, I write to serial the magnetic field values. I am using the latest release of the Arduino library.

The Python script writes to serial that specific character when field values are wanted, and then reads serial.

The thing is, in the Python script I am reading in a loop because I want to sample X times the field values. I send the command, read serial to get the message, do a 2 ms sleep and then send the command again.

It works, but sometimes I start to get the exact same field values even when I am sure they must be different. If I reset the sensor (re-uploading the Arduino sketch or simply unplugging and plugging back the USB cable), it gets back to work as it should. The number of readings I can perform before this "freezing" is not fixed. Once I could do up to 26 k readings, once less than 5 k.

My guess is that somehow the sensor itself "dies" and register values are not longer updated. So the XMC uC puts into serial the latest value before the crash.

Any ideas on why this happens? And how could I avoid it?
I could add another function to the Arduino sketch to force a reset of the sensor if another specific command is received in serial, and periodically send that command in my Python script. But initially I would like to avoid that,

The sleep of 2 ms in the Python script was chosen after checking how long it took for new data to be available: I timed the updateData() method using micros() in the Arduino sketch, and it yielded on average 1800 us. I had to use two updateData() in a row because new data wasn't showing up properly with only one function call. This comes to a second question: how to properly set the sampling frequency in MASTER CONTROLLED MODE without losing bits of resolution? I would like to sample as fast as possible while keeping the 12 bits. But this can be done later.

Thank you!

ADC hang up in Master Controlled or Fast Mode

Hello,

I'm constantly running up against the ADC hangup issue.
I've tried a few ways to try and implement a general reset as suggested in section 5.61 of the User Manual, but nothing has worked for me yet.

Any advice on implementing the general reset?

Additionally,would you consider making it part of the library?

Thanks

Adafruit HUZZAH32

I am trying to use the TLV493D-A1B6 board with a Adafruit HUZZAH32 Arduino dev board.

I started with the magnetic sensor board pictured at the top of this github readme file.

I broke away the small sensor board from the main board so I could connect the HUZZAH32 to it. I made a cable that lets me connect it back to your board and that works fine.

If I use the PC software to get values everything works fine. On the scope I see several bytes of clock and data over and over really fast.

I install this github library and it compiles and builds.

I connect it to my HUZZAH32 board and I get nothing.

When I watch the start up on a scope on the i2c lines I see the clock going and data going so I know I have the correct pins.

The problem is that when it tries to read data I get nothing. All of the examples do the same things. They just send an 8 byte worth of clock over and over about every second and nothing else.

During initialization I do see 4 bytes of clock and data, but am not sure what that means.

How do I figure out what is going wrong?

Dual sensor example?

Is it possible to post some simple example for dual TLV493D sensors? I follow the power up procedure described in the user manual, but with no luck.
Thanks!

Cartesian Example only returning X0, Y0, Z0 continuously

Hi Juan,

I seem to be encountering a similar issue as Mark reported 2 years ago in the closed issue:
#12 (comment)

I'm getting readings:
X = 0.00 mT; Y = 0.00 mT; Z = 0.00 mT

Meanwhile, the device works smoothly in the GUI application. The GUI application shows that I have device TLV493D-A1B6.
The board itself is labelled "TLV493D-A1B6_2GO_V3.2"

Tried to use the recommended solution at that time, via kit2go-wa branch https://github.com/Infineon/TLV493D-A1B6-3DMagnetic-Sensor/tree/kit2go-wa that you shared on 14 May 2019. However, that branch does not seem to exist any more.

Would appreciate advice how I can get the code working, or how I can edit the library directly to enable that power pin assuming it is a similar issue.

Thanks!
Gi

TLV493D-A1B6-3D with nordic Nrf52 unstable values

Hello,
I am getting some measurement but they are quite random e.g my raw measurement i.e. converting data to signed 12 bit integer values are as follows

Bx = 0, By = 0 Bz = -1 temp = 342
Bx = 0, By = 1 Bz = 0 temp = 341
Bx = -2, By = 0 Bz = 1 temp = 342
Bx = 0, By = -1 Bz = 1 temp = 342
Bx = -1, By = -1 Bz = 0 temp = 342
Bx = 0, By = 1 Bz = 0 temp = 341
Bx = 1, By = 1 Bz = 1 temp = 343
Bx = -1, By = 2 Bz = 0 temp = 341
Bx = -1, By = -1 Bz = 0 temp = 342
Bx = -2, By = 1 Bz = 0 temp = 341
Bx = 2, By = 1 Bz = 0 temp = 342
Bx = 0, By = 0 Bz = 1 temp = 342
Bx = 0, By = -1 Bz = 0 temp = 341
Bx = 0, By = 1 Bz = 0 temp = 342
Bx = -1, By = 0 Bz = 0 temp = 342
Bx = 2, By = 1 Bz = 0 temp = 342
Bx = -2, By = 1 Bz = 0 temp = 341
Bx = -1, By = 0 Bz = 0 temp = 341
Bx = 0, By = 1 Bz = 0 temp = 341
Bx = 3, By = 0 Bz = 0 temp = 342
Bx = 1, By = 0 Bz = -1 temp = 342
Bx = 2, By = -1 Bz = 1 temp = 342

Now I am not sure whether I am reading the measurement wrong or these are the values expected from sensor. I am not touching the sensor and it is lying on the table. Additionally, I am using Nordic NRF52 controller, sensor TLV393D-A1B6 and I using the driver given on infineon official website.

Can't flash with Arduino

When I try to flash with Arduino I get this:
[Error] Infineon.DebuggerExceptions: It seems that JLink software is not installed please download from www.segger.com and install it. You can specify it by setting java property xmcFlasher.JLink.dllPath

I have tried the GUI and it detects everything normally. I have the board set to XMC1100 XMC2Go, Programmer AVRISP mkll

Readings stay the same

I've tried both cartesian and spherical sketches and the same readings are printed regardless of how far or the orientation of the magnet.

Readings:
Amount = 0.17 mT; Azimuth angle (rad) = -2.36 ; Polar angle (rad) = -0.62

X = -0.10 mT; Y = -0.10 mT; Z = -0.10 mT

Sensor Reads only 0xFF

Hi,
any ideas why I can't get measurements from the sensor? I always read back 0xFF.
But the acknowledgement seems to work,
also the sensors is detected at 0x1F when using a simple i2c slave scanner arduino sketch.

I'm using the examples/cartesian_fast example - on an esp8266.
I added some print statements to the BusInterface.cpp - the result looks like this:

---------BEGIN SETUP------
Addr1F
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Send:0
I2C Send:18
I2C Send:0
I2C Send:20
I2C Send:0
I2C Send:9B
I2C Send:0
I2C Send:60
Addr1F
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Send:0
I2C Send:18
I2C Send:0
I2C Send:20
I2C Send:0
I2C Send:9B
I2C Send:0
I2C Send:60
I2C Send:0
I2C Send:1B
I2C Send:0
I2C Send:E0
---------BEGIN READ LOOP------
Addr1F
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Read:FF
I2C Read:FF
-0.10 ; -0.10 ; -0.10

Any ideas?

3+ sensors

Hi there, thank you for the library as is, works great. Do you have any examples for 3+ sensors, my project uses 3 hopefully but from reading seems like once you go above 2 the process for 3-8 seems to be different to the dual example given? Thank you in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.