I'm trying to build a simple schmitt-trigger to convert an audio input signal to an approximate square wave of the same frequency. The output of that will then be fed to a microcontroller to detect the pitch of the input signal.
The schematic of the schmitt-trigger part can be seen here.
It works nicely in a SPICE simulation.
However, when built on a breadboard, the circuit doesn't work as expected. The scope shows the input signal in green, op-amp output in red.
I built it with the resistor and capacitor values as shown, around a MC1458P Op-Amp. Supply voltage is 5V (power supply is a wall-wart, not a lab supply; however a PIC18F452 and LCD character display run without glitches on it). Actual input is from a rather hot guitar pick-up, so actual AC voltage on input should be similar to the simulation.
I'm a bit stumped, as I don't quite see what could be the problem. I've tried both amps of the same IC, no difference. What would be the best way to tackle this problem?