News:

we are back up and running again!

Main Menu

modified st controller

Started by mobile_bob, December 28, 2009, 12:52:52 AM

Previous topic - Next topic

mobile_bob

just thought i would start a different thread and maybe get some idea's and input on
control or regulation for a modified st head rectified for battery charging.

attached is a block diagram, with what i think are the the major components needed to get the hardware end
sorted out.

comments welcome

alterations are also welcome

the adc are needed for the stamp bs2 micro's and likely unneeded for a pic controller as they are built in iirc

the gm regulator could also be replaced with something other, but it is cheap and widely available

the controlled resistor network i have to look up the number for and spec sheet, i cannot remember what it is called
but i know such exists

so have at it

bob g

mobile_bob

continuing on with a bit more explanation


the microcontroller is the heart of the controller/regulator, it allows for the ability to program the operating parameters and allows
for dynamic regulation over a fairly broad range of voltage and current, taking inputs from temp sensors from both the batteries
and alternator (the former for temp compensated charge, the latter for alternator protection from overheating).

because i am most familiar with the bs2 stamp, (actually that is the only micro i am familiar with) there are also two ADC units
they basically take voltage samples and digitize them so that the bs2 can read what is taking place, that way it can monitor voltage
being delivered to the battery as well as current.  these are two more sources of info needed by the micro which are basically feedback
so that it can make programmed decisions on setpoints

the resistor network, is basically a microprocessor controlled variable resistor, the micro adjusts this unit dynamically on the fly by
sending pulses to the chip, this in turn changes the resistance of the output of the unit.

the gm regulator, while it looks like every other gm internal regulator on the market is somewhat different, it has the typical two male
spade connections, but unlike the more typical unit which connect to idiot lights for activation, had a rubber encased 4 stage resistor block
attached, with a red plastic jumper that was externally accessible. you could change the voltage setpoint from something like 13.8 up to
about 14.8 or so by removing and reinserting in quarter turn changes to get 4 different setpoints, there were only 4 because there were
only 4 resistors and positions.  a variable resistor could be placed here the result being a dramatically increase in steps,

the field driver basically is the bridge between the gm regulators ability to control ~14 volts and the needed ~60volts of the ST field
apart from the obvious need for a bridge between the voltages, it also provides protection for the gm regulator, in that the driver
circuits power requirement from the gm regulator would be only a very small percentage of that which it was originally designed for.
therefore the gm regulator should last forever.

the ability to program this unit would allow for soft start, temp compensated charging, true  step regulation, accurate control of both amperage
and voltage, and alternator overheat protection, along with the ability to flip a switch for timed equalization with the addition of a switch
and another few lines of code. there could also be another logic line that would direct the controller to reduce charge voltage to whatever level
needed should a critical load come on line while charging that might not be able to operate properly or be damaged due to higher charge voltages or during equalization.

through coding we can ramp up slowly to the proper temp compensated charge rate, so that the engine can respond more easily without
chirping belts, and with reduced exhaust smoke, charge at a bulk rate that is appropriate for a programmed length of time, ramp down to
an absorption rate for a programmed length of time (all the while checking battery temp and adjusting voltage accordingly), then ramp down
to float and set an output to indicate or shutdown the genset.

there should be enough pins left over for indicator leds to show where in the charge cycle it is at, perhaps have a set of dip switches for simple
program changes, and maybe some other interesting additions or options

thoughts?

bob g

BruceM

#2
Here's my 2 bits:

An inductive filter is needed between the rectification and batteries, else you'll have too much ripple voltage, which battery manufacturers advise against.

The current sensing shunt needs an op amp circuit to convert the tiny voltage drop on the 0.01 ohm or less shunt to a 0-5V range for A/D conversion.  I've posted this circuit in the Automation section, it's a single op amp, not a big deal.

Since this smart controller will need a PCB, you can integrate a single power MOSFET with gate driver onto the board, there is no point in an interface to  GM alternator regulator product. Our excitation voltage would be too high for it anyway, most likely.

