Author Topic: LM324 Pinout Compatible Comparator  (Read 7209 times)

0 Members and 1 Guest are viewing this topic.

Offline cowboy303Topic starter

  • Regular Contributor
  • *
  • Posts: 82
  • Country: us
LM324 Pinout Compatible Comparator
« on: January 11, 2017, 02:17:48 am »
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!
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: LM324 Pinout Compatible Comparator
« Reply #1 on: January 11, 2017, 02:36:51 am »
If you can't find one you can always do an intermediate carrier board
to do the pin translations.


Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline JoeN

  • Frequent Contributor
  • **
  • Posts: 991
  • Country: us
  • We Buy Trannies By The Truckload
Re: LM324 Pinout Compatible Comparator
« Reply #2 on: January 11, 2017, 03:18:25 am »
And then sell them on eBay and make a buck or two!   :-+
Have You Been Triggered Today?
 

Offline eblc1388

  • Frequent Contributor
  • **
  • Posts: 394
  • Country: gb
Re: LM324 Pinout Compatible Comparator
« Reply #3 on: January 11, 2017, 09:42:34 am »
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.
 

Online wraper

  • Supporter
  • ****
  • Posts: 16833
  • Country: lv
Re: LM324 Pinout Compatible Comparator
« Reply #4 on: January 11, 2017, 10:39:13 am »
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.
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: LM324 Pinout Compatible Comparator
« Reply #5 on: January 11, 2017, 10:53:28 am »
« Last Edit: January 11, 2017, 11:08:20 am by ebclr »
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: LM324 Pinout Compatible Comparator
« Reply #6 on: January 11, 2017, 12:50:27 pm »
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 approximately
40 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 eventual
destruction. 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 effect
DC performance in the other amps, eg. the added Pdiss, rail current effects.

Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline cowboy303Topic starter

  • Regular Contributor
  • *
  • Posts: 82
  • Country: us
Re: LM324 Pinout Compatible Comparator
« Reply #7 on: January 11, 2017, 03:38:51 pm »
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. lol

Thanks guys!
 

Online wraper

  • Supporter
  • ****
  • Posts: 16833
  • Country: lv
Re: LM324 Pinout Compatible Comparator
« Reply #8 on: January 11, 2017, 03:48:03 pm »
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.
« Last Edit: January 11, 2017, 03:49:59 pm by wraper »
 

Offline cowboy303Topic starter

  • Regular Contributor
  • *
  • Posts: 82
  • Country: us
Re: LM324 Pinout Compatible Comparator
« Reply #9 on: January 11, 2017, 05:58:50 pm »
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.

Thank 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.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: LM324 Pinout Compatible Comparator
« Reply #10 on: January 12, 2017, 01:45:11 am »
You can use an R and a Zener to clamp inputs, LM324 has been around for a
long time, and not all LM324 are same internally. There are bipolar versions and
CMOS versions for example. There was a problem years ago where excessive rail
current could cause either phase reversal on output or latchup or both. This caused
a lot of agita for designers because they had to incorporate power supply sequencing
in designs to insure no part ever had its pins driven outside their respective allowable
range. So plan on designing to the specs, keeps you happy with outcome.



Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Online wraper

  • Supporter
  • ****
  • Posts: 16833
  • Country: lv
Re: LM324 Pinout Compatible Comparator
« Reply #11 on: January 12, 2017, 01:59:10 am »
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
From LM339 datasheet:
Common-mode input-voltage range  VCC – 1.5V
 

Online wraper

  • Supporter
  • ****
  • Posts: 16833
  • Country: lv
Re: LM324 Pinout Compatible Comparator
« Reply #12 on: January 12, 2017, 02:04:23 am »
You can use an R and a Zener to clamp inputs, LM324 has been around for a
long time, and not all LM324 are same internally. There are bipolar versions and
CMOS versions for example.
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.
 

Offline cowboy303Topic starter

  • Regular Contributor
  • *
  • Posts: 82
  • Country: us
