0
\$\begingroup\$

I have connected the output (2Y) of the NAND gate to the clock pulse (CP0) input of the counter, but as soon as I send an input to the NAND gate the counter misbehaves; it does not count in sequence as it was expected to count.

I sent a CLK pulse from a function generator, and manually from a power supply: in both cases the counter worked perfectly.

I have tried connecting a resistor, diode, capacitor, and a Schmitt buffer between the NAND output and the clock of the counter, but it didn't work. I have removed the LED from the clock pulse.

What do I do?

  • Clock pulse - CP0
  • NAND output - 2Y
  • Counter - HEF4017BT
  • NAND gate - 74AHC00PW,112
\$\endgroup\$
4
  • 3
    \$\begingroup\$ What is pin 15 of the 4017 connected to? Where are your decoupling capacitors? What signals are you putting into pins 1 and 2 of the 74AHC00? What is connected to pins 8-13? Can you show us a photo of the setup? \$\endgroup\$ Commented Jan 29, 2022 at 7:07
  • \$\begingroup\$ pin 15 is connnected to monostable multivibrator output because i want to reset the counter after a particular time. Pin1 is connected to schmitt triggger buffer and pin2 is connected to LM393 comparator output. Pin 8-13 are connected to different logic inputs and outputs. I'll share the photo only after permission. Thanks for reply \$\endgroup\$ Commented Jan 29, 2022 at 7:59
  • \$\begingroup\$ if you connect the signal generator to the NAND input does it work? \$\endgroup\$ Commented Jan 29, 2022 at 11:48
  • \$\begingroup\$ "Pin1 is connected to schmitt trigger buffer and pin2 is connected to LM393 comparator " - Please show us the circuit around the buffer and LM393. \$\endgroup\$ Commented Jan 29, 2022 at 19:57

2 Answers 2

0
\$\begingroup\$

but as soon as I send an input to the NAND gate

This bit is critical. How do you send an input to the NAND gate?

If it is with switches, then switch bounce is your problem. A mechanical switch doesn't close cleanly, but can bounce many times before the contacts settle closed. You can sometimes get bounce on opening too. These multiple transitions, although too fast to see by eye when using the switch to control a lamp, are easily read by fast logic as tens or hundreds of transitions.

Use your function generator to send pulses to the input of the NAND to confirm this. Then look up switch debounce methods. They should go before the NAND, not after, as you've been trying to do.

\$\endgroup\$
1
  • \$\begingroup\$ NAND gate first pin is driven by schmitt buffer and second pin by LM393 comparator. If i provide input to clock by a pull up with mechanical switch, counter works perfectly so bouncing is not a problem. I have used function generator as a clock, 5 & 3.3 volts with a switch to provide clock with a resistance in series, counter works perfectly well. I'll try with function generator as input to NAND. Thanks for reply \$\endgroup\$ Commented Jan 29, 2022 at 9:02
0
\$\begingroup\$

Finally I found the cause of problem and that was LM393. I replcaed LM393 with OPA348 in open loop configuration as differential amplifier. But Still thinking, why LM393 didn’t work? Thanks to all

\$\endgroup\$
2
  • \$\begingroup\$ Hi, You are still asking for advice, so this is an update not an answer. As the OP, you would only write an answer if you fully solved the problem on your own and the topic can be closed. If you ask for more advice in an "answer" then it becomes a question again, and questions are not allowed in the "answer box". Therefore please (quickly) either (a) move this into the question as an update instead, if you want to ask why the LM393 didn't work, or (b) delete the part asking why the LM393 didn't work, if this is the final answer. || See the tour and help center for more site rules. Thanks. \$\endgroup\$
    – SamGibson
    Commented Feb 14, 2022 at 10:35
  • \$\begingroup\$ [continued] Also, you did not yet supply the requested schematic showing the circuit around the LM393. Therefore you need to edit your question to provide that (and any other relevant information about your use of the LM393) before you can ask why it didn't work for you. Thanks. \$\endgroup\$
    – SamGibson
    Commented Feb 14, 2022 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.