Author Topic: CD4026 counter circuit  (Read 11497 times)

0 Members and 1 Guest are viewing this topic.

Offline mattybigbackTopic starter

  • Contributor
  • Posts: 19
  • Country: gb
    • Totally Keyboard
CD4026 counter circuit
« on: January 11, 2014, 02:30:53 am »
Hi there

I'm trying to build a little circuit that acts as a push-button counter, like the ones used on airlines to count the passengers. I've designed a circuit that uses three CD4026 Decade counter/7 segment decoder chips and 3 common cathode 7 segment displays.

I've got it working in the Yenka simulator, but I have some questions about the design.

The simulation doesn't reference the clock inhibit pin, so I'm assuming that I'll need to tie it to ground. Is that correct?

Also, I've chained the display enable out of IC3 to the display enable in of IC2, and then the out of IC2 to the input of IC1 (the software has the chips in reverse order). Pins 4 and 5 are left unconnected, and on all chips I've left pin 14 unconnected.

I'm planning to drive the 7 segment display directly from the chip, via some 100 ohm resistors (or whatever value the displays I end up getting will need). I've seen some designs use transistors, but I don't think they'd be necessary.

Does this seem like the best way to do this?

Many thanks
Matt
 

Offline TheGreatGooglyMoogly

  • Contributor
  • Posts: 22
Re: CD4026 counter circuit
« Reply #1 on: January 11, 2014, 04:09:03 am »
Hi!

Inhibit is low, no thanks to the TI datasheet which doesn't have a function table. But yes, clock inhibit is low.

Reset is also normally low.

CMOS outputs almost always can be left unconnected with no adverse effects, so thats ok. (pin 4, 5 and 14)

Use high enough voltage to drive the display (like 9V or higher) to make sure the displays are bright enough.

You will *need* a debounce circuit on the clock switch, if you don't it will count erratically (say it starts at 0 and you push the button it will go to 43 because the switch bounced 43 times.

Don't forget to use 100k resistors to pull the switch input pins to ground when the switch is not pressed. CMOS inputs are capacitive and very high impedance, so stray static can charge them to logic, resulting in your counter counting or resetting seemingly at random.

Build it up and have fun.
"If you can't afford to blow it up, you can't afford to use it"


 

Offline TheGreatGooglyMoogly

  • Contributor
  • Posts: 22
Re: CD4026 counter circuit
« Reply #2 on: January 11, 2014, 04:10:04 am »
Here's a debounce page. The last circuit is super good and the CD4093 is a cheap and easy chip to get.

http://www.zen22142.zen.co.uk/Design/debounce.htm

~G
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7909
  • Country: nl
  • Current job: ATEX product design
Re: CD4026 counter circuit
« Reply #3 on: January 11, 2014, 05:22:31 am »
Hi!

Inhibit is low, no thanks to the TI Harris semiconductor datasheet
Fixed that for you.
But indeed, they could refresh the 4000 series datasheets.
 

Offline mattybigbackTopic starter

  • Contributor
  • Posts: 19
  • Country: gb
    • Totally Keyboard
Re: CD4026 counter circuit
« Reply #4 on: January 11, 2014, 05:29:24 am »
Thanks for the advice on debouncing. I actually have a 4093 in my parts box so it's nice to have a use for it.

It's a daft little project, but I've been working solidly on the same thing for months, and I just fancied designing and building something over the weekend. Once the counter is built I can always modify it to do something useful.
 

Offline rdl

  • Super Contributor
  • ***
  • Posts: 3667
  • Country: us
Re: CD4026 counter circuit
« Reply #5 on: January 11, 2014, 05:42:09 am »
If you're using the "B" series 4026, and depending on the supply voltage and the LEDs, you may not need the current limiting resistors. I have the beginnings of a digital clock on a breadboard somewhere that I started a couple of years ago, I seem to remember something like 5 mA per segment at 6 volts just driving the LEDs directly from the 4026 outputs.
 

Offline mattybigbackTopic starter

  • Contributor
  • Posts: 19
  • Country: gb
    • Totally Keyboard
Re: CD4026 counter circuit
« Reply #6 on: January 11, 2014, 06:03:35 am »
I suppose I can always give it a go with the decimal point on one of the displays - if it does go pop then the rest of the display will still be usable and I'll have learned a valuable lesson.
 

Offline DBoulanger

  • Regular Contributor
  • *
  • Posts: 56
  • Country: ca
Re: CD4026 counter circuit
« Reply #7 on: February 03, 2014, 01:39:27 am »
I suppose I can always give it a go with the decimal point on one of the displays - if it does go pop then the rest of the display will still be usable...

That's one way to do it although personnaly I'm a bit more conservative.  I'd rather prefer testing with a higher resistor first, take some measurements and figure out if the current is adequate and adjust accordingly.

If I read the datasheet correctly, the chip's max clock frequency can range from 2.5MHz to 8MHz, for a Vdd value ranging from 2.5 to 8V, so obviously, the display segments resistors will need to accomodate the Vdd you'll use.

BTW, I'm also "playing" with some CD4026B and CD4017 chips these days.  I added a little extra to my CD4026 based counters.  When the Display Enable is LOW (Segments not lit) and the Clock INHIBIT is LOW too (Counter incremententing on raising edge of the CLK input), I set the CLK INHIBIT of a CD4017 to LOW allowing it to light the DPs (decimal points) in rotation.  Obvioulsly, the CD4017 is using a different clock input, a 555 oscillator ranging from 1 to 100Hz in my case.

That little extra gives me a visual feedback telling me that the counter still running, even if the segements aren't lit and overall, it adds a little personnal touch !

Have fun !
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2129
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: CD4026 counter circuit
« Reply #8 on: February 03, 2014, 11:51:23 am »
If you're using the "B" series 4026, and depending on the supply voltage and the LEDs, you may not need the current limiting resistors. I have the beginnings of a digital clock on a breadboard somewhere that I started a couple of years ago, I seem to remember something like 5 mA per segment at 6 volts just driving the LEDs directly from the 4026 outputs.
Can you actually get "4000A" series logic?  I'm not sure I've ever seen one, and I've got 4000 series dating back to the 70's (in nice cerdip packages) in my logic bin.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1447
  • Country: us
  • Very dangerous - may attack at any time
Re: CD4026 counter circuit
« Reply #9 on: February 03, 2014, 08:43:04 pm »
The original 4000 series chips didn't have ESD protection. They where very fragile and quickly succeeded by the B series.
 

Offline mattybigbackTopic starter

  • Contributor
  • Posts: 19
  • Country: gb
    • Totally Keyboard
Re: CD4026 counter circuit
« Reply #10 on: February 03, 2014, 09:26:13 pm »
Quick update!

As per usual I ended up overcomplicating things and I extended the scope. I'm using an AVR, some shift registers and some 4511 chips. Electrically it all works, and 5v from the 4511 will power the displays with no problems.

The advantage of using the AVR is that I can add in all of the debouncing in code, and I've added some audible responses to set and reset using the arduino Tone library. I'm using an ATMega168 at the moment, but I'm going to port the code to an ATTiny2313. Lovely little chips those!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf