Im thinking of using a opa2335( bsically 2 335s) as a 25x non inverting amp and a comparator would this be a bad idea? One opamp circuit will feed the other and that one will flag if its above or below a threshold voltage, it wont be a rapidly chnging signal for the most part, reaction time is slightly important but within a ms would be plenty fine some research says it can be done for a poor performance comparator but it would save me some space and ease of soldering im just wondering how poor performing
would this be a bad idea?
No it is a fine idea. The only point is that a specialised comparator has a bit of hysteresis built in, if you want this with an op amp you will have to put the resistors in yourself. Also sometimes they have a better slew rate but generally it is not a concern.
Could be a slow part. Swing from 0 to 4V in ~4uS, ~64 clock cycles. Can you live with that?
I've used standard op-amps as comparators in trigger circuits for high speed flash photography. The response time, even with jellybean op-amps was far faster (at worst a couple of uS) than what you need (ms)
Cool that's good then, wikipedia says in the dual package using one as a comprator can cause strange effects, but doesn't say what or under which circumstances any truth in that? With a gain of 25x its not the most sensitive thing but still something I want to retain accurate
the dual package using one as a comprator can cause strange effects,
The thing is you can't decouple the supply between the two amplifiers so you might get a bit of cross talk especially if the one amplifying has high gain. However, that is not what you asked at first.
Of course you can use an op-amp as a comparator. You can use a screwdriver for a cold chisel too. But dedicated comparator chips are inexpensive and are designed specifically for the job.
Hmm, like I said tho for my particular situation with both opamps being in the same package, with the 25x gain one measuring a prettty slow signal, and the other receiving the output , are there any obvious problems that may arise? The accuracy of the 25x gain opamp is important while the other is just tto trigger an overcurrent condition which will result in the system killing power to that section of the circuit, so once its triggered the original signal will drop to 0 until its manually turned back on, so its not like it will be flipflopping often during the other opamps operation tho I don't know if that matters what would the general consensus be for under this circumstance?
I would suspect it would work fine. Of course I would also probably build a prototype to see how the actual circuit functioned anyway…
As I said I have used an opamp as a comparator in a dual configuration, also btw, in a case where the other opamp was being used to amplify the signal… As I recall the amplification was in the same ball park as well… And that was a jelly bean op amp (358?)… with a circuit that required a faster response rate than what you are asking for…
You will need to check the datasheet of the opamp carefully to see if it can tolerate a large voltage difference between the two inputs (most opamp circuits using negative feedback keep them at the same voltage). Some opamps are damaged by having the inputs at widely different voltages (this should be less likely to be an issue with low voltage opamps).
[hint if the datasheet shows an application circuit labelled "comparator" then its a good bet you can use it as a comparator!!]
Also you should choose one with rail-to-rail inputs so it can't go into lock-up when the inputs are driven right to the supplies. Rail-to-rail is also important to guarantee the output will reliably be logic high or logic low. Of course it goes without saying that the opamp is running from 5V single supply...
Comparators usually have open-drain or open-collector outputs that can deliver nice clean logic signals, and have low power consumption when that output is high. They are optimized for rapid response (100ns rather than many microseconds) but are also more prone to oscillation unless on a ground-plane. A comparator would usually be totally unstable if you tried to use it as an opamp!