Quote:
Originally Posted by Mike Dabrowski 2000
...
...
The LM324 like all op amps can operate as a comparator, but you should also look into true comparator chips like this one.
LM311 - Voltage Comparator
|
That's something for much later on, I think! The LM324 will keep me busy for quite a while.....I like the solar tracker you built with it.
As you know, I'm a bloody beginner with this and the more a single device does, the more it will confuse me!
...
Quote:
You must have noticed that as you increase the hysteresis the difference between the set-point and the actual turn off point got bigger. this makes it difficult to simply set a value and have the turnoff happen at that value, but if you adjust the setpoint dynamically what you have will work fine. 500K is still a reasonable number, but the real issue is that you must have a lot of HF noise in your setup.
A look at your schematic shows why you are still having issues.
1. The capacitor across the setpoint pots should be cap - to negative 6V, cap + to pot wiper
|
Aha! I might try that.
Quote:
|
2. The cap across the PTC strip wants to be cap- to negative 6v, cap + to junction of r5 and r4.
|
I had it connected that way, but made a mistake in the diagram. That's the one that caused the smooth dimmer function.
Quote:
|
3. The lm324 is rated for 25ma output current. pin14 is driving an led and a relay, and may be exceeding its max current which will make the circuit unstable. I much better way to drive the relay is to drive it with a transistor that the op amp turns on, so the relay current is handled by the transistor.
|
Are the specs for current per output or the sum of all 4 outputs?
The relay powered by pin 14 is a solid state relay with very little current draw. Additionally, it has a 20KOhm resistor in series and cannot draw more than a few uA.
But indeed, I did not pay enough attention to the current ratings. I figured that the 900mW rating means I'm staying within specs, but of course there might be a maximum current rating when it is not used at 30V. Another beginners error! Need to read that book!
The red LED has a forward voltage drop of 2.2V.
6V - 2.2V = 3.8V
3.8V/120 Ohm = 32mA
The yellow LED has the same specs.
That means the current draw is 64mA when both the yellow and the red LED are on. The maximum current rating from the spec sheet seems to be -60mA (at 15V) and short circuit current is +/-60mA at +5V / -5V . I might read these specs wrongly, of course!
But anyway, it's too close to the maximum rating and I better put more resistance in the path of these two LED's!
Increasing the series resistor on each LED to 240 Ohm results in:
(3.8V/240 Ohm) x 2 = 32mA combined; right on the "typical" specification.
I hope the LED's will still be bright enough, because I use them for illumination of the panel meters and would like to be able to read them through tinted car windows in daylight. A locked car is often the safest place to charge these batteries. But the green LED will do this without causing a load on the LM324, anyway.
Quote:
adding more hysteresis of course will let it switch cleanly even with the noise, so if it is doing the job leave it as is.
The accuracy of switching will be effected by the actual 6v power supply voltage, so for a more accurate system, one must regulate the voltage feeding both the PTC strip voltage divider and the setpoint pots.
keep playing you will understand it all eventually.
|
I really like the effect that triggering the "Too Hot" state will not allow charging to re-commence until the battery has cooled below the warning level. So I'll keep the hysteresis high for now.
Thanks again for all your help and patience with this!