Ive a school project of building a logic circuit that counts the number of objects that passes through a checkout belt using 2 sensors.
Thing is: Tried to find something similar online (no luck) and I dont know how can I integrate those sensors because the displaying number for the objects is only changed on the 4th stage of this sequence: Starting from both sensors off 1- Sensor 1 on, sensor 2 off 2- Sensor 1 and 2 on 3- Sensor 1 off, sensor 2 on 4- Sensor 1 doenst matter (can be either on or off), sensor 2 off
Basically I want to know how can I apply this sequence on the circuit and I want to make it so when the signal is sent from the sensors, it activates the clock on my counter and adds 1 on the display (meaning I want the sensors to send one signal after the requirements are met)
Idk if table is right but its what I came up with Sensor1 Sensor2 Clock for Counter 1 0 0 1 1 0 0 1 0 X 0 1
then loops
P.s: Didnt add any reference image because it doesnt require any previous info othet than the sequence
Tried build something using the previous truth table and manually arranging the gates but no luck
Also tried to use an adder and a flip flop
expectations: not much
Let your sensor inputs be
i1andi2, and we'll define outputss1,s2,s3,s4for the required stages of your sequence.We can translate what you said directly into logic:
You can implement it just like this.
s4can be used as the clock for a counter.The factors like
(s1|s2)establish the required sequence and make a sort of flip-flop -- you can only be ins2if you were already ins1ors2. There needs to be enough propagation delay on the input from the previous stage to make sure that(s1|s2)doesn't turn off whens1changes tos2.