1
\$\begingroup\$

I just started studying electrical engineering this semester, and I'm currently working on following impulse counter:

Original circuit

The circuit is basically a power supply regulated to 5V, a pendulum acting as a switch connected to the clock of a counter, with a bit of noise-reducing circuit to limit the impulses, and some 7-seg displays with drivers to display the value of the counters.

I have a few issues with the circuit, that I would love to get help or inspiration on how to solve:

  • The counter (U4) always starts at 1 instead of 0, so I have to use the implemented reset button every time I power on the circuit. Not a major issue, but it would be awesome to find a way to solve this. I assume it is because of the small delay whilst the capacitor (C3) is "loading" initially - making the inverted output HIGH, then LOW when powering on the circuit. If that is the case, I don't know how to solve it while retaining the noise-reducing circuit.
  • I implemented some logic to keep 7-seg 2 (U7) turned off initially (when it should be displaying 0) and turns on only for 1-9. This works as intended when simulating the circuit in MultiSim, but when I realise the circuit on a breadboard it acts a bit unexpected. Initially it works as intended, but after 7-seg 2 (U7) has been turned on once, it never turns off again and instead displays the value '0' when reset.

I appreciate any help on solving the issues!

EDIT: Solution for the problem, by attempting to implement suggestions by Dan: Improved circuit Added another (slightly slower) low-pass filter connected to the counters ~CLR-pin to reset the counter to 0 initially, and replaced the logic for U5's RBI-pin with a ground connection to solve the display issues.

EDIT2: Final working solution if anyone is interested, thanks to suggestions: Final circuit Fixed the reset switch and improved the reset module with a diode and some amplification to make it more reliable. Works great now!

\$\endgroup\$
  • \$\begingroup\$ Regarding your new reset circuit: 1) ResA appears to be +5V. Calling it something else is confusing. 2) With the reset circuit, you can eliminate R18 since ResB is driven by U2C. 3) I would suggest a diode in parallel with R17 with the cathode at ResA (+5V). This will assure that the reset capacitor gets cleared on power-down, especially when cycling power. \$\endgroup\$ – Tut Nov 4 '14 at 21:46
  • \$\begingroup\$ Thanks a lot for the advice Tut! Will try to implement your suggestions straight away! \$\endgroup\$ – l_priebe Nov 4 '14 at 22:25
0
\$\begingroup\$

You are probably correct about why you're always seeing a "1" on the display on power up. As C3 is charging, the Schmitt Trigger U2A will see it as a low voltage until the voltage on C3 exceeds U2A's minimum threshold. With such a large value for R1, it takes a long time to charge up C3. I'm assuming the pendulum is relatively slow if you're using such a low frequency low-pass filter.

An elegant way to prevent that erroneous behavior is to put a similar low-pass filter on the ~CLR pin of U4. If you choose an RC time constant this is slightly larger than \$R1*C3\$, it'll guarantee that U4 will come out of reset only after U2A has stabilized.

The ~RBI feature is actually easier than I think you are thinking it is. If you just hard-wire it to ground, the chip will automatically blank the display for zeros, but illuminate normally for anything besides zero. In other words, you can get rid of U9 completely and just tie the pin to ground. You can see from the datasheet that if ~RBI is driven low AND all of the inputs are low, the display will be blanked. If any of the inputs are not low (a non-zero number), it doesn't matter what ~RBI is, it will actively display the number.
enter image description here

\$\endgroup\$
  • \$\begingroup\$ Thanks a lot for your answer, I found it really helpful! Funny how I overcomplicated the RBI feature, but I guess that is what I get for not being thorough when consulting the datasheets! :) I will work on adding another low-pass filter as you suggested, it sounds like a nice solution if I can get it working! And yes, it is intended for C3 to charge slowly as the pendulum is mounted on a car (should make contact while the car is accelerating or decelerating above a certain limit). Thanks again for the thorough answer! \$\endgroup\$ – l_priebe Nov 4 '14 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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