Friday, May 1, 2020

WELCOME

Revised 6/20/2013

Note:  If you are looking for the companion to this - the Stand-along Alternator Regualtor, I have started placing those files in a separate Blog: ArduinoAlternatorRegulator.blogspot.com/


After using our Kubota EA300 based DC generator / water-maker for about a year (mvVikingStar.blogspot.com/search/label/Kubota DC Generator.)  I wanted to make an improvment.

The goal was very simple:  Shorten the amount of time I needed to listen to the Generator running.   See, being away from the dock for 8-9mo a year we are very dependent on our generator.  And I just did not look forward to the 'suffering' hours of the daily generator run.  I wanted a regulator which would maximize the amount of energy produced for every minute the Diesel was spinning.   I also wished to be able to generate some energy while running the Water maker and provide remote operation of the generator. 

As the project grew, it gained two additional values:  ability to fully recharge the batteries, along with remote automated start/stop.

Limitations of most 'smart' regulators prevents all of these goals - primarily because they manage only the Volts, relying on the self-limiting nature of alternators to manage the Amps. (Though some do a crude attempt to manage Amps produced.). A major design point of this project is the active monitoring of BOTH Voltage and Amperage. By doing so I will be able to meet the charging needs of the batteries while also maintaining a constant load on the Kubota EA300.


BTW:  If you are looking for a simpler design, one that keeps the key values of shortening Generator run-time and/or the able to fully recharge batteries, see the stand alone regulator on the link above.

This design is done in such a way to be applicable to other small engine control deployments.  With or Without an Alternator and/or Water maker.  Key features include:


Overall Features:
  • Local Controller and operating switches with optional remote display / switches.
  • Supports system voltages (Starter, throttle control, etc) of 12 or 24v.
  • Support of Alternator field and battery voltages up to 48v systems.
  • Alternator voltage support is independent of System Voltage - as 12v system can manage a 48v alternator.
  • Driver to enable external pump, ala HP pump for watermaker, or circulation pump for co-generation deployments.
  • Open Source Firmware and hardware for ultimate customization
  • Easy attachment of diagnostics console for easy firmware updates as well as detailed monitoring and logging of system operation.
  • Wide range of configuration available, modes of operations, checks preformed, features included.


Engine Management:
  • Selectable Auto Generator Start-up (based on battery voltage)
  • Auto stop after charging is completed
  • Warm-up and cool-down periods w/o alternator load.
  • Active throttle speed control, adjusting engine speed to match current loading.

Alternator Management:
  • Fully configurable 3-stage Alternator regulation with soft ramp of initial power on.
  • 'Over Charge' (or 4th stage) support for AGM batteries.
  • Battery Temperature Compensation and adjustment for all charging voltages.
  • Reduced total charge time by capturing wasted engine capacity during early portions of charge cycle.
  • Precise measurement of battery voltage,  including  negative lead to accommodation any common ground line voltage drops.
  • Alternator charging actively managed by measured battery voltage, charging current, and total load placed on driving engine.
  • Adaptive alternator reduced power mode to support simultaneous driving of other loads, ala water pumps, hydraulic pumps.
  • Charging rate reduced under excessive EGT, engine and/or alternator temperature conditions. 
  • By actively managing Voltage and Amps, larger framed alternators turning at lower RPMS can be utilized resulting in upwards of 10% greater alternator efficiency.

Fault Detection:
  • System fault monitoring:  Over temperatures (Engine, EGT, alternator, battery), voltage, amps.
  • Broken sender / wire check for Oil pressure and Cooling Water Flow Senders.
  • Fail safe protection:  Watchdog timer, hardware crow-bar for over-voltage
  • Software self-checks for incorrect configurations, and internal operating errors.


And some likely future enhancements will include:
  • Auto Start quite period holds off (with optional RTC added)
  • Lifetime recording of total amps /  watts produced by alternator, hours of operation, etc.

The project is base around the Amtel ATmega328 CPU configured using the Arduino development environment.  All parameters and features are fully configurable  with a wide array of options.  Features may be disabled if not needed.   