Re: LM324 Pinout Compatible Comparator
« Reply #13 on: January 12, 2017, 03:51:52 am »
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! 
« Last Edit: January 12, 2017, 04:00:10 am by cowboy303 »
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: LM324 Pinout Compatible Comparator
« Reply #14 on: January 12, 2017, 11:50:49 am »
"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 had
to carry a different part number. Who knows, maybe the vendors of CMOS version could not carry
the 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 in
it.


Regards, Dana.
« Last Edit: January 12, 2017, 11:52:30 am by danadak »
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Online wraper

  • Supporter
  • ****
  • Posts: 16833
  • Country: lv
Re: LM324 Pinout Compatible Comparator
« Reply #15 on: January 12, 2017, 02:48:54 pm »
Agree. A CMOS 324 is not same as a bipolar 324, that was the point. And yes, by necessity, they had
to carry a different part number. Who knows, maybe the vendors of CMOS version could not carry
the name "LM324" due to licensing, trademark....
They 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.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: LM324 Pinout Compatible Comparator
« Reply #16 on: January 12, 2017, 10:06:58 pm »
LM324C, LM324B, all possibilities. I cannot comment on a real time
decision on how to market. I can see your point, and I can see keeping
base name the same. Neither of which would be stupid. Each with its
own limitations and benefits.


Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19482
  • Country: gb
  • 0999
Re: LM324 Pinout Compatible Comparator
« Reply #17 on: January 12, 2017, 10:56:58 pm »
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!

The 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.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16600
  • Country: us
  • DavidH
Re: LM324 Pinout Compatible Comparator
« Reply #18 on: January 14, 2017, 06:48:56 am »
LM324C, LM324B, all possibilities. I cannot comment on a real time
decision on how to market. I can see your point, and I can see keeping
base name the same. Neither of which would be stupid. Each with its
own limitations and benefits.

It 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.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: LM324 Pinout Compatible Comparator
« Reply #19 on: January 14, 2017, 11:33:02 am »
His point about LV as dis-qualifier....We, NSC, National Semiconductor, used to
do voltage grading and part number ID off base part numbers all day long.
We even processed parts differently within a family, customer driven. And marked
them accordingly, some with completely different part numbers, others with a
common base. Depended on phase of moon  :)

Again I will not second guess a marketing / product production decision process,
those decisions made, generally, by pretty intelligent people in my experience.


Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Online wraper

  • Supporter
  • ****
  • Posts: 16833
  • Country: lv
Re: LM324 Pinout Compatible Comparator
« Reply #20 on: January 14, 2017, 12:29:20 pm »
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.
« Last Edit: January 14, 2017, 12:35:02 pm by wraper »
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: LM324 Pinout Compatible Comparator
« Reply #21 on: January 14, 2017, 01:18:48 pm »
Yes, but -

We had a hybrid line that substituted completely different parts within
the package, still carried same P/N. We did the same in a PMOS line
with 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 right
decision is for the situation at hand. On the other hand we had completely different
markings 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 end
product driven, some not......

Maybe its time for my experiences to step away from this discussion as I cannot categorically
state whats right and wrong, having been there done that.


Thanks all, bye.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Online wraper

  • Supporter
  • ****
  • Posts: 16833
  • Country: lv
Re: LM324 Pinout Compatible Comparator
« Reply #22 on: January 14, 2017, 01:39:37 pm »
Yes, but -

We had a hybrid line that substituted completely different parts within
the package, still carried same P/N. We did the same in a PMOS line
with completely different die designs.
But 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.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16600
  • Country: us
  • DavidH
Re: LM324 Pinout Compatible Comparator
« Reply #23 on: January 14, 2017, 05:41:14 pm »
We had a hybrid line that substituted completely different parts within
the package, still carried same P/N. We did the same in a PMOS line
with completely different die designs.

It 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.

But 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.

The 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf