Monday, April 16, 2012

Arduino based Alternator Regulator and Engine Controller

UPDATE:   Have started a new Blog to take this design project out of Viking Star's Blog.  If you want to see more details, go to:  http://smartdcgenerator.blogspot.com/


As reported before, I have been looking at designing a microcontroller based alternator regulator. I am doing this to address some of the limitations of most ‘smart’ alternator regulators on the market. The two primary goals I am looking to achieve, which I cannot source at a reasonable cost (under $1,000) using current offerings, are:

  1. Maximize generator output at all points of recharging cycle.
  2. Adjust generator output to accommodate additional engine load of watermaker high pressure pump.


Today when the house battery is being charged the Kubota EA300/DC generator might start at 13.2v and slowly rise over time until capped at 14.4v. During this time we are delivering around 110A to the battery; anymore and the Kubota starts to show signs of being overloaded. But there is a devil in the detail here! While charging the greatest load on the Kubota will be at that point when the voltage just reaches 14.4v. Right when the 'charging' changes from Bulk Charge mode to Absorption Charge mode.  In our case 1,584 watts of energy (or 2.12 HP) is being delivered. Given the ‘approx 50%’ efficiency of alternators, delivering 2.12Hp means we are extracting a bit under the 5HP continuous limit of the Kubota EA300.



However, at the beginning of the Bulk charge cycle where 110A is still being produced, there is only 13.2v. This equals 1,452 watts -  which means we are leaving 132 watts of excess capacity ‘on the table’ . A bit less than 10%. If we had a regulator which managed Amps and not just Volts we could increase the Amps to 120a, getting the 'load' on the Kubota back up to its 1,584w point and cut our run-time down by 10%, or about 15 minutes a day. (Hey, every part counts here!  And yes, these are ruff numbers as the benefit scales back as the charging voltage increases) And with such a regulator, I could experiment with different alternators - looking for a more efficient solution then the current ~50% If I could get another 10-15% efficiency out of a setup, we might be seeing real reduction in generating time.


In order to fully accomplish goal  #1 the controller needs to actively manage energy produced (Watts in this case) and hence needs to sample both Amperage  and Voltage. Goal #2 requires the controller to recognize when the watermaker pump is engaged and further reduce the overall energy produced by the alternator.  All but a few regulators on the market today manage only Volts and rely on the self-limiting factor of the alternator to manage (limit) Amps.  Some more advanced ones will have a crude Amp Management capability, but in every case (under $1000) these are all open-looped and very imprecise and unreliable.



Plus I get to play around with controlling computers again! What fun! (sorry, Nerd is showing again)

The design goals for this intelligent regulator:
Required:

  • Alternator Voltage Regulation (Classic ‘regulator’ function)
  • Alternator Amp Regulation (adjust Amps relative to Volts to maximize energy production) 
  • Reduced Watts produced during watermaker operation (Today I have to turn off the alternator all together while making water)
  • Soft-start logic


Additional

  • Battery Temperature compensation


Optional

  • Alternator Temperature Monitoring
  • Kubota Temperature Monitoring
  • Exhaust Temperature Monitoring (Exhaust Mixer)
  • Low-Oil Pressure monitoring
  • Shut-down and alarm on faulting of any of the above


Optional 2 (Feature Creep)

  • Kubota start / stop control
  • Kubota Throttle (speed) control
  • Maximize Watts produced in response to motor RPMs (Allows for slower / quieter motor RPMs with reduced output)


Stretch Goal (Getting Wide here!)

  • Remote Monitoring and Control Panel
  • Simple ‘Generate’ /  ‘Make Water’ on/off controls.
  • Optional auto-start? (Including Time block-outs, and Safety interlocks for motor servicing)



Required features

  • Good ESD protection
  • Watch-dog function to auto-restart if controller faults
  • Energy efficient design: High efficiency switching DC-Dc converters, Power Down modes
  • Fail-Safe modes (ala, Over-voltage shut down, etc..)



