Author Topic: $5 2-state temp compensated ANALOG dump controller  (Read 18336 times)

0 Members and 1 Guest are viewing this topic.

elt

  • Sr. Member
  • ****
  • Posts: 328
$5 2-state temp compensated ANALOG dump controller
« on: August 26, 2007, 05:36:13 PM »
Hi all,


I am op-amp stupid! I did go around some cookbook and app-notes web sites to copy some gain and voltage subtraction circuits. I think I get that the gain is set by the ratio of the resistor values but have no idea what the values should be in practice (and other practical considerations.)


Concept:


A reference voltage for the battery is corrected for temperature and charge/float mode and compared to the current battery voltage. If the battery voltage is higher than the reference voltage, the dump load is turned on.


A reference voltage is calculated as follows:


The float voltage for the batter at 0C is 14.2 volts. Temperature compensation is -30mv/degreeC. The charge voltage is .8v greater than the float voltage. = 15 volts.


The LM35 temperature sensor has a sensitivity of 10mv/degreeC. I'll use a gain stage to multiply that by three.  There is a one volt offset provided to the LM35 so it can report negative temperatures. That is also multiplied by the gain stage so I add three volts to the reference voltage (now = 18 volts ) so that when the LM35 bias is subtracted I get back to the 15 volt charge voltage at 0C.


A third op amp circuit subtracts the float voltage offset. A little mosfet is used to switch this between .8 volts and 0 volts. The input can be controlled by the $5 charge controller or put on a switch for manual operation. Or perhaps a 555 timer circuit for a timed charge.


(I have a question as to whether the float voltage offset and temp compensation voltage can be summed on one leg and subtracted from the reference voltage on the other in one stage (with one op amp) but since there are four op amps in the package I decided not to try to confuse myself more than I already am.)


The fourth stage compares the temperature compensated, charge/float level adjusted reference voltage to the battery voltage and turns on a FET driver if the battery voltage is higher.


I think that a differencing circuit at this stage could drive a PWM chip but my head was swimming looking at PWM data sheets so I just made a "bang-bang" switch at the output. A simple interface to a cheap PWM chip would be greatly appreciated!


Implementation


18 volts is more than we want for most 12 volt circuits so I've divided all the voltages by three. The reference voltage will be 6 volts. This means that we don't need the gain stage for the temperature sensor (but we still need to subtract the one volt bias.) I left the gain stage in so that it could be switched to 2x when used in a 24volt system.


Other than that, the only other thing needed to switch to a 24 volt system is to raise VCC from 6 volts to 12 volts.


Here's my circuit so far... again, I know I'm op-amp stupid; I'm hoping at least that the concept is sound. (The image is too wide to post so please click on the link.)


http://www.otherpower.com/images/scimages/6527/2sTempDump_1.gif


If you don't like the values of a 14.2 volts float voltage @ 0C, the temperature compensation or the charge/float delta then you can compute the a different reference  voltage, set the variable voltage regulator to that, tweak the gain on the temperature sensor and adjust the trim pots to match your favorite set points. (You don't really need trim pots, you can compute the voltage divider ratios and just use 1% resistors since those values won't change once you pick them. As shown, the controller set points at 20C are a 14.4v charge voltage and a 13.6 volt float voltage... might be worth tweaking those if the concept is sound.


Thank you for your help!

- Ed.

« Last Edit: August 26, 2007, 05:36:13 PM by (unknown) »

phil b

  • Sr. Member
  • ****
  • Posts: 304
  • Country: us
Re: ANALOG dump controller
« Reply #1 on: August 26, 2007, 03:23:40 PM »
Ed,

I've been following your posts. You are doing a great job!

I've had a big problem finding 1% thru-hole resistors. It seems since everything is going to finger burning surface mount stuff. :(

Where did you find them?
« Last Edit: August 26, 2007, 03:23:40 PM by phil b »
Phil

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: ANALOG dump controller
« Reply #2 on: August 26, 2007, 03:31:37 PM »
Thank's Phil,


Radio Shack sells an assortment of 1% resistors (item 271-309)

otherwise I order them from Mouser or Digikey.


I want to reiterate that I am not an electrical engineer; all I'm trying to do is dig out the information from the folks that really know and collect and repeat it in a way that folks at the "kit builder" level (like me) can build.


- Ed.

« Last Edit: August 26, 2007, 03:31:37 PM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #3 on: August 26, 2007, 09:56:22 PM »
Hello elt,


We have been talking a lot lately!


OK, I have a question:

With the micro in the charge controller why are you designing a separate controller for the load dump?

No better place than the charge controller to decide if its time to dump some power! The micro has 5v outputs can drive the MosFETs directly if logic level types, unless high speed PWM is necessary, which I do not see a need for. Will not use any more power for the circuit. Has all the inputs necessary. Will add very little cost to the existing box. (a MosFET or two)


Temperature

http://www.allelectronics.com/cgi-bin/item/THR-19/search/THERMISTOR,30K_PREPPED.html

