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.
- Systemarchitecture SmartFactory
- Working area
- Tools and technologies
- Hardware
- Software
- ToDo's
- Contributors
- Changelog
- License
- Links to SmartFactory
The following diagram shows the system architecture of the SmartFactory.
[Image: SmartFactory system architecture]
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.
[Image: SorticRoboter workingarea]
The source code is implemented in the programming language C++. In the following, the tools for editing the project are listed.
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 was used for documenting the source code. For using Doxygen in Visual Studio code, the Doxygen Documentation Generator extension is available.
For the creation of the electrical shema the software Fritzing was used. A link to the software can be found here.
The connection to the SmartFactory_SorticRoboter_CommunicationHub is via i2c. For an explanation of the technology and the library look here.
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.
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.
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.
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.
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
[Image: SmartFactory_SorticRoboter with robot arm]
The following illustrations show the electro shema of the SmartFactory_SorticRoboter. The connection to the SmartFactory_SorticRoboter_CommunicationHub is shown on it.
[Image: Breadboard SmartFactory_SorticRoboter with SmartFactory_SorticRoboter_CommunicationHub]
[Image: Electrical shematic SmartFactory_SorticRoboter with SmartFactory_SorticRoboter_CommunicationHub]
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.
[Image: Distrelec: Arduino Uno]
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.
[Image: ARDUSHOP: Arduino Motor Shield Rev3]
The Lego motor is used for the linear motion of the Sortic robot.
[Image: Mein Baukasten: LEGO exucation Power Functions XL-Motor]
The sensor used to read the data on the rfid transponder is the MFRC522 Rfid sensor.
[Image: Arduino Tutorial Online: RFID-RC522]
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.
[Image: Finite State Machine SorticRoboter with SorticRoboter CommunicationHub]
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.
The figure below shows the dependency tree of the main file. The used extern libraries for the project:
- SmartFactory_I2cCommunication
- MFRC522.h
Click on the image to open doxygen-documentation.
All the ToDo's are documented in the source code with Doxygen.
V 1.0 - Release SA HS20 - Philip Zellweger
MIT License
- SmartFactory-Sortic
- SmartFactory_Box-Sortic
- SmartFactory_Vehicle-Sortic
- SmartFactory_Vehicle-Basis
- SmartFactory_SorticRoboter
- SmartFactory_SorticRoboter_CommunicationHub
- SmartFactory_MQTTCommunication for Adafruit Feather M0 Wifi
- SmartFactory_MQTTCommunication for Esp32 DevKitC
- SmartFactory_I2cCommunication
- SmartFactory_Messages









