LM324 Pinout Compatible Comparator  - Page 1
Forum section: electronics / beginners

author: cowboy303
author_rank: Regular Contributor
timestamp: January 11, 2017, 02:17:48 am
content: Yeah, it's not hard to figure out what happened. Long story short, I designed a PCB a while back that takes a square wave from a RPM sensor and sends it to a micro-controller for it to read the RPM. I used a LM324 when it should have been a Comparator.So the question, is there any budget friendly Comparators out there that use the same pinout as a LM324? I found the MAX908, but that's not really budget freindly as I would need a couple of them. I'm trying to avoid getting new boards made until I'm a little further on in R&D and I'm confident that there are no other quirks to work out.All I need is it to take a 0-8V square wave and turn it into a 0-5V square wave, the frequency varies from 26-100Hz.Thanks Y'all!

author: danadak
author_rank: Super Contributor
timestamp: January 11, 2017, 02:36:51 am
content: If you can't find one you can always do an intermediate carrier boardto do the pin translations.Regards, Dana.

author: JoeN
author_rank: Frequent Contributor
timestamp: January 11, 2017, 03:18:25 am
content: And then sell them on eBay and make a buck or two!

author: eblc1388
author_rank: Frequent Contributor
timestamp: January 11, 2017, 09:42:34 am
content: LM324 output can survive shorted to ground continuously.Just place a 5.1V zener diode fron its output to ground to get 0~5V output for these few boards. You can modify the PCB for proper LM339 pinout later on.

author: wraper
author_rank: Unknown
timestamp: January 11, 2017, 10:39:13 am
content: I guess, you will need to bodge pull-up resistors too if using comparator. As these seem to be just prototype boards, you could instead cut the traces, put resistor in series and add 4.7V zener to GND. And then redesign the final board for LM339 as suggested above.

author: ebclr
author_rank: Super Contributor
timestamp: January 11, 2017, 10:53:28 am
content: May be this solve your problemhttp://www.onsemi.com/pub_link/Collateral/DTC123E-D.PDF

author: danadak
author_rank: Super Contributor
timestamp: January 11, 2017, 12:50:27 pm
content: The zener on output excellent idea, but observe the caveats in datasheet -Short circuits from the output to V can cause excessive heating and eventual destruction.When considering short circuits to ground, the maximum output current is approximately40 mA independent of the magnitude of V. At values of supply voltage in excess of 15 V,continuous short-circuits can exceed the power dissipation ratings and cause eventualdestruction. Destructive dissipation can result from simultaneous shorts on all amplifiers.And the fact you can only do that to one amp in the package. Note that will effectDC performance in the other amps, eg. the added Pdiss, rail current effects.Regards, Dana.

author: cowboy303
author_rank: Regular Contributor
timestamp: January 11, 2017, 03:38:51 pm
content: Thank you guys for your replies.I probably should have been a little more detailed with my application.The LM324 has Vcc of 5V, the signal it gets from the sensor goes from 0-8V under it's normal operating range, and if it goes beyond either limit for unseen reasons, I want the LM324 to take in instead of the micro controller. This design works well. However the alternator seems to be transmitting AC noise into the lines which messes it up the RPM reading when the truck current consumption changes (I've tried two alternators).My original prototype didn't have this issue, and was using a comparator. I used this quad op-amp to avoid needing multiple chips for space reasons.I know I can rig something to work, but if/when I do, I'll be sending one to a couple buddies, and I want it to be as bullet proof as possible, so they don't accidentally fry something.I'm just about to the point of just making a new PCB, as there are a couple other things I should change while I'm at it.I appreciate the ideas guys. I'm going to omit some features on the new board. There was one buddy that wanted the extra features, hence the need for an Op-amp, well he can get an old board with a LM324 to LM319 adapter. lolThanks guys!

author: wraper
author_rank: Unknown
timestamp: January 11, 2017, 03:48:03 pm
content: Then your issue is not the opamp itself but a lack of positive feedback to add some hysteresis. Or some other flaw of your circuit. I hope you don't push 8V directly into the opamp.

author: cowboy303
author_rank: Regular Contributor
timestamp: January 11, 2017, 05:58:50 pm
content: Quote from: wraper on January 11, 2017, 03:48:03 pmThank you for bringing this up. I took a glance at the datasheet and sure enough, the LM324 is only rated for an input voltage up to Vcc. The LM339 appears to be rated for an input voltage up to 36V regardless of Vcc. Is that correct?My setup is only a 0-5V signal, but some of my buddies setups are 0-8V, so I want to make sure it will work for them.Currently all I have for filtering is a little 100nf cap at the (+) input of the Op-amp, and the (-) input is held at 2.5V.I could try splicing a resistor in series with the RPM signal input to effectivly create an RC filter, you think that would work? I know it wont fix my 8V input problem, but it will get me a little further on in the R&D process. I don't want to cause inaccuracy in the reading as I'm forced to use only 2 pulses to calculate the RPM off of, and it has to be as accurate as possible for smooth operation. For anyone curious, this is a high idle controller, it reads the RPM from the stock RPM sensor, and then uses the cruise control solenoid to apply throttle.Thanks again.

author: danadak
author_rank: Super Contributor
timestamp: January 12, 2017, 01:45:11 am
content: You can use an R and a Zener to clamp inputs, LM324 has been around for along time, and not all LM324 are same internally. There are bipolar versions andCMOS versions for example. There was a problem years ago where excessive railcurrent could cause either phase reversal on output or latchup or both. This causeda lot of agita for designers because they had to incorporate power supply sequencingin designs to insure no part ever had its pins driven outside their respective allowablerange. So plan on designing to the specs, keeps you happy with outcome.Regards, Dana.

author: wraper
author_rank: Unknown
timestamp: January 12, 2017, 01:59:10 am
content: LM339 have similar input stage to LM324, it won't work properly close to positive power rail and above it. And shall no be exposed to voltage above positive power rail in any case for both LM324 and LM339. Also you should not expose bare input to the outside. And your circuit certainly needs hysteresis, otherwise it may generate multiple pulses when input voltage is close to the 2.5V threshold.Quote

author: wraper
author_rank: Unknown
timestamp: January 12, 2017, 02:04:23 am
content: Quote from: danadak on January 12, 2017, 01:45:11 amThere are no CMOS or whatever non bipolar LM324. They are notLM324 but LMV, LPV or whatever. They are completely different ICs with different supply voltage range and specs.

author: cowboy303
author_rank: Regular Contributor
timestamp: January 12, 2017, 03:51:52 am
content: Wow, it has become apparent I need to do more reading and less... other stuff.OK, so I guess ditch the Op-amp/comparator stuff.I read that the atmega328 pins are good from Vcc+ 0.5V to GND -0.5V. After that the internal clamping diodes take over but can only handle 1ma. So I guess I'll just use a series resistor and a zener, would you suggest 5.1V or 4.7V one? As far as protecting against sub-zero voltages, because of the Zeners pretty crappy Vf of 1.2V, I guess I'll just put a reversed bias schottky diode in to protect from that.Also, I tried putting a series resistor inline with my RPM signal wire, I tried a 4k7 but that was to much, so I tried a 1k and it worked perfectly, no more issues, but I'll definitely be making a new board with the required changes.Thanks Again!EDIT: again with the more reading thing. I read over your previous reply's and noted the original post. 4.7V zener it is!

author: danadak
author_rank: Super Contributor
timestamp: January 12, 2017, 11:50:49 am
content: "There are no CMOS or whatever non bipolar LM324. They are not LM324 but LMV, LPV or whatever. They are completely different ICs with different supply voltage range and specs."Agree. A CMOS 324 is not same as a bipolar 324, that was the point. And yes, by necessity, they hadto carry a different part number. Who knows, maybe the vendors of CMOS version could not carrythe name "LM324" due to licensing, trademark....And of course how do we know what is on the die, eg. a hybrid solution, unless we are privy to the "secrets"vault at the vendor. The semi industry has never been accused of full disclosure. From 40 years experience init.Regards, Dana.

author: wraper
author_rank: Unknown
timestamp: January 12, 2017, 02:48:54 pm
content: Quote from: danadak on January 12, 2017, 11:50:49 amThey do not carry LM324 name because that would be plain stupid as they are very different ICs. For example, LMV324 and LPV324, I mentioned, are made by TI which makes LM324 too. Naming ICs which has max supply voltage is only 5.5V as LM324 would be the same as intended sabotage.

author: danadak
author_rank: Super Contributor
timestamp: January 12, 2017, 10:06:58 pm
content: LM324C, LM324B, all possibilities. I cannot comment on a real timedecision on how to market. I can see your point, and I can see keepingbase name the same. Neither of which would be stupid. Each with itsown limitations and benefits.Regards, Dana.

