Sorry for the delay.
Please find attached script for battery emulation below.
- It’s a Beta, with all that follows from that…
- The model is that you set a nominal battery voltage and internal resistance, and it will regulate output voltage based on these parameters and current drawn. Look at the script, it is quite simple. This is a first order model, it does not emulate other parts of chemistry such as recovery time.
- The loop is run in the PC, which means it’s timing will be affected by other stuff running on the PC. For the real stuff we are moving it into the Arc.
- This script does not contain a low pass filter, so it will be a bit noisy.
Put it somewhere on your computer, load it in SW menu “Window/Scripting”, change parameters in the script to what you want (default 3.3V, 100ohm), and hit “'Run”.
Any question or issues, feel free to ask. If this is close to what you want we can improve the script a bit while waiting for the real updates.
BatEmulationIntResV0.2.lua (2.1 KB)