All works are being released under the Creative Commons licensing agreement, with the only restrictions around commercial use.  I have selected the Open Source KiCAD tool for Schematic capture and PCB layout and posted those CAD files.   Links at the top of this Blog provide details of each portion of this project.  Click on the Link-to-Files area to download the schematic and well as PCB layout and parts list.

The Design Elements section goes into more details of each sub-segment.

And for an ongoing list of status / issues click here:  >>> STATUS <<<


Comments and advice are always welcome!   It is my hope this project can be the basis for others works in intelligently controlling small engine deployments and generating systems.

Friday, September 30, 2016

Hair-Pin!!!

Last year I changed out the alternator on our DC generator for a larger frame Leeve Neville alternator - and at the same time reduced the drive ratio to 1:1, which resulted in a noticeable gain in overall efficiency (See prior post).

Well, today I received a new alternator that I am interested in testing to see if additional gains can be made:


Nice and Clean!

Note the square wires, and how close the are.  







It is a 220A, 138.5 (larger frame) Desno Hairpin alternator.   Configured for installation on Cummins 5.9L diesels as an option on some Dodge light trucks.

I am unable to locate RPM/output curves for this unit, though data from one of the people using my Alternator Regulator shows they have a very fast cut-in.  And I need to think about the drive belt - to keep it at the 1:1 ratio, increase it, change it to a rubbed belt..  Some more thinking to do.  But I am looking forward to a winter project and see how this baby works out!

 



Monday, November 9, 2015

Another look at DC Generator Efficiency

Or:  Why you want a variable speed generator

This fall I spent a few weeks ‘back on the farm’ helping to bring in the crops.   Along the way I had a chance to find a series of tractor tests conducted by the University of Nebraska documenting many performance measurements.  Bar pull, speed / RPM, gear ratios, etc.   Why is this interesting?   Well, one of the things they documented was measured actual fuel consumption at different engine loads.

A common rule of thumb for diesel engines is they will produce around 15-17HP for one hour while consuming about a gallon of diesel fuel.  What is interesting from the Nebraska reports is this only holds true under full load at a given RPM.   Example, take a look at this test data:


Source:  http://digitalcommons.unl.edu/tractormuseumlit/1860?utm_source=digitalcommons.unl.edu%2Ftractormuseumlit%2F1860&utm_medium=PDF&utm_campaign=PDFCoverPages


Source:  http://digitalcommons.unl.edu/tractormuseumlit/1860?utm_source=digitalcommons.unl.edu%2Ftractormuseumlit%2F1860&utm_medium=PDF&utm_campaign=PDFCoverPages


What is interesting is at 100% load / max RPMS (115HP / 2100 RPM) the engine produced 17.4 HP*hr using 1 gallon of diesel.   However, run that same engine under 25% load and the engine is around ½ as efficient – only able to produce a bit under 9 HP*hr from that same gallon of fuel.

What does this mean?   Well, if you have a traditional fixed speed AC generator it is true it will consume less fuel under light loads – but it will be no were as efficient while doing so.  Running that 7.5Kw generator at say a 2Kw load (charging up the house batteries)  might be doing only ¼ the work, but its fuel consumption will only be reduced by ½ (not the ¼ we might hope for).

But there is an answer.   Again from the Tractor World there is a concept of GUTD, or Gear Up Throttle Down.   Meaning – if the load is light use a higher gear and pull back on the RPMs.   Just like overdrive in a car, this can help recover most of the lost efficiency vs. running those loads at the higher (fixed) RPM.   Again, here is an example from the Tractor world – this one from Virginia Tech:



Source: https://pubs.ext.vt.edu/442/442-450/442-450_pdf.pdf



Source: https://pubs.ext.vt.edu/442/442-450/442-450_pdf.pdf

This takes a little explanation:  Start by looking at the blue star in the upper right hand corner.  That point represents full RPMs and full engine load – and we see that the relative fuel ‘efficiency’ is 100%.   However if we keep the same ‘throttle’ position but only apply say 45% of the load we drop down that red line on the right hand side to where it crosses the 45% load point (Red Star).  Here we can see the 75% efficiency dashed line has been intercepted.  This means if the engine produced 17HP*hr / gal @ 100% load, it will now only be 75% as efficient, and will now only produce  12.75HP*hr/gal.  Bring the load down to the 30% point and we are again at ½ the efficiency as when under full load.

