Op- amps etc. not working as expected

Thread Starter

Happy Harry

Joined Apr 18, 2018
21
My project is building a NiCd battery charger based on a circuit from : Texas Instruments application report SNOA327B http://www.ti.com/general/docs/litabsmultiplefilelist.tsp?literatureNumber=snoa327b

This is their schematic:

upload_2018-5-7_11-57-54.png

Some modifications were necessary as this was designed around charging a 6.2V battery at a constant 3A current. My requirements were to charge a 14.4V battery at 2 amps. A 24V regulated supply was used to as a power source and R7 was changed from 75KΩ to 100KΩ to control the current to around 2A instead of 3A.

My electronics experience finished in the early 60’s so I am now struggling with some of the modern devices – Op amps in particular, but at this stage I had better show you a schematic of the circuit as I have modified it and do my best to explain what seems to be going wrong.


Some modifications were necessary as this was designed around charging a 6.2V battery at a constant 3A current. My requirements were to charge a 14.4V battery at 2 amps. A 24V regulated supply was used to as a power source and R7 was changed from 75KΩ to 100KΩ to control the current to around 2A instead of 3A.

My electronics experience finished in the early 60’s so I am now struggling with some of the modern devices – Op amps in particular, but at this stage I had better show you a schematic of the circuit as I have modified it and do my best to explain what seems to be going wrong.


NiCd charger schematic.pdf

The power supply board works fine and the LM2576 is ON when pin 5 is grounded and turned OFF when it is triggered by a high voltage from a source other than it’s own input.

It is essential that the power is turned off when, but not before, the battery is fully charged and this is achieved by detecting a 10degC rise in battery temperature. Temperature is measured both ambient and within the core of the battery by LM35 devices which output 10mV per DegC rise. The ambient LM35 output is raised by 100mV to represent a 10degC rise and when this matches the output from the LM35 in the battery core the ‘C’ channel of the quad LMC660 outputs high and turns off the power source.

Data sheets showed that the max. input voltage for the 78L05 was 5.5volts so I Changed this for an LM317Adj configured to provide 6V output. This then involved altering the Texas resistor chain R2/R3 so that 100mV was available at the junction of these two resistors. That’s when I started running into problems.

Ambient temperature was 23.4degC but rising fairly rapidly as the morning went on.

As I see it the ‘B’ channel of my op amp acts as a unity gain buffer but if I check the voltage at pin 5 with a 10MΩ input impedance multimeter I had expected to see 334mV (100mV + 234mV due to ambient temperature) only to find there was 162mV here and the action of probing with the meter caused ‘C’ channel output to go high, turn on the LED and switch off the power.

‘C’ channel remains latched on and does not reset after all power is switched off and then switched on again, even after 10 minutes or so. Only if you take time for a long cup of coffee and then come back to things later has the ‘C’ channel finally latched low.

Output of Channel ‘C’ went high when the battery sensor reached about 40degC and pin10 was at 583mV although pin9 was at 414mV I don’t understand what is happening here; surely ‘C’ would only change state when pins 9 and 10 were at the same voltage and why am I seeing 583mV at pin 10 when it should only be 400mV if the battery sensor was at 40degC

My other problem is the length of time it takes for ‘C’ to reset. Has this possibly something to do with C4 and C5?
 

Attachments

danadak

Joined Mar 10, 2018
4,057
U5A Gain = 2.

upload_2018-5-7_7-40-21.png

U5C is acting as a comparator with Hysteresis, here is a calculator
to figure out its trip points -

http://sim.okawa-denshi.jp/en/compkeisan.htm

As I see it the ‘B’ channel of my op amp acts as a unity gain buffer but if I check the voltage at pin 5 with a 10MΩ input impedance multimeter I had expected to see 334mV (100mV + 234mV due to ambient temperature) only to find there was 162mV here and the action of probing with the meter caused ‘C’ channel output to go high, turn on the LED and switch off the power.
Is there a floating/unconnected pin or connection or component here ? Seems to be an indication
this is a possibility.

Regards, Dana.
 
Last edited:

Thread Starter

Happy Harry

