News:

we are back up and running again!

Main Menu

Stand Alone Regulator project

Started by thomasonw, June 23, 2013, 05:12:10 PM

Previous topic - Next topic

thomasonw

I thought I perhaps should start a new topic for he Stand alone regulator, as opposed to continuing to tack onto the integrated Engine controller and Regulator.  Though they are related - in that they use the same core regulator function, there are actually separate projects.   So, here goes!

Yesterday we picked up a stack of part that have been accumulating at a friend's house in Friday Harbor. Among them were the parts and the PCBs for the regulator!



These PCBs cure do look Royal: with their Purple color and gold plating!  With the removal of Tin-lead plating, seems folks are working to get a good alternative, and I am guessing this Gold plating must work well?    I am looking to mount the PCB in the gap in the heat sink to the left.  The Heatsink is a bit of an overkill, but I think between it, a nice plastic cover, and conformal coating on the PCB it will give a tidy package.  And this is a tight board, mostly because I tried where possible to still use through hole components, to make hand soldering easier.  But even so I had to go to three SMT parts, including the dreaded INA-220!  Oh Well.   And, that small PCB the pencil is point it is actually a wiring-assistance to connect the NTC temperature probes to a CAT-5 cable for the Bat and Alternator temperature.  I had better cut way back on the coffee the next couple of days I think!  Will be doing some family traveling soon, so likely will not be able to bring one of these up until mid July.  But am looking forward to seeing how things work out.


And to kick this regulator only thread off, here is a kind of high-level summary of the key features:

  • Support 12, 24, 36, or 48v batteries
  • Supports 12,24,36, or 48v field - independent of battery voltage
  • Support N or P type alternators with no hardware changes
  • Monitors Voltage as well as Current, to allow for smarter transactions - primarily preventing early exiting of Acceptance phase while battery is still undercharged.
  • Also allows for setting limit on engine load, e.g. when trying to drive large alternator with small engine.
  • DIP-Switch selection of 8 predefined charge profiles, ala FLA, AGM, etc.
  • Temperature probe for battery and Alternator - battery temp compensation and alternator temp limit
  • Feature-In and Feature-Out ports, currently being use to drive external 'dash lamp' and provide ways to reset-to-initial configuration and/or select EQUALIZE mode.
  • Ability to fully customize charge profiles via ASCII commands - stored in EEPROM
  • Serial port for monitor status and/or changing configurations
  • Bluetooth port for doing same wirelessly
  • Sync port to intelligently communicate between two alternators chargings same battery (e.g., twin engine installation in a boat)
  • Open Source design, hardware and software (non-comercial), allows for fully configuration and modification if desired.

Someone will also be working on some applications to host the Serial communications (via Bluetooth and/or serial port) on PCs, Androids, iPhones?  to allow for monitoring of the current status as well as simplify configuration changes.

And as some of these things get proofed out (esp the new FET drivers), I will likely roll them back into the full Engine Controller / Regulator project.




thomasonw

Have been making good progress on the bring-up, with many of the subsections tested.  So far have the hardware almost 100% 'spot checked' for no-smoke and some level of function.  Am now working through integration of hardware and software, and doing more detailed sub-section testing.

Here is a photo of the 1st board:




Notice I am using a Uno development board to provide DC power as well as communication to and from the regulator.  All those Tombstone resistors provide handy test points!




BruceM

I see the temptation of boards and parts on hand was irresistible and you are well ahead of your own schedule, Thomasonw.  :)
Bravo! 

mobile_bob

i apologize for not paying enough attention to your project, and i am trying to catch up

what i would see as most beneficial in a controller (regulator) would be the capability
to monitor a 48volt string and drive a 12volt field...

as we know the commercial units all are sample and drive the same voltage which means we got to get really creative in order to use them

being able to drive a field at some other voltage than the buss voltage would be most welcome

as for accessing it with my smart phone, that i could care the less about, and quite frankly i would not want the typical end user having any access to the core programming for a myriad of reasons.

if they burn up their alternator or a set of batteries, the first place they are going to blame is the damn "controller/regulator" it surely won't be their fault.

i guess i am just cynical that way.

having said all that, i think it is a way cool project!

bob g


thomasonw

Quote from: mobile_bob on June 27, 2013, 03:48:08 PM
i apologize for not paying enough attention to your project, and i am trying to catch up

