ElectronicLoad: Difference between revisions
No edit summary |
mNo edit summary |
||
Line 31: | Line 31: | ||
=== Software === | === Software === | ||
The [https://github.com/bertrik/ElectronicLoadR2 source code is on github]. | |||
Building blocks: | Building blocks: | ||
* USB serial port, to receive commands from the user | * USB serial port, to receive commands from the user |
Revision as of 21:48, 18 October 2017
Project ElectronicLoadV2 | |
---|---|
![]() | |
Software voor Electronic Load v2 | |
Status | Initializing |
Contact | bertrik |
Last Update | 2017-10-18 |
Intro
This page is about software I'm writing for my brother who is developing an 'electronic load'. An electronic load is a thing that draws current from a power source in a well-defined way.
A possible use case for an electronic load is to discharge a battery with a constant current, while recording the voltage so you can make a nice discharge graph.
Another user case is to test a solar panel, drawing variable current from it while measuring the voltage, to find the point where it delivers most power.
Perhaps yet another use case is just to measure current drawn by a specific device at a high time resolution, and determine the amount of charge used per use cycle.
Design
Hardware
For the hardware design, see http://sikken.nl/electronicloadr2.html
The basic principle of operation is that the electronic load has a circuit with a mosfet controlled by a microcontroller to draw a configurable constant current. The mosfet is connected to a heatsink that dissipates the power as heat.
The microcontroller can set the desired current, measure the actual current and measure the voltage. This way we can also do other modes than just constant current:
- constant power mode: from the voltage measured, we can calculate the current required to draw a constant power
- constant resistance mode: from the voltage measured, we can calculate the current to emulate a specific resistance
Software
Building blocks:
- USB serial port, to receive commands from the user
- command interpreter, to transform user input into actions
- measurement loop, that continuously calculates voltage and current, and integrates them (from mA to mAh for example)
- control loop, that maintains the desired behaviour (constant current, power, resistance)
- logging logic, to log measured values to the output
- sequencing logic, to perform the steps needed for particular measurement mode, e.g. solar panel characterisation
Random thoughts
Features to implement:
- safety to prevent damaging the electronic load: max power, max current
- perhaps average this over some time, e.g. average over 100ms, so very short peaks don't cause a panic
- limits to prevent damage to the device-under-test:
- a lower voltage to avoid overdischarging cells when doing a battery test
- a current limit?
- sequencer for stepping through a specific range of currents at a specific speed
- operating modes:
- fixed modes: off, manual CC, manual CP, manual CR
- sequenced modes: special sequences for measuring a PV-cell, measuring a battery, measuring a Peltier?
- automatic max power point determination?
- calibration
- automatic if possible, e.g. set current to 0, measure current, use this as an offset?
- manual if required
- save calibration values in non-volatile memory and load them at startup
- automatically reset cumulative counters when starting a log
- conversion from SI units to other units, like mAh, Wh, etc?
- configurable LED blink:
- blink on overload
- blink per amount of charge/power, so more current means faster blink