Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cd mppTracker
$ ./mppTracker.py -h
usage: mppTracker.py [-h] [--dummy] [--visa_lib VISA_LIB] [--reverse_polarity]
[--file FILE] [--scan]
[address] [t_dwell] [t_total]
[address] [t_dwell] [t_total] [max_current]

Max power point tracker for solar cells using a Keithley 2400 sourcemeter
(hopefully robust enough for perovskites). Data is written to stdout and human
Expand All @@ -36,6 +36,7 @@ positional arguments:
address VISA resource name for sourcemeter
t_dwell Total number of seconds for the dwell phase(s)
t_total Total number of seconds to run for
max_current Maximum current limit (amperes)

optional arguments:
-h, --help show this help message and exit
Expand Down
6 changes: 5 additions & 1 deletion mppTracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
parser.add_argument("address", nargs='?', default=None, type=str, help="VISA resource name for sourcemeter")
parser.add_argument("t_dwell", nargs='?', default=None, type=int, help="Total number of seconds for the dwell phase(s)")
parser.add_argument("t_total", nargs='?', default=None, type=int, help="Total number of seconds to run for")
parser.add_argument("max_current", nargs='?', default=None, type=float, help="Maximum current limit (amperes)")
parser.add_argument('--dummy', default=False, action='store_true', help="Run in dummy mode (doesn't need sourcemeter, generates simulated device data)")
parser.add_argument('--visa_lib', type=str, help="Path to visa library in case pyvisa can't find it, try C:\\Windows\\system32\\visa64.dll")
parser.add_argument('--reverse_polarity', default=False, action='store_true', help="Swaps voltage polarity on output terminals.")
Expand Down Expand Up @@ -263,7 +264,10 @@ def close(self):
##NOTE: what if Isc degrades the device? maybe I should only sweep backwards
##until the power output starts dropping instead of going all the way to zero volts...
sweepParams = {} # here we'll store the parameters that define our sweep
sweepParams['maxCurrent'] = 0.01 # amps
if args.max_current is None:
sweepParams['maxCurrent'] = 0.01 # amps
else:
sweepParams['maxCurrent'] = args.max_current
sweepParams['sweepStart'] = Voc # volts
sweepParams['sweepEnd'] = 0 # volts
sweepParams['nPoints'] = 1001
Expand Down