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

0 Members and 1 Guest are viewing this topic.

SamoaPower

  • Sr. Member
  • ****
  • Posts: 417
Re: $5 2-state temp comp ANALOG dump controller
« Reply #33 on: September 04, 2007, 11:15:46 PM »
"Fast switching can generate a lot of heat."


Huh?? I thought the whole purpose of switching quickly was to minimize FET dissipation through the linear region.


Yes, the drive peak current requirement is higher but the average is quite low.

« Last Edit: September 04, 2007, 11:15:46 PM by SamoaPower »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #34 on: September 05, 2007, 12:10:06 AM »
If your switching every 100ns, taking 10ns to switch.

Percentage wise your spending a lot of time in the linear region.

The gate current is high, some losses are going to occur.

Power to drive this gate starts adding to overall switching efficiencies.


  1. mhz switching power supply will be using a PWM like signal to control power transfer.
  2. ns cycle time... like above.


Few years back I sold NEC MosFETs, was an easy sell for fast switchers. Our CV was 30% lower than the nearest competitor... Looking at the above numbers you can see why!

Have fun,

Scott.
« Last Edit: September 05, 2007, 12:10:06 AM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #35 on: September 05, 2007, 06:21:56 PM »
Thanks Scott,


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


Oh...went to a 100k divider in the breadboard but I had to gang up a pair are pico devices to even come up with a nano farad!




I set the circuit to 10 volts and used it to take off the front voltage-peak on a freshly charged 8 pack of nicads. That's a 20 ohm resistor so it was only about a 5 watt load. The LED started out bright, dimmed fairly quickly and held a steady 9.99 volts for longer than my attention span... later the LED was out and the voltage read 9.96 volts.


My DVM seems to show between 2 and 10 kHz depending on duty cycle... don't really know if that was a good reading or not; R = 44k, C = 1.1nF, time constant would have been 48uS (though my low pas filter simulator says almost twice that...) It looks like a lowpass filter on the front end of the op amp; is there a way to get PWM frequency from the time constant and maybe the current? (1 over 2 pi tau doesn't look like the number...) Or is 3 ms one of those rules of thumb to use in general?


Anyway, I've a baggie of .1uF caps, I'll try one of them in there next.


Have you been running this in a simulator?


Wouldn't that be nice! I do have a very limited simulator (called "ProtoLab, $20 years ago at Radio Shack;) it only takes discrete devices. I have used it to tweak the voltages and get the temperature compensation curve out for the larger circuit, thought it doesn't have op amps so it doesn't take into account input offset so my curve is probably offset a little from what the circuit will really do... I'll post that, what hope is "final" schematic, tomorrow.


Thanks again,

 - Ed.

« Last Edit: September 05, 2007, 06:21:56 PM by elt »

scottsAI

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


Assuming frequency with the input voltage right at the setpoint?

Thinking about it you should go for a lower freq, 500hz or less.

Going to need a lot more caps. Example had 47uf... seemed high maybe not.


Free simulator: http://www.electronics-lab.com/downloads/schematic/013/

Have not tried it, looks good.

Have fun,

Scott.

« Last Edit: September 05, 2007, 10:33:33 PM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #37 on: September 06, 2007, 10:43:37 AM »
I think this is it!






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


I removed that resistor on the bottom of the battery divider chain (that was inserted to provide a reasonable default temperature if the temp sensor became unplugged.) As you pointed out, it attenuated the temp sensor. I'll put it on the switches for a stereo mini plug that I'll use to attach the sensor. I always have to play with those things to see if the switches are NO or NC so the connections show at the top of the schematic might not be correct.


I changed the derivation of the charge voltage reference and float offset so that the switch would default to float mode and activate charge mode by grounding the input.


Because the temp compensation curves varies from linear, particularly at high temperatures, I shifted the resistor values slightly to center around 25C rather than 0C. I think this follows the curves better. The cold voltage may be a little low but I thought that better than having the hot voltages too high.


Am I ready to etch copper? My preliminary layout still has this all on a one-sided board!


 - Ed.

« Last Edit: September 06, 2007, 10:43:37 AM by elt »

ghurd

  • Super Hero Member Plus
  • *******
  • Posts: 8059