We have a minor problem in that (about) rectified 120VDC (doesn't have to be filtered)  is what we need for excitation on a 3-5KW ST head (lower does not work well- I've tried), and I would NOT use the harmonic winding (It could be used, but I'd rather not.) . A small step up transformer off of the ST 60V output would do the trick, and I'd assume 12VDC available for start up excitation, and as the bulk power source for the controller (which needs 5V and 12V).

The processor can PWM the MOSFET to control current during bulk charging, and then PWM for temperature adjusted, fixed voltage adsorption phase.  Battery bank sensed voltage and temperature need to be ranged and scaled to 0-5VDC (useful range, not full range) for A/D conversion.  

This is a significant electronics/software development effort.  Concepts are easy,"idea men" like leaves in fall, but the nitty gritty of designing, building, testing the first prototype and then getting it to well tested product stage is more similar in effort to childbirth.

I'll make an attempt at a block diagram later.

BruceM



mobile_bob

Bruce:

please allow me to beat the dead horse a bit longer  :)

my interest in the gm delco regulator i reference to is based on my desire to use it
to control a 48vdc nominal automotive alternator (modified per my ealier white paper)

i know a balmar will do what i want, and do it well, but
the cost is north of 300 bucks for the controller, unless you find a deal on ebay an then the average about 220-240 bucks

having worked with the balmar i fully understand how it works, and what its strong point are, and what its weak points are as
well,
the strong points are easily duplicated in my opinion and the weak points are a function of making a one product fits all purposes
product, at a price point so that everyone in the sales food chain can make a reasonable profit,

so if the thing retails for 350 bucks, the retailer buys if for 250 or less from the wholesaler, who buys it from the manufacture for
probably around 200bucks, the manufacture has to produce the thing for far less than 50 bucks in order to pay for all the overhead
production costs, shipping, r&d, advertizing, tech staff, etc, and show a profit large enough to not only keep the rent paid, but cover
all warrantee issue's and buy the boss a new condo or boat this year.

bottom line is they don't have 50 bucks in the thing, same goes for the mx60 or mx80

so that is the reality, you got 50 bucks worth of stuff built into a flashy case, and it must be adaptable over a huge range of
installations, with all sorts of folks, all kinds and sizes of batteries and in the case of a balmar controller, all sorts of alternators
running at all sorts of speeds, blah blah blah

actually quite an impressive feat when you think about it, however

in order to do all this there are lots of compromises that are made, one of the biggies is the calculation of amps instead of actual measurement
calculation of amp/hr, kw/hrs instead of actual measurement, etc.

so where is old bob going with all this?

this is where i am going

we have a very well defined problem, to find a solution so

we will know which battery technology we are going to use, in my case flooded lead acid cells
we will know what voltage we are going to operate at, in my case 48volt nominal
we will know specifically which alternator we are going to use, and its field requirements
we will know specifically what frequency it will operate at, our engines are fixed speed

so

(going back a bit)

if for instance i am using a large frame automotive alternator, then i know the gm regulator will work
to control it, but only at a fixed voltage, unless i use some means of altering the resistance between the
two spade terminals, this is easily done and requires no fancy or finicky electronic voodoo

i want temperature compensation, they sell the temp sensors that are compatible with my micro
and all it take is coding to read that sensor, no fancy or finicky electronic voodoo there either

i want a temp sensor on the alternator for its protection, however a temp snap switch in series with
the field could be used to cut off the alternator should it get above my design high temp limit, but
i could just as easily use another temp sensor and have the micro read it,, no fancy finicky voodoo here either.

i have absolutely no doubt that a reasonably proficient diy'er could build and program a controller to regulate
a large frame automotive alternator using largely off the shelf parts without the need for some difficult
and hard to make right pc board etc.

none of the circuitry external to the regulator runs at any high frequency needing very careful layout or protection.

i just don't see the issue,  up to this point

however i do see a few issues getting he regulator field driver to drive another field driver that is tasked with the
required voltage and amperage of the st field, as you know we can't run the st field straight from the gm regulator.

now if its the gm regulator you don't like there are single chip automotive regulators available now that have all sorts of
bells and whistles incorporated within a single package, i see no reason one of those chips could not be used in a design
of a suitable regulator.

