Added Constant-Power draw. Increased PID frequency and changed PID fr…#9
Added Constant-Power draw. Increased PID frequency and changed PID fr…#9aseiger wants to merge 1 commit intosparkfun:masterfrom
Conversation
…om F-I control to real PI control. Power limit changed to 50W,
|
Thank you for adding this additional functionality. I needed a simple circuit that could drain an alkaline battery at a constant load to estimate operating life under a set of controlled conditions. The SparkFun Variable Load Kit (KIT-14449) had the proper bits needed to perform this but the base functionality of the kit only provides constant current and constant voltage loads. Your changes add constant power to the feature set. The command readout on the serial interface was a helpful improvement for my purposes. I am running with a USB connection and not with an attached LCD display. After a careful review of your changes, I was able to directly build your code in PSoC Creator v4.4 and upload to the PSoC on the Variable Load. My application requires a 75 mW constant load and therefore I modified the <sprintf(buff,..> lines to %6.3f for the power readout. To improve code maintenance and readability I would recommend having the 50 W maximum load limit as a #define instead of explicitly called out for each use: |
|
Will do! Thank you for the input |
-Added a constant-power option
-Re-tuned and improved the PID
-Power limit increased significantly - requires a better heatsink. This can be changed back to 15W of course!
-Serial interface has a better command printout, making it easier to use
These changes were made to test a 25W Raspberry Pi power supply board. I changed the heatsink to one from an old CPU, and powered the fan off of the exposed 5V debug header.