daqopen-lib


Namedaqopen-lib JSON
Version 0.5.0 PyPI version JSON
download
home_pageNone
SummaryA data acquisition library for streaming adc data from arduino due and more
upload_time2024-12-17 18:42:58
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # daqopen-lib

This library can be used for various data acquisition tasks to proper handle streaming ADC data for building data acquisition applications.

**Documentation** incl. tutorials can be found here: [docs.daqopen.com](https://docs.daqopen.com)

Initially, it is build around the Arduino Due, which has a high-speed ADC with good accuracy and a data transfer via USB 2.0. Most of the examples and driver uses this model together with the firmware which can be found in the firmware folder.

![Schema-Bild](resources/scheme-overview.png)

## Features

- **ADC driver:** Driver for communicating with Arduino Due (included firmware) and packing the data to numpy arrays.
- **Circular Channel Buffer:** A class representing a circular buffer for holding needed amount of data for viewing, calculating and storing.
- **DAQ-Info Class:** Can be used to exchange informations regarding the interpretation of the data packages. It holds adjustment values and info about the acquisition rate.
- **ZMQ-Support:** Transfer the acquired data in realtime via zmq to other applications or hosts

## Intended Use

This library should be used if:

- you build long-running acquisition applications (e.g. measurement devices)

## Installation

Installation from pypi:

```bash
pip install daqopen-lib
```

Install latest directly from Github:

```
git clone https://github.com/DaqOpen/daqopen-lib.git
cd daqopen-lib
pip install -e .
```

## Usage

### SIM (no hardware)

```python
from daqopen.duedaq import DueDaq
import matplotlib.pyplot as plt

# Create Instance of DueDaq
myDaq = DueDaq(serial_port_name="SIM")

# Start acquisition device
myDaq.start_acquisition()

# Read the buffer 10 times
for i in range(10):
    data = myDaq.read_data()

# Hold acqusition device
myDaq.stop_acquisition()

# Plot Data of last buffer
plt.plot(data)
plt.show()
```

![image-20241010124001678](resources/sim-first-acq.png)



### Arduino Due

#### Setting up Arduino IDE

- Download Arduino IDE for your plattform and start the app
- Install the Package to support SAM-Controllers:  Arduino SAM Boards (32-bits ARM Cortex-
  M3) by Arduino of version **1.6.12**

#### Compiling and Downloading

- Open the sketch-file from firmware/due-daq/due-daq.ino
- Connect the Arduino Due to the "Programming Port" (the port near to the power socket)
- Compile and upload the firmware
- Disconnect from the "Programming Port"



Now, connect the "Native USB Port" (the port near the reset toggle) and use the following sketch for testing the Arduino acquisition:

```python
from daqopen.duedaq import DueDaq
import matplotlib.pyplot as plt

# Create Instance of DueDaq (use empty port name for automatic search)
myDaq = DueDaq()

# Start acquisition device
myDaq.start_acquisition()
for i in range(10):
    data = myDaq.read_data() # read buffer

# Hold acqusition device
myDaq.stop_acquisition()

# Plot Data of last buffer
plt.plot(data)
plt.show()
```

You should see something like this:

![my-first-acq-1](resources/my-first-acq-1.png)

Congratulations!

For more Examples see [docs.daqopen.com](https://docs.daqopen.com)

## Roadmap

A quick and dirty roadmap to show what is planned for the future:

- [ ] More practical examples
- [ ] Raspberry Pi Pico as DAQ device
- [ ] ...

## Contributing

I welcome contributions to **DaqOpen**! If you'd like to contribute, please fork the repository, create a new branch, and submit a pull request.

## License

This project is licensed under the MIT License - see the LICENSE file for details.

![Logo_200px](resources/Logo_200px.png)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "daqopen-lib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Michael Oberhofer <info@pqopen.com>",
    "download_url": "https://files.pythonhosted.org/packages/6b/88/9683cce6fa3488f67108027cdae5acf995fcc799bf3130a4609554099f88/daqopen_lib-0.5.0.tar.gz",
    "platform": null,
    "description": "# daqopen-lib\n\nThis library can be used for various data acquisition tasks to proper handle streaming ADC data for building data acquisition applications.\n\n**Documentation** incl. tutorials can be found here: [docs.daqopen.com](https://docs.daqopen.com)\n\nInitially, it is build around the Arduino Due, which has a high-speed ADC with good accuracy and a data transfer via USB 2.0. Most of the examples and driver uses this model together with the firmware which can be found in the firmware folder.\n\n![Schema-Bild](resources/scheme-overview.png)\n\n## Features\n\n- **ADC driver:** Driver for communicating with Arduino Due (included firmware) and packing the data to numpy arrays.\n- **Circular Channel Buffer:** A class representing a circular buffer for holding needed amount of data for viewing, calculating and storing.\n- **DAQ-Info Class:** Can be used to exchange informations regarding the interpretation of the data packages. It holds adjustment values and info about the acquisition rate.\n- **ZMQ-Support:** Transfer the acquired data in realtime via zmq to other applications or hosts\n\n## Intended Use\n\nThis library should be used if:\n\n- you build long-running acquisition applications (e.g. measurement devices)\n\n## Installation\n\nInstallation from pypi:\n\n```bash\npip install daqopen-lib\n```\n\nInstall latest directly from Github:\n\n```\ngit clone https://github.com/DaqOpen/daqopen-lib.git\ncd daqopen-lib\npip install -e .\n```\n\n## Usage\n\n### SIM (no hardware)\n\n```python\nfrom daqopen.duedaq import DueDaq\nimport matplotlib.pyplot as plt\n\n# Create Instance of DueDaq\nmyDaq = DueDaq(serial_port_name=\"SIM\")\n\n# Start acquisition device\nmyDaq.start_acquisition()\n\n# Read the buffer 10 times\nfor i in range(10):\n    data = myDaq.read_data()\n\n# Hold acqusition device\nmyDaq.stop_acquisition()\n\n# Plot Data of last buffer\nplt.plot(data)\nplt.show()\n```\n\n![image-20241010124001678](resources/sim-first-acq.png)\n\n\n\n### Arduino Due\n\n#### Setting up Arduino IDE\n\n- Download Arduino IDE for your plattform and start the app\n- Install the Package to support SAM-Controllers:  Arduino SAM Boards (32-bits ARM Cortex-\n  M3) by Arduino of version **1.6.12**\n\n#### Compiling and Downloading\n\n- Open the sketch-file from firmware/due-daq/due-daq.ino\n- Connect the Arduino Due to the \"Programming Port\" (the port near to the power socket)\n- Compile and upload the firmware\n- Disconnect from the \"Programming Port\"\n\n\n\nNow, connect the \"Native USB Port\" (the port near the reset toggle) and use the following sketch for testing the Arduino acquisition:\n\n```python\nfrom daqopen.duedaq import DueDaq\nimport matplotlib.pyplot as plt\n\n# Create Instance of DueDaq (use empty port name for automatic search)\nmyDaq = DueDaq()\n\n# Start acquisition device\nmyDaq.start_acquisition()\nfor i in range(10):\n    data = myDaq.read_data() # read buffer\n\n# Hold acqusition device\nmyDaq.stop_acquisition()\n\n# Plot Data of last buffer\nplt.plot(data)\nplt.show()\n```\n\nYou should see something like this:\n\n![my-first-acq-1](resources/my-first-acq-1.png)\n\nCongratulations!\n\nFor more Examples see [docs.daqopen.com](https://docs.daqopen.com)\n\n## Roadmap\n\nA quick and dirty roadmap to show what is planned for the future:\n\n- [ ] More practical examples\n- [ ] Raspberry Pi Pico as DAQ device\n- [ ] ...\n\n## Contributing\n\nI welcome contributions to **DaqOpen**! If you'd like to contribute, please fork the repository, create a new branch, and submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n![Logo_200px](resources/Logo_200px.png)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A data acquisition library for streaming adc data from arduino due and more",
    "version": "0.5.0",
    "project_urls": {
        "Homepage": "https://github.com/DaqOpen/daqopen-lib",
        "Issues": "https://github.com/DaqOpen/daqopen-lib/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8cfcf2937f39ac2560048263283e5497cbae03a6b042dc4e53576955806a13ed",
                "md5": "eb1f94e096bcb34a6566ed41aa0340d0",
                "sha256": "5976ca566dd43d383d1e4a1813c1edc9532cfe9d2a3985dc7ff6526f1f5e42ff"
            },
            "downloads": -1,
            "filename": "daqopen_lib-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eb1f94e096bcb34a6566ed41aa0340d0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 25412,
            "upload_time": "2024-12-17T18:42:53",
            "upload_time_iso_8601": "2024-12-17T18:42:53.646705Z",
            "url": "https://files.pythonhosted.org/packages/8c/fc/f2937f39ac2560048263283e5497cbae03a6b042dc4e53576955806a13ed/daqopen_lib-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6b889683cce6fa3488f67108027cdae5acf995fcc799bf3130a4609554099f88",
                "md5": "bb656e3d8888590464b3cd8c1cf45ea5",
                "sha256": "d68e8fd702724fa1b4c57a8dde7dd21f0390b908db2228b4f64cac6355ba09a1"
            },
            "downloads": -1,
            "filename": "daqopen_lib-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "bb656e3d8888590464b3cd8c1cf45ea5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 894335,
            "upload_time": "2024-12-17T18:42:58",
            "upload_time_iso_8601": "2024-12-17T18:42:58.003679Z",
            "url": "https://files.pythonhosted.org/packages/6b/88/9683cce6fa3488f67108027cdae5acf995fcc799bf3130a4609554099f88/daqopen_lib-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-17 18:42:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DaqOpen",
    "github_project": "daqopen-lib",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "daqopen-lib"
}
        
Elapsed time: 0.44432s