DWL5500XY


NameDWL5500XY JSON
Version 0.0.0 PyPI version JSON
download
home_page
SummaryAn inofficial python library for the Digipas DWL5500XY high precision inclinometer.
upload_time2023-12-04 18:11:40
maintainer
docs_urlNone
author
requires_python>=3
licenseMs-PL
keywords inclination digipas dwl5500xy dwl5500 dwl-5500xy inclinometer
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Upload Python Package](https://github.com/missing-user/py-DWL5500XY/actions/workflows/python-publish.yml/badge.svg)](https://github.com/missing-user/py-DWL5500XY/actions/workflows/python-publish.yml)
# Description
Python library and a small recording script for the [Digipass DWL5500XY inclinometer](https://www.digipas.com/product/precision-measurement/2-axis-inclination-sensor-module/dwl-5500xy.php), which fixes a few minor in [Stormholt's implementation](https://github.com/Stormholt/DWL5500XY-Python). 
For further details regarding the sensor, please read the [instruction manual](https://www.digipas.com/documents/DWL-5x000%20Instruction%20Manual-rev.2.4.12.pdf). 

The DWL5500-XY is an inclinometer (sensor that measures the angle against gravity) with an accuracy and precision of 0.001 deg. It internally uses a high precision accelerometer and therefore uses strong filtering to get rid of the noise. Measurements therefore need some time to settle (up to 5 minutes after sharp movements. Settling time is lower for small movements).

# Installation
> [!IMPORTANT]
> Both the libraries `serial` and `pyserial` can be imported as `import serial`. This module expects a `pyserial` installation, and will not work with the incorrect library!
```sh
git clone https://github.com/missing-user/py-DWL5500XY.git
pip install py-DWL5500XY
```
# Quickstart
1. Place the sensor according to one of the graphics below. Dual axis angle measurement is only available when oriented as in Figure 32 ![Graphic about mounting styles from the instruction manual](docs/angle_measurement_modes.png)
2. Let the sensor warm up and settle in for 15 minutes after connecting it to power to get the full measurement accuracy.
3. Run `python inclinometer_gui.py` from your terminal to open the recording tool.
4. It will ask you for the serial port your device is connected to. Type it into the terminal and press enter.
# Usage
1. Open the serial connection. On Windows you can find the port by opening `Windows Key > Device Manager > COM Devices` and identifying the COM port that appears when plugging in the USB to serial converter of your sensor. On Linux, you can list connected serial devices using `ls /sys/class/tty/ttyUSB*`. Replace the port name in the code by the one you identified. ![windows screenshot](docs/Windows10USB.png)
  ```python
  import os
  import DWL5500XY
  sc = DWL5500XY.Sensor(True) # The argument controls Logging level
  if os.name == 'nt':
    sc.open_connection("COM5") # Windows style serial port
  else:
    sc.open_connection('/dev/ttyUSB0') # Linux style serial port
  ```
2. Initialize the sensor and set the location you are operating in (county codes can be found starting on page 60 of the instruction manual). The location dependent gravitational acceleration constant `g` is internally used for filtering. 
  ```python
  sc.initialize_sensor()
  sc.set_location_code(0x17, 0x0E) # Germany, Munich
  sc.set_mode(sc.LOCATION_MODE) # Call after setting the location code
  ```
3. Switch the sensor into the correct measurement mode. It supports dual axis angle measurement (in degrees) (default), single axis angle measurement (in degrees), vibration measurement (in multiples of g).
  ```python
  sc.set_mode(sc.DUAL_MODE)
  # sc.set_mode(sc.SINGLE_MODE)
  # sc.set_mode(sc.VIBRO_MODE)
  ```
4. Periodically read data from the sensor.
  ```python
  sc.read_response() # Blocking function, sensor returns measurements at a rate of 10Hz 
  ```
# Re-Calibration
Connect to the sensor as usual, then call `sc.calibration()` and follow the instructions from the terminal.
> [!CAUTION]
> ***Calling the calibration function will overwrite the factory settings!***
>
> If you have purchased a new DWL5500XY sensor, i suggest to **NOT PERFORM A NEW CALIBRATION**! The sensor should be calibrated at the factory, and will most probably be better than what you can achieve, unless you really know what you're doing. You have been warned.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "DWL5500XY",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": "",
    "keywords": "inclination,digipas,DWL5500XY,DWL5500,DWL-5500XY,inclinometer",
    "author": "",
    "author_email": "Philipp Juasic <philipp@jurasic.dev>, \"Ajs R. Stormholt\" <nicetry@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/18/bc/85471b41cdb673a8dc0ff75620f22a423daad7aed33c9d70a46def60ee75/DWL5500XY-0.0.0.tar.gz",
    "platform": null,
    "description": "[![Upload Python Package](https://github.com/missing-user/py-DWL5500XY/actions/workflows/python-publish.yml/badge.svg)](https://github.com/missing-user/py-DWL5500XY/actions/workflows/python-publish.yml)\n# Description\nPython library and a small recording script for the [Digipass DWL5500XY inclinometer](https://www.digipas.com/product/precision-measurement/2-axis-inclination-sensor-module/dwl-5500xy.php), which fixes a few minor in [Stormholt's implementation](https://github.com/Stormholt/DWL5500XY-Python). \nFor further details regarding the sensor, please read the [instruction manual](https://www.digipas.com/documents/DWL-5x000%20Instruction%20Manual-rev.2.4.12.pdf). \n\nThe DWL5500-XY is an inclinometer (sensor that measures the angle against gravity) with an accuracy and precision of 0.001 deg. It internally uses a high precision accelerometer and therefore uses strong filtering to get rid of the noise. Measurements therefore need some time to settle (up to 5 minutes after sharp movements. Settling time is lower for small movements).\n\n# Installation\n> [!IMPORTANT]\n> Both the libraries `serial` and `pyserial` can be imported as `import serial`. This module expects a `pyserial` installation, and will not work with the incorrect library!\n```sh\ngit clone https://github.com/missing-user/py-DWL5500XY.git\npip install py-DWL5500XY\n```\n# Quickstart\n1. Place the sensor according to one of the graphics below. Dual axis angle measurement is only available when oriented as in Figure 32 ![Graphic about mounting styles from the instruction manual](docs/angle_measurement_modes.png)\n2. Let the sensor warm up and settle in for 15 minutes after connecting it to power to get the full measurement accuracy.\n3. Run `python inclinometer_gui.py` from your terminal to open the recording tool.\n4. It will ask you for the serial port your device is connected to. Type it into the terminal and press enter.\n# Usage\n1. Open the serial connection. On Windows you can find the port by opening `Windows Key > Device Manager > COM Devices` and identifying the COM port that appears when plugging in the USB to serial converter of your sensor. On Linux, you can list connected serial devices using `ls /sys/class/tty/ttyUSB*`. Replace the port name in the code by the one you identified. ![windows screenshot](docs/Windows10USB.png)\n  ```python\n  import os\n  import DWL5500XY\n  sc = DWL5500XY.Sensor(True) # The argument controls Logging level\n  if os.name == 'nt':\n    sc.open_connection(\"COM5\") # Windows style serial port\n  else:\n    sc.open_connection('/dev/ttyUSB0') # Linux style serial port\n  ```\n2. Initialize the sensor and set the location you are operating in (county codes can be found starting on page 60 of the instruction manual). The location dependent gravitational acceleration constant `g` is internally used for filtering. \n  ```python\n  sc.initialize_sensor()\n  sc.set_location_code(0x17, 0x0E) # Germany, Munich\n  sc.set_mode(sc.LOCATION_MODE) # Call after setting the location code\n  ```\n3. Switch the sensor into the correct measurement mode. It supports dual axis angle measurement (in degrees) (default), single axis angle measurement (in degrees), vibration measurement (in multiples of g).\n  ```python\n  sc.set_mode(sc.DUAL_MODE)\n  # sc.set_mode(sc.SINGLE_MODE)\n  # sc.set_mode(sc.VIBRO_MODE)\n  ```\n4. Periodically read data from the sensor.\n  ```python\n  sc.read_response() # Blocking function, sensor returns measurements at a rate of 10Hz \n  ```\n# Re-Calibration\nConnect to the sensor as usual, then call `sc.calibration()` and follow the instructions from the terminal.\n> [!CAUTION]\n> ***Calling the calibration function will overwrite the factory settings!***\n>\n> If you have purchased a new DWL5500XY sensor, i suggest to **NOT PERFORM A NEW CALIBRATION**! The sensor should be calibrated at the factory, and will most probably be better than what you can achieve, unless you really know what you're doing. You have been warned.\n",
    "bugtrack_url": null,
    "license": "Ms-PL",
    "summary": "An inofficial python library for the Digipas DWL5500XY high precision inclinometer.",
    "version": "0.0.0",
    "project_urls": {
        "Homepage": "https://github.com/missing-user/py-DWL5500XY"
    },
    "split_keywords": [
        "inclination",
        "digipas",
        "dwl5500xy",
        "dwl5500",
        "dwl-5500xy",
        "inclinometer"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a568587c27c05160020975c74022710a07c02f1004b700da644a5b9fc916ccef",
                "md5": "1a00d423a64fd767d321203ad6535ffe",
                "sha256": "d25373e270d0bb729fc4d409a9a64308e1c7ade9747a9cb44afe26b59e7f8364"
            },
            "downloads": -1,
            "filename": "DWL5500XY-0.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1a00d423a64fd767d321203ad6535ffe",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 7649,
            "upload_time": "2023-12-04T18:11:39",
            "upload_time_iso_8601": "2023-12-04T18:11:39.111415Z",
            "url": "https://files.pythonhosted.org/packages/a5/68/587c27c05160020975c74022710a07c02f1004b700da644a5b9fc916ccef/DWL5500XY-0.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "18bc85471b41cdb673a8dc0ff75620f22a423daad7aed33c9d70a46def60ee75",
                "md5": "a67262e57dd14cc9c59e0a8acc90c0ec",
                "sha256": "bf6ede81ecaf287c9ed84e1342941144da07baad835a105074e7b3e0ac862f08"
            },
            "downloads": -1,
            "filename": "DWL5500XY-0.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a67262e57dd14cc9c59e0a8acc90c0ec",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 7186,
            "upload_time": "2023-12-04T18:11:40",
            "upload_time_iso_8601": "2023-12-04T18:11:40.662952Z",
            "url": "https://files.pythonhosted.org/packages/18/bc/85471b41cdb673a8dc0ff75620f22a423daad7aed33c9d70a46def60ee75/DWL5500XY-0.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-04 18:11:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "missing-user",
    "github_project": "py-DWL5500XY",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "dwl5500xy"
}
        
Elapsed time: 0.17613s