PDA

View Full Version : Discussion switching regulator control with opamp question


thanhTran
Sep 23, 2008, 01:47 AM
I've been working on a booster to charge my A123 packs. I found this reference to this good chip: http://www.rcgroups.com/forums/showpost.php?p=6356084&postcount=12

I bought the chip and built the circuit. It works great by the way. However, now come the controlling part of the circuit. I added an op-amp on the Feed back line of the LT1680 circuit so that I can modify the output voltage with a current monitor or micro controller. I face some problems which I can't explain. I reduced all the troublesome parts and make the circuit simple, but still has problems. So I turn to this forum for expert suggestion :). Any way, here is the problem:

1. The circuit mentioned above (http://www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1003,C1042,C1031, C1115,P1597,D1509) is working great by itself. It can keep the output voltage pretty well (0.03v drops with 2.5A load (the max resistant load I can have at that voltage right now). I can put my 5S A123 battery packs in and I can maintain 6A@18v output which should drain about 10A in the 12v input from an old ATX power supply unit.

2. Now I add in an op-amp to test the working baseline. My understanding is that the LT1680 will try to maintain the Vfb to 1.25v. If the output voltage is low, the voltage across the R6 & R7 bridge will be lower than 1.25v, the chip will bring up the output voltage by changing its PWM duty cycle so that the output voltage rises and thus the Vfb voltage = 1.25v again. I made the opamp circuit as a "follower" circuit so that it passes the voltage of the input to the output. My opamp circuit looks like this:

http://76.100.236.149/pictures/miscs/s_opamp.jpg

The original R6&R7 is disconnected from pin 7 of the LT1680. Instead the above opamp sits in between.

The ability to maintain the voltage of the output in this case is bad. The output voltage could drop as much as 1v on a 1+ A load.

The opamp doesn't seem to carry the voltage from the R6&R7 bridge to its output correctly. Underload, the output voltage of the opamp is higher than the voltage from the R6&R7 bridge. This fools the LT1680 and makes it think the output voltage is ok.

I can't explain the reason why I have this problem. Maybe the high frequency of the LT1680 is not responded correctly by the opamp? But my output has a couple of 680uF caps which should make voltage going through the opamp is DC.

Is my understanding correct? What could be my problem?

Thanks very much for your time and thank you for reading this long post.

Thanks again

-Thanh

Acetronics
Sep 23, 2008, 08:34 AM
Hi, Tree tormentor

I think your answer is in the Datasheet ...

TL 27 ( exists ??? ) Bandwidth ???

Alain

dleroi
Sep 23, 2008, 08:54 AM
Thanh,

I think that the input bias current of the LT1680's feedback pin may be overwhelming the output of your op amp. You need a "low" resistance to ground on the feedback pin. I would try a 4.7K resistor to ground on the output of the op amp, or giving the op amp some gain and using a voltage divider on the output.

- Don

thanhTran
Sep 23, 2008, 10:11 PM
Thanh,

I think that the input bias current of the LT1680's feedback pin may be overwhelming the output of your op amp. You need a "low" resistance to ground on the feedback pin. I would try a 4.7K resistor to ground on the output of the op amp, or giving the op amp some gain and using a voltage divider on the output.

- Don

Hi Don,

Thank you very much for your help. That resistor seems helping the problem :). Before adding the resistor, it could drop as much as 1.8v. Now it drops about 0.6v under 2.5A load @ 22.1v with a 4.7K resistor on the output of the op-amp. I'll play with these settings to see how it turns out. The option of putting gain to the opamp sounds good also.

Thanks again

Thanh

thanhTran
Sep 23, 2008, 10:28 PM
Hi, Tree tormentor

I think your answer is in the Datasheet ...

TL 27 ( exists ??? ) Bandwidth ???

Alain

Hi Alan,

For a while, I was wondering what you mean by "tree tormentor" :D.
Thanks for your help. I now see the section mentioned about the Vfb in the data sheet. I didn't look at that section carefully when I started building the circuit :p.

