FSM Robot Arm

FSM Robot Arm

Obstacle avoiding robot arm implemented using finite state machines.

This project consists in programming a robotic arm to move a small object from a point A to a point B with the ability to detect an obstacle between these two positions and to find an alternative path to avoid it, by moving up and down along the Z axis until the object is no longer detected and then fixing the Z position and resuming movement to point B. To achieve this, an ultrasonic sensor was placed on the right side of the extremity of the arm, just below the grip.

\n \n

The programming was implemented using the concept of Finite State Machines (FSM), which consist of a finite number of states in which the machine can be in at any given time. The advantage of using FSM's is that the time the main loop takes to finish is minimal (milliseconds) and each FSM evaluates the current inputs to generate the right outputs, by doing this, it allows the program to seem asynchronous as it seems to do several tasks at the same time. This allows the robot arm to do diagonal movements (by moving several servos at the same time) or to avoid obstacles while moving without the need to stop the current movement.

These states are linked to each other, which means it needs to transition through the states to do its function. Each state has a specific output and to transition to the next state it needs to verify certain conditions that are associated to that transition. There are cases where the transition to the next state has no conditions, so this transition happens in the next loop cycle. Every machine starts on an initial state and ends the cycle when it reaches that state. This project uses several FSM’s, according to the architecture of the project.

View the full project in: hackster.io/Marcos10Soares/object-avoiding-fsm-robot-arm-3f1296