Garage Gateway Controller FSM

Thread Starter

fiendslyr

Joined Mar 22, 2011
7
Alright, so I have a homework problem I am working on. Here is the description:
Construct a garage gateway controller implemented as a Finite State Machine (FSM). The gateway system
(Figure 1) has the following features.
• An electric motor (M) that allows the gateway to be moved upwards or downwards. The FSM has to
generate the control signals (M1 and M2) to indicate when there should be motion and in which
direction. These would correspond to actuator signals in a real system.
• Two sensors that indicate if the gateway is in the topmost (ST) or bottommost (SB) position, respectively.
• A switch (S) for users to open (close) the gateway when it is fully closed (open). For simplicity, once the
gateway is moving (up or down) it cannot be stopped or the direction of the movement reversed until
the corresponding sensor (SB or ST, respectively) is activated.



So in a nutshell, I have no idea where to start with this. I just need help designing a FSM diagram and from there I know how to build it. I know there will intermediate states that the machine will go to from Topmost to Bottom most and vice versa. If someone can help me get started, I would really appreciate it.

Edit: Here is the figure http://imgur.com/4XCwo
 
Last edited:

Thread Starter

fiendslyr

Joined Mar 22, 2011
7
Ok, so if i make a flow chart for lets say closed to open... How would I know how many states it would go through? So if I start at close, the bottom sensor will read "1" then do I just go to halfway open, then all the way open? Or a third of the way open and so on? I don't really understand how the intermediate states work (between close and open).
 

Georacer

Joined Nov 25, 2009
5,182
Consider the following:

I think that you must build one and only one state diagram.
You have 3 inputs (user button, ST and SB) and at least 2 FFs, so you 're looking at a 5 input state table. That's to know what you 're looking at.

As for the intermediate states, I suggest making a "moving up waiting for ST" state and a "moving down and waiting for SB" state.
Take a look here for a quick FSM tutorial:
http://www.allaboutcircuits.com/vol_4/chpt_11/5.html

At any rate, post your work and we 'll talk more then.
 

Thread Starter

fiendslyr

Joined Mar 22, 2011
7
I've got a state diagram table (I went to my TAs office hours to get some help). So at this point, I don't think I need anymore help. Thanks for your initial help guys!
 
Top