author: Zero999
author_rank: Super Contributor
timestamp: January 12, 2017, 10:56:58 pm
content: Quote from: cowboy303 on January 11, 2017, 02:17:48 amThe MAX908 sounds like a bargain, compared to the alternatives, such as adaptor boards and re-spinning the PCB. The trouble is, it's only rated to 5V and you're talking about feeding it an 8V squarewave.

author: David Hess
author_rank: Super Contributor
timestamp: January 14, 2017, 06:48:56 am
content: Quote from: danadak on January 12, 2017, 10:06:58 pmIt would be stupid and I would chastise any company doing this for the reason wraper identifies.Rough industry practice is to use the prefix to identify the process, family, and manufacturer and the suffix to identify the grade, temperature range, and package. Sometimes the process is identified in the middle but there are all kinds of variations.But the LM324 already has a common A grade and some manufacturers use a C suffice for the commercial version even though 324 should be commercial anyway versus the 224 and 124.

author: danadak
author_rank: Super Contributor
timestamp: January 14, 2017, 11:33:02 am
content: His point about LV as dis-qualifier....We, NSC, National Semiconductor, used todo voltage grading and part number ID off base part numbers all day long.We even processed parts differently within a family, customer driven. And markedthem accordingly, some with completely different part numbers, others with acommon base. Depended on phase of moonAgain I will not second guess a marketing / product production decision process,those decisions made, generally, by pretty intelligent people in my experience.Regards, Dana.

author: wraper
author_rank: Unknown
timestamp: January 14, 2017, 12:29:20 pm
content: Voltage grading of the same part and completely different part inside are very different things.BTW LM2902 and LM324, which are the same part basically, have very close max supply voltage unlike those ICs with 6 times less, still have different part numbers.

author: danadak
author_rank: Super Contributor
timestamp: January 14, 2017, 01:18:48 pm
content: Yes, but -We had a hybrid line that substituted completely different parts withinthe package, still carried same P/N. We did the same in a PMOS linewith completely different die designs. Again, having been in these situations,as a production and test EE, I am not going to second guess what the rightdecision is for the situation at hand. On the other hand we had completely differentmarkings for the exact same die in a package. The decisions were not complicated,nor were they trivial. Some included customer input, some not. Some were endproduct driven, some not......Maybe its time for my experiences to step away from this discussion as I cannot categoricallystate whats right and wrong, having been there done that.Thanks all, bye.

author: wraper
author_rank: Unknown
timestamp: January 14, 2017, 01:39:37 pm
content: Quote from: danadak on January 14, 2017, 01:18:48 pmBut those were drop in replacements. Basically a new revision of the part. Many parts are like this, for example 2N3055 which had very different internals over the years. Those xxx324 are not drop-in replacements at all.

author: David Hess
author_rank: Super Contributor
timestamp: January 14, 2017, 05:41:14 pm
content: Quote from: danadak on January 14, 2017, 01:18:48 pmIt is one thing so change the part's design while meeting all of the previous specifications but something else to make a major change in specifications while keeping the same part number. Sometimes even this is not enough if customers are relying on some unspecified characteristic or even bug.Didn't someone make an LM324 where saturating one of the amplifiers caused the others to misbehave because of shared bias circuits? If it was not the LM324, then it was another quad operational amplifier.I seem to remember someone made a 741 clone with PNP inputs; maybe it was a single version of the quad RC4136. It had all the same specifications but of course the input bias currents were reversed.Quote from: wraper on January 14, 2017, 01:39:37 pmThe 2N3055 is old enough that the original process it was produced on was discontinued (twice!) so later parts really are different and this sometimes causes problems. An early 0.3MHz Ft mesa process 2N3055 replaced with a modern 2.5Mhz 2N3055 can produce big surprises. Even the old but still discontinued 0.8MHz 2N3055 can cause problems as I suspect Tektronix found out; one of their oscilloscopes includes two *different* 2N3055 parts, 0.3MHz and 0.8MHz, divided into 3 grades to produce 3 different house numbers and they had at least one other house number making 4 different 2N3055s. A modern 0.2MHz On Semiconductor 2N3772 is a closer match to the original 0.3MHz part.The 2N3055 part number also became a dumping ground for other power transistors that would not meet their specifications.