Joined Apr 18, 2018
21
Thanks Dana,
I need to study a little more about hysteresis but meanwhile as regards channel 'B' I'll check all connections here and possibly replace the op amp just in case there is an internal O.C.
 

Thread Starter

Happy Harry

Joined Apr 18, 2018
21
After a visual check on wiring and joints I swapped the LMC660 for an LM324 and found things to be working to a certain extent.

The output at both LM35 sensors was in line with the temperature and the voltage at the R5/R6 junction was still 102mV.

Disregarding the voltage at pin 5 of the op amp (because probing with a meter here just caused the op amp channel 'C' to trigger) I find 320mV at pin 7. This seems about correct since allowing for the 100mV shift and if channel 'A' is producing unity gain then the 220mV difference would correspond to the sensor detecting an ambient temperature of 22deg.C

Now, getting on to channel 'C' and increasing the temperature of the battery sensor gradually, the output pin 8 went high when pin 10 reached 333mV. The problem was that the temperature of this sensor was now at 42deg.C and that was a rise of 20deg.C when I am needing to shut down after a rise of 10deg.C. I'm not quite sure how R12 and R13 affect things but could it be that Texas Instruments designed this to be run from a 5V supply whereas I have now changed this to 6V but kept the values of R12 and R13 the same. Should I be thinking about altering the values of R12 and R13 or possibly any other resistive components?

The circuit now resets itself immediately the power supply is switched off and then back on again. This was not happening with the LM660 op amp when it would still remain in the 'off' state even after having been switched off for several minutes before switching on again. I think that the way things are now it will switch on again as soon as the temperature of the battery sensor falls below the threshold level which could be a problem if the charger is left unattended for any length of time after the charging is complete. I need to be certain that 'C' channel will remain latched high until the entire circuit is switched off. How do I do that?
 

crutschow

Joined Mar 14, 2008
38,503
Below is the LTspice simulation of your circuit.
The ambient temperature V(4) is set at 220mV.
The V(5) output goes high when the battery temperature V(6) hits 336.8mv and does not go back low until V(6) hits 99.1mV.
If you want to insure it doesn't go low after tripping, you could reduce the value of R11 (R14 in your schematic) to 500kΩ or so.

(Why did you adjust the LM317 to output 6v instead of the 5V in the original design?)

upload_2018-5-8_19-58-6.png
 

Thread Starter

Happy Harry

Joined Apr 18, 2018
21
Thanks crutschow. I don't have LTSpice and only an entry level Hantek scope but it looks as though you have some invaluable tools at hand.
Your simulation seems to be in good agreement with my circuit's performance but I need to get the trip level down to 100mV above the ambient output - in this case 320mV rather than 336mV. I'm not quite sure how to do that.
Trying to take voltage readings with a 10MΩ impedance meter whilst the temperature is constantly rising is not easy but when I measured 333mV at the op amp I also measured 347mV directly at the output lead of the battery sensor. Perhaps there was some thermal delay here or is a difference between V(6) and the non inverting input of U2 to be expected? I will repeat the observations but take the rate of temperature rise a lot slower.
Thanks for your advice about R11, I will swap it for a 470KΩ and see what happens.
I started this project about a year ago and now my short term memory performance has extended into long term, so I'm not quite sure why I abandoned the 5V in favour of jacking it up to 6V. It may be that I thought the LM35's would have been operating closer to their minimum than I would have liked for reliability.
I see in your schematic that you are using an LMC6484C. I damaged my one and only LMC660 and without a replacement I used an LM324 as I had bought some very cheap to have a play around with. Should the choice of op amp make any difference for a circuit of this sort?
 

crutschow

Joined Mar 14, 2008
38,503
I need to get the trip level down to 100mV above the ambient output - in this case 320mV rather than 336mV.
The difference it trip points is due to R11 (R14) acting as a voltage divider with R12 (R10) so I changed R5 and R5 to reduce the reference voltage slightly from the LM317 to give a 320mV trip point.

upload_2018-5-9_10-0-56.png

I don't have LTSpice
You might try it.
It's a free download from Linear Technology/Analog Devices.
Should the choice of op amp make any difference for a circuit of this sort?
With 1meg feedback resistors you want an opamp with low input bias current, such as a CMOS type.
Lowering the resistors to 100kΩ would work better with an LM324, which has a relatively high input bias current.
 