However what if the engine speed could be slowed down while under the light 45% load?  Shift into Overdrive if you will.   OK.   See the Green Star?   This is the same 45% loading (meaning we are producing the exact same Horse Power as when at the Red Star point)  – but look; we have now intercepted the 106% efficiency curve!  Meaning our engine will now produce 18HP*hr for each gallon of fuel consumed.   Doing some math and coming up with a hypothetical example an engine using the representative graph might look like this:

 Deliver 7.5Kw at full throttle burns 0.75 GPH
 Deliver 3.3Kw at full throttle burns 0.45 GPH
 Deliver 3.3Kw at half throttle burns 0.30 GPH

If we could reduce the engine speed to ½ we would save 0.15GPH in fuel. 

Take this example to say a 2Kw load and the ‘savings’ will be even greater.

So what does this all mean?   In short:  run that fixed speed AC generator under a light load if just wasteful.   Problem is most all AC generators run at a fixed speed, no matter how much of a load you put on them.  It is the nature of needing to produce a stable 50 or 60Hz AC frequency.   DC generators do not have that restriction and can be used at any RPM (just like the alternator in your car – and also some AC ‘inverter’ generators  ala the small Honda’s).    Being able to adjust an engines speed to match its load can pay off. 

And here is where a DC generator with engine speed control can help.   Just like this integrated engine speed controller does.   In my quest to improve the efficiency of our DC generator looks like this is one significant factor that is already accomplished.


BTW:  Here is another paper from Virginia Tech that goes into more detail, and even has some formulas for predicting engine performance at many different RPM and load points: 
  https://pubs.ext.vt.edu/442/442-073/442-073_pdf.pdf





Wednesday, May 20, 2015

Improving efficiency of DC generator - alternator configuration

This post is not directly related to the DC Generator controller, but I figure it is related and relevant.

