Hi everyone,I made a circuit in which in which i gave the output of opamp comparator to pulse input of counter ic.but i beleive that because of some spikes generated by opamp while transition from one stage to another,i am not getting proper count.Is there a way to remove spikes using some sort of resistors,capacitors,diodes etc.Thanks in advance

Hi,
Seems like i was having problems with my pc,thats why i couldn't post the file earlier.Anyways,the circuit is infrared counter
I posted the word document with necessary details.
Hope u can help
Thanks

It is preferable to post schematics as .png images, as it does not require loading other software; browsers can view the .png images directly.

You can create the image by performing a screen print, starting MSPaint, and then pasting the image into it, and saving it as a .png.

It's also preferable to crop the image, unless you have a simulation also - those generally need the full-size image.

You don't seem to have any hysteresis in your circuit. This will cause the output of the opamp-as-a-comparator to trigger many times quickly when the inverting (-) and noninverting (+) inputs are nearly the same. You can fix that by using a feedback resistor.

I have modified your basic circuit diagram; added a signal generator to provide a slowly transitioning input pulse, added a potentiometer to adjust the trip threshold level, and added a feedback resistor to provide hysteresis.

Note also that I have shown the 2nd half of the opamp with it's output connected to the noninverting input, and the inverting input tied to ground. This is very important, as otherwise the opamp can oscillate at high frequency. The inverting input tied to the output sets the gain for that opamp to 1, and tying the noninverting input causes the output to "follow" the input ground signal.

Hi sgtwoogie,is it necessary to connecct the unused opamp as u have shown,or will it affect the other opamp.It may sound stupid but for a beginner like me,it is necessary to learn the basics of making a circuit.Thanks</p>