Up/Down Counter with 2 input sensors to trigger clock

Thread Starter

droymanz

Joined Dec 24, 2020
5
Hello, can you help me with this project?

I want to design a circuit which counts up when the ENTRANCE SENSOR detects an object and counts down when the EXIT SENSOR detects an object. I created the circuit design attached below with the help of some tutorials on YouTube but I do not know what to do to make it counts down.

circuit design.png
 

MrChips

Joined Oct 2, 2009
23,858
From your circuit schematics I can see the following mistakes you have made:

1) Outputs from both Q1 and Q2 are connected. The circuit cannot tell the difference between the two events.

2) Both signals are connected to the CLOCK input of IC1. There is no way to change from COUNT UP to COUNT DOWN.

3) You are mixing CMOS 4000 series ICs with BJT 74LS00 series ICs which is not good.

4) 74LS47 operates from 5V, not 9V.

You need to choose your IC type, either CMOS or TTL (BJT), don't mix.
You are using the wrong IC for counting up and down. If you want to use 74LS00 series ICs choose 74LS192.
If you want to use CMOS ICs, you can use 74HC192 or CD40192.
For display drivers, use CD4511 or CD4513 for common anode displays or CD4543 for either common anode or common cathode.
 

Thread Starter

droymanz

Joined Dec 24, 2020
5
1) Outputs from both Q1 and Q2 are connected. The circuit cannot tell the difference between the two events.
Thank you for your suggestions @MrChips I will definitely try all those later.. Re mistake #1, I just did that thinking that when Q2 has an output the clock on the counter will trigger .

This image below is an updated version where the Q2 is now connected to the U/D pin. This circuit will count up if the exit sensor is always active and will count down if it is not. This is actually not what I wanted but it is the only solution I can think of yet. Can you suggest a better method or design on how can I do it?

Mod: reduced the drawing size.E
circuit design 2.png
 
Last edited by a moderator:

ericgibbs

Joined Jan 29, 2010
13,204
hi d,
I assume that when there is no one blocking the beams , the Q1 and Q2 Collectors are High. ie;+9v.

Is that correct.?
E
 

MrChips

Joined Oct 2, 2009
23,858
Start with your choice of supply voltage.
If you want to use a 9V battery then that eliminates 74LS00 series choice of ICs.
 

ericgibbs

Joined Jan 29, 2010
13,204
hi droy,
You cannot operate the CD4029 at 9V and the 74LS47 at 5V.
I would suggest 5V operation for the complete circuit.

Can you post a diagram, with dimensions, showing how the Enter and Exit detectors are mounted in the door way entrance.?

On your circuit you cannot use the U/D pins on the 4029 to clock the counter

E
This image shows 5 people Enter and 5 people Exit, as this is Homework, I have not shown how the U/D is controlled.
Hint: Either the Enter or Exit pulses must Clock the 4029 Up or Down, so you have to design the circuit so that U/D pin is in the correct State for Up or Down Clock pulse.
 

Attachments

Top