Monday, September 16, 2013

Hardware update

Debugging the hardware I have IDed several areas I am not happy with.  In fact, overall I am not happy with almost the whole design and am l looking to improve each subsection.  Here is a rundown of the changes I am looking at:


Changed  out Zener diodes in overvoltage protection:  The zeners just did not work for any input which has a noticeable impedance, as the Zeners themselves are incredibly leaky and caused massive signal changes – even well before their knee.  This was most noticeable on the NTC problems.  With its  5-10K impedance the Zeners rendered this circuit unusable.  So, I have gone back to the tried-but-true two Diode approach.

Changed from Switching to Liner voltage regulator:  A key challenge in  being able to support the wide range of battery voltage – from 12v to 48v systems – is handling this wide dynamic range without hardware changes.   The expected actually battery voltage can range from 8v to over 68v and with this massive voltage range traditional Liner power supplies can have a large amount of heat disputation (upwards of 3Watts).  So I tried a Switcher – but it just is not working.   It is missing its design specs, frequency of operation, ripple, etc.   The datasheet cautions that ‘fine tuning’ of components is often needed to dial things in..   Well, I just do not have the experience to do that.   And despite the promise of 48v being ‘normal’ in automobiles (and hence there being a wide range of ICs available to support these higher voltages), we are just not there yet.  Hence the picking is slim when it comes to 48v tolerant ICs (All ICs - not just voltage regulators!).   In the end I am going back to the brute-force linear regulator.  I will use a simple zener/emitter-follower transistor for the pre-regulator to handle the bulk of power dissipation in 48v deployments finishing up with a proven reliable LM7805 to polish things off.

Changed FET driver chip:  This support for 12v to 48v systems also has been a challenge in the FET circuit.  Specifically the driver.  I found the LT1910 chip which solved a TON of issues (chiefly being able to self-generator boost voltage during 100% duty cycle) and it has worked very very well.  However, it will not withstand voltages that might occur on 48v systems.  Specifically while equalizing, and more so, specifically while equalizing in a cold temperatures where the battery voltage needs to be higher…  I wrestled with this one for a long time, as the LT1910 is such a nice solution, and it worked for all but a small corner case…  And in fact, it might have been just fine, only overrating above its max rated voltage by say 5-7v or so…    But. . . . .  it bothered me . . . .  so I have changed this design.  I could not find another fully integrated FET driver like the LT1910, and instead selected a common high voltage driver chip (IRS2127 in this case, good for up to 500v - should be sufficient!).  That left me with the challenge of how to support boost voltage generation with high duty cycle, specially:  How to keep the FETs on while at 100% / full field…   I thought about just limit field drive to say a 98% max, and that might have worked.  But in the end I added an external voltage doubler to provide boost voltage.  There are app notes about doing this using 555’s for this, with extra costs.  In the end I thing I will be able to use a 2nd PWM pin from the Amtel CPU to drive the voltage doubler.  Will see how this all works out….

Bluetooth module supplier changed:  The low cost HC-05 Bluetooth module I have been using to provide simple wireless connection has been working well, and at $5 how can one beat it!   Well, in fact I am a bit concerned that it does not carry an FCC certification.  And in looking at Bluetooth devices that do I can clearly see extra shielding.  Perhaps it is not an issue, perhaps one does not worry about FCC cert.  But, I am changing the module to one that provides the same Serial emulation functionality (SPP), has the extra shielding, and carries an FCC cert (along with other countries as well) the Roving Networks RN-41.  It is available at Mouser, but sadly costs $25. . . .  This one I am a bit troubled by, because I think there is no really engineering risk here – it is a ‘government’ thing.   IF by chance I make up a few of these to offer to others, in kit, or even some level of assembled, I worry about the FCC thing..   So – Costs Up $20 for that one.  There is one advantage though, the RN-41 is higher power and likely will keep a stable connection for over 50’ or so, while the HC-05 was a lower-power Bluetooth device designed for a few feet.   AND if one wants to lower costs, the same low-power level device is available from Roving networks as the RN-42, it is pin and software compatible, and its costs is around $15.  So only $10 up..

Upgrading the Voltage sensor chip:   Again, driven by the wide range needed to cover and the desire to not have any assembly (ala, part value selection) options to cover that.  I tried a switchable pre-scaling voltage divider in front of the INA220, but that proved to be problematic – again, and impedance thing.  In order to keep the power dissipation reasonable in the resister divider in a 48v system I needed to use somewhat high resister values, but that combined with the input impedance of the INA220 did not produce a stable design.   TI offers an upgraded part, the INA226 which not only has improved input impedance, but also a wider voltage tolerance (it can handle 24v systems directly), AND greater resolution!   So, I am going to upgrade to that part, and place a fixed voltage diver on the input to cover the range needed for 48v systems.  No more switching in/out, it will just always be there.  I will lose some precision with the pre-scaling, but will pick it back up with the improved resolution of the INA-226.  And it looks like the expected impedance input range of the INA-226 will keep total calibration errors under 0.5%.  I feel this whole thing is a bit of a compromise between precision and flexibility to cover the wide deployment range w/o hardware changes.  I looked into other approaches, ala a simple Op-amp to buffer the input impedance, but again picking are slim to cover the wide range needed (actually, I did find a jus the part I needed – the LM143.   But that simple, low cost device was taken off the market in the late 90’s.   Sigh..).  Did find native 48v sample chips, but they had too low of resolution, and insufficient speed to meet the 100mS cycle time goals.