This year I have altered the alternator being used on our Kubota EA-300 based DC generator, switching out a large framed 130A alternator for an even larger framed 200A one.  Though the more interesting part is I also adjusted the drive ratio from 2.5:1 to 1:1  (More detailed here:
http://mvvikingstar.blogspot.com/2015/05/improving-dc-generator-efficiency.html  )


My reason for doing this is alternators loose efficiency as RPMs are increased.  By using a larger alternator, and turning it slower, I have picked up perhaps 7% in overall system efficiency.   A very nice gain.

But it occurred to me there is even better news here: The controller's active throttle control matches engine speed to the load it is being asked to drive, slowing the engine down during the last potion of the Acceptance phase of battery charging.  Guess what: This slowing down just pushes us into a more and more efficient operation range for the alternator!  Though I have not measured it, it does occur to me that during those final 'packing it in' phases which lead-acid batteries oh so like and need for proper health - we get an additional benefit of even higher overall system efficiency.


Wednesday, March 4, 2015

Source Code v0.1.6 released

Today I posted source version 0.1.6 for the SERC (Controller) source code.  The remote source is unchanged, and there has been no additions to the config.h include files.  See the above Source resource tab to download the new code.

The reason for this release is to bring the DC Generators core regulation functions back in step with changes which have been made in the stand alone Arduino Alternator Regulator source.  These mainly focus on the core mange_alt() function and include:
  1. Expansion of P&D engine to include 'I' factor, now a full PID capable engine.
  2. Improved field PWM error summing to prevent one factor from overwhelming others when regulation is close to its goal (esp Voltage)
  3. Adjusted pull-back factors, to lessen the dramatic pull down associated with common load-dumps
Some other bugs have been corrected, see the change log for more details.  Along with the above core changes, I have also adjusted the default PID tuning values - based in feedback from others and trials on Viking Star. The original values were developed with a small-frame alternator, and turned out to provide insufficient sensitivity when a larger alternator was used - esp in conjunction with a high acceptance rage battery such as AGM or perhaps LiFeP04 technology.

Over the coming months  I hope more can be learned about the core regulation engine, and perhaps further refinements can be made to the PID tuning.  Given the common code base between the DC Generator and the stand alone Alternator Regulator there is opportunity for all to help in any future adjustments.

There had been no changes to the configuration.h file, so if you have already edited a copy of that to match your system - just download the core .INO source file and team it up with your edited config.h file.  That way you will get the new code, and retain your individual customization.


A final note:   Over the past few days I have completed a changeover to the newest Arduino IDE release v1.6.0   This release of source was tested using the new IDE, and going forward will continue to keep largely in step with the RELEASED (non beta) versions of the Arduino IDE.  I suspect the DC generator source will work OK with the prior IDE released (1.0.5, or 1.0.6), but have not been actively using those for about a week now.

Tuesday, August 5, 2014

Capturing log data for assessment

The Arduino Integrated Controller and Alternator Regulator will output a stream of ASCII data via the service port providing details on its current operation.  I have used these dumps to help improve the PID engine tuning as well as resolve issues.  In this Blog post I want to describe one way to capture log data into a .txt file, and perhaps ask that folks send in a few of these so I can improve the base code.

To capture the ASCII stream, you will need to do the following:
  1. Attach a USB <--> TTL adapter to the Service Port
  2. Open up the Arduino IDE
  3. Select the serial port used by the USB <--. TTL adapter in Step #1 via Tools/Serial Port
  4. Make sure the correct Board type is selected via Tools/Board (Arduino Uno for the controller)
  5. Open the Controller 'sketch' (source code).
  6. Un-comment the line #define DEBUG  (remove the two // at the start of the line)
    • This will cause an extra set of debug information to be sent to the serial port.
  7. Consider changing   "#define   SDM_SENSITIVITY    20"  in the source code from 20 to a smaller number, especially if looking at load-dumps, or some odd issue.  This #define controls how may times through manage_alt() before a debug string is sent out.  Setting it to 1 gives the most data, and the largest files..
  8. Upload the new sketch.

Example debug output.
You now have an option.  You can remain in the Arduino IDE and open the Terminal window to see the ASCII data - I find unclicking 'auto scroll' helps make things run a bit smoother.  Then after some amount of data is there, so a copy-n-paste into a standard text editor (ala, notepad), finally saving the file in .TXT form.

Oh you can use a 3rd party terminal program.  Myself, I like to use PuTTY as it is simple,  reliable, fast, and you can enable it to automatically capture the .txt file.  To use PuTTY take note which serial port is being used by the Arduino IDE to communicate with your controller (Step #3).  Then download PuTTY using the following link:   http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Once installed, open PuTTY and make the following changes:
  • On the opening screen (Session screen), enter the Serial port and Speed from step #3 above.  Click the 'Serial' button.
  • On the Session/Logging screen, click the 'Printable output' button and enter a log filename.  Each time you run PuTTY data will be captured into this log file.
  • On the Window screen, change the columns to something large, like 400.
    • Not really needed, the log file will be OK w/o this change. 
    • Just makes the visible screen look a little nicer.
  • Then go back to the Sessions screen and click the 'default setting' profile and press the Save button.
Now each time you start PuTTY it will open to the correct port, and automatically start saving a data log.  Press the 'Open' button on the bottom to connect to the controller and start a data capture session.  When finished, just close the window and the log file will be saved.  Rename this to something meaningful, and perhaps edit using notepad to add in some details about the captured run, ala alternator / engine / battery size.  Any unusual event - like a washer/dryer running during Float mode, other charging sources.  Anything you think might be relevant.

If you would then Email it to me, I can use it to help look for ways to improve the code.

You can look for the function  debug_print_common(); to get an idea what data is being sent out.  And if you do have any issues with the generator, make sure to set the sensitivity to 1 and capture all the data.  Note that the 1st number sent out is a time mark, so in the preamble it would be good to comment on what you see going wrong, and referencing to the approx timestamp if you can.

And when finished you can reload the firmware with the #define DEBUG commented out - disabling the ASCII strings.  Not sure it really matters, I tend to leave DEBUG mode enabled on my generator.