Attachments

Thread Starter

Happy Harry

Joined Apr 18, 2018
21
Thanks for information about R11 and R12. I suppose that explains why I have been getting about 13mV less at the non inverting input than I am seeing at v(6)
I tried making measurements again this afternoon but this time increasing the temperature rise of the battery sensor very slowly. I think there has been an appreciable lag in temperature seen by the sensor over that shown on my thermometer. It is still tripping higher than I want. With ambient at 17.1deg.C it trips at 28.7deg.C. That's a temperature difference 1.6deg.C. higher than advised.
I came to the same conclusion as you, that I needed to reduce the reference voltage from the LM317 slightly. Somehow, but I'm not sure how, I worked out that I needed to reduce it by 15mV to 85mV and that I would need to make the combined R4/R5 6.754KΩ. I'm sure that I can achieve my 10deg.C. temperature difference by playing around with these resistors tomorrow.
I haven't got round to changing the 1meg feedback resistor yet. That's another job for tomorrow but as it is at the moment with almost no hysteresis it makes it easier to identify the trip point with greater accuracy as I can hover up and down a bit and watch the LED go off and on.
I had no idea that LTSpice was free. I'll have a go at downloading that too and probably spend a little time getting to grips with it.
Thinking again about my choice of an LM317 running at 6V instead of a 78L05 I think it was prompted by availability of resistors for the voltage divider. I was fresh out of 9.1K's and I still am!
 

Thread Starter

Happy Harry

Joined Apr 18, 2018
21
Success at last.
I reduced the voltage at R3/R4 junction to 85mV and was getting just a little over a 10deg.C rise so I settled for that and changed R11 from my original 1Meg to 470K. That upset the apple cart because my temperature rise was now 12.6deg.C. which was unacceptable. I then had to reduce the R3/R4 voltage yet further and ended up at 70mV which was achieved by keeping R4 at it's original 4.7K and changing R5 to 820Ω.

The final performance is:
Initial switch on and the circuit is latched;
Switch off and on again and the latch is reset;
Allow temperature to rise and circuit latches for a 9.4deg.C. rise
On cooling the circuit now remains latched for 3 hours (so far) but I will leave it overnight to see if it still remains latched.

Next I will provide a dual charging current. One at the fast charge rate of 2A and then a switch to select a charge current of 1A as it shortens the life of these batteries if charged too fast when they are new, or when the temperature is low.
After that I shall have to get busy with a saw and drill etc. and house it all in a convenient box and then it's on to my next project.
Thank you all for your invaluable help.
 

crutschow

Joined Mar 14, 2008
38,503
It's probably a moot point now, but the interaction between the set point and the value of R14 could be eliminated by adding a diode in series with R14 (anode towards U2 output).
 

Thread Starter

Happy Harry

Joined Apr 18, 2018
21
A very valid point Crutschow. The proper way to tackle the problem rather than my trial and error compromise approach.
I really need to rebuild this circuit board because I constructed it on a small 50x70 matrix board, the underside of which now looks like a plateful of spaghetti so I shall probably upgrade the circuit by providing the choice of two charging currents and a count up timer display to see how long the charging process lasted. That should give a good indication if the battery is loosing capacity by observing the time it takes to complete a charge at a constant current. I'm scouring Ebay at the moment to see if I can find such a timer that I can stop and reset using logic signals but no luck so far.
I'm working on my LTSpice learning curve which I am not finding as easy as it would have been fifty years ago. Tutorial videos are presented by people who work so quickly that I have to keep stopping and rewinding to see what they're doing. LTSpice works far too fast for me too; when I run a simulation things happen faster than I can move my eyes across my screen so that makes life difficult, particularly if it decides to put up a dark blue trace on a black screen. Oh well! Don't I go on.
 

BobaMosfet

Joined Jul 1, 2009
2,211
I would recommend playing with the OpAmp by itself first, just seeing what the output does, based on inverting input and non-inverting input, and then if it supports it, differential input. Wrap your mind around how an OpAmp behaves first, before trying to build a circuit with it. There are a lot of good tutorials and channels on Youtube.
 
Top