Can power it with an IO port. Turn on when need a reading. As mentioned connect to neg term, only need to bring one additional wire back. The currents in the shunt will mess up the reading a bit, so subtract it since you know what they are!


Have fun,

Scott.

« Last Edit: August 26, 2007, 09:56:22 PM by scottsAI »

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: ANALOG dump controller
« Reply #4 on: August 27, 2007, 02:01:32 AM »
In the UK/EU there is RS Components http://rswww.com/ who I have used for over 20 years, and they have excellent customer service.  They are aimed at small-business users and up, rather than consumers.


Rgds


Damon

« Last Edit: August 27, 2007, 02:01:32 AM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #5 on: August 27, 2007, 11:01:21 AM »
Hi Scott, you asked:

OK, I have a question:

With the micro in the charge controller why are you designing a separate controller for the load dump?


I know, it does look like a step backwards. Indeed, I have incorporated the charge controller and dump functions under the control of a single microprocessor for my use here.


But I know that most people won't build a controller with a microprocessor in it themselves and I've seen a lot folks are asking how to modify "the normal" 12v volt dump controller for 24v and 48v use. I think I know the answer, if not all the details, and I'd like to share. I think I have a single design that can be used for 12v, 24 and 48 volts systems with nothing but a few resistor changes. In fact, in the latest revision you can switch from 12 to 24 volt mode with two jumper changes but that wouldn't be needed in a fixed installation. (Changing it 48 volt requires two resistor changes.)


While the circuit is a little more complicated than the other bang-bang controller, I don't think that building it is and it has what I think are two advantages: It is temperature compensated and it has a float mode. (I think that most people would run in charge mode most of the time but if you have to walk away for a while you can switch to float mode with the flick of a switch.)


Here's a single-sided layout of what I've got so far. (Note that the board is rev 9, the schematic is rev-1)





I don't think it's a scary build...


Since the original post I've changed the front end voltages a little because I realized that the lm324 doesn't work near it's supply voltage and I switched the temp sensor from the lm35 to the lm61 because the lm61 looks more readily available and cost less than a dollar.


Thanks for the thermistor link. For buying new parts, though, the lm61 costs less. I'm not too worried about the three wires. I've seen folks implement the remote sensor easily: you take a stereo cable with a miniplug on one end and wire the device to the other end, then shrink wrap over the leads and half the body... makes a nice looking sensor.


 - Ed.

« Last Edit: August 27, 2007, 11:01:21 AM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #6 on: August 27, 2007, 08:38:04 PM »
Hello elt,


Don t go buying parts just yet. Several things wrong.

Have not had the time to check it in detail.



  1. Q1, why not just use the switch to short out the resister?
  2. Your micro can do temperature comp also, understand your goal here.
  3. Values of the resisters are too big, stray currents (moisture on board) input bias currents can inject 100mv(=1e-9*1e6) and throw off setpoints. Calibration can help.


Thats it for now, will check more tomorrow.

Have fun,

Scott.
« Last Edit: August 27, 2007, 08:38:04 PM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #7 on: August 28, 2007, 06:43:09 AM »
Hi Scott,


I know that you put a lot of thought and time into your comments and suggestions and I really, really appreciate your help.


Your wrote:

1. Q1, why not just use the switch to short out the resister?


That'll work! I figured that when I test the circuit here that Q1 will be switched by the charge controller. That part of the circuit can be removed for manual control.


2. Your micro can do temperature comp also, understand your goal here.


If you have a micro... I do that in the all-in-on design but that circuit is a little complex to do on a one-sided build-at-home board. The modular "$5 charge controller" and "$5 dump controller" have simpler layouts and ought to be able to be made at home. In the modular approach, the built-in temp sensor on the charge controller board is used to sense ambient and adjust for the resistance change in the cables while the remote sensor on the dump controller board is used to determine what the actual charge/float voltage should be.


Perhaps the charge controller module should also take into account that battery capacity changes with temperature. Since the battery might be a little warmer from charging, the controller module might have a tendency to overcharge the battery in cold weather but 1) we've determined that overcharging is better than undercharging and 2) the dump controller will automatically lower the charge voltage if the battery heats up.


3. Values of the resisters are too big, stray currents (moisture on board) input bias currents can inject 100mv(=1e-9*1e6) and throw off setpoints. Calibration can help.


Thanks! The example circuits I've seen show 1 meg resistors a lot though I've seen in prose that 10k and 15k are used in noisy environments and up to 100k otherwise ... I've zero experience in determining those things. Also, I've seen that sometimes when op-amp stages are put in series that some of the resistors disappear but I don't know why or when so I (intended at least) to put them all in.


Thanks again,

 - Ed.

« Last Edit: August 28, 2007, 06:43:09 AM by elt »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #8 on: August 28, 2007, 08:34:14 AM »
Here's my latest schematic -


