Skip to main content

CircuitPython driver for 3D Magnetic Sensor.

Project description

TLV493D-A1B6-3DMagnetic-Sensor

Summary

The 3D magnetic sensor TLV493D-A1B6 offers accurate three-dimensional sensing with extremely low power consumption in a small 6-pin package. With its magnetic field detection in x, y, and z-direction the sensor reliably measures three-dimensional, linear and rotation movements. Applications include joysticks, control elements (white goods, multifunction knops), or electric meters (anti tampering) and any other application that requires accurate angular measurements or low power consumptions.

Key features are 3D magnetic sensing with a very low power consumption during operations. The sensor has a digital output via 2-wire based standard I2C interface up to 1 MBit/sec and 12 bit data resolution for each measurement direction (Bx, By and Bz linear field measurement up to +-130mT).

Key Features and Benefits

  • Integrated temperature sensing
  • Low current consumption of 0.007 µA in power down mode and 10 µA in ultra low power mode
  • 2.7 to 3.5 V operating supply voltage
  • Digital output via 2-wire standard I2C interface
  • Bx, By and Bz linear field measurement up to ±130 mT
  • 12-bit data resolution for each measurement direction
  • Resolution 98 µT/LSB
  • Operating temperature range from -40 °C to 125 °C

Dependencies

This driver depends on:

  • python version 3 and above
  • SMBus

Please ensure all dependencies are resolved before proceeding further.

Steps for installation

Supported hardware --> Raspberry pi Zero/3/3B+/4B

  • Update apt

sudo apt update

  • Enable i2c (Interfacing options menu and then I2C enable). For detailed steps see this article.

sudo raspi-config

  • Install pip3

sudo apt install python3-pip

  • Install smbus

pip3 install smbus
sudo apt-get install -y python-smbus i2c-tools

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver from PyPI

For current user:


pip3 install TLV493D

To install system-wide (this may be required in some cases):


sudo pip3 install TLV493D

Connection diagram:

Raspberry Pi TLV
3.3V 3V3
GND GND
BCM 2 (pin3) SDA
BCM 3 (pin 5) SCL
  • Clone the Github repository or download the .zip, unzip it, go to examples folder and run the sample code.

Printables

The TLx493D 3D magnetic sensor family has additional tools which can be directly mounted on top of the evaluation boards. The 3D print data of the joystick, the rotate knob and the linear slider can be found in the folder printables.

Board Information, Datasheet and Additional Information

The datasheet for the TLV493D-A1B6 can be found here TLV493D-A1B6 Datasheet while respective application notes are located here Application Notes.

Please check the wiki with more information for the TLV493D-A1B6 3DSense Shield2Go as well.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TLV493D-1.0.1.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

TLV493D-1.0.1-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page