The TL 27 is an opamp from Texas Instruments: http://focus.ti.com/lit/ds/symlink/tlv27l1.pdf

The picture is what I've gotten so far. It's going to be a CCCV A123 charger which can charge 10S A123. I've blew up 2 FET's so far. :rolleyes:

Thanks

Thanh

ps. I also wonder if it's possible to make this circuit a buck converter???

thanhTran
Sep 24, 2008, 12:01 AM
...
TL 27 ( exists ??? ) Bandwidth ???

Alain
Alain, are you saying that the opamp bandwidth is not high enough and causes this problem? It's rated for 160Khz; but the voltage output is DC, so if bandwidth is not enough, it would mean that the regulation would be not stable. But the result I got was a stable voltage; just a different voltage than I expect.

I tried the 4.7k on the output of the opamp, but it seems that the regulator output voltage is always drops 0.5 - 0.6v under load. This is probably ok for a battery charger, but I think it should be fixable. Not sure how yet :o

Thanks

Thanh

dleroi
Sep 24, 2008, 07:14 AM
I tried the 4.7k on the output of the opamp, but it seems that the regulator output voltage is always drops 0.5 - 0.6v under load. This is probably ok for a battery charger, but I think it should be fixable. Not sure how yet :o Thanh

Thanh,

Does the voltage drop at all without the op amp? If not, I would next try 2K - if the op amp can work into that much load. Or, give it some gain and use a voltage divider. Are you stuck with using 5V for the op amp? That's going to limit the gain to 3, or so.

- Don

Acetronics
Sep 24, 2008, 07:22 AM
Hi Alan,

For a while, I was wondering what you mean by "tree tormentor" :D.



:D



The TL 27 is an opamp from Texas Instruments: http://focus.ti.com/lit/ds/symlink/tlv27l1.pdf


 High Wide Bandwidth . . . 160 kHz ...



Ok, I better understand !!!

Usable AOPs Bandwith should have been 20 to 100 times that !!! with 200 kHz at the input ... the gain will be ... 160/200 = .8 !!!

No risk the switching chip sees anything as the "sawtooth" feedback !!!

Not surprising you blew off some Mosfets ...

Look for something equivalent to LMH 6639/42/45/47 from National ... or try "oldies" like LF357, LM 318 ...


Switching supplies App Designs are often somewhat hard to modify ... I 've also realized that. ;)

Alain

thanhTran
Sep 24, 2008, 10:45 AM
:D


Ok, I better understand !!!

Usable AOPs Bandwith should have been 20 to 100 times that !!! with 200 kHz at the input ... the gain will be ... 160/200 = .8 !!!

No risk the switching chip sees anything as the "sawtooth" feedback !!!

Not surprising you blew off some Mosfets ...
...
Alain

Hi Alain,

Thank you for sharing your experience and for your help. Your point seems to explain what happens to my circuit (i.e the opamp doesn't carry the input voltage to the output.) In my case, the input of the op-amp is DC voltage (with some ripple under-load). Last night, I expanded your earlier suggestion and added some small caps (0.001uF) on various places in the circuit (output of the regulator, op-amp power decoupling, etc.) and the circuit works like it should be right now. I'm so happy :D. Right now, the result is that it the output of the regulator only drops 0.02v under load (2.5A at 20v).

I didn't blow the FET because of the opamp. I blew them because I was trying adding some component while the circuit is hot and under load, and onetime I got a cold solder join.

Thanks a lot ;)

-Thanh

thanhTran
Sep 24, 2008, 10:48 AM
Thanh,

Does the voltage drop at all without the op amp? If not, I would next try 2K - if the op amp can work into that much load. Or, give it some gain and use a voltage divider. Are you stuck with using 5V for the op amp? That's going to limit the gain to 3, or so.

- Don

Hi Don, no it didn't drop that much when it had no opamp (with no opamp, it drops about 0.02 - 0.05v under load). I added some small caps (0.001uF) in various places and it seems fixing the problem. I still have the 4.7K resistor on the output of the opamp though.