Re: $5 2-state temp comp ANALOG dump controller
« Reply #38 on: September 06, 2007, 02:25:54 PM »
You have the power fet gates on a single resistor.  I thought that caused a problem before.


"The cold voltage may be a little low".

Think happy thoughts!  If the controller is controlling, the battery is charging, the inside may be a bit warmer than the exposed temperature probe?  Kind of balancing itself out?

G-

« Last Edit: September 06, 2007, 02:25:54 PM by ghurd »
www.ghurd.info<<<-----Information on my Controller

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #39 on: September 06, 2007, 04:07:09 PM »
Hi ghurd,


Scott wrote up-thread:

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.



BTW: I did put in .1 uF cap center of the the 100k pot in the bread board (actual values .08 uF and 88K) and the circuit ran at about 800 Hz and then slowed downed to 0 Hz. I haven't tested it with real loads yet as I don't have real FETs; I do have a couple tubes of irf530's that I use it for low current tests.


It's been hard to find a nice op amp that costs less than the tinyAVR micro processor but I think I did, a ts921. It's rail to rail, up to 12 volts and has a whopping 80ma source and sink capability. Costs $1 to $1.50 USD depending on who has it.


I think you're probably right about battery temperature vs. cold weather; the case or terminal would be losing some temperature to ambient so it seems likely that it would read a little low... Good point!


- Ed.