what i would see as most beneficial in a controller (regulator) would be the capability
to monitor a 48volt string and drive a 12volt field...

as we know the commercial units all are sample and drive the same voltage which means we got to get really creative in order to use them

being able to drive a field at some other voltage than the buss voltage would be most welcome

as for accessing it with my smart phone, that i could care the less about, and quite frankly i would not want the typical end user having any access to the core programming for a myriad of reasons.

if they burn up their alternator or a set of batteries, the first place they are going to blame is the damn "controller/regulator" it surely won't be their fault.

i guess i am just cynical that way.

having said all that, i think it is a way cool project!

bob g



Bob, thanks, and very glad you are looking here - with your experience.

The split Battery / Field voltage thing is a need I picked up here, mostly it seems from your work.  And though I live in a 12v world, I know many other folks (esp you Dirt Dwellers  ;) ) do not.  (I think in marine useage, pure 12v is common, with pure 24v common in larger  boats / small ships - and some OLD 36v systems still out there - but again still pure).

When speccing this out, I had three types of users in mind:


  • Plug it in an let it work - DIP switches and predefined charge profiles for these users.
  • Need to customize some - here the PC interface comes into play.  Be it via Bluetooth, or the plug in serial cable (the Service Port).   Someone is helping me to "Point and Click" apps that will leverage the serial port / bluetooth connection
  • True propellerheads - here folks can make any changes they want, by altering the source code and reloading new firmware.  (Again, via the Service port).

Adding the serial comms was really to enable people who do need to make changes a way to do so without learning C programing language and the Arduino programming environment.  I do see, to be honest, the Bluetooth module being a bit over the top. All the above can be accomplished via the Service port.  And I think some folks will just choose not to install the Bluetooth dongle. (or turn it off)

And a side note:  Down the road (like next winter or Spring) the person who is making up the fancy point-n-click apps has a NMEA-2000 in his boat.  We are loosely talking about a bridge that plugs into the service port, uses the ASCII comms coming from the regulator and translating them into CAM-BUS statements for the NMEA2000.  That will be a maybe things, as the NMEA2000 is a closed spec and I am not THAT interested in joining the group...


Back to the current regulator.  One thing I could use input on is the default charge profiles - the ones selected by the DIP switches.  There is room for 8x of them and each allows the definition of targets to regulate to (Battery Volts and Alternator Amps), exit criteria based on time, Amps, and/or volts, and  some battery specific info, ala temp compensation value, safety hot and cold temps.  I would like to populate the default table wiht a range of battery charging profiles that will cover most folks needs, and I would like to keep this table constant for a long time - to avoid a disuation where different versions of hte firmware have different make the regulator work much different. . . .   

I could use help in filling in this charge profile table.

Rather then take up space here, I have documented the charge profile tables in the Blog: http://arduinoalternatorregulator.blogspot.com/2013/06/charge-profiles-need-help-in-setting.html  and would ask for help from folks about things like:

  • Which types of batteries should be included?  FLOA, AGM, GEL,..  Other?  LiPro?  one of two 'reserved' spots for future definition?
  • Values for each battery type.  Which modes should be enabled by default, temp comp value to use, and limits.  Exit criteria for each stage
  • Do I have the correct table entries, e.g. should there be additional charge modes, exit criterias, etc...

I tried to make the charge profiles flexible, for example one could configure them to actually single the generator to turn itself off once charging has been completed via the feature-out port. (and that is where I am thinking the ability to update change profiles via the serial port could be used.)  But for the built in profiles/default - I think I have a good handle on FLA batteries, given that is what I am using.  And can leverage works from other chargers for the rest.  But I also figure this board has a massive pool of folks with much more insight into this area then I.   So, if you can take a look at the above link and send me your input - now is a good time to start defining the 'default' profiles.

-al-


thomasonw

#5
It has been a while, but I am still around - and still poking away at the stand-alone regulator project.  Did take a break while  Kristi and I took a trip back to Minnesota for her folks 60th anniversary.  But we are back on the boat now, and I have just about finished up with the 1st build.   Here are a couple of photos of the regulator:



Top view. :  Field connectors are the large ones on the top left, bottom left connects battery voltage sensing, Alternator stator, as well as engine 'enable' line.  Top right has Feature in/out connectors and Alternator shunt, while the bottom right has the block of RJ-45 connectors for temp probes, service probe, and synchronization cable for twin engine install.  Bluetooth module is top center.






Bottom view.   Field Driver FETs (right hand side) will mount face down onto the heatsink, with relief holes in the PCB to gain access to the mounting screws. Need to use a bit more PCB cleaner to get rid of the remaining residue.













Today I did some mocking up of the assembly, just to see what parts fit and what I was missing.  Mostly it looks good, but I will need to get taller standoffs to raise the ‘cover’ up some more (Cover not shown here). The Plastic cover which will go over the whole unit giving it a nicer finished look, and some additional protection beyond the conformal coating.   Also need to print up and add the stick-on labels describing the DIP switch and connectors.  And BTW, the heat-sink is a MASSIVE overkill - I selected it for the notch / channel in it to place the regulator PCB in. 




A few issues I have found:  There was one design error in the FET driver, the 15v clipping zener needed to go between G and S, not G and GND:  I relocated the Zener to the back of the PCB and tacked it on.   I also am finding the NTC daughter boards a real PITA to solder up.  Partly due to their small size, partly due to I made the wire through holes a little small, and partly due to the Chinese sourced CAT-5 cables I purchased, which seem to be made from Aluminum – not copper…  Digging through our parts stash I found some unused Magnum remote cables and use them.  Even so, it is a REALLY small PCB, that is a CAT-5 cable coming in from the left...






My next step is to complete the mounting and then install it on Viking Star.  I am very interested to see how some of the new algorithms work (specifically the auto-alternator size determination).   I figure I will also want to wire up a remote ‘kill switch’, just in case things go really bad.  But as with the integrated Engine control / regulator project, I will be making several test runs, logging data, and making adjustments to the source.   I am not worried about the core regulator functions, it is the new stuff placed around that that I need to check out.

Still looking for input on the details for the default charge profiles that I will build-into the source, see here for more details:  http://arduinoalternatorregulator.blogspot.com/2013/06/charge-profiles-need-help-in-setting.html


-al-

thomasonw