Thanks again

-Thanh

dleroi
Sep 24, 2008, 01:35 PM
Hi Don, no it didn't drop that much when it had no opamp (with no opamp, it drops about 0.02 - 0.05v under load). I added some small caps (0.001uF) in various places and it seems fixing the problem. I still have the 4.7K resistor on the output of the opamp though.

Thanks again

-Thanh

Thanh,

Great that it's working with Alain's suggestion. I would have thought the input to the op amp was relatively pure DC. I wonder if that was the entire problem? I'd be curious to know how it reacts if you remove the 4.7k resistor.

- Don

thanhTran
Sep 24, 2008, 10:57 PM
...I would have thought the input to the op amp was relatively pure DC. I wonder if that was the entire problem? I'd be curious to know how it reacts if you remove the 4.7k resistor.

- Don

Hi Don,

I tried removing the resistor, and the stability wasn't as good as when it was there. The voltage varies about 0.2v under 2.3A load. So it definitely helps :).
Thanks very much for your help.

-Thanh

ps. I'm working on the CCCV aspect of this circuit right now. I can control the voltage from a MCU (using TI MSP43022F74 for ease of development). I have the circuit in place to measure the current, but I need to know why its measurement result is different from the value I measured from an external amp meter. not sure if my current sense resistor (0.01 ohm 1%) or if the Vref is not accurate enough. I I had about 80% of the work done before I unrolled everything to debug the instability issue.

thanhTran
Sep 25, 2008, 01:55 AM
The ADC reading from my current sense output is all over the place (value showing any where from 1.7A - 3.5A while my load is only 2.5A). I put a cheap scope on the current sense output, and the signal looks bad. The current sense also amplifies the ripple voltage. So I added 2 more 630uf 63V aluminum caps on the output of the regulator. The current sense output is much much better. But I'm back to square one with the voltage drop problem! The opamp doesn't do 1:1 amplification like it's supposed to. The output voltage drops about 0.8v under load. :o hmm.

It's sure like what Alain said: "it's hard to modify the switching regulator" ;)

The people who make lipo charger sure makes the job look easy. Their charger can boost and buck at the same time and staying accurate, not to mention they have so many fancy features.

Acetronics
Sep 25, 2008, 04:45 AM
Hi, Thanh

DO not touch to that "ripple" ... it drives the internal switching circuits !!!

It's necessary for the switching supply to work properly !!!


If I understood ( ??? ) you want to measure the load current ???

You should then add a R-C filter to the output and use R as a shunt ...

a diff amp will extract the value ...

or use an ACS 7xx current sensor ...

Alain

thanhTran
Sep 25, 2008, 10:50 PM
Hi, Thanh

DO not touch to that "ripple" ... it drives the internal switching circuits !!!

It's necessary for the switching supply to work properly !!!

...

Hi Alain

I'm puzzled why you say the ripple on the output is needed for the operation.
Could you please explain more?

I've always thought that the low ESR capacitors on to smooth those ripples. I understand that the switching FETs switch the current on and off to the inductor so that it creates the different voltage. The FET's needs pulses to turn current on and off the coil. I understand that part. But after the diodes, the voltage is supposed to be pure DC, isn't it? The diode also separates the output from the switch.

In the original app note from LT, they use 3 680uF 63v caps on the output. In my circuit, I only used 2 and it created the ripple. I added two more like the app note and I got problem.

Yes, I want to measure the current flow on the output of the regulator. I use this chip for current sense:
AD8211YRJZ-RL7CT-ND. http://www.analog.com/static/imported-files/Data_Sheets/AD8211.pdf

The sense is done on the high side with a 0.01 ohm shunt resistor. The chip has an amplification factor of 20. So if the current is 1A, the drops on the shunt is 0.01v, times 20, that would be 0.2v. Ripple is not seen on the vcc line (not big enough), but the current sense amplified the different voltage drops on the shunt and also amplified the ripple. In the picture, before adding more cap, the ripple voltage generated by the current sens chip is already about 0.2v and is not really usable (it was with a 2.5A load).

