Hi,
I'm not that knowledgeable in TTL but know enough to get myself in trouble. ;-) I built a very simply TTL circuit that is not behaving as it should IMHO.
I have one 54LS00J NAND chip, one 74HC161 hi-speed CMOS counter, and some phototransistors. I am simply trying to tie the phototransistor to the counters clock input. I am doing this the common way by placing a resistor (47K) from Vcc to collector and grounding the emitter and then using the phototransistors collector as the output, which goes to the counters clock input (pin 2). I understand 47K is not common, but it works best with my phototransistor since the phototransistor goes from over 2 mega ohms in darkness to several kilo ohms in light. So as a test, I simply move the phototransistors from light to dark, then back to light and so forth. It is a gentle transition and I see no noise. Of course it is not an instant transition either. The counters clock input looks fine as it goes from nearly zero to 5.22 volts. For some reason the counter won't respond. Below you'll see that I've tried adding various size capacitors to eliminate noise.
So then I use two of the four NAND gates to create a J/K flip-flop just to see if the counter is working. So now I have two phototransistors tied to a J/K flip-flop. Both phototransistors are in the dark and I move one of them into the light and then back into the dark then do the same to the other phototransistors. This makes the flip-flops R input go from H to L to H and then the S input goes from H to L to H. That causes the flip-flop to change. I tie either one of the flip-flops output to the counters clock and it works! So fine, I figure the counter just don't like my phototransistor. I have no idea why because the voltages look fine. I don't want the phototransistor to go to a flip-flop, that was just a test. So instead of feeding two phototransistors to a flip-flop, I feed one single phototransistor to one NAND gate and then feed the NAND gate output to the counters clock. So then I verified that the NAND gate is working fine; i.e., it's happy with the phototransistor, BUT the counter is not happy! So then I feed the NAND output to another NAND (on the same NAND chip) and then that NAND output to the counters clock input. Still doesn't work! Also I tried placing various size capacitors from the phototransistor's collector to ground just incase their was some noise, but it made no difference.
BTW, I am using a simple digital multimeter to measure the voltage. Here's where some weird voodoo stuff comes in. If I reset the counter by making the master reset (pin 1) go low then all four output bits of the counter goes low. Then if I move the phototransistor in light and back to dark the least significant bit goes high. After that point, regardless if I move the phototransistor in light and back to dark, etc. it will not change. Although, if I remove the multimeter and then move the phototransistor in light and back to dark and then put the multimeters clip lead back on counters least significant bit (pin 14) then it is low! If I remove the multimeter again and move the phototransistor back and forth in light / dark and put multimeter back on then nothing changes, but if I leave the multimeter on pin 14 and then move phototransistor back and forth in light / dark then the counter bit goes high. I can't understand how my multimeter is affecting the counter. I have no reason to believe there's anything wrong with my multimeter. Regardless, the counter will not work if the multimeter is connected or not.
I always thought a voltage was a voltage. The counters clock input (pin
2) goes from 0.11 to 4.11 volts coming from the NAND gate, but it does not work. Yet, when I make two NAND's into j/k flip-flop then the counter works even though the clock input voltages are not any difference as they still change from 0.11 to 4.11 volts. Why would the counter care? I refuse to believe there's any noise in my NAND output.I would appreciate any help or suggestions!
Thanks, Paul