
Housney A. answered 06/14/20
Computer Engineer
Hello Talha,
I will give you some tips to design this system. However, if you want to design and simulate this system, feel free to connect with me.
Let the output of the four sensors be denoted by A, B, C, and D
All of these sensors are digital (0 or 1 as an output). Let's assume that 1 means the door is open, and 0 means that the door is closed. Let f be a function that outputs logic 1 when at least one of the door is open.
f = A + B + C + D (you need three OR Gates for this function)
The output of this function is connected to :
- The alarm (can be a buzzer)
- 555 Timer: connect the VCC of the timer to the output of the function f
Now, you need to design a down counter (4-bits counter, 4 flip flops) using using D or JK flip flops. The 555 timer will be the clock of the counter.
Let the output of the counters be Q0, Q1, Q2, and Q3. Connect these flip flops outputs to a BCD to 7-segment decoder (74LS47 or 74LS48) in order to show the counts. When the counter reaches 0 0 0 0 , Q0, Q1, Q2, and Q3 are all at logic LOW or 0. Therefore, to turn the LED light on (send sms message), we need to create another logic function using Q0, Q1, Q2, and Q3.
g = Q0' Q1' Q2' Q3' = (Q0 + Q1 + Q2 + Q3)' (you need 3 OR gates and one NOT gate)
Connect the output of this function to the LED.
Feel free to comment with a followup question.