Close

Counting to 10 thousand

A project log for All-hardware frequency meter and LCR

Look mom, no MCU!

hummusprinceHummusPrince 05/31/2020 at 22:110 Comments

I want to display at least 3 digits of the frequency or other value that I measure. Each CD4518 contains two BCD counters, so it makes sense to make a 4 digit counter rather than leaving one counter unutilized for the same price.

The design is based on cascading the 4 counters, in such a way that when one of them overflow the next one will increment. I went with the simple design in the datasheet, using Q4 falling edge as the next timer increment. Because I wanted to disable all counters together I used their CLOCK input as an inverted ENABLE, and the ENABLE as falling edge CLOCK.

In retrospective, I could have gone with this recommended design, as only the less-significant-digit counter must be disabled to stop to rest too. But meh, I've already tied them up together. Maybe if I'll make a PCB revision of this thing I'll do it in this more senseful way.

As for display, I've gone the lazy way - each 7seg is getting it's own CD4511 to drive hoe directly from his respectful counter. I'm not going for the complexity of multiplexing the 4 7-segments with only one CD4511, thank you very much. It would be a pain and will also use at least the same number of chips and work as the lazy approach. This approach might be reasonable for an 8 (or more) digit counter, which isn't practical anyway.

So, I can count to 10. Now I want to count further, from 0 to 9999. 

Together with the four 7 segment LEDs, and the 4 CD4511 chips driving them, the whole design fits very well into my el-cheapo 18X24 holes protoboard.

As this design is quite modular, at first I've assembled and connected only the 2 lower digits, and used the previous test circuit to test the counter.

You can see that it was working quite well, though I found a weak solder-joint I made between one of the 4518s and it's 4511, resulting in wrong display value.

It was also the time to see what value the series resistor of each 7seg will be - I'm lazy and won't use 7 input resistors for each individual LED to celebrate the marginally-better-looking result. That's what the crocodile wires are for. I've decided that 330 Ohms will suffice.

I took out each of the important signals into the female headers. These are the Vdd and Gnd of course, the ENABLE, CLOCK and RESET of the counters, and the Light-Test, Blnking and Input-latch of the 7seg drivers. Also I left 4 pins for each of the decimal points, to be used in the future to indicate resolution.

At last I wired the second half of the circuit. I let it count some random value, and it has worked very well. Here is the the counter when disabled mid-counting: 

That's very cool in my opinion, I've hardly believed it will work that well and require no bugfixes.

As to how it was all assembled, well, it was quite annoying to make:

 Worry not, all these are enameled 0.1mm wires (these cheap aliexpress jobbies), - so no accidental shorts, even despite the cheap materials and sloppy soldering job.

Discussions