#6
Today I uploaded version v0.0.3 of the firmware to the blog (http://arduinoalternatorregulator.blogspot.com).  This version seems stable enough for me to be using it and the regulator hardware as my primary alternator regulator (though I do monitor it closely and capture data on every engine run) - and with a few exceptions all major functions have been tested and work at a basic level, including:


  • Core regulation function - Volts, Amps as well as Watts
  • State switching, including the key goal of exiting Absorption Phase based on batteries actual acceptance rate (and hence actual state of charge) vs. fixed time duration
  • Auto-size determination of alternator - used in capping outputs following user selection (See more below as I have a question on this one..)

What I have not tested out yet is the Temperature compensation (been having assembly issues with the NTC probes), nor the dual-engine synchronization capability.   These will come.  Also have a list of hardware errata, most centered around high impedance signals and their handling (Wow, Impedance in a Digital World, who would think :-\ )


On my question:  One of the features of this is the ability to limit alternator output to some % of its max capability, for example:  If the user selects 'Small Alternator Mode' via the DIP switches, then I limit output to 75% of its capability (ala, a 'small frame' 150A alternator would be limited to 112A).  The idea here being that some small alternators really are not designed to run Full Bore for long periods of time without burning up.  So, if selected, I regulate the Amps to a max of 75%.   Now I noticed when the engine is at speed, the above 75% regulation works well, capping things at 112A's.  However, when the engine is throttled down we try to keep the output up and start raising the field PWM value.  If, for example, this alternator is only able to produce 50A at idle - the PWM value will increase to Full Field, attempting to get the 112A's out of it.  (BTW, this is the same as a Voltage Only regulator will do, it just has no idea it is asking the impossible).   

Now, my specific question is:  Currently I apply the same de-rating factor (75% in this case) to the Max allowed PWM, and as such will limit the Field PWM to a 75% duty cycle, vs. allowing it to go to full field in the case of Idling as described above..   Is this a good thing?  Or am I adding complexity that does not need to be there - is there risk in applying Full Field to an alternator for extended periods of time while it is at idle?  (Or even while running at speed).   My initial reaction is No (even though I did put the code in):  As looking at simple Voltage Only regulators, this is what they will do - raise Field as long as voltage is under the limit - they would drive to Full Field in the idle condition described above.   So:  Should I leave in this Field PWM de-rating capability - giving the alternator a bit easier of a time, or take it out (leaving in only the Amps de-rating capping) and let things drive to Full Field to pull every Amp possible out of them at idle.



-al-

mobile_bob

my vote is leave in the derating capability, it will be needed by most folks in my opinion
and i see no need for max field at idle speeds, most will be running at a fixed speed anyway and not ask their alternators to support the load at idle speeds like a car would do.

just my opinion
bob g

mike90045

what about using a cheap diode as a temperature sensor (very linear Vf change over temperature) and let that be some feedback of case or exit air temps ?

thomasonw

Quote from: mobile_bob on August 24, 2013, 03:01:27 PM
my vote is leave in the derating capability, it will be needed by most folks in my opinion
and i see no need for max field at idle speeds, most will be running at a fixed speed anyway and not ask their alternators to support the load at idle speeds like a car would do.

just my opinion
bob g

Bob,  Thanks, guess I can leave it in - perhaps make it #define selectable...  That section of code will cap the field drive (depending on what value the user has selected)  at all points of operation, from idle to full speed.  In practice I expect the Amps capping to play the major roll at full speed, and the PWM capping only coming into play as the throttle is lowered.   And on that - I have some interest in this from a boat/marine group (hence the dual regulator sync capability - to better handle twin engine installations), and in that application do expect to see full range of running from idle to cruising speed.


Quote from: mike90045 on August 24, 2013, 11:40:38 PM
what about using a cheap diode as a temperature sensor (very linear Vf change over temperature) and let that be some feedback of case or exit air temps ?

Mike, thanks I do have a NTC temp senders in there for both the battery and the alternator - adjusting the target voltage based on battery temp., and reducing the PWM drive based on alt overtemp.  But I expect the Alt Temp will be slow moving in its response to PWM changes, so am looking at the PWM de-rating as a way for users to decide how hard they want to drive their unit ahead of time.


OK, heading to a code to hunker down against an approaching low Monday.  Not sure if we will have internet access or not for a while, but do appreciate the input here!

-al-

thomasonw

Well,

As falls seems like it is starting to settle in and I stress over the outside  'projects' I have not yet completed (ala, refreshing coat of Cetol on the brightwork, and the caulking I pulled a few weeks ago that I need to wait for things to dry out before I apply new stuff....), it does give me time to play with indoor things a bit more...

Over the past few weeks we have been using this regulator as our primary regulator for the main engine house alternator.  The firmware is getting tight.  So I turned my attention on the hardware and there are a few areas I am really not happy about.   Mostly (I know, I have learned my lesson - this is just too much of a black art) the switching regulator. . . . .  In trying to ID a solution that would span 12v to 48v batteries lead me down some of the newer 'auto' ICs, but in the end it is just not working.  Today I put the scope to a sample;  it is operating outside its target frequent, PLUS giving me 100mV of ripply...   Wont even talk about how it responds to load changes (ala the Bluetooth doing a search).   So, will go back to Lin reg solution (looking at the TL783) and figure out how to dissipate upwards of 3W of heat.

During one long run it occurred to me that I have the Amp Shunt in the wrong location - on the alternator, when it really should be on the battery.  IF the goal is to better decide the true state of the battery charge (by looking at acceptance amps), then one needs to sample the battery.  If I monitor the Alternator output and there is no other load or charging source or loads  then sampling Amps at the Alternator will work great.  But if anything else ++ or -- is there (on Viking Star I have both:  House load for chart plotter, auto pilot, GPS, depth sounder, etc.  + if the inverter kicks in, and the Solar Panels as a charging source), one looses the true picture....

So, for the basic install am now looking to put the shunt at the battery, so all the above can be seen.  This has a couple of benefits:  Perhaps many battery systems already have a battery shunt as part of a battery monitor, it can be reused.  And it eliminates the need for the 'dual' port I put in for twin engine installs on boats...  IF one needs to more closely monitor the Amps output (ala, putting a large alternator on a small engine), this regulator can still do that by placing the Amp shunt on the alternator and doing he appropriate configuration - then it will run just like my DC Generator / controller does.

Firmware is getting solid and will continue to fine tune it.  Am look to revise the hardware this winter when we get back into port.

-al-

thomasonw

I have been working the past few weeks to update the hardware design as well as flush out the hardware description narrative in the blog.  Today I posted a new version of the schematic:  http://arduinoalternatorregulator.blogspot.com/2013/10/posted-v010-of-schematic-and-where.html   (And here is a link to the hardware overview section. http://arduinoalternatorregulator.blogspot.com/2010/06/hardware-design-overview.html


Perhaps the biggest change is an update to the FET driver.  The LT1910 worked great, and its internally generation of FET gate boost voltage allowed operation up to 100% PWM (Full Field).  However, the LT1910 has a Vmax spec of  60v, a bit shy for some situation with 48v batteries (specifically equalization).  I changed out to a more commonly available FET driver and added an external voltage-doubler ckt. driven by an independent PWM pin from the CPU, to generate the needed FET gate drive boost voltage.   SPICE modeling shows this works well and I am anxious to see how it performs in real hardware.

Firmware has shaped up.  Have been cross-updating between the DC Generator source and this regulator source as I learn from each deployment.

I want to investigate simplifying the design to 3.3v only (vs the current 3.3v / 5v design), I need to make sure there is not some funny thing in the Arduino boot-loader / firmware package that will balk at a CPU not running at 5v.  Once I complete that I will be sending out from a new round of PCBs.

Side note on hardware:  Am really starting to feel the pressure of the world changing from oh-so-easy-to-solder-with-not-20-year-old-eyes through hole parts to Surface mount parts.  More and more I am seeing that interesting chips are only available in SMT versions, and where through-hole parts are available they often cost more...    Anyone have an opinion:  Keep the through-hole approach, or give in and go SMT??  (Have been looking into some ideas around using an electric skillet as a way to home-solder SMT boards..)




-al-





BruceM

I like the improved performance of the new IXYS P-channel Mosfets; they can be soft switched to reduce EMI, and make high side drive simpler since no gate voltage above the supply is needed.   But anyway you can pull off both high and low side drive on such a small board is a minor miracle!!!

I recently soldered up a  new analog 12V PV charge regulator design using an IXYS P-channel Mosfet as an analog, high side, series regulator.  For high current applications you have to dedicate an op amp per transistor to run them in parallel, but they'll do 10 amps/10V drop (100+ watts) per transistor (TO-247) without a problem with a big enough heat sink.  All that with 0.014 ohm on resistance.  Sweet.




thomasonw

Quote from: BruceM on October 25, 2013, 08:08:55 AM
I like the improved performance of the new IXYS P-channel Mosfets; they can be soft switched to reduce EMI, and make high side drive simpler since no gate voltage above the supply is needed.   


Ya, was those parts that I use in the Kubota DC generator controller to allow for low/high side drive with board stuffing options.  But I wanted to go beyond assembly/stuffing options and make the selection purely a wiring configuration. My inspiration was AC generators and motors, with their jumper blocks to select different configurations for voltages.

Completed look at 3.3v, firmware seems to have sufficient extra headroom - even when reducing the Clock to 8Mhz per the Amtel specs.  There IS some funny settings in the Arduino environment I still need to work around, to support the 8Mhz clock as well as disable 'brown-out' tripping of around 3.8v.   But these are solvable I am sure, just a small matter of programming.   Think I will send out for a new batch of PCBs today or tomorrow and see how things really work out  :-X

-al-

thomasonw

It has been a while that I have done an update, and part of that is that progress has been slow.  I have assembled the new PCB, and burned the 3.3v firmware.  But I have not yet started modes to the source to account for the new TI parts, nor the boost power feed.  Plus, we are facing a change:  My Wife and I will be moving to Minnesota next month for about a year to help her folks out.  (Ya, we got odd looks about coming to Friday Harbor for the winter, though we would step it up a notch).  The side effect is  I will not have access to my test bed (our boat).  As such, I will complete the firmware and do self testing, as well as bench testing with the external Simulator.  But will need to wait until I get back for real-world testing (outside what has already been done with the PCB version).

So, if anyone is interested in Smoke Testing this thing, let me know.  Till then, will be looking for really warm cloths, and watching Fargo to get into the mood!

-al-