Skip to content

OSTLCLab/SmartFactory_SorticRoboter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartFactory_SorticRoboter

The SmartFactory_SorticRoboter is an implementation of the SmartFactory project for Sortic. The SmartFactory_SorticRoboter scans the rfid chip from a package and sort the package to a suitable SmartFactory_Box-Sortic to deliver the package. To communicate with the SmartFactory_Box-Sortic the SmartFactory_SorticRoboter is in connection with the SmartFactory_SorticRoboter_CommunicationHub. The connection is made via an I2C data bus.

The programmed algorithm is based on the finite state machine design pattern. The design pattern allows to give the robot a state and to change it to another state by events. The robot is built by different nested state machines and thus executes its tasks.

Table of contents

Systemarchitecture SmartFactory

The following diagram shows the system architecture of the SmartFactory.

systemarchitecture

[Image: SmartFactory system architecture]

Working area

The existing sorting robot is designed with three transition lines. The number of lines can be extended modularly. In addition (to the three lines) the system has a upload line to load the packages.

workingarea

[Image: SorticRoboter workingarea]

Tools and technologies

The source code is implemented in the programming language C++. In the following, the tools for editing the project are listed.

Visual Studio Code

The development environment used is Visual Studio Code with the PlatformIO extension. The development environment can be downloaded open sourced. For an installation guide look here.

Doxygen

Doxygen was used for documenting the source code. For using Doxygen in Visual Studio code, the Doxygen Documentation Generator extension is available.

Fritzing

For the creation of the electrical shema the software Fritzing was used. A link to the software can be found here.

I2C

The connection to the SmartFactory_SorticRoboter_CommunicationHub is via i2c. For an explanation of the technology and the library look here.

SPI

The data on the rfid transponder is transmitted by the spi protocol. Spi is a serial data bus which is used to read the data of the rfid scanner. For an explanation of the technology look here.

RFID

The radio frequency identification technology is used to write and read the information of the package. This is a non-contact automatic transmitter receiver system based on the physical principle of a capacitor. Electromagnetic waves transmit the data from the transponder with the scanner. A detailed explanation can be found here.

Ultrasound

For the navigation of the robot, the position is measured by an ultrasonic sensor. The sensor emits sound waves and receives them again, so that the distance to an object can be determined. The sensor data is transmitted by the SPI protocol. A detailed explanation of the technology can be found here.

Hardware

The elements used for the construction are built of Lego. Lego is used, as there are no real construction requirements in the project. It is needed to illustrate the SmartFactory concept. This principle can be applied to any conceivable installation. In addition Lego also reflects the modularity of the project.

SorticRobot

The Sortic robot is constructed as shown in the figure below. The robot consists of the following elements:

  • Arduino Uno
  • Arduino Motorshield V2.0
  • Sonar HC-SR04
  • Lego Motor
  • MFRC522 RFID Reader
  • Sortic substructure based on LEGO

SorticRobot

[Image: SmartFactory_SorticRoboter with robot arm]

Electrical shematic

The following illustrations show the electro shema of the SmartFactory_SorticRoboter. The connection to the SmartFactory_SorticRoboter_CommunicationHub is shown on it.

Breadbord

[Image: Breadboard SmartFactory_SorticRoboter with SmartFactory_SorticRoboter_CommunicationHub]

Electrical shematic

[Image: Electrical shematic SmartFactory_SorticRoboter with SmartFactory_SorticRoboter_CommunicationHub]

Arduino Uno

The microcontroller used is an Arduino Uno. For the existing system the memory and clock speed are sufficient, for a more complex system it is recommended to change to an Arduino Mega.

arduino uno

[Image: Distrelec: Arduino Uno]

Arduino Motor Shield

A motor shield is required to control the motor. The used motorshield is from Arduino and is compatible to the Arduino Uno and Arduino Mega.

motorshield

[Image: ARDUSHOP: Arduino Motor Shield Rev3]

LEGO Motor

The Lego motor is used for the linear motion of the Sortic robot.

legomotor

[Image: Mein Baukasten: LEGO exucation Power Functions XL-Motor]

MFRC522

The sensor used to read the data on the rfid transponder is the MFRC522 Rfid sensor.

rfidscanner

[Image: Arduino Tutorial Online: RFID-RC522]

Software

Finite State Machine

The design pattern used to implement the software is the Finite State Machine. The robot always has a state. The states are transformed into other states by events. The figure below shows the finite state machine of the sortic robot seen in the blue area. The main state machine is the SorticCtrl, which contains the finite state machine DetectPackageCtrl, SortPackageCtrl and NavigationCtrl.

FSM

[Image: Finite State Machine SorticRoboter with SorticRoboter CommunicationHub]

UML

The figure below shows the data model in UML notation. A separate class has been implemented for each finite state machine.

Click on the image to open doxygen-documentation.

Dependency Graph

The figure below shows the dependency tree of the main file. The used extern libraries for the project:

Click on the image to open doxygen-documentation.

ToDo's

All the ToDo's are documented in the source code with Doxygen.

Contributors

Changelog

V 1.0 - Release SA HS20 - Philip Zellweger

License

MIT License

Links to SmartFactory