The basics: Am looking to use the Arduino Uno microcontroller board and development environment. Am using KiCad software for schematic capture and PCB layout. Looking to use a used automobile ‘Cruise Control’ motor to give me throttle control on the Kubota.   I2C devices will monitor temperature, as well as provide connection to the remote panel.

Will I ever build it? Who knows. But I sure am having fun playing with it. Have many of the key components picked out, the schematic perhaps 80% completed. I do need to find some place to open a Arduino Project and document all this, as this Blog is not really an effective vehicle. If anyone has some ideas, pass them on! And if anyone wants to help play with this, drop me a note.

8 comments:

  1. Are you really leaving 132 watts "on the table"? Why does the generator output less energy when you start the charge routine than at the point you switch from bulk to absorption, given that a)The alternator is warmer at the end than at the beginning and alternator efficiency goes down as temperature goes up; and b) The alternator controller should be essentially "full field" the alternator during the entire bulk charge cycle (unless the upper limit is controlled because battery bank size is too small for the generator). Something is amiss here, don't you think? Is it the alternator or the controller?

    Another thought: While I don't know the type of batteries you have, I will assuming from the voltages that they are flooded cell lead-acid. If that is the case, and the possibility exists for a larger generator in the future, I would build the controller with a modified bulk charge cycle so that the generator was controlled to output 40% of battery bank capacity until 13.5 volts was reached, then reduce output to 25% of bank capacity to 14.4 volts.

    Just my $.02.

    ReplyDelete
    Replies
    1. Daniel, Welcome! Ah, so you are the one who reads these Over-the-top posts :-)

      To you question of why the system puts out less “energy” at the start of the charge cycle – it has to do with the self-limiting aspect of Alternators. They are constructed in such a way that they will only put out so many amps, largely independent of the charging voltage. Common regulators take advantage of that characteristic– which is why they no longer monitor Amps produced (unlike old “generator” regulators, that had to limit Amps as well as Volts)

      So when we first start charging the battery, the alternator itself limits the current to around 110A – at Full Field. As the battery accepts this charge, it will allow the voltage to rise during the ‘Bulk’ cycle; all the while the alternator is still self-limiting to 110A. The amps stay basically the same during the whole Bulk phase with the voltage rising as the battery state of charge changes. Hence the ‘energy’ delivered also rises. (Watts = Volts*Amps). This continues until the magic 14.4v point is reached at which point the regulator starts cutting back on the Full Field and we shift into ‘Absorption’ phase.

      Temperature in the alternator does impact this a bit as well – with these large Leece Neville alternators, I might see the self-limit current drop from 110A to 105A as it heats up. So there are some details as well… Have to admit, never seen a recommendation of 40% charge rate for FLA’s, but at the higher discharge point (lower charge voltage) can see you point. As it is, am limited by the HP available from the EA300 Kubota.

      Thank for the thoughts, and enjoyed reading about WhiskyJack – Grounding and all!

      Delete
  2. Take a look at the controllers from AMPLE POWER. I think that they are well under your $1k target.
    http://www.amplepower.com/manuals/ns2/index.html
    The manuals are well-written, and worth a read even if you don't buy the hardware.

    Efficiency in battery charging is a big deal on-board a smaller sailboat, so you might as well start with folks in Ballard (the spiritual capitol of Seattle) who have been sailing and fishing with electricals for as long as they have existed.

    ReplyDelete
    Replies
    1. Yes! You have found the ONE vender I know of that is able to meet the goal of specifically measuring the batteries state of charge (via acceptance amps) to decide the correct time to remain in Acceptance (vs. a fixed time, or one 'adjusted' based on how the battery responds during Bulk phase). However, that is not the NS2 version. It is the EnerMatic that start at $1,599... Their NS2 does not measure current and Absorption time is set via a fixed timer Pot.

      Delete
    2. Another model: http://www.amplepower.com/products/sarv3/index.html Beginning @ $499

      If you want to measure current, install a shunt in-line. Direct read with a good dvm or feed current to a Battery Monitor for accumulated. SoC has exactly one useful calibrate-able point: full. Dead (under 8v) is not a useful check point. Once you know the fully-charged state of your bank (specific gravity, post-equalized, high-voltage, at ambient temp-batt cooled after charging). A few cycles up and down (to est. 50% level) will let you measure power out and power in (charging efficiency should meet/exceed mfg. spec) and will give confidence in the system.

      If you want this to happen automagically, $1600 seems pretty reasonable.
      I think that you could get a system set up to where batteries get charged with a lot of manual attention at first, then much less over time. Charged batteries is the point.

      I see the rotary charger as a great way to get batteries up to 85%SoC, and support loads that are too big for the bank (motor/heater), but lower-current (85%-100%SoC) charging can/should be done with solar pv or grid power (save genset run hours/fuel/noise).

      Delete
    3. Hello, thank you for the additional link – Ample Power had a nice lineup of offering.

      However, I think you are missing the fundamental point of this project: It MEASUREs Amps (via a shunt) in order to regulate the load place done on the engine. This is done to prevent chronic overloading of the engine, as well as prevent running the system under capacity thereby increasing generator run times. The SARV3, and the NS2 you linked before, lack this ability. They cap field PWM as a way to reducing Amps, just as the Balmar regulator I used for several years does. The problem is this open-loop PWM capping approach cannot accurately regulate the load on the engine and one must pick a point well below its capability to prevent overloading – thereby increasing engine run-times.

      Ample Power’s EnerMatic system at $1,600+ is able to do this, but the NS2, nor the SARV3, nor any of the Balmar, etc regulators are.

      Current measurement is also used to MEASURE the batteries state of recharge to decide when to exit Absorption phase. Outside the EnerMatic, all other regulators use a fixed time based approach (or one a modified time adjusted as a function of Bulk time). This can work in a static / isolated recharging environment, but in the real world where a battery is not isolated – with varying house loads being applied during recharging as well as varying recharge amps due to changes in engine speed, a time-only based approach often result in chronic unchanging (or less common overcharging). Greatly reducing battery life. I had this problem with our time-based Balmar regulator on our mains and removed it. But that is another story one can read about here: http://arduinoalternatorregulator.blogspot.com/

      And yes the EnerMatic can also do this, but it does not manage the engine. The 3rd use for measuring Amps is to decide when the engine has started (by monitoring the amps draw of the starter motor). Full engine control, staring/stopping, fault monitoring, active throttle/speed control – all is done by this project and for a BOM cost under $150. About 1/10 the cost of the only other viable commercial regulator-only (no engine control) I am aware of.

      Delete
  3. I'm trying to do a project that reads the load on the alternator and if the devices that are running off of the alternator need more power the Arduino will increase the throttle. How are you planning / how did you read the load on the alternator? Thanks!

    ReplyDelete
    Replies
    1. Will, hello - and so sorry for the long delay in replying.

      My controller is completed and we have been using it for several years now. You can see more here (including hardware deign and source code as it is open source / open hardware):

      http://smartdcgenerator.blogspot.com/

      Why way i decide the alternator load is measure it: I use an Amp shunt to measure the current the alternator is delivering, and when combined with the Volts it gives me watts - or work/load. The regulator portion of the project regulates the alternator to what is needed by the battery, while the engine manager portion looks at the load being driven and adjusts the engine RPMs to match. (There are some details as well, esp to handle large sudden loads, e.g., a hold-off to allow time for the engine to spool up before the large load is applied to it)

      Feel free to have a look, and perhaps you will find some of your work is already done!

      Depending on your needs there are other approaches. Example, one could look at the voltage, RPMs and field drive to estimate the alternator output. This would eliminate the need for an Amp shunt, but it would also need careful characterization of your alternator and be fixed to a one-off approach.

      Good luck, and perhaps drop an Email sharing whatyou are doing!

      Delete