I'm experimenting with dimming mains lights using a H11AA1 chip to detect the zero crossing of the Mains input power. I'm having some difficulty with the output from the H11AA1 when connected to the micro controller, which is going to be doing the intelligent switching. I'll attach two images, one is of the output from the H11AA1 opto-coupler zero crossing detection chip, WITHOUT the micro controller soldered onto the PCB. In this image the spikes are very responsive, for what of a better word. So without the uC it all looks great. The problem is when I move the H11AA1 chip from the PCB without a UC to a board with the uC soldered onto the PCB it all goes a bit pear shaped. The spikes are no longer instantaneous but rather ramp up, relatively slowly and die away equally slowly.
All that might not be a problem, but I think if nothing else I'm not sure the zero crossing will be detected in the correct place.
On top of that I'm using an interrupt on change pin in the micro controller and I'm not getting a nice clean 100Hz of zero crossing.
I have a physical copy of 'The Art of Electronics', second edition, but not at present. I should maybe get the 3rd edition on my Kindle so I always have it handy. Is this just a case of putting a logic gate between the H11AA1 chip and the uC to buffer the signal and remove stray capacitance, if that is the problem.
Thanks in advance for any advice on this one...