I can add a low pass filter on the output of the current sense chip, but I'm wondering if I should remove some caps on the regulator or not. So please tell me if my understanding on the regulator is correct or not. :)

Thanks Alain

Thanh

thanhTran
Sep 28, 2008, 03:34 AM
I added more caps to the circuit. Each of the op amps (2 opamp in the circuit now), current sense chip, has an extra pair of 10uF and 0.001uF (originally only a .1uf). The circuit seems functioning fine without too much variation between 2.5A loaded and unloaded (0.04v different on the output).

Now to the current measurement part, it still gives me lots of variation during high amp (which I think caused by the ripple from the switching regulator). I've added a rc filter on the output (output of the chip goes to a 19K resistor then to a 47uF to ground, but it doesn't help much. On the scope, the variation is just slower but it's still varying quite a lot (150mV peak to peak)

Would it help if i use an active low pass filter with an opamp? or should I just smooth it out using software (reading will be delay, for says 1 - 2 seconds?)

Thanks for reading

Thanh

thanhTran
Sep 28, 2008, 05:50 AM
It seems the current sense chip picks up interference from the switching regulator. I moved the chip away and the signal looks better. reading is also more reasonable. I think its time for a PCB with better track routing & isolation to see if the result is better.

dleroi
Sep 28, 2008, 09:53 AM
It seems the current sense chip picks up interference from the switching regulator. I moved the chip away and the signal looks better. reading is also more reasonable. I think its time for a PCB with better track routing & isolation to see if the result is better.


Hi Thanh,

I'm getting confused. Is the "current sense chip" the sense resistor, or are you referring to the op amp circuit you added?

It seems to me you SHOULD see some ripple across the sense resistor. The question is, how much is acceptable? It also occurs to me that you should be able to add as much capacitance as you want at the input to the sense resistor (Cin) or the output of the regulator (Cout), without worrying that it will adversely affect operation.

Now, if your op amp is being affected by the switching of the regulator that's a whole new can of worms.

Do you have a schematic?

- Don

thanhTran
Sep 29, 2008, 01:15 AM
Hi Don

Sorry to confuse you. I didn't have any schematic (apart from the LT1680 app note, I just wire the component together as whatever in my mind). So I draw a little block diagram to show you what I've had so far.

The opamps are for modifying the feed back voltage and is not for current sense purpose. The current sense chip (AD8211) is reporting the current to the MSP430 MCU.

The two 2K resistors of one of the opamps to 2K was changed according to your suggestion so that the overall resistant is < 5K. Originally, it was around 20K.

The output of the current sense chip (Iadc votlage) is what concern me most right now. It varies in as much as 150mV when I have a 2.5A load on the output of the whole circuit. The IAdc voltage is about 1(A)*0.01 (ohm)*20 (amplification factor) = 0.2v per amp. So with 150mV variation, the ADC value read by the MSP430 could be anywhere within +/- 0.5A. I'm trying to measure within 10mA or 100mA accuracy.

If you have any suggestion, that would be great :)

Thanks

-Thanh

acrorc
Sep 29, 2008, 02:40 AM
Here is another idea about the problem you are having with the regulation when using the opamp in the feedback loop. I would try adding a 2k resistor between the output of the opamp and the input of the regulator chip. Add another 2k resistor to ground on the input pin of the regulator. This will act as a voltage divider to the fb signal. It will then be necessary to adjust (lower) the value of the 62k resistor on the input of the first opamp in your schematic. The reason for these changes is to ensure that the opamp is operating in a linear point of its curve and that it can force the control voltage low enought to maintain control over the output voltage.

John W.

thanhTran
Sep 29, 2008, 03:10 AM
...The reason for these changes is to ensure that the opamp is operating in a linear point of its curve and that it can force the control voltage low enought to maintain control over the output voltage.

John W.

Hi John

Thank you very much for your suggestion. Quick question, though, is there a reason why you think the opamp in my circuit is not working in its linear region? Currently, with the circuit in the picture, the software in the MSP430 is able to set the output voltage any where from 12v - 39v (by sending a number to the DAC). If it's not in its linear region, would it be possible to do so?

Thanks John

-Thanh

thanhTran
Sep 29, 2008, 03:48 AM
...
The output of the current sense chip (Iadc votlage) is what concern me most right now. It varies in as much as 150mV ...

I moved the current sense chip away from the regulator board; I make the ground line bigger, and it seems the current sense reading problem is much improved. The value readings are now ranging within 40mA. :cool:

There are still couple issues with my circuit:
1. Under load, the output voltage jumps about 0.15v (it used to go lower). If I set the voltage at 19.00v then apply a load. Underload, the voltage jumps to 19.14v. I'll try out what John suggested to see if it fixes it.

2. The current sense chip, when idle (no current) shows a 0.034v (equal to 170mA.) From the data sheet, it says this happens when the voltage across the shunt is < 2mV. That equals to: 0.002/0.01 = 0.2A. Not sure if there is away to fix this without increasing the Rshunt. I'd like to keep it 0.01ohm as I would want to measure as high as 10A. with 10A, the loss over the shunt is: 0.01*100 = 1W.

3. The current value calculated from the current sense is about 0.2A higher than the value read from an inline DMM. I think the current shunt is not really accurate. I guess, I will adjust this reading through software.

-Thanh

dleroi
Sep 29, 2008, 11:03 AM
3. The current value calculated from the current sense is about 0.2A higher than the value read from an inline DMM. I think the current shunt is not really accurate. I guess, I will adjust this reading through software.

-Thanh

Thanh,

Your schematic makes it a lot clearer. It's much different than I imagined!

The first question that comes to my mind is: why use the AD8211 at all? You are already measuring voltage on one end of the shunt resistor. Why not measure the other end, as well, and let the MSP430 do the calculation? Also, why not measure across the regulator's sense resistor instead of introducing another voltage drop with the "shunt" resistor?

These are just my thoughts based on my own work with a LiIon charger I built using an off-the-shelf charger IC.

- Don

thanhTran
Sep 30, 2008, 04:03 AM
Hi Don

There are several reasons I can think of that I use a separate current shunt. I don't want to mess with the original LT1680 chip. The current circuit itself is already running funny when I add more caps, or removing caps, or even solder to a different place on the ground wire. Were you suggesting to use another current sense chip across that shunt? or were you suggesting to measures the voltage on both sides of the shunt? The latter would be tough since the voltage different is small.

Also, if I measured on the "primary" side of the regulator, I don't know how much lost actually happens to be able to figure out exactly what the current on the "secondary" side. It would be nice to measure both sides and figure out what the efficiency is. This would be a neat feature, I think :cool: :).

Thanh

dleroi
Sep 30, 2008, 07:44 AM
Were you suggesting to use another current sense chip across that shunt? or were you suggesting to measures the voltage on both sides of the shunt? The latter would be tough since the voltage different is small. Thanh

Hi Thanh,

My main point was that the current sense chip seems unnecessary, in that you have all that horsepower at your disposal (the MSP430). I've seen commercial battery chargers that use the same MPU and they simple read the voltage at each end of the sense resistor to determine the current. My design (an eMoli charger) does the same, but with a differential amplifier between the sense resistor and the A/D of the MPU.

- Don

thanhTran
Oct 05, 2008, 04:50 AM
Hi Thanh,

My main point was that the current sense chip seems unnecessary, in that you have all that horsepower at your disposal (the MSP430). I've seen commercial battery chargers that use the same MPU and they simple read the voltage at each end of the sense resistor to determine the current. My design (an eMoli charger) does the same, but with a differential amplifier between the sense resistor and the A/D of the MPU.

- Don