« Last Edit: September 06, 2007, 04:07:09 PM by elt »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #40 on: September 07, 2007, 07:15:01 AM »
Oh! The catch diode blew in a previous circuit (which did have balancing resistors so lack of them wasn't the cause) and the fix was to use a beefier catch diode and big cap on the batt+ and ground to keep the induced voltages within the voltage range of the components.
« Last Edit: September 07, 2007, 07:15:01 AM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #41 on: September 08, 2007, 10:38:31 AM »
Elt,


I did not see this yesterday. Buried in all the posts.


I agree I think that is it! (OK couple comments)


I dis-like pots. The wiper gets dirty over time and causes problems like becomes open. R13 connect pin 2 to 3, that way if it opens it will still have something there. Would like to do something like that for R15, but with how its used, can't.


I very much dis-like connectors, even expensive ones go bad over time.

X1 is a great idea until the contact don't make connection. I would feel better with a simple 3 pin connection and the resister (R14) back in the bottom of string R1-4, if the probe is removed the circuit will still work. Measure the attenuation with R14 back in the circuit. I'm expecting less than 8%, for the long term benefit I would feel better with it on the PCB. You can always remove it.


Opamps: Request a sample or two (I always get two), like OP196GS, will ask future volumes, use less than 1k or someone will end up calling you.


Great work!

Have fun,

Scott.

« Last Edit: September 08, 2007, 10:38:31 AM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #42 on: September 08, 2007, 12:12:27 PM »
Thanks Scott,


>  R13 connect pin 2 to 3,


So that's why people do that! I try to learn something new every day; now I can go to sleep...


> I dis-like pots.


I think I have to have at least one pot somewhere. I'm pleased enough (probably through ignorance) with the voltage curves to put in fixed resistors but I still have to account for the difference in actual versus nominal voltage out of the voltage regulator. I've used digital pots in a couple of circuits and don't have a problem with them but I've tried to set those reference voltages to within 3mv and it'll take some fixed biasing resistors (more parts) to allow the low resolution of the digital pots to give fine enough control... it just seems too complicated to me. There's not really any fault detection in the circuit; it's going to need checking on no matter what... I'm hesitant to take the pots out.


> I very much dis-like connectors, even expensive ones go bad over time.


Okay, you've convinced me. I'll put that resistor back in the bottom of the chain. What I didn't like with it there is that it seemed to widen the offsets at higher voltages when narrowing them is spec... still I think in the name of "robustness" that that's the spot for it.


>  OP196GS


That looks like it only has a +/- 4 ma output (and, samples aside, costs more than a microprocessor!) Would I need a FET driver with that?


Thanks again!


 - Ed.

« Last Edit: September 08, 2007, 12:12:27 PM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #43 on: September 08, 2007, 01:52:57 PM »
Ed,


Your pots look just fine, sealed units are OK. Pots like that usually cost several $.

Yes, a pot will be needed since the Vreg is not a precision one.


Okay, you've convinced me. I'll put that resistor back in the bottom of the chain. What I didn't like with it there is that it seemed to widen the offsets at higher voltages when narrowing them is spec... still I think in the name of "robustness" that that's the spot for it.

Not sure what this means?

When designing a circuit, always build a prototype, some times things do not work as expected secondary or third order effects can get you! (why I use a simulator, did you look the link over for it?)


4ma will slow down on/off time to 5us, at 300hz still a small percentage of on vs off time.

Look around many other choices, find one that tickles your fancy!


Have fun,

Scott.

« Last Edit: September 08, 2007, 01:52:57 PM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #44 on: September 08, 2007, 02:51:43 PM »
>> that that's the spot for it.

> Not sure what this means?


That means I put the 4.12K resistor back where you originally said to put it in the first place. (Sometimes you have to beat me over the head but I learn eventually.) The thing is that the 30mv per C was already reduced by the voltage divider, the "safety" resistor may only take it down about 8% but now the overall compensation is only about 20mv/C. This lowers the voltage off spec at high temps but lowers the voltage at low temps even more. I'm going to look at the LM62 which is 15.6mv/C, about perfect, but the output impedance is much higher (4.7k) and the offset voltage is lower (.48v) so I've got to run the numbers to see whether the combination actually works better or worse.


> [that's] why I use a simulator, did you look the link over for it?


Yes I did and I downloaded it though I haven't installed it yet. I will but seeing "Orcad" cut me to the quick as they were an upstart back when I was writing PCB routers... At least in name, "Orcad" is still around while "SciCards" looks to be on the verge of Google-extinction :(


- Ed.

« Last Edit: September 08, 2007, 02:51:43 PM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #45 on: September 09, 2007, 08:51:52 AM »
Ed,


Simulation with 4.1k bottom resister. No temperature. 60V battery all tests.

Node voltage = 615.11mv (close to 600 mv target), + input opamp = 5.026v.

At the 48v battery 30mv/c = 120mv/c


Assumed Temp sensor output resistance was 400 ohm (800 max, normal should be much less)

temperature



  1. mv: Node = 601.36mv, + input 5.013v
  2. mv: Node = 610.46mv, + input 5.022v
  3. mv: Node = 692.38mv, + input 5.097v
  4. mv: Node = 783.40mv, + input 5.181v (jumper 3pin = 15.13v
  5. mv = 20'C, the battery voltage should be 30mv*20 *4 = 2.4v drop. Or 57.6.


Entered battery voltage 57.6v, = + input 5.002v! Looks close to me!

57.75 to get back to 5.013. (600mv starting point). 150mv error or 1'c equivalent error.


How accurate were you targeting?


Have fun,

Scott.

« Last Edit: September 09, 2007, 08:51:52 AM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #46 on: September 09, 2007, 11:35:57 AM »
I think that we're both correct!


At 60 volts the attenuation is 30k/400k, about 7.5%

At 15 volts the attenuation is 30k/100K, about 30%


I tried floating the sensor ground on the battery divider. That gave very good temperature compensation at all voltages but that also raised the voltage of the sagging regulator problem to about 5 volts. I think I like floating sensor but would like to find an op amp with an enable line. Otherwise, I think that just a warning that if the battery volts drop to 5 volts, the dumper might take it down another half volt or so... That's not a problem if 3.75 volts (the regulator drop) won't turn on the FETs but if it will, it will drop the battery voltage volt for volt until the gate voltage is too low.


What do you think of floating the temp sensor on the battery divider?





 - Ed.

« Last Edit: September 09, 2007, 11:35:57 AM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #47 on: September 09, 2007, 01:49:45 PM »
Ed,


The placement of temperature sensor above R4 or Below R4 should not matter.

If your simulation shows a difference then something is wrong.

I did it both ways and as expected they were exactly the same.


I tested with 15v battery and see a difference in temperature compensation, from when I did it at 60v.


Have fun,

Scott.

« Last Edit: September 09, 2007, 01:49:45 PM by scottsAI »

elt

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


I must not have said or shown it correctly; I'll try again -





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


It takes 1.5v at the bottom to be the equivalent of 1v floating in the middle.


The problem I'm seeing is that the 125uA load of the sensor is about all that's going though the divider... looks like it'd take changing the divider to resistors on the order of 1k, 2k, 3k 6k to make the sensor load reasonable on the divider network. Otherwise, it might take going back to two op amps to do temp comp to spec. Spec? The Trojan web site say 14.7v charge at 80F and 30mv per degree C compensation. Is 20mv/C good enough? I don't know; it sounds better than nothing but I don't like seeing it dependent on system voltage.


I think i see four choices:



  1. Float the sensor, reduce the divider resistance and accept 5ma of drain when "idle"
  2. two op amps
  3. don't sweat the reduced compensation at 12v; it's pretty close at 24v and 48v
  4. Something else.


What do you think?


Thanks again!


- Ed.

« Last Edit: September 10, 2007, 09:08:24 AM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #49 on: September 10, 2007, 11:11:46 AM »
Hi Ed,


OK, the two circuits as you know are not equal.

Try to build with actual devices the second circuit. And simulate it. Easier to use two opamps.


I expected a little interplay when putting the temp sensor on the bottom, with 10mv per c didn't seem like enough to be a problem. With the low mv accuracy we are interested here it looks like it's causing more error than you want.


With 12v battery, 0'c, 15v at 20'c should be 14.4v yet is 14.6v 200mv error is 1.2%.

I looked could not find it... wanted something like 40'c operating range?

With 40'c rise in temp error is 400mv. 2.75%

The voltage reference needs to be looked at to have a prayer of making 1% with 40'c change.


Choices:



  1. live with it.
  2. lower the setpoint voltage: divide by 3.75 vs the 3 now. The battery temperature will then be 8mv/'c at input of opamp, just about where temperature sensor is now.
  3. Use two opamps.


My choice would be to investigate #2. See if it works, decide or try tweaking it...

Or, See if you can't live with it, or default to #3.


Nice thing about simulators, you can do all above in about an hour. Then you will know!


Have fun,

Scott.

« Last Edit: September 10, 2007, 11:11:46 AM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #50 on: September 10, 2007, 01:54:08 PM »
I don't know if it's necessary but I'd been shooting for a .1v accuracy (+/- .05v of target.) Please tell me if you think I'm chasing grains of sand as I wouldn't know otherwise! My goal is to make a circuit that "a builder" (like me) would build rather than going out to buy a c40 or c60 because it was better.


Also, I'm not particularly hung up on costs and "$5" isn't a hard target; I just don't see that it should cost any more than it needs too. As is, I see about $8 in parts plus the PCB... I think that's delightful.


I'll look at #2 again. On my first pass the increased gain was offset by increased attenuation but maybe I did something wrong. Re voltage references, at one point I'd considered averaging 3v and 7v zeners as they should (in theory) have equal but opposite temperature drifts. (While a 5.1v zener, being right at the cross over is spec'ed as having a random plus or minus temperature drift.) - Ed.

« Last Edit: September 10, 2007, 01:54:08 PM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #51 on: September 10, 2007, 02:27:09 PM »
Ed,


Good thoughts.

I will do a real design study on this, later tonight or tomorrow.

Let me know the results of #2.

Have a party to go to!


Have fun,

Scott.

« Last Edit: September 10, 2007, 02:27:09 PM by scottsAI »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #52 on: September 11, 2007, 10:25:23 PM »
Ed,


Normally would have asked your accuracy targets at the start.

Did not want to confuse things with the opamp and circuit design. Step by step.

+-50mv, at 15v is not easy. (0.333%)


Battery -30mv/c TC, requires less than 2'c error. LM61 is +-3'c, all ready over.

Ok, that was a cheap shot, true nun the less. Lets continue!


LM317 TC is 5mv reference change over 50'c, 9v / 1.25v = 7.2, or 35mv change.


LM2904 has 10mv offset error drift. (find different numbers from different documents.)

10mv * 3 = 30mv, above 35mv, over.


Calibration removes many sins, for you it's ok, not in a normal production.

Others mentioned wiring issues, surprisingly easy to loose 50mv.

Resisters have a TC, not a major contribution here. POTs even worse.


TC of zeners is much larger, averaging couple does not help much. Details.


Let me know how #2 above comes out.

Have fun,

Scott.

« Last Edit: September 11, 2007, 10:25:23 PM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #53 on: September 12, 2007, 07:27:29 AM »
Hi Scott,


You're right, there's a lot of potential error in the components themselves and I see that +/- .05 volts might not be reasonable. To me, though, that's all the more reason to insure that the design doesn't have its own errors (that can't be calibrated out.)


The best I've been able to get with #2 was to get -1v from spec at 0C and +.4v at 40C in a 24v system with temp comp at 26mv/C at 12v, 30mv/C at 24v and 32mv/C at 48v... not too bad but I'm still looking.


The best (well, most accurate) design I've come up with is to move a temperature sensor with negative compensation to the fixed reference side and float in on the reference voltage(s). I'm looking at the LM19 which has a -11mv/C coefficient and, in the relevant temperature range, the same accuracy as the lm61.


If loading by the floating sensor is an issue, then developing the reference voltages with a lm319 in its "digitally selectable voltages" application instead of using a passive voltage divider would provide regulated reference voltages. The lm317 is listed as having a max 1% temp error but the error is well spec'ed and much less than that in the -10c to +40c range


That's were I'm at!


 - Ed.

« Last Edit: September 12, 2007, 07:27:29 AM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #54 on: September 12, 2007, 10:38:08 AM »
Ed,


I used 4v at the opamps inputs. LM61. Using 400 ohms output.

15v, R1 = 73.33k, R2 = 22.66k, Temp sensor 4k at 0c 4.000 volts opamp inputs.

With 0.8 or 20'c, Vbat = 14.415v for 4v

with 1v or 40'c, Vbat = 13.84v for 4 v.

If calibrated for 20'c first the error would be half. Or only 20mv total!


Other battery voltages are a ratio of 12v so should be close. (but not the same)


Have fun,

Scott.

« Last Edit: September 12, 2007, 10:38:08 AM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #55 on: September 12, 2007, 04:40:21 PM »
!!! I'm going back up to reply at an earlier post to get some more width (again!)

-  Ed.
« Last Edit: September 12, 2007, 04:40:21 PM by elt »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #56 on: September 12, 2007, 05:36:44 PM »
This is really a reply to this post:




I used 4v at the opamps inputs. LM61. Using 400 ohms output.

15v, R1 = 73.33k, R2 = 22.66k, Temp sensor 4k at 0c 4.000 volts opamp inputs.

With 0.8 or 20'c, Vbat = 14.415v for 4v

with 1v or 40'c, Vbat = 13.84v for 4 v.

If calibrated for 20'c first the error would be half. Or only 20mv total!


I went up thread to get some room...


That's nearly identical to what I came up with (but yours is a little closer!)


I used a 5.75k  R at the temp sensor because I thought if it were unplugged or failed it would be safer to simulate a higher temp. I think 5.75k is 20 or 25c. Given that, I lowered R2 a little to compensate... I still get about .1v error from "ideal" if I run the the voltage and temperature range. I imagine that's good enough!


The design, however, has an intrinsic non-linearity. I see that because if you divide the input and output voltage of the battery divider you get (about) 3.6x but if you look at the incremental voltage step on the output seen by raising or lowering the voltage you get 4.1x I feel like I've been chasing numbers around for two days trying to get the best fit to the curve.


This...





... floats a sensor on the "fixed" side with the charging references so it does not have that issue. I believe that its accuracy is only limited by the available values for the fixed resistors. Using in-stock 1% resistors from Digikey, I get an error typically 34mv or less across all voltages and a worst case 60mv for a 48v system. I know that you haven't been keen on floating the temperature sensor and I'm not sure why... in this case the LM19 only draws 10uA so I don't think it'll load the divider network it's riding on.


I'm not sure however, whether the output of the lm19 is sourcing or sinking. The spec says it'll source 1uA and sink 16uA.. I think I have it sinking about 8 uA (Worst case is at the cold end when its output is about 2.1 volts)


Is this a bone head idea? (I know I've been hanging on to the idea of floating the temp sensor like a dog with a bone!)


Thanks again!

- Ed.

« Last Edit: September 12, 2007, 05:36:44 PM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #57 on: September 12, 2007, 06:49:38 PM »
:-)
« Last Edit: September 12, 2007, 06:49:38 PM by scottsAI »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #58 on: September 12, 2007, 07:17:27 PM »
Ed,


I though you would like to know I look forward to what your going to come up with each day.


Sometimes you just have to make your own errors!


So take up my challenge, design the floating sensor with real devices and simulate it.

Floating voltage source does not cut it:-)


Current dependent voltage source will work.

The temperature sensors output changing will result in a current load change of the voltage source driving it. Now if you understand that you get two stars!


What simulator is that your using?


Many of my ideas people have and continue to discouraged me, I understood their points, but knew they did not understand mine. I go and make mine work better. I design very simple complex circuits.

Using a simulator they believe it sooner, but simulators lie.


Nothing wrong with a floating MosFET, does that help?


Have fun,

Scott.

« Last Edit: September 12, 2007, 07:17:27 PM by scottsAI »

elt

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


I though you would like to know I look forward to what your going to come up with each day.


You have gone so far past any reasonable expectation of "help" that I am at a loss as to how to express my gratitude... Thank you.


[...] design the floating sensor with real devices and simulate it.


My simulator (ProtoLab) is basic to the max; it has a handful of discretes in it and is not extensible. I've been through the first of Orcad/PSPICE examples; I think I'll build the circuit and see if it works before I'm able to simulate current loading variations of temperature responsive devices!


I'm looking at making the reference voltages "regulated" so I don't have to worry about the sensor load.





I looked at some "precision voltage references" but they didn't seem that much better than the lm317 over the -10c to 40c range so I have not referenced them.


One thing I like about this geometry is that it's very easy to set the setpoints for different charging preferences... just note what the voltages should be at the current temperature, divide them by 2.58 (the divisor on the battery divider) and dial them in.


Okay, it adds another vreg (and its 5ma minimum load requirement) but I think this one is bullet proof... perhaps I think I'll add a LED to the temperature probe at the battery end; that'll at least let me know if two of the three wires are connected. I could put a LED on the sensor output (at the battery end) if I can find a sensor with a neg coefficient and a bit more capacity to sink than the LM19 has...


What do you think of that?

 - Ed.

« Last Edit: September 13, 2007, 04:13:13 PM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #60 on: September 13, 2007, 07:39:08 PM »
Ed,


Looks good. Bravo!


Remember Vcc must be 2.7v higher than Vref.


We have noticed the 317 cost less than an opamp. Good solution!


LED on probe power works for me. Not on temp output.


Vcc is only powering the Opamp and Vref.

I am sure you can find a cheaper way to do this:-)


MosFET gate voltage. Looking over the IRF530, rather high resistance at 0.14 ohms.

Since this is for a load dump use a few with a heat sink. 5 will have 10 amp each with 14 watts each. Any thing above 0.5 watts of heat in T0-220 will need heat sink. Driving the gate above 8-9v does not improve Rdson much, 10% maybe. Using 12v on a 12v battery is rather difficult. Take a look at the Vgs vs Id Vs Vds graph. No line for 12v it would be next to 10Vgs line.


Have fun,

Scott.

« Last Edit: September 13, 2007, 07:39:08 PM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #61 on: September 14, 2007, 03:44:21 PM »
Hi Scott,


MosFET gate voltage. Looking over the IRF530, rather high resistance at 0.14 ohms.


I used the 530's on the breadboards because I have a bunch of them. I figure it'll take some $2 FETs to get to 40 amps on 48v systems. Newark.com has a promo on IRFZ48Z for $1.05 USD (Rdson=.011 Ohm). I figure three with little heatsinks will do 40 amps on 12/24 volts systems.


I etched a board set... battery shown for scale.




I put connectors and a switch across the top of the board. (The footprint can be wired to if you hate connectors...) After the fact, I've learned that I used the footprint for a $4 switch instead of a 40 cent switch. I'll address that if there's a rev two...


You can't tell from the top side but, per ghurd's suggestion, there is an optional power connector and some solder pads on the bottom side so that you can set it up to sample the battery voltage with a second (low current) wire set that won't have a voltage drop due to high current load.


The trim pots, test point, connectors, jumpers and switch positions are labeled; I just transfered the labels to the top (etch) layer before making the artwork.


There's only two holes for each FET. I'll bend the drain pin across the drain plain on the top (and the ground pin across the ground plain on the bottom) to get lots of pin in contact with the plains. I've learned that by soldering the gates first, you can bend the device a little to put pressure on the pins you're working on to get good mechanical contact with the plains before you solder. Also, I made a ground plain over the circuit area to save on enchant. :) I've lost my fear of making two layer boards. If you get two pins aligned, the whole top layer is aligned so all you have to do is make sure get two pins aligned...


Next thing is to see if it actually works!


Thanks again,

- Ed.

« Last Edit: September 14, 2007, 03:44:21 PM by elt »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #62 on: September 27, 2007, 03:47:51 PM »
Hi Scott, hope all is well.


I'm stumped and I hope that you can help me.


I've built the circuit and the main board works fine ...






... well, my reference voltage switching didn't work right because for "float" voltage you have turn both mini-FETs off; a switching diode on the switch fixed that...


But it's the temperature probe that is confusing the heck out of me!


When I plug it in, it somehow raises the reference voltage a volt or so. For example, the float reference voltage (before the temp sensor) is about 3 volts. When I plug the temp sensor in it rises to about 4 volts.


(Here's the schematic- http://www.otherpower.com/images/scimages/6527/tiny_29s.gif)


I've tried and tested just about everything I can think of and it looks like there's some interaction between the temp sensor chip and the LED that effects the regulator, IC2:



  1. When the sensor is plugged in, the 1.25 volt reference on the lm317 stays at 1.25 volts; the voltage at the low end of R14 actually rises. The main supply stays constant at 8 volts; the difference between vref and v(t) is the 1.8 volts as expected by the ambient temperature. (Am now using an LM94022, LM20 compatible temperature sensor.)
  2. I built a "probe" without the temperature sensor (LED, resistor, cap) and the circuit works as expected. (A "default" reading on v(t) is provided by the on-board voltage divider. R18, R21.)
  3. I have a dual independent power supply so I put a 1.8v on the temperature wire of the mock probe, varied it a little bit, and the circuit worked as expected.
  4. I tested the probe by itself with a standalone power supply and it works as expected.
  5. I built a second probe and it behaves just like the first one does.
  6. I cut the connection to the LED on the second probe and the V(t) works fine!


... so it looks like I can have the LED or the sensor chip but not both!?


I can live w/o the LED though I wish I knew why; I think it was a nice idea.


The only clue I have (and what gave me the first clue) was that voltage was only pulled up 3/4 a volt on the second probe and the only difference was I put a smaller resistor (470 vs 2200) on it so the LED would be brighter. I know that the lm317 is a "floating" regulator but I just don't see the way that the probe interacts with it ... I imagine it has something to do with sourcing and sinking across the lm317 output but I just don't see it.


As always, help is greatly appreciated.


Thank you,

- Ed.

« Last Edit: September 27, 2007, 03:47:51 PM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp comp ANALOG dump controller
« Reply #63 on: September 28, 2007, 10:33:27 PM »
Hello Ed,


Just by accident I checked this. You should email me if on an old post.

For me that was 14 post ago and 14 days don't usually look that far back


IC2 is a series regulator, it has no ability to sink the current from the LED.

If no load on IC2, the LED's current will pull it high.

Think of the regulator as a variable resister connected to the Plus supply.

You know the LED will not be lighted!


Fix by placing a load on the V-REF slightly larger, use a Power OK LED.


Yep, that simple! You almost had it.


Looking good.


Have fun,

Scott

« Last Edit: September 28, 2007, 10:33:27 PM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: $5 2-state temp comp ANALOG dump controller
« Reply #64 on: September 29, 2007, 07:44:54 AM »
>  Fix by placing a load on the V-REF [...]


That worked!!!


How's the story go, "$1 for hitting it with the hammer, $100 for knowing where to hit it" ... again, you've come up with the silver bullet. Thank you very much.


Here's a picture of the second probe; no etch or wiring this time, I just cut four islands in the copper with a razor knife and soldered on parts.




The two probe readings match now to a little better than two degrees, that's within spec... now I'll put the op amp in and do some more testing.


Thanks again!


- Ed.

« Last Edit: September 29, 2007, 07:44:54 AM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: $5 2-state temp compensated ANALOG dump contro
« Reply #65 on: September 29, 2007, 10:35:13 AM »
Hello Ed,


Creative way to make the probe!

How will you attach it to the battery?

I hear measuring the temp of a terminal is better than the case.

Be careful to electrically isolate it.


Have fun,

Scott

« Last Edit: September 29, 2007, 10:35:13 AM by scottsAI »