This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CD4029B: Best IC for presettable up/down counter for use with 7-segment display

Part Number: CD4029B
Other Parts Discussed in Thread: CD4516B, MSP430FR2311, SN7400, SN74LVC1G123

Hi all!

I am busy on a project where I need to be able to track the number of cars entering and exiting a parking lot by way of a gap sensor. I need to be able to use a 7-segment display to show the number of parking spaces available, so that means I have to start counting from 46 - which is the size of my parking lot. I'll also only be receiving a single input at any one time. I have been doing a lot of research, but am struggling to determine which is the best IC for the job - every time I make a choice, I find a link to another possible option! 

I have narrowed my choices down to a CD4029B, a 74HC193 and a CD4516B. I am favouring the CD4029B at this point and am just looking for confirmation that I'm on the right track.

Any help will be appreciated!

  • Hi Kirsten and welcome to the forums!
    Typically these days the best solution is to use a microcontroller -- there are a lot of low cost, low power options out there that are basically infinitely customizable. I recently did a similar build with an MSP430FR2311. The one down side is that you have to program an MCU, and for mass production that adds cost and complexity. In this case though -- for a one-time build -- it's probably your best bet. The code is likely going to be very simple.

    I know that doesn't directly answer your question though. If you're intent on using logic, I want to get some clarification on the requirements.

    The CD4k family of logic is pretty old and generally inefficient for modern designs. Because it's old, it also includes functions that are typically handled by MCUs today - like counters. Most of our customers only choose CD4k logic if they need an obscure function, or if they really need to operate between 5V and 18V. HC is similarly old (it was the original CMOS replacement for SN7400 series TTL logic)

    Can you tell me a bit about the requirements for your system? Are there power constraints? Voltage? What kind of signal is coming in? What kind of load is to be driven? A block diagram would be helpful if you have one -- preferably with a lot of detail around the signals in and out of the counter.
  • Hi Emrys,

    Thanks so much for your response!

    Unfortunately, this is for a university project and we are not allowed to use microcontrollers! You were spot-on with my voltage limitations though, as the power supply to the system has to stay within the 3V to 18V range.

    Besides the voltage constraints, the signal being received is from a transmissive optical sensor with phototransistor output (TCST110-230). I was planning on designing a circuit which passes a voltage pulse that is generated by the gap sensor through a 555 timer and then to the 4029 (one gap sensor will count down, another will count up), which will generate an output via a 7-segment display.

    I didn't mention the second part of the circuit functionality because I haven't explored it yet, but perhaps it will be useful to you - my system (which is just made up of tracking the number of cars entering and exiting the parking lot) has to be able to generate a signal that shuts off various other subsystems when the parking lot reaches its maximum or minimum capacity - it has to switch off a fan and lights when the parking lot is empty, and it has to disable a boom motor when the parking lot is at maximum capacity. The fan system will be implemented using a Schmitt trigger circuit, and the lighting system will be implemented using an analogue comparator circuit.

    I'm not in charge of all the subsystems for this project, but I'm meeting with the other group members tomorrow and will be able to get more information, including a block diagram showing how all the subsystems interact.

    Thanks again for your feedback!
  • My first recommendation would be to run the system at 5V to give you the maximum variety of possible logic devices. Anything higher will limit you to only the CD4k family, and it's not the most diverse logic family we have.

    For the pulse generation, instead of a 555 timer, I would recommend using a monostable multivibrator like SN74LVC1G123. This device just uses a one external resistor and one external capacitor to set the pulse width, and that can be sent straight to the CD4029B clock as an input.

    You'll need to preset the CD4029B at system startup -- this can be accomplished by using either the system controller (which it sounds like you can't use), or a power-on-reset signal. I would recommend checking out this video for details on the circuit: training.ti.com/tlm-app-por

    You might find the rest of the videos on that site useful as well - we try to keep them short and informative.

    It sounds like you have a fun project to work on. Feel free to come back any time with questions. We're here to help.