my thinking is to let the oem engineers work out the regulation and just do what i need to make the regulator do what i want
it to do with external control that in itself controlled by the micro and my programming.

first step is probably to build one to do the control of my alternator, when that is proven to work see what it takes to adapt it to
duty on controlling an st head.

makes sense to me anyway

:)

bob g


mobile_bob

if you don't like the delco, here are a couple of options that might be useful

bob g

ps, i have another one that looks really good, but i can't find the pdf just now, but will post it when i find it

BruceM

#5
Sure, use the 48V alternator regulator for the intended 48V battery bank, if it has the flexibility you need and gives you a warm fuzzy feeling.    

I thought this thread was about the ST regulator.  For the ST, the excitation voltage needed is very likely too high.  

Besides two ST AVRs, I've designed and built an external  12V alternator regulator (linear, as you would expect from me), I run it in my '85 MB 300D (modified alternator does not use chassis for ground,  and uses a massive multistage LC filter). The typical auto regulator is just a fixed voltage, bang-bang regulator with thermal limiting.  There's nothing special about an alternator regulator compared to what's needed for the ST, the latter could easily be adapted up to do an alternator. (A lower lower voltage mosfet would run cooler.)

I just wouldn't mess with someone else's regulator- unless it did everything I needed without a hack job.  If you've got to hack it, what's the point for such a trivial circuit?   Maybe you should look at the schematic for my basic AVR again?




mobile_bob

#6
Bruce:

in an effort to try and understand what your position is, let me try again to present mine
maybe afterward we can see where we part company.

i am not proposing "hacking" anything!

what i proposed was this

1. the delco regulator of the specific model i referenced uses a resistor block that has 4 internal resistors, which can be
connected via an externally removable little red square cap, that has two prongs on it, you simply remove the little cap
and reinsert it in any of four positions, which in doing so resets the voltage setpoint to 4 different voltages, starting at 13.8 and going
up in .2volt steps.

what i propose is replacing that 4 step manually switched resistor block with a digital potentiometer, which in effect is simply a resistor network
that is stepped by command pulses from a micro controller.

i don't see this as a "hack" of the oem regulator

2. the delco regulator works on a pwm scheme, running at a few hundred hz on the older units and perhaps a couple khz on the newer ones, not sure but at this point it is not something i worried about much, perhaps i should if i were to use it to drive a field driver stage to provide control of the much higher voltage requirement of the st head,

the added driver stage is not a "hack" of the gm regulator, but rather an add on that doesn't change the function of the gm regulator.

3. the microcontroller can read temp sensors, that is one of the useful things they do, i don't see that as a "hack" either.

4. the microcontroller can read an adc and by extention both a voltage from a divider and current via a shunt, this to is something they
are good at and commonly used for, and not seen as a hack.

apart from the added field driver i am having a problem understanding how this proposal is a hack of anything?  the core of the system
would be an unmolested gm regulator but could be a regulator of your design, or one of the several single chip alternator regulators, or
possibly something else entirely.

it just seems to me like what i have presented is basically a three part design,

1.  the first part is a microcontroller that monitors temp sensors, voltage and current, and drives a digital potentiometer based on programming code.  is there a problem with this part in theory? any special concerns? highly technical hurdles? tricky construction techniques required?
if so i surely want to know!

2. the second part is the gm regulator, you might not like the regulator, but it is hard to beat in price, dependability or availability. it can be controlled externally by a variable resistance easily. if you don't like the gm regulator i guess one could use any regulator that is controllable
via a variable resistance?  is it that you just hate the gm regulator, or that you specifically like yours better?
its ok by me either way, your regulator may be far better for what it was designed to be?  however if i am not "hacking" the regulator
what specifically is the issue with the gm regulator?

3. the third part is the field driver, this section could be as you state a mosfet easy enough, mosfet drivers are common and are used for
all sorts of stuff, but admittedly this section is not my strong suit, however i don't believe that it would be a horribly complex circuit requiring
lots of expensive parts or specialized construction.  H bridges are cobbed together all the time by the robotics crowd, i don't need field reversal
so it would seem plausible that a single mosfet from an H bridge design would be adequate?

