Skip to main content

NX Solutions Work Log

Project description

Introduction

The NSRT_mk3_Dev is a new variant of the NSRT_mk3 series that introduces an open virtual Com port communication protocol. That means that the instrument can be used on any platform that has a generic driver to support the CDC (Communication) USB class. Nowadays most platforms support that class, including Windows, Mac and Linux. That instrument is targeted at developers. Because its communication protocol is open, developers can design their own application supporting the instrument. In addition to the Com port, the NSRT_mk3_Dev can have an optional USB Audio interface to stream the actual Audio signal captured by the microphone.

Usage

  1. Connect the NSRT mk3 dev to the computer

  2. Check the virtual Com port under which it was enumerated:

    1. Windows: WIN + type: Device Manager

      Look for the extra device:

      USB Serial Device (COM20)

      Indicating the device can be found on COM20

    2. Linux: type:

      dmesg | grep -i usb

      and look for:

      [22339.508035] usb 1-1.2: Product: NSRT_mk3_Dev
      [22339.508044] usb 1-1.2: Manufacturer: Convergence Instruments
      [22339.520711] cdc_acm 1-1.2:1.1: ttyACM0: USB ACM device

      Indicating that the device can be found on /dev/ttyACM0

  3. Install the package:

    pip install nsrt-mk3-dev
  4. Create a script to access the device:

    import nsrt_mk3_dev
    
    nsrt = nsrt_mk3_dev.NsrtMk3Dev('COM20')
    model = nsrt.read_model()
    
    serial_number  = nsrt.read_sn()
    firmware_revision = nsrt.read_fw_rev()
    date_of_birth = nsrt.read_dob()
    date_of_calibration = nsrt.read_doc()
    print(f'Sound level meter model: {model}\n'
          f'serial number: {serial_number}, firmware revision number: {firmware_revision}\n'
          f'manufactured on: {date_of_birth}, calibrated on: {date_of_calibration}')
    
    leq_level = nsrt.read_leq()
    weighting = nsrt.read_weighting()
    weighted_level = nsrt.read_level()
    print(f'current leq level: {leq_level:0.2f} dB, {weighting} value: {weighted_level:0.2f}')

Test

The GIT repo contains a pytest which tests all the API functions. The test_device_parameters testcase will need to be updated to the device under test as it reads out device specific data. To execute the test run the following command in the GIT repo’s root directory:

pytest tests

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

nsrt_mk3_dev-0.2.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nsrt_mk3_dev-0.2.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file nsrt_mk3_dev-0.2.0.tar.gz.

File metadata

  • Download URL: nsrt_mk3_dev-0.2.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.8

File hashes

Hashes for nsrt_mk3_dev-0.2.0.tar.gz
Algorithm Hash digest
SHA256 db453525162c1ced57d321124a3b91e9206287779755eee1068b8b05f40b722e
MD5 1b52e64cf3eb64530d6c36a27d0166e9
BLAKE2b-256 b44662a11412daa89083ccd988365dcbfbf3b66b9e4b930d0fd1a35c765d39ef

See more details on using hashes here.

File details

Details for the file nsrt_mk3_dev-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: nsrt_mk3_dev-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.8

File hashes

Hashes for nsrt_mk3_dev-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d768085fdd3a0851ee9a22e7817052c730802ad3929922284cc3e815603b3634
MD5 b6faeb9fc1ff66495a92d97e5d182f51
BLAKE2b-256 a84fd2bfe6f18261d41f5f0477054f50fbb4ad399ff738bc55c4cd8837584ecc

See more details on using hashes here.

Supported by

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