Current Measurement:  Another benefit of upgrading the sensor chip to the INA-226 is its ability to handle voltages sufficient to allow the Current Shunt to be placed either High or Low on 12v AND 24v systems.   Giving greater deployment flexibility to those systems.  36v and 48v systems will still need to place the shunt low (in the ground) to prevent exceeding (and damaging) the INA-226.  In order to place shunts High on 36/48v systems, a simple external pre-scalar will be needed (ala, and AD8217).  I had thought to imbed the pre-scalar directly into the design, but that has the side effect of locking ALL deployments into high-shunt deployments.   So, for now, am going to simplify things with this slight restriction:  36v/48v systems must use a shunt placed low or use an external pre-scalar on a high-shunt.  As the world progresses, perhaps a new INA-22x will come out that can directly handle 48v voltages. 

Removed the Dual-sync port:  With the insight of where the shunt SHOULD be placed (or, perhaps more polite to say COULD be placed) it became clear that a dial-sync capability was not really needed.  By placing the shunt at the battery that situation is handled, and even more:  Things like a 3rd charging source (ala Solar panels) and house loads are all covered.   None of that would have been addressed with the simple dual-sync port, but placing the shunt at the battery does.   So:  With a better engineered solution available, still retaining the flexibility to place the shunt on the alternator if one wishes (and perhaps making some educated guesses at other charging sources / house loads) I have removed the dual sync logic and code.  It seemed like a needed feature, but in the end it was an incomplete solution.  There is a better one, and the better one is FREE!

Removed CAT-5 connector block:  And with these  simplifications, I can remove the stacked CAT-5 block; going back to header pins for the Service port and using simple screw connectors for the NTC temperature probes.  It not only lowers costs some, but also greatly increases the flexibility of sourcing temperature probes – several are readily available from EBay, and one could also use ones from Morning Star or even Balmar.  All made up for you!  (Will need to confirm the nominal resistance of these as being 10K, and if not you will need to change the source code #define calibration values).


OK, that is it.  I will be looking to fab up new PCBs this October, and perhaps do some assemble in November when we return to port for the winter.  Until then, I will continue to refine the firmware – currently addressing details around load-dumping, and think I about have it nailed.


Thursday, September 12, 2013

Looking at Load Dump

Load Dump is a condition when a large DC load is suddenly removed.  A common example aboard Viking Star is when the Dryer is running, it consumes 1200watts to power the heating element.  This is supplied via the inverter, and it can consume upwards of 90-100Amps to meet the need.  But when all of a sudden the Dryer decides it is at temperature, it will turn off the heating element - with a very very sudden drop in a 90A+ load:   a Load Dump.

While the heating element is operating, the Alternator will work it hardest to meet the needs of the
inverter with the remaining energy being sent to the battery for its recharging needs.  However, once that Inverter load is suddenly removed, the Alternator will take some time to spool down - and there is a risk of overvolting the battery if not done quick enough.   BTW:  In the Automobile world, there are many recognized transient situations.  Most of which are described in the graph to the right.  And yes, I am using Load Dump a little different - removal of  large load, as opposed to disconnecting the battery . . . .

The Source code is configured to update the Alternator field drive every 100mS, or 10 times a second.   And any overvoltage situation takes absolute precedence in reducing the PWM drive.  With the DC generator, and its smallish 135A alternator, the normal PID logic was able to deal with any load-dump situations.  However, with using our Mains alternator (a 270A Leece Neville monster)  I found the PID was not able to respond quickly enough.  Example, on one run I noted a max Overvoltage of 450mV, almost half a volt!

So I added in some Load Dump code:  upon detecting as little as 40mV overvoltage, we now cut down the PWM by 50%. 80mV causes another 50% pull back, and 120mV over target just turns off the Alternator.  a Primary goal is to protect the Battery.  Using this approach I was able to reduce the maximum overvoltage to 80mV.  (As a side:  the regulator normally regulates within a 25mV range around the charge profile target).

After looking at the data dumps from todays trial run, I think I can do better - by looking not only at the absolute voltage to detect a Load Dump, but by also looking at the Rate of Change of voltage.  If I see a massive Rate of Change, and we are close to the target Charge Profile voltage, then we also trigger a Load Dump pull back of 50%.





Thursday, September 5, 2013

Continued progress

Over the past several weeks I have continued to test out the Arduino based Alternator Regulator.  It has gotten to the point where I now am using it as the primary regulator and the source code is getting rather stable.  But I continue to find problems with the hardware design, today’s admission is around the high voltage switching regulator - it is just not stable.

It is operating outside its design frequency, has very poor response to transients, and is present as much as a 100mV ripple in the +5!!!   All of this is enough to zero out the Bluetooth, and I am sure lots of other things are impacted.

So, in the redesign I will be going back to a liner regulator.  Either a standard LDO with a pre-scaling transistor, or something like the TL783 form TI.   At issue here is when running with a 48v system, there will be upwards of 3w of heat displaced with a linear regulator!

But, it will be stable....  

And I have been thinking more on application - specifically the placement of the Amp shunt.  IF we are really looking to understand the condition around the battery, then I am thinking it makes more sense to place the Shunt at the BATTERY, as opposed to at the Alternator.   Doing so would allow us to know the true state of the battery, independent (and accounting for) and house loads, and/or other charging sources.  

It would however preclude managing closely the load the Alternator places on the engine.


But I think there is sufficient flexibility in the firmware to allow the user to use it for either application:   Better regulation of large alternators on a house battery, as well as doing things like limiting the load placed on an engine if one wants.

All depends on how it is hooked up and configured.

So, will continue to work through issues with the firmware and ge ready to do a hardware redesign this fall.   One open question I have is:   Should I continue to use as many Through Hole devices as I can, or give in and start moving to SMT for things like blocking Diodes, resisters, etc...

Hum....