EDIT: This is a homework question. What I need to know is how to solve the circuit through the transition table. That is, how do I write the circuits for the state changes (is it a flip-flop circuit, or a combinatorial circuit?) and the outputs?
I have a simple state machine with 3 states to control the automatic doors of a mall: waiting, entering and leaving. Two sensors, one in each side of the door, a timer that counts to 10 seconds.
The door opens when one of the sensors is activated, and remains open until the other sensor is activated or 10 seconds pass without any other input. Every time a person goes in or out, an alarm goes off. One of the suppositions is that only one person goes in or out at any time, so the sensors can't go off at the same time.
I have then 3 inputs to the circuit: S1, S2 and the Timer. And one output, the alarm A.
I was wondering how I'm supposed to write the state transitions table. I'd written something like
S1 S2 10s Q(n) Q(n+1) Alarm
0 0 0 A A 0
1 1 1 A X X
0 0 0 B B 0
1 1 1 B X X
And so on, with the 0-7 table being repeated for the states Q(n) = A, B and C.
Is this correct?
What's the next step to build the combinatorial circuit? I know I have to make the Karnaugh maps, but how do I factor in the states A, B, C? Are they supposed to be flip-flops? Are those then different "functions" I have to make the Karnaugh maps for?