Hi Don,
yeah, it's would be good to use one shunt and not two. Due to the unknown efficiency over a wide range of voltage on the output, I have to use another shunt. I ran some numbers for using ADC directly the two ends of the shunt without an opamp or without a current sense chip. I think it's very possible if we don't need high resolution. With 2.048v vref, and with 0.01 ohm shunt, we would be able to have a resolution of 200mA with 10 bit ADC. if I use 12 bit, I should have a resolution of 50mA. But since I'm doing measurement on the high side, and my voltage line is ranging from 12v to 40v, the set up will become complicated and not precise. So I keep my current sense.

Thanks

Thanh

thanhTran
Oct 05, 2008, 05:06 AM
...I would try adding a 2k resistor between the output of the opamp and the input of the regulator chip. Add another 2k resistor to ground on the input pin of the regulator. This will act as a voltage divider to the fb signal. ...John W.

Hi John
I tried this out and I really liked it. The result is much better compared to when I didn't have that mod. Voltage changes under load is within 0.08v compare to as much as 0.22v in some voltage ranges (different output voltage gives me different error)

I also have another problem from the 12 bit DAC. Its accuracy is not linear over the 4096 possible values. I like the 12 bit DAC since I can set in the software to set the output voltage in as fine as 0.01v changes. If I use a digital POT, the resolution is rougher. Im wondering if a better DAC would have better accuracy. I'm using the MCP4921 DAC from Microchip.

Maybe I need to use the MPU to "fine tune" DAC to set the output voltage to the wanted one.

Thanh

JohnMuchow
Oct 05, 2008, 07:53 AM
I also have another problem from the 12 bit DAC. Its accuracy is not linear over the 4096 possible values. I like the 12 bit DAC since I can set in the software to set the output voltage in as fine as 0.01v changes. If I use a digital POT, the resolution is rougher. Im wondering if a better DAC would have better accuracy. I'm using the MCP4921 DAC from Microchip.

Maybe I need to use the MPU to "fine tune" DAC to set the output voltage to the wanted one.

ThanhI'm currently using the MCP4921 in a product. It's a darn good DAC and it's darn linear over its entire range too. More linear than I can measure. It's accuracy is also darn good. A "better' DAC might be more accurate (for a lot more money), but do you need a more accurate DAC or a more linear response from your circuit?

What's the temperature coefficient (TCR) of your shunt resistor? I'm betting that its resistance value is drifting as it heats up and that is causing your entire circuit to drift. I'm using +/-20ppm TCR shunt resistors and even with that very low TCR, my readings drift up to 0.7% when I'm only at about 65% of the shunt resistor's power rating. If I get up to 100% of the shunt resistor's power rating (more current through it), it drifts up to 1.5% of its rated resistance. And there are lots of sense resistors with TCR values 10 times worse.

John

[Edit] You can any of the following to cure the problem (if it's drift due to TCR of the sense resistor)...
- Use a resistor with a much lower TCR.
- Use a much higher power rated resistor so it runs a lot cooler.
- Use the existing resistor and calibrate your circuit to compensate for the drift.

Using all three works great. :)

thanhTran
Oct 05, 2008, 04:20 PM
Hi John,

Thanks for the assurance of the MCP4921. I should look at other places for source of the inaccuracy in my circuit.

I was measuring the voltage when my circuit is UNLOADED, so the current shunt resistor is NOT in the equation of the different voltage problem because current running through the shunt is 0A.

I was suspecting the DAC because of this:

I have 2.048v Vref,
+ If I send 2000 to the DAC, the output should have 1.000v. Instead I got 1.009.
+ If I send 4000 I should have 2v, but I have 1.995.
+ If I send 3000, I should have 1.5v, I got 1.490.

These numbers are measured with a Fluke 179 which has accuracy 0.09%.

The different DAC output voltage goes low or high randomly and not linear across the entire digital value.

With my current circuit, each DAC' LSB change (0.0005v changes), the output voltage supposed to change 0.01v. But with these added shift, the output changes could be as much as 0.2 - 0.5v. These are what i talk about when I say it's inaccurate.

Maybe I should change the ratio of voltage change caused by the DAC thus limiting the effect of the DAC inaccuracy.

Thanks

-Thanh