(I haven't changed the resistor values on the op-amps, am hoping for some help with what value to use.)


http://www.otherpower.com/images/scimages/6527/2sTempDump_12s.gif


Basically, I've made separate "VCC" and battery reference voltages. As before, the battery reference voltage is one third of the temperature compensated target voltage, the slightly higher Vcc means that the op amps don't have to operate too close to their upper rail.


For 48 volt systems, though, that made a fairly high gate voltage for the FETs. There are FETs with 25v and 30v gate-source voltages and they can be used with this circuit. However, I thought it better to develop an option for a separate Vgs power supply that could be populated (only needed for 48 volt systems) if someone wanted to use FETs with the more normal 15 or 20 volts Vgs specs.


There's no particular reason to make the board tiny but there's no reason that it needs to be big... give or take the resolution of your monitor, this should near "full size" -





(2"x2.5", still one-sided.)

 - Ed.

« Last Edit: August 28, 2007, 08:34:14 AM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #9 on: August 29, 2007, 08:12:09 AM »
Hello elt,


Would you believe 1 comparator is all you need?


Put Q1 in Batt compare string, Place a resister to ground on the gate (or high) for a default state if input opens.


Change the Batt input divider to handle different Battery voltages. Everything will then be scaled to one setup.

No need to mess with temperature comp etc.!


You are doing great. Looking forward to your next drawing. Could you include the load and MosFET in circuit too?

Have fun,

Scott.

« Last Edit: August 29, 2007, 08:12:09 AM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #10 on: August 30, 2007, 06:20:24 AM »
Hi Scott,


I don't know if anyone else does, but I plan to switch my mill from 12 to 24 volts depending on the season. I have a little 12v inverter than can run my lights in the summer when the wind is weak and couple of heavy metal 24v inverters for use in the winter and spring when the wind is stronger.


I did put the charge/float logic switch in the battery string, but that required another jumper block because the voltage offset is (12/24/48v) system dependent at that point.


I still want a second op amp to do temperature compensation and figured doing float/charge compensation at that point would be system-voltage independent. I searched doing a subtraction of sums and found Daisy's theorem and Plato's rule... a bit thick for a quick read... eventually decided that my compensation stage was a straight inverting summer. Most inverting summer examples I found show the plus side of the op amp connected to ground. I figured that I can call my reference voltage (that the temperature and float offset are subtracted from) the virtual ground for that stage and use the examples as is. At any rate, I hope I got the first stage correct.


Here's the latest schematic, much sparser now.

http://www.otherpower.com/images/scimages/6527/2opamp_13.gif


Other minor changes are to lower Vcc to 10V so that no zener is needed at the lm61 and, after calculating all kinds of odd ball resistor values for the voltage dividers, decided that trimmer pots look like a better application for that.


The schematic shows how to set the controller up for jumper selection of two system voltage, 12v/24v or 24v/48v. There's just one jumper block now and a single resistor value that changes. You don't even need to change the trimmer pots.


How's that look?


Thanks again!

- Ed.

« Last Edit: August 30, 2007, 06:20:24 AM by elt »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #11 on: August 30, 2007, 09:27:44 AM »
Adding the Mosfets to the board increases the size a little and raises the price by a couple bucks...






I figure the the 1 oz copper is good for about 30 amps. If you don't want to make the "drain plain" on the top layer, you can stick the drain pins out on the top and solder a #10 solid wire across them. (In fact, unless you know you have 1 oz copper on your copperclad or better, it may be a good idea to add copper to the high-current buses just to be safe.)


At any rate, with a good choice of FETs, you probably don't need heat sinks on 12 and 24 volts systems. 75v FETs for a 48v system seem to have slightly higher Rdson values and will need a least small heat sinks.


(I didn't put a connector on for an external FET bank but if you want to go that way you can wire to or put a header in one of the on-board FET sites.)


 - Ed.

« Last Edit: August 30, 2007, 09:27:44 AM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #12 on: August 30, 2007, 09:07:25 PM »
Hello elt,


Your doing great!


Switching voltages for you sounds like a good idea.


The temperature comp should be raising the set point as it gets hotter?

Then remove the inverter.


The float/charge is changing the set point, put in battery voltage divider on the bottom.

Top of divider using two jumpers can select 12 / 24 / 48v.


You need the MosFETs to control the load dump...?

If the opamp is powered by 6v then do not need FET driver. This is not high speed stuff.


May want a little feedback?


We will see how this goes. Keep up the good work!

Maybe only a couple more iterations!-)

Have fun,

Scott.

« Last Edit: August 30, 2007, 09:07:25 PM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
IT WORKS! (temp comp ANALOG dump controller)
« Reply #13 on: August 31, 2007, 03:58:35 PM »
It looked like it would work so I built one...





Other than an error in what the positive input voltage for the first op amp should be, the circuit works as described in the last schematic. I did make some changes: I put a 5.1v zener in to power the temperature probe [ section 4] and float/charge offset voltage[2] so those settings wouldn't change while I was fooling around with the battery reference voltage[1]. Also, I did remove the driver transistors and am switching the FETs directly from the op amp though I haven't tried a big load yet so I'm not sure if the 20 ma source and sink of the op amp is enough by itself.


Summary of the project so far:



  1. voltage regulator and voltage divider for Vref, the battery reference. Set Vref to 1.95 volts.
  2. Set to 1/3 of the float/charge offset; set to .333 volts. Also has push/pull switch for manually changing from float to charge mode.
  3. Divide battery voltage by 1/3 or 1/6 ; jumper selectable for 12 or 24 volt systems. Divide by 1/12 for 48 volt systems. I had a baggie of odd-valued precision resistors so I daisy chained them to make the dividers.
  4. Connector and 5.1 volt zener for powering the temperature probe. I don't have a temp sensor yet so I simulated it with a trim pot.
  5. Op amp and resistors. I don't think you need to by precision resistors. I took ten "5%" resistors out of a bag and seven of them matched to better than .5% ... The actual value was less then the marked value, but the match was excellent.
  6. FET's. I soldered the drains to a #10 wire on the top and the grounds to a #10 wire on the bottom.


Theory of operation:

The battery voltage is divided by 3, 6 or 12 to get a constant and independent monitoring voltage depending on whether the dump controller is put on a 12v, 24v, or 48v system. The basic "divide by three" is determined by the temperature sensor which has a 10mv/degree-C output voltage. Since a .30mv/C offset is commonly recommended for a 12v system, dividing the system voltage by three matches the temperature sensor output. Another offset of 1volt (divided by 3 = .333 volts) can be switched in and out to put the dump controller in float or charge mode.


Example temperature and voltage setpoints:



  1. C, float at 14.2 volts, charge at 15.2 volts
  2. C, float at 13.6 volts, charge at 14.6 volts
  3. C, float at 13.3 volts, charge at 14.3 volts.


If you don't like those values you can set your own by twidding the trim pots and resistors.


All the little parts are available on Digikey and Newark web sites for $6 USD not counting the proto board and FETs. The board and FETs will cost a few bucks more depending on how you want to build and the size of the dump load. Newark doesn't have a minimum order so that might be the best deal.


ScottAI wrote:


The temperature comp should be raising the set point as it gets hotter? [...] the float/charge is changing the set point, put in battery voltage divider on the bottom.


No, the set point should go down as it gets hotter. I did have a second jumper block at the bottom of the battery divider at one point but there it contribution varied slightly with battery voltage. (It may have been that the variation was a in good way; allowing slightly more voltage at lower battery values.) But with enough reading and playing with an online LabView model (http://designtools.analog.com/dtAPETWeb/dtAPETMain.aspx) I got it all working in voltage-independent way on the first op amp so I left put it there.


May want a little feedback?


Do you mean for hysteresis? I know you can count the life time of relays by how many times they click but with FET's, aren't we okay as long as they don't turn off before they turn fully on? (Or is that IGBTs?) At any rate, I was thinking that if this circuit could turn on and off on the order of a millisecond then it might actually work like a pwm circuit... in that case might I need to put the FET driver back in? How does that sound?


- Ed.

« Last Edit: August 31, 2007, 03:58:35 PM by elt »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: IT WORKS! (temp comp ANALOG dump controller)
« Reply #14 on: September 01, 2007, 09:24:16 AM »
Here's the latest schematic:


http://www.otherpower.com/images/scimages/6527/2sTempDump_21s.gif


I've addressed two failure modes that I discovered in testing the bread board version:



  1. If the temperature probe was disconnected, the battery-compare voltage could be just about anything. I put in a voltage divider across the plug for the LM61 to default to a temperature of 20C if the probe is unplugged or otherwise not present.
  2. In noticed that the "dump" LED would flash when I unplugged the battery. Turns out that when Vref was derived from Vcc, Vref could sag if  the battery voltage dropped enough for Vcc to loose regulation. With enough sag, that could have caused the dump load to turn on! Now, Vref is derived from the 3.3v zener. If the battery ever becomes dead enough for the zener to sag (about 5.3 volts, the largest gate voltage that could be developed would be about 1 volt... that's too low to turn the FETs on.


I still have a design question whether hysteresis is needed or not... after than I'll etch a board and try some high current tests.


Thanks again,

- Ed.

« Last Edit: September 01, 2007, 09:24:16 AM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: IT WORKS! (temp comp ANALOG dump controller)
« Reply #15 on: September 01, 2007, 12:34:35 PM »
Hello elt,


Since you build it not sure if you will change anything.

Going from two to one opamp will not save much cost, but it does help keep the original target with reduction of other parts.


To continue with the reduction in parts: Keep it simple Scott.



  1. Voltage regulator 6v.
  2. opamp.
  3. resisters all 1% Trimming only needed to trim Vreg.


Toss in some caps and Q1 for float/charge control (or swtich)


One three post jumper sets voltage 12, 24, 48. No jumper is 48v battery.


Battery Resister divider

top R is 200k, for 48v operation.

Next is 100k for 24v (top R is jumpered out)

Next is 66.5k for 12v operation. (Both top resisters jumpered out.)

Bottom is 29.4k connected to LM61 temperature sensor.


Node 66R and 29R is connected to opamp + input.

Float 4.73 volts, Charg is 5v.


Opamp (- input) resister divider.

6v reg output connects to 20k resistor.

Next is 76.8k this node connects to opamp - input.

Bottom resistor is 23.2k to ground, Q1 or Sw1 will short this out to set float or charge.


Voltage regulator is 6v, supplies voltage reference and power to opamp.

For 48v operation the Vreg may be a problem, 60v is the set point, the limit of most cheap Vreg.

Need something with at least 70v, better 80v operation. Not cheap $2.


Check the rise time of a 20pC gate with 20 ma input. Rise time is just fine.

No FET drivers needed.


Hysteresis?

Well yes, to force a PWM mode. Small RC positive feedback.


Simulated the circuit at 0c 14.2v and 15v.

Since the output is divided by 3, assumed the temperature changed correctly.

You may want to simulate many more data points to make sure it works correctly.

How is that?


Have fun,

Scott.

« Last Edit: September 01, 2007, 12:34:35 PM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: IT WORKS! (temp comp ANALOG dump controller)
« Reply #16 on: September 01, 2007, 11:05:33 PM »
That's fabulous Scott!


I hope I didn't butcher it too badly -




I couldn't figure out how to get the temperature offset at the bottom of any of the voltage dividers (because the offset was scaled at the middle of the divider... so I floated it in the middle of the battery voltage divider... there because it could be powered from the voltage divider network without needed to raise Vcc as would be needed if it were on the negative input. If I read the datasheet corrently, the 33k resistors would provide the 100 uA the sensor needs but I still lowered the resistor values to provide it (the LM61) with more current.


But, this circuit does suffer from the "number 2" problem where the MOSFET might turn on at low battery voltages. (Once the vreg looses regulation, vcc drops a volt per volt while the battery side continues to drop 1/3 volt per volt. Theres a fix for it with s 5 pin voltage regulator but I don't know how to fix it with radio shack parts...


Re: RC feedback. I just don't know how to do what you are suggestion. I saw that ghurd put a cap on the input of his comparator but I get the feeling that you are thinking something else....

« Last Edit: September 01, 2007, 11:05:33 PM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: IT WORKS! (temp comp ANALOG dump controller)
« Reply #17 on: September 02, 2007, 12:09:29 AM »
Hello elt,


How about this:





Test it out the temperature should work right. I tried one.


P1,2,3 = No jumper = 48v.

P1-2 = 24v

P2-3 = 12v


I selected the resisters to not draw much current, yet not too high.

R1,2,3,4 using 1% should keep stable numbers.

R8 is shorted by Q1 float/charge.

R6 adjust to have 4.73 or 5v on opamp neg input. Based on Vreg output.

Keep R7 fixed.


R5 only needed to make simulator happy.

May help solve your failing voltage problem.

Do not use logic FETS, may be another.


At 7v the reg will starrt to fail, the pos input is 2.3V, Neg is just under 5v.

I do not see it getting caught up soon enough to be a problem with non logic fets.


Have fun,

Scott.

« Last Edit: September 02, 2007, 12:09:29 AM by scottsAI »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: IT WORKS! (temp comp ANALOG dump controller)
« Reply #18 on: September 02, 2007, 08:07:05 AM »
Hello elt,


Oops forget to say:

V1 is the temperature sensor. I noticed in data sheet the output impedance is 800 ohms max, may want to remove half that from the resister above (R4). Should be able to adjust it out with the Vreg adjustment.


V2 was to make the dumb model of an opamp happy, not needed.


V3 is the battery, shown 48v, at high spec of charge 60v.


V4 is the voltage regulator, I picked 6v, anything above 5v should work.

Make sure the input range of the opamp covers the 5v input.

If non logic FETS are used, check the data sheet, may want a higher gate voltage.

Make sure the opamp can handle the supply voltage. Many of the newer opamps supply limit is 6v.


Hysteresis

Is built in, when the load dump turns on the battery voltage will sage. Thus turning it off very quickly. This will give you a PWM like effect. Feedback with a very small cap can fix the time to keep it to a lower frequency. Cap on the opamp + input will do something similar.

Normally an opamp has a feedback circuit, putting cap on opamp inputs is a no, no. This is a great example of why engineering is so fun, almost always an exception.


Elt, my goal was to help you make your goals at the top of this post. I have not verified the goals.

Did verify the temperature coefficient is neg. I found numbers for it both larger and smaller.

If a variable temp co is desired, then using the two opamp as you did before would be necessary. This is the simplest circuit I can imagine to meet your goals and cost. By the way, your doing great. Keep it up!

Have fun,

Scott.

« Last Edit: September 02, 2007, 08:07:05 AM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: IT WORKS! (temp comp ANALOG dump controller)
« Reply #19 on: September 02, 2007, 09:25:14 AM »
Thanks, the picture helps a lot.


Okay, how's this ...






(http://www.otherpower.com/images/scimages/6527/tiny_03.gif)


I got rid of the voltage regulator, now the upper rail of the op am will sag before its inputs do...


- Ed.

« Last Edit: September 02, 2007, 09:25:14 AM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: IT WORKS! (temp comp ANALOG dump controller)
« Reply #20 on: September 02, 2007, 10:52:38 AM »
Hello elt,


No can do.


As drawn, ANY load on the opamp will change the voltage seen on the plus input.

Not good. (had an LED before)


Power supply and voltage reference must be independent of R1-4.

Why do you have the temperature input as a jumper?


Zener, can work, driving resistance must be low enough to supply worst case current of all the loads, LED will draw several ma, much more than the rest of the circuit. Voltage regulator is better, draws current only as needed.


Have fun,

Scott.

« Last Edit: September 02, 2007, 10:52:38 AM by scottsAI »

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: IT WORKS! (temp comp ANALOG dump controller)
« Reply #21 on: September 02, 2007, 10:56:22 AM »
What I worry about in these situations having killed a few 4xxx CMOS logic circuits in the past, is driving current through an IC's input diodes from any capacitors that happen to hold a decent charge and end up briefly beyond the supply-rail voltages.


You sure that your op-amp is OK here?  I can't see if C1 is meaty enough to present a problem (say > 1 microFarad).


Rgds


Damon

« Last Edit: September 02, 2007, 10:56:22 AM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: IT WORKS! (temp comp ANALOG dump controller)
« Reply #22 on: September 02, 2007, 10:19:19 PM »
Hi Damon,


I don't know what op amp to use though I noticed that nearly all one-per-package 8 pin op amps have the same pin out so I figured that the lack of a choice didn't need to hold me up... I think that the last issue to work out is a little hysteresis for the circuit; the cap was more or less a place holder for that.


- Ed.

« Last Edit: September 02, 2007, 10:19:19 PM by elt »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: IT WORKS! (temp comp ANALOG dump controller)
« Reply #23 on: September 02, 2007, 11:13:35 PM »
Okay, I think it's close!


Scott wrote:

At 7v the reg will start to fail, the pos input is 2.3V, Neg is just under 5v.

I do not see it getting caught up soon enough to be a problem with non logic fets.


It seemed at odds to me to have a 6v Vcc and to say that we can't use logic fets... so I thought to use a 10 vcc to power the op amp, temp sensor and a zener diode (to derive the reference voltages.) Using the zener to power the reference voltages means that the voltage regulator can sag a lot before the reference voltages are messed up. By the time it does, as you pointed out, there won't be enough volts to turn on non logic fets.


I added an optional diode and lm317 to drop the voltage to the regulator on 48 volt systems. (IIRC, the fixed regulators are protected against reverse connections, the lm317 in not.) Can be left unpopulated and shorted out if 48v operation isn't needed.


Also:

That's not a jumper at the temp sensor, that's my connector for the sensor.


What do I know about charging batteries??? Nevertheless, I tweaked the voltages slightly from what you picked... Knowing that if you ask ten people what charging voltage should be you'll get seventeen answers, I put in two 10k trim post where I think they'll let folks tweak the set point and offset. Trimmers can always be left off and resistors can be put in their place if desired.






http://www.otherpower.com/images/scimages/6527/tiny_07.gif


The fets indicated are only good for 12 and 24 volts systems; a different choice is needed for 48 volt systems.


How's that look? Should I put that cap on the positive input back in? Is there any critical consideration to the op amp selection? I figure I owe you one of the boards so I'll make two!


- Ed.

« Last Edit: September 02, 2007, 11:13:35 PM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: IT WORKS! (temp comp ANALOG dump controller)
« Reply #24 on: September 03, 2007, 11:09:02 AM »
elt,

this was getting too narrow, so will post later today to the main.

Have fun,

Scott.
« Last Edit: September 03, 2007, 11:09:02 AM by scottsAI »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #25 on: September 03, 2007, 02:34:28 PM »
Hello elt,


Yes getting close. In the spirit of parts reduction:


Gate resisters r8, r16, r17 are not needed. Gate resisters are used to isolate the driver from the capacitive load in high speed circuits. We are not high speed here. Opamps will need decoupling from a capacitive load in a closed loop, since we are not closed loop, not necessary. The resister value normally used is near the output impedance of the opamp, the lower speed stuff your looking at 100 to 1k ohms is more in line. If you like, put one resister in, test with and without.


What are r6, r5 for? Not in the application notes for LM61?

Remember to put a 0.1uf cap across the supply at the remote temperature sensor. In circuit use another cap on sensor output for noise reduction. Consider using a shielded cable or twisted or ribbon cable.


Consider putting a LED across the LM61, if the remote sensor is unplugged battery sensing will pull high turning on the load dump. The LED must be a very low current one, it wont have much light out with 150ua. The LED will keep the voltage from rising much, preventing the load dump. Or consider using two diodes.


I would not use a pot (r13) in the battery sensing string, used fixed 1%. The set point can be adjusted in the Vref string. I think you put it there to adjust for the output impedance of LM61, the 400 ohms or so will cause less error than the pot. Over time I have had problems with pots, enough so I try not to use them. A good pot can be costly, so consider something like: http://www.analog.com/en/prod/0,,761_797_AD5228%2C00.html

Better than a mechanical pot (for me). Many variation on this, click on digital potentio... upper left for more.


Voltage regulator is much more accurate than the zener diode. Non logic FET 10v is good idea.

With Q1 off the set point is controlled only by zener diode, r15 will not adjust. The temperature sensor and set point are calculated for 5v, change the value of the set point will change the balance.

Use a voltage divider like shown in my schematic. Top resistor use a pot to adjust for the right setpoint.

You seem very worried about the FET turning on with a sagging battery voltage? Why? With that said what voltage regulator will you be using? Lets assume a one volt drop, with a 10v reg it will start to loose it at 11v. Nothing going on yet. As battery volts continue to drop sensing is 1/3 set point is 1/2. Vbat = 6, 2 vs 2.5, opamp is still off. Below the FET turn on.

Based on this, I do not see a problem with logic FETS, and 6v regulator. Write down each volt as the battery drops and verify no unsafe condition.


Cap on opamp plus input is good idea, 1-10nf should do it.


48v

LM317 voltage limit is 60v, this is the set point for charging. CANT use it.

Suggest a 15v zener resister and transistor pre-regulator. Transistor might need heat sink.


Good to have D3 (only needed of load is inductive) and C3 (no fast signals here so not critical), and of course C2 (verify Vreg output cap requirements). Might add cap to the Vreg node going to neg input on opamp.


Opamp

Operating voltage should be rated above supply. Output and input must be within design.

If Vcc = 6v, set point is 5v, the opamp must handle 1v input from supply rail. Output should be rail to rail. Many older opamps will not go to the positive rail. Please verify. LM358 input range is Vcc - 1.5v, output is Vcc - 2v, so with 10v supply only 8v gets to gates. Not a good choice.


I perceived you were interested in learning. I have not told you everything to give you a chance to think of it, your doing great. I even hesitated to send you a schematic, was taking me to long to talk it through!

I thank you for the kind offer of a PCB, no wind gen... no need!


Have fun,

Scott.

« Last Edit: September 03, 2007, 02:34:28 PM by scottsAI »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #26 on: September 03, 2007, 02:38:50 PM »
Nice simple load dump. Follow the links.

http://www.fieldlines.com/story/2007/9/3/18347/60207


Your design had temp comp. almost as simple!

Have fun,

Scott.

« Last Edit: September 03, 2007, 02:38:50 PM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #27 on: September 03, 2007, 06:37:12 PM »
1. Gate resisters r8, r16, r17 are not needed.


Okay!


2. What are r6, r5 for? Not in the application notes for LM61? [...] Or consider using two diodes.


My theory is that if the LM61 is unplugged that it will look about like a 17C voltage would. I haven't actually looked at the currents, though, to see if/how-much it will pull down the battery's voltage dividers. At a glance though, it looks like I need much smaller valued resistors. I'll run the numbers and see what I come up with.


Two diodes sounds good but wouldn't that clamp the temp sensor output when it was pluged in? ... perhaps with a resistor in there (like r6?) to allow the sensor to overcome the diodes.


3) You seem very worried about the FET turning on with a sagging battery voltage? Why?


I've seen it happen in my two op amp circuit. The single op amp circuit behaves better but it depends on the upper rail of the op amp, the drop out voltage of the regulator and the gate threshold of the FETs... If a 7810 still has a 2 volt drop out (the spec on the data sheet) with a tiny current draw on it, the condition would occur at a battery voltage of 6 volts or less. With 4 volts available to a nice rail to rail op amp, it might actually turn on the FETs. (So while the LM358 might only output 8 volts when the power was good, it would only output 2 volts at most when the power was bad...) A low drop out voltage regulator gets rid of the problem for all practical purposes but they tend to have lower maximum input voltages... I guess that you're saying that the a 7810 with little current will have a lower drop out voltage but I looked at a bunch of data sheets from different manufacturers and I could find that on a spec sheet. Speaking of spec sheets:


4) LM317 voltage limit is 60v,


I couldn't find that on the spec sheet. What I saw was the voltage difference between in and out is limited to 40 volts. Otherwise, the lm317 is a floating regulator and the absolute value of input and output doesn't matter. So, I had the lm317 set up for a 30 volts out, which is in spec for input on the 7810, and that means the input voltage can up up to 70 volts... shouldn't that be enough?


5) I perceived you were interested in learning.


I have learned a lot! Thank you very much. I know you said early on that "would you believe you can do it with one op amp"; I've just been a little slow catching on. I appreciate your patience tremendously. I would self-evaluate and say that I've gone from "op amp stupid" to "op amp neophyte" ...


Thanks again!

- Ed.

« Last Edit: September 03, 2007, 06:37:12 PM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #28 on: September 03, 2007, 09:10:49 PM »
Elt,


2) I agree, don't like it, skip the diodes.

On the output complete r1-r4 with a 4.1k resister to ground. Open sensor will see 0'c setting.

Sum of the 14.2v string should equal 100k, as the 100k/200k resisters above.

This will attenuate the sensor output a little but well worth the benefit and simple!


3)What I was trying to get you to do:

