Wednesday, July 27, 2011

Success! Let the counting begin

I have been struggling with a particular issue for several weeks now. Even though I get a seemingly perfect TTL (0-5V) pulse every time the 60Hz AC signal inverts, the IC counters all put out erratic signals which are not a simple divisor of the 60Hz signal. I thought originally that I had fried the IC's, but I tried several types of counters and ended up with the same result. I tried putting in capacitors almost everywhere, hoping that I could solve this by smoothing out the signal. I even set it up so an transistor made a more aesthetically-pleasing square wave (I decided to leave the transistor in).

After being infuriated for ages about this issue, I finally stumbled upon a forum post which noted that the rise of the signal from the 60Hz signal may not happen as smoothly as expected. In other words, small fluctuations could cause the IC to get tripped up and start pulsing faster than it should. Apparently, I was lucky the first time when I set up the initial timing circuit.

The solution: a Schmitt trigger.


It is a positive feedback that pulls the signal up once you hit a particular threshold. The type I chose was an "Inverted Schmitt trigger". These are often used to debounce a switch. I happened to have a quad op-amp IC laying around from another project. After hooking it up with three resistors, I got a perfect 10Hz output from the counter/divider I thought I had fried!



All soldered in:


Here is the new schematic:

Moving onwards!

share on: facebook

No comments:

Post a Comment