Skip to main content

Control the BK Precision 1900 series power supplies

Project description

BK Precision 1900

Description

This project implements the BK Precision 1902B control as a Python context manager. It allows users to easily access and manipulate the BK Precision 1902B control through a Python interface. It is only tested with the BK 1902B Power supply but should work with all of any supply for the 1900 series.

Installation

Via pip

To install the package from PyPI using pip, run the following command:

pip install bk_precision_1900

From the repository

To install the package from the repository, clone the repository and install it using poetry:

git clone https://github.com/DephyInc/bk_precision_1900
cd bk_precision_1900
poetry install

Running the Demo Code

To run the demo code from the repo, use the following command:

poetry shell
poetry run python bk_demo.py [SERIAL_PORT]

This will execute the bk_demo.py script, which sets a series of voltages in the BK Precision 1902B and prints out the display readouts.

Note that you will need to have poetry installed on your system in order to use the poetry run command. You can install poetry by following the instructions at https://python-poetry.org/docs/.

Usage

Sample code snippey to control a BK Precision 1902B at port /dev/ttyUSB0

from bk_precision_1900.bk1902b import BK1902B

with BK1902B("/dev/ttyUSB0") as psu:
    psu.set_current(0.1)
    psu.set_voltage(1)
    psu.set_output_on()
    time.sleep(10)
    psu.set_output_off()

To Do

  • Implement all commands
  • cleanup repo structure
  • Read max voltage and current instead of hard-coding
  • Add tests
  • Automate release

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

bk_precision_1900-1.0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

bk_precision_1900-1.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file bk_precision_1900-1.0.1.tar.gz.

File metadata

  • Download URL: bk_precision_1900-1.0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.6 Linux/5.15.0-56-generic

File hashes

Hashes for bk_precision_1900-1.0.1.tar.gz
Algorithm Hash digest
SHA256 93fbd5fa2572092e769cde96cfe03fa3b2e3d289adc7982c7419ae243b3a6a09
MD5 f729928cc62a57416a981bb71a362a57
BLAKE2b-256 8748168f3cc4ca8806831ffcb5c1e9ac75b3a99366ba8c12cb192dd182fd61bc

See more details on using hashes here.

File details

Details for the file bk_precision_1900-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: bk_precision_1900-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.6 Linux/5.15.0-56-generic

File hashes

Hashes for bk_precision_1900-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a60585bd2c90c02d8d9c84e9612913d095b25526302aa7af332815fb27a11751
MD5 4cfc73f15ce01c80e4a55521b5e563fb
BLAKE2b-256 726b6a656bb4d370694e94c2d2f1dd0e9dc3b2c4aca49a3d59933e9a38c8afc2

See more details on using hashes here.

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