61 MMM Finite State Machine (4 States)

61 : MMM Finite State Machine (4 States)

Select Project123456789ONSW2
  • Author: Alexandra Zhang Jiang
  • Description: Finite State Machine for the Magnetic Microsystems and Microrobotics Research Lab at UCI
  • GitHub repository
  • Clock: 1000 Hz

How it works

This chip will be incorporated in the microrobot that is being developed in lab.

Inputs

The inputs consist of two bits I0 and I1, each one for a sensor that detects contamination in water to the left and right fo the robot respectively. The input bus goes to logic gates along with the Current State to calculate the Next State, which is then saved in a register (D-FlipFlop).

States

There are a total of four states:

  • 00 Start (default initial state of the robot, both motors are off)
  • 01 Go Right (which enables Left Motor in order to go right)
  • 10 Go Left (which enables Right Motor in order to go left)
  • 11 Straight (both motors are enabled to go straight)

The register will store the Current State (which is given by S0 and S1) at any given time.

Outputs

This is a Moore Finite State Machine, meaning that the output only depends on the current state. The outputs consist of two bits M0 and M1, each one turns on the motor on the right or left of the robot respectively.

How to test

The truth table for the FSM can be found below.

I0 I1 S0 S1 S0+ S1+ M0 M1
0 0 0 0 0 0 0 0
0 0 0 1 1 1 0 1
0 0 1 0 1 1 1 0
0 0 1 1 1 1 1 1
0 1 0 0 0 1 0 0
0 1 0 1 0 1 0 1
0 1 1 0 0 1 1 0
0 1 1 1 0 1 1 1
1 0 0 0 1 0 0 0
1 0 0 1 1 0 0 1
1 0 1 0 1 0 1 0
1 0 1 1 1 0 1 1
1 1 0 0 1 1 0 0
1 1 0 1 1 1 0 1
1 1 1 0 1 1 1 0
1 1 1 1 1 1 1 1

External hardware

3-electrode sensor and motors

IO

#InputOutput
0clockEnable Right Motor
1resetEnable Left Motor
2segment c
3segment d
4segment e
5segment f
6Sensor Left Inputsegment g
7Sensor Right Inputdot