Use LM317 reg requires 1.25v delta by data sheet.

Assume battery at 6v, reg - 1.25v = 4.75v, battery /3 = 2v, opamp will hold output low.

Any lower voltage is below the gate threshold of FET, your in the clear.

Most opamps can work down to 3v. I would use R-R so can lower Vreg voltage.

Good idea to put a pull down resistance on gates, the LED you had before is a start. Still need a resister. (10k?)


4) LM317 voltage limit is 60v... oops that should read LM317HV.

Look around for some other regulators, Some LDO for automotive must be had for a cheap price. Check out their spec, then you can use logic FETs again. (don't they cost more?)


Have fun,

Scott.

« Last Edit: September 03, 2007, 09:10:49 PM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #29 on: September 03, 2007, 10:28:39 PM »
I have been following ghurd's controller... Nice work and that he's offering kits. My first look was to see how it might be enabled for remote float/charge modes to work with the "$5 charge controller" circuit... also, that it's 4.6v trip point is near our vref got me looking at closely as well.


Having graduated to (I hope!) an op-amp neophyte, if I wanted to propose a minimalistic circuit without temperature compensation or remote float/charge mode, I'd draw something like this...




It's about half the parts and all of them are available from Radio Shack; RS even has some IRF510 that could be ganged together to handle a few amps of load.


How's that look?


- Ed.

« Last Edit: September 03, 2007, 10:28:39 PM by elt »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #30 on: September 04, 2007, 08:08:55 AM »
Hi Scott,


You wrote:

[...] then you can use logic FETs again.


Do we want logic FETs because they typically have lower gate charge and input capacitance? Otherwise there are some "regular" FETs with (only) 3x the values and less than 10 mOhm Rdson that aren't priced too bad.....


Previously:

Check the rise time of a 20pC gate with 20 ma input. Rise time is just fine.

No FET drivers needed.


I didn't follow this... is that nC? ... I see many devices have gate-source and gate-drain specs in the 20nC range though total gate charge is more.


I found this formula given as an approximation for calculating driver rise and fall times:


Tr=Tf ~= 4.6 Rp Qg / Vp


And as I understood the formula:


Rp = driver output impedance

Qg = typically spec'ed as gate capacitance x 4.5 volts

Vp = Vgs


... with that, I can see how an op amp with low output impedance would be capable of sub microsecond slewing but I don't see any indication of the current needed... everyone always says that you need current for "hard switching."


I'd like to see the circuit handle 40 to 60 amps with little to moderate heat sinking, that way there might be a reason to build one over buying a C40 or C60. Looks like two or three "regular" FETs with sub 10 mOhm Rdson or maybe twice as many Logic FETs.


Thanks again,

 - Ed.

« Last Edit: September 04, 2007, 08:08:55 AM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #31 on: September 04, 2007, 04:29:46 PM »
Elt,


His complete schematic:

http://gotwind.forumco.com/topic~TOPIC_ID~183.asp

Your simplified circuit is now almost the same.


Several difference:

Second zener and LED showing in load dump.

Your requirement of 24v operation requires more work. Simply use a 40v opamp. Might cost more than a regulator does. By placing the Load dump LED on to the MosFET will save the current to drive it from opamp. The zener is then just fine. Missing is the 0.1uf decoupling cap across the opamp!


Take your schematic:

remove R1 and D2. Lower voltage of D3 to 8v or lower for logic FET.

Add a two resister voltage divider in parallel to D3, center node connect to neg input of opamp.

Do not use 741 POS.

If the resisters on +input are much lower than 100k, then might want a larger cap.

I would target: 0.3ms RC time or longer, not much longer than 3ms. R is the parallel resistance of the voltage divider.


A possibility of what caused the load dump to occur with decreasing voltage.

If the cap on + input is large and the voltage drops fast, the load dump will be turned on.

If not please describe the circumstances.


Have you been running this in a simulator?

Have fun,

Scott.

« Last Edit: September 04, 2007, 04:29:46 PM by scottsAI »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #32 on: September 04, 2007, 07:56:31 PM »
Elt,


Logic FETs cost more so far. The benefits are as you outlined.

If you don't need them, use what ever solution is cheaper.


Yes, typo nC is right.

1C = 1F * 1V (F = cap in Farad, V = voltage, C = Coulomb)


I Normally think C is cap.

i * delta( t) = C * V so the rise time is = C * V / i = 1us

Which is more than fast enough for a load dump. Very slow for many other applications.

To make it 100x faster need 2 amp! For 10ns.

Fast switching can generate a lot of heat.

Read the adds for FETs, they all claim low gate charge (C), the key to low power fast switching.


Have fun,

Scott.

« Last Edit: September 04, 2007, 07:56:31 PM by scottsAI »