- #1
PrincePhoenix
Gold Member
- 116
- 2
Homework Statement
Hello. We have been given a project in our course "Digital Logic Design", which is an introductory course to Digital Logic. We are only allowed to use gates, multiplexers, flip-flops/latches, counters, comparators, simple displays (like seven segments) etc.
I am making an automatic room lighting system, for a room with one door.
The attempt at a solution
My logic is that there will be two IR transmittors and receivers, one each on either side of the door pane. Depending on the sequence in which the receivers go dark, the circuit will detect whether someone entered or left the room, increment/decrement a counter, counting the number of people accordingly. If the counter becomes zero, the light(s) are switched off. For greater than zero, it will be switched on.
So I thought it'd be two sequence detectors (made from different gates) (one for each sequence)(we've already built one in a lab, using flip-flops(so, synchronous)), with the two IR receivers acting as inputs to the sequence detectors. On detecting either of the two sequences one of them will increment and the other would decrement the counter through their outputs.
Now since it'd give an ouput in each clock cycle, the sequence of states that the detector will actually get will hardly ever match the ones for which I will make the sequence detector.
Any pointers on how this may be overcome? Is it possible to make it purely through a combinational circuit?
Can this logic work with an asynchronous circuit? (we haven't and won't be studying them this semester. We haven't studied counter yet. So I apologise for any weird assumptions made above about counters)
Hello. We have been given a project in our course "Digital Logic Design", which is an introductory course to Digital Logic. We are only allowed to use gates, multiplexers, flip-flops/latches, counters, comparators, simple displays (like seven segments) etc.
I am making an automatic room lighting system, for a room with one door.
The attempt at a solution
My logic is that there will be two IR transmittors and receivers, one each on either side of the door pane. Depending on the sequence in which the receivers go dark, the circuit will detect whether someone entered or left the room, increment/decrement a counter, counting the number of people accordingly. If the counter becomes zero, the light(s) are switched off. For greater than zero, it will be switched on.
So I thought it'd be two sequence detectors (made from different gates) (one for each sequence)(we've already built one in a lab, using flip-flops(so, synchronous)), with the two IR receivers acting as inputs to the sequence detectors. On detecting either of the two sequences one of them will increment and the other would decrement the counter through their outputs.
Now since it'd give an ouput in each clock cycle, the sequence of states that the detector will actually get will hardly ever match the ones for which I will make the sequence detector.
Any pointers on how this may be overcome? Is it possible to make it purely through a combinational circuit?
Can this logic work with an asynchronous circuit? (we haven't and won't be studying them this semester. We haven't studied counter yet. So I apologise for any weird assumptions made above about counters)