This repository contains the Python control software (read_data.py) developed for my BSc thesis. The tool automates the process of recording battery discharge curves by synchronizing voltage readings and current measurements. The set-up is simple: The Arduino is connected parallel to the battery, while the PPK2 is in series with the resistor.
It integrates two hardware components:
- Arduino: Acts as a voltmeter to read the battery's terminal voltage.
- Nordic Power Profiler Kit II (PPK2): Measures from micro-ampere to ~1ampere level discharge current.
The script logs Time, Voltage (V), and Current (µA) to a CSV file until the battery reaches a defined cutoff voltage.
To replicate this setup, you need:
- Nordic PPK2: Connected via USB (Data/Power).
- Arduino (Any model): Connected via USB. Must be running a sketch that prints voltage floats to Serial @ 115200 baud.
- Device Under Test (DUT): The battery being discharged.
- Ohmic Resistor: The resistor in which the battery voltage will drop.
This project relies on Python 3 and the following external libraries:
pyserial: For communicating with the Arduino.ppk2-api: For controlling the Power Profiler Kit II.
The Arduino script and required libraries are already included in this repository.
pip install pyserial
git clone https://github.com/IRNAS/ppk2-api-python