m-teng/readme.md

50 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2023-06-18 17:38:10 +02:00
# m-TENG
2023-06-28 10:48:09 +02:00
Helper scripts and shell for measuring **T**ribo**e**lectric **N**ano**g**enerator-based sensor output with a Keithley 2600B SMU or an Arduino
2023-04-27 01:41:30 +02:00
2023-08-30 18:06:34 +02:00
This project was written for my bachelor's thesis.
2023-04-27 01:41:30 +02:00
## Features
2023-06-18 17:38:10 +02:00
2023-04-27 01:41:30 +02:00
### Interactive (shell) mode
2023-04-06 22:55:24 +02:00
- Live view
2023-04-27 01:51:01 +02:00
- Press button to stop
- Save and load settings (default interval, data directory...)
- Easily run arbitrary command on device
2023-04-27 01:41:30 +02:00
2023-06-18 17:38:10 +02:00
### Useful functions for scripts
- Measure voltage and/or current
- Transfer buffer from measurement device to host
- Save/load as csv
- Run lua script on Keithley SMU
- Auto-filenames
2023-06-28 10:48:09 +02:00
2023-06-18 17:38:10 +02:00
## Available backends
### keithley
2023-08-30 18:35:20 +02:00
Use a Keithley 2600B Source-Measure-Unit via *pyvisa*. This backend allows measuring both voltage and current simultaneously. *Tested with 2611B and 2614B*
2023-06-18 17:38:10 +02:00
### arduino
2023-08-30 18:35:20 +02:00
Use a Bluetooth capable Arduino with [https://git.quintern.xyz/MatthiasQuintern/teng-arduino](this software on the arduino).
This backend only allows measuring voltage using an Arduinos analog input pin (0 - 3.3 V, 12 bit resolution).
2023-06-18 17:38:10 +02:00
### testing
2023-08-30 18:35:20 +02:00
Use the shell without measuring TENG output. When starting a measurement, sample data will be generated.
2023-06-18 17:38:10 +02:00
2023-04-27 01:41:30 +02:00
## Shell mode
2023-06-18 17:38:10 +02:00
It is recommended to run the shell with ipython:
2023-04-27 01:51:01 +02:00
```shell
2023-08-30 18:36:25 +02:00
ipython -i m_teng_interactive.py -- -*X*
2023-04-27 01:41:30 +02:00
```
2023-06-18 17:38:10 +02:00
Substitute *X* for `-k` for keithley backend, `-a` for arduino backend or `-t` for testing backend.
2023-04-06 22:55:24 +02:00
2023-06-24 12:27:45 +02:00
In the shell, run `help()` to get a list of available commands
2023-06-27 15:23:48 +02:00
## Installation
### Keithley
On linux:
Install the udev rule in `/etc/udev/rules.d/` and run `sudo udevadm control --reload` to force the usbtmc driver to be used with the Keithley SMU.
The `ATTRS{product_id} ` needs to match the id shown by `lsusb`.