JohnMuchow
Oct 05, 2008, 07:52 PM
Hi Thanh,
As you mentioned, the basic DC accuracy of the Fluke 179 is +/-0.09%. But that's only for a new unit. It's accuracy drifts as it ages. When was it last calibrated? My 179 was about .019mV off (after several years) before I had it recalibrated.

What's the voltage reading for the reference? What's the level of the noise on the reference input to the DAC? If there's a few millivolts of noise on the reference line, that will shift the output of the DAC by a few millivolts. The Fluke 179 will just average out all the noise.

I'm leaning towards a noise source being the problem because of the random nature of the incorrect readings you''re seeing. Especially for those big voltage jumps. If it was the DAC being inaccurate, you'd see the same incorrect output value every time you went back to that same DAC setting.

I still think your DAC is giving you as accurate an output it can. I suspect it's noise on the reference line or in another part of your circuit. Do you have a good scope you can use to measure the noise levels?

John

thanhTran
Oct 06, 2008, 01:24 AM
Hi John

I've not done any calibration to the fluke so I'll check it out sometimes. The thing is, the real output from the DAC could be randomly higher or lower than the supposed value makes me think my fluke is fine. If the fluke was in the picture, I should have seen consistent lower or higher, not both. Based on your suggestion, the Vref noise could cause reading of a digital value should be different each time I go back to the same digital value, but I see I keep having the same reading after I set to a different value then come back. So it's not noise on the vref line that could cause it.

I'm also wondering how much noise could attribute to the output of the DAC value reading. If Vref varies by noise, says, in 100mV (which is very, very bad,) 100mv changes in Vref should result in a 100/4096 = 0.02mv for each digital step. That's not what I see from the reading straight from the DAC output though

Thanh

JohnMuchow
Oct 06, 2008, 04:22 AM
Hi Tranh,
IMHO, you need to get back to basics here. There are just too many possible reasons for the problems you're seeing and without a good scope to look at everything, we can only guess.

Take your microprocessor, reference, and the DAC and put together a circuit just using these. Make sure no other circuitry is operating while you do the test. Be sure to properly bypass and filter all power lines, cut the leads to all components as short as possible, use a quiet linear power supply or battery (before the regulator), and locate the components as closely together as possible. Do not use perfboard. At a minimum, use a breadboard with a grounded base plate.

Then test the stability and accuracy of the output of the DAC. If you see any variation, it will be a lot easier to track down the cause with this simplified setup. If the output is stable, then you know you have a noise, or other, problem with your original circuit.

John

thanhTran
Oct 07, 2008, 03:01 AM
Thanks for the suggestions John.

I'll try to make a PCB sometime once I verify the circuit is ok for what I need. I can only make 1 layer PCB so I may not be able to eliminate all the noise. Maybe I can use 2-sided PCB with one side with just copper

All the numbers given earlier were measured with only the MIC2950 (low noise linear 5v BEC), DAC, the Vref generator (LM431 or its clone) and the MSP430 (MSP430 run on a separate battery pack - it's the 2500RF kit). They were completely disconnected from the regulator and was supplied with a 2 cell VPX battery (switching regulator is not powered up). I think the numbers (except those at around 3000 digital) are matching with the spec of the DAC: -2 to +2 LSB (1mV) difference (figure 2-9, figure 2-10 of the spec.)

I think I need to change the "weight" of the impact of the DAC voltage on my circuit to reduce its imperfection. That will reduce the range of the output voltages which can controlled by the DAC.

Thanks again

Thanh

thanhTran
Nov 05, 2008, 04:08 AM
I got the circuit working to a degree that I'm comfortable to connect my 9-cell A123 packs to this circuit to charge them. The charge is fine except that the charge current is jumping around the the current limit I set in the software. It's not a solid steady current value seen in commercial charger. Maybe I need a hardware current limiter? Maybe I can also improve the software a bit more.

-Thanh

The whole circuit would work fine as a voltage generator right now. The software can tell the circuit to set to a voltage and the value at the output would be within 0.02v of compared to my external DMM.