Saturday, June 7, 2014

Posted source code release v0.1.5

Today I posted source code release v0.1.5 to the links above (Source-code tab).  This is a rather small release with a couple of big changes.

Perhaps the biggest change is I have broken the single source file into a .ino and a separate .h file. In the SECR_config.h file are all the customization parameters needed for YOUR system installation. The idea is that with future releases of the source you will be able to cope on the new Souce - keeping your same .h file.

With the  SERC_config.h you can:
  • Set some clues about the controller hardware you are using (ala, which version of TLEs, do you have the new FET drivers which need the charge pump PWM - v0.3.x and above)...   
  • Decide which features you want enabled:  Do you have a watermaker to support?  Perhaps instead doing co-gen and want to start a pump at a set temperature?
  • Set checks / probes you have installed:  Want to check the Oil Pressure?   Raw Water Flow (marine installation)?
These are all deselected / selected via commenting out / uncommenting in different #define's.  You will also want to set:
  • Alarm limits for your system, temperatures, volts, etc.  What do you want the controller to monitor and at what threshold do you want it to sound the alarm and shut things down.
  • Engine management timings:  A number of things are done open-loop and for those there are timing values.  Example, before starting we need to advance the throttle cable some to the 'start' position.  Because there is no position sensor on the throttle cable we simple 'advance' it for a fixed amount of time to get it 'about' where we want it.  This fixed amount of time is set by the #define THROTTLE_TO_IDLE_DELAY value.  On my little Kubota 1300 (1.3 seconds) of 'advancing' is 'about right'.
  • Engine management thresholds:  Another group of values are measured thresholds - ones where we have a sensor and can get feedback.  Examples include all the alarm values (Overtemp, under oil pressure) as well as things like:  #define STARTED_AMPS_THRESH which is used to help decide when the engine has started by a drop in measured starter amps.
  • Engine RPM/HP specs:  A key configuration is how much HP the engine is specified to produce at a given RPM.  This is used to limit the max load on the engine; while getting the most out of any running time.  It is also used to decide the throttle position needed, allowing the engine to be slowed down towards the end of the charging cycle with active throttle management.  This key table is called: RPM_Watts_array
  • Alternator and Battery management:  What are your target voltages?  At what point do you consider the battery fully charged?  Do you want to move on into Float Mode of stop the engine when the battery is fully charged?
  • The address for all the DS18s20 temperature senders need to be typed in, see the assembly tab above for some hints on how to determine these values.
  • You will also want to set other misc parameters, such as the engine and alternator pulley size - to calibrate the measured RPMs.
  • And finally, configuration of AutoStart mode can  be done.  Do you want the generator to auto-start when the battery reaches a specific voltage?  There is more to do in this area, ala setting block-out times via the RTC on the remote.  But this is a start.

Configuring the .h file will take some time; take care in setting this up making sure not to choose more then one option, and also pay special attention to how values are defined.  e.g., many of the timing values end in UL, you need to make sure to retain that Unsigned Long guidance for the compiler.   Once set up you might have to tweek some settings to fine tune things, but after that things should go smoother when loading new revisions to the source.

Finally:  Need to point out:  as I am away from the boat these days (See Viking Star blog) I have no way to testing this release outside of bench testing.  Version 0.1.3 (also on the source-code tab above) is the last version of source I had actually loaded into our DC generator.  This August I will be back at the boat for a check-in and will be able to verify newer releases in actual hardware.

No comments:

Post a Comment