Wednesday, March 4, 2015

Release of Source Code v0.1.5

 << NOTE:  THIS RELEASE HAS BEEN WITHDRAWN;  USE v0.1.6 >>

Today I posted source version 0.1.5 for the Arduino Alternator Regulator.  See the file under the Source resource tab at the top.  There are really two major changes with this source:

1) It targets Arduino IDE 1.6.0 - now the 'official' released IDE from Arduino.cc
2) It has refined PID tuning based on users feedback as well as testing on Viking Star.


See the prior post for some more details about the new Arduino IDE, along with needed support files to enable the 3.3v bootloader.   I also needed to make some small syntax changes in the source to reflect subtle changes to the Arduino IDE around PROGMEM.  Going forward future released will be tested with the mainstream 1.6.0 and after release of the Arduino IDE code.

PID tuning.  The past weeks I have had a chance to try different combinations of PID tuning on Viking Star, mainly using our DC generator (Which shares a common source base in the manage_alt() function).  That, combined with feedback I have received from a few uses (THANK YOU so much!) I have what I believe is 'better but not final' PID values.  They are a bit less twitchy when deployed in a system that has a larger alternator vs. battery size - like many AGM batteries, or perhaps LiFeP04 systems.  I do not believe these are the final values, and in fact I am still only using the P&D values, the new I is disabled.  But I do believe they are better, and am looking forward to gaining feedback on them form others.

The PID tuning is perhaps the greatest challenge facing this project today.  Most all other functions are rather stable.  But as more experience is gained with different combinations of alternators and batteries, I can expect there will be additional insights.  Ideally we can find a common set of PID values what works well in all cases, but in the end it may be that some type of sampling / real-time adjustment will be needed.   But that is down the road even more.


Supporting release 1.6.0 of the Arduino IDE

Arduino has released a major update to their toolset, now version 1.6.0.  It includes better support for the ARM type Arduino CPUs and is now the 'primary' release stream.  Of impact to the Arduino Alternator Regulator is this release also has updated the GCC compiler - resulting in about a 5% reduction in code size!

But they have also changed some of the file structures with regards to enabling custom bootloaders.

If you look under the Arduino Libs resource tab above you will see a new folder to support the Arduino IDE 1.6.0 with a fixed Optiboot to allow the watchdog to function (as opposed to totally wedge the system using the as-included 8Mhz bootloader in the Arduino IDE).  Just follow install the new Arduino IDE release 1.6.0, copy down the files from the resource tab above and follow the instructions in the readme.txt file to allow the newest Arduino development environment to support the improved bootloader for 8Mhz operating of an ATmega328p cpu.