also i am aware that there are other concerns, and all the bits to tie the three sections together, most of which are digital and require relatively simple connections, the one that perhaps could cause problems it the connection between the output of the regulator and the mosfet field driver
certainly there might be some other needed components to tie the two together?

Bruce i apologize if i seem to be pressing you on this topic, i am not doing so to make your life miserable or irritate you or anybody, rather
i need a bit more specifics about why you are so negative about the proposed system. statements that include the word "hack" don't really
do much to convince me of your position i guess, unless of course you can explain to me how you feel the term "hack" is appropriate?

i keep thinking perhaps i am not presenting my idea clearly, perhaps i left out an important part inadvertently that renders the idea looking like
some sort of half baked "hack"?

if that is the case i surely would like a chance to clear that up, because i really feel the idea has merit and would work.  actually i have "no" doubt
at all that i could make the system work as described to control any automotive alternator and provide for 3 step, temp compensated charging
with protection, and timed equalization, however

the integration with a field driver suitable for the field of an st head i am less sure of, only because i haven't done it yet.

so in conclusion, would you mind being a bit more specific as to your dislike of the idea, maybe i can learn something from you in the process
and save myself a bunch of work?

far easier and cheaper to discuss with you first, than it is to just buy parts and put something together.

:)

bob g

ps. some of my best thinking gets done while i am asleep, and this evening is one of those nights

it occurred to me, i don't need a final driver to control the st head, just give me about 60vdc that is relatively clean,
and i can filter and do the rest for the st head just fine.

and another question if i might,
how does your regulator handle "load dump"?   or rather how will it handle load dump when the st head is charging batteries
at a high rate, with a load heavy load online, and that load drops off instantaneously as loads often do? do you have provision for the
large voltage spike that will result? i am sure you do, just wondered what your favorite method of clamping those spikes might be?

more in the morning...

BruceM

Hacking a product is reverse engineering it, then modifying it's function. I do it all the time, when I get a lot of function for not too much work.  When the function is simple, I don't. 

The product you're talking about (I haven't seen your reverse engineered schematic) can be replaced by the single op amp comparator circuit of my public domain, basic AVR.  That would seem a far easier starting point for adding the other features needed to make a full 3 phase, 48V battery charger to me, but if you really like using the alternator regulator, go for it.

As for the basic AVR load dump situation-  using 10-22uf for the AC voltage averaging cap (for improved flicker reduction), the unit cuts field current within a fraction of a 120Hz half cycle (a couple ms). I've not seen any spike on my ST-3.  Quenching the circulating field coil current (brief short of windings) could be done for a much larger ST head, but it's not done with the stock harmonic excitation- so I don't think it's warranted. 

It would be interesting to see your reverse engineered schematic for the alternator regulator, to see if it does load shed voltage clamping by shunting or by field coil shorting. In a high current auto environment, or perhaps with an alternator as source (high rpm, lots of poles, more spike on sudden load drop),  it might be needed, so seeing your reverse engineered schematic might be very educational, especially for alternator based designs.




mobile_bob

thanks for clearing that up a bit Bruce, i left me quite frankly a bit perplexed  ???

my thinking has always been to reverse engineer something, fully understand its operation, plan for a change, and initiate
it with the understanding that it has a very high propability of working, is called "modification"

on the other hand, my belief has always been, that if you open the case on something, with without a clue as to what you
are doing, poking around to see what this will do, and stumbling onto something that works to some extent, after releaseing
magic smoke and other problems is called "hacking"

clearly there is a difference between the two, and i would think you would understand why i might not want to be associated with
the latter.

as i suspected though the fault in communication was on my part, my understanding of the term "hacking" evidently is not the
common understanding of the term. that being the case there is no reason for me to get excited about being called a "hacker"

or rather what i proposed doing, being a "hack"

hmmm, "hacker"  i guess that don't sound to bad!

:)

thanks Bruce

bob g

ps, if you have time to comment on my other questions, i would like to get your take on them as well.
i am thinking maybe i am missing something important that you are trying to get across, or as likely i am not
getting my point across in a clearly understandable manner?

BruceM

If you have the reverse engineered schematic for the alternator regulator, I can comment intelligently. I'm not good at guessing about something described in text.  It's not clear whether this unit even includes the power switching component. 

Your general intent is to do slow (stamp) control of the voltage regulator, to do the current limiting during bulk charging.  If there is enough control authority (need schematic), this might work, I just wouldn't do it that way, as it's easier to use an op-amp closed control loop to do the same thing. 

I'd integrate an adjustable DC charge current limit on the AVR circuit.  With that and adding the battery temperature compensation circuit from my existing 12V shunt regulator board, the AVR would then be able to do bulk charge (current limited) and then hold at a fixed voltage absorption phase  battery temperature compensated).  This would mean switching to a quad op amp, but it's peanuts in parts.   The smallest Picaxe chip could then do the timeout/ current drop sense for charge termination, or this can be done in analog/cmos timer as well.

Since 120/240 volt AVR operation might be wanted as well, and this could be integrated into the same controller.   An analog switch to bypass the temperature compensation, and force regulation to a fixed 60V per coil would do the trick. 

A prototype 2 layer PCB board for something like this would be about 5"x6", and about $100 for two.  Parts likely $100.  Perhaps 100 hrs design time including prototype PCB. Another 80-100 hrs.  build and test/mod. 

mobile_bob

Bruce:

i am home today dealing with a throbbing canine that has decided to absess and it is not something anyone enjoys
and certainly not me

anyway i will look in my saved files and see if i can find the schematic for the regulator and post it here.

also i will take another serious look at your avr design as well, certainly no sense reinventing the wheel when you
have so much time invested in your design.

i just looked at the proposed system as analogous to taking a car with a stick shift 4 speed and replaceing the trans with
a 4 speed computer controlled automatic trans.

kind of like taking (in this case) a multiposition switched resistor bank and installing a potentiometer to increase resolution
and have it adjusted by an electronic monkey (microcontroller) instead of an ape (me)

i am not sure this change is either hacking or modifying, maybe just an option?


let me do some digging and i will see if i can find the schematic and get it posted

btw, interestingly while up last night throbbing, i was doing  some searching and came across the old delco electomechanical
regulator, schematic and theory of operation. they operated at ~200 hz and controlled both amperage and voltage setpoint

now i am not suggesting using one for anything other than a period correct restoration or a paperweight, i just found it interesting
to see they controlled both amps and volts, and not just voltage, ran at 200hz and were actually as good as they were.

we know the newer electronic regulators were an order of magnitude better than the mechanicals or so they say.

let me see what i can find, meanwhile i will take another look at you avr

thanks Bruce

bob g

mobile_bob

between throbs i came across some text outlining some of the operating parmeters

the delco regulator runs at approx 400 hz, and pwm duty cycle from 10-90%

looks like i will need to dig into my old books to find an internal schematic of the regulator
for the life of me i cannot find one online for some reason.

bob g

BruceM

You'll never be sorry for learning the basics of op-amp applications.  They are more useful than a micro processor.  They do it all- basic math (add, subtract, multiply, divide) and calculus (integration, differentiation), comparators, and closed loop controls with feedback.  All programmable with resistors (and capacitors for integration and differentiation). 

There are lots of good books on basic op amp circuits. 



mobile_bob

Bruce:

op amps are something i look to as links that tie together a system, and not something i gave due attention to
i guess.

would you have a favorite book on op amps that you would recommend?

bob g

rcavictim

Quote from: mobile_bob on December 30, 2009, 01:34:47 AM
Bruce:

op amps are something i look to as links that tie together a system, and not something i gave due attention to
i guess.

would you have a favorite book on op amps that you would recommend?

bob g

I have the "IC Timer Cookbook" by Walter Jung and I know he has an "IC Op-amp Cookbook", also a Howard W. Sams publication.  That is probably gold.  If Don Lancaster ever wrote a book on op-amps that one would also be likely worth having a look at too.
"There are more worlds than the one you can hold in your hand."   Albert Hosteen, Navajo spiritual elder and code-breaker,  X-Files TV Series.