The SmartFactory_Vehicle-Basis is an modular part of the SmartFactory project.
SmartFactory_Vehicle-Basis is a vehicle which is equipped with a drive, sensors (line-detection, sonar and a camera) and a hoist. It consists of three modules:
- Environment-Detection
- Drive-Control
- Hoist-Control
Multiple nested Finite State Machines (FSM) based on the pattern of the ArdFSM are used to control the processes.
- The SmartFactory project
- Tools and technologies
- Documentation
- FAQ's
- ToDo's
- Contributors
- Changelog
- License
SmartFactory_Vehicle-Basis is part of the SmartFactory project. It provides a library with basic vehicle functions.
Other SmartFactory-components are:
A possible implementation of the SmartFactory project can be seen in the Sortic-Showcase:
The associated repositories are:
SmartFactory-Sortic
SmartFactory_Box-Sortic
SmartFactory_Vehicle-Sortic
SmartFactory_Vehicle-Basis
SmartFactory_MQTTCommunication
The source code is written in C++. To achieve this project, the following listed tools and technologies were used.
Doxygen is used for the documentation of the source-code.
An intorduction to Doxygen and how to install it can be found in the ArdFSM-Repo.
The used IDE is VSCode with the PlatformIO-extension.
For a description of the MQTT-Technologie take a look at the MQTTCommunication-ReadMe.
[Source: FTS, BA FS18, Huber,Paly]To build a SmartVehicle the following hardware is needed:
- 1x Adafruit Feather M0 WiFi - ATSAMD21 + ATWINC1500 from Adafruit.
- 1x DC Motor + Stepper FeatherWing Add-on
- 3x Battery with an JST 2.0 connection
- 1x PixyCam
- 1x Sonar - HC-SR04
- 5x IR Sensor - IR-Sensor breakout-board
- 1x Servo for Hoist - Bluebird Midi-Servo BMS-390
- 1x Servo for Cam and Sonar - SG92R Adafruit 169
- 2x Drive Lego - LEGO® Power Functions M-Motor
For detailed building instructions please contact Felix Nyffenegger.
All functions and files are documented on the GitHub-Page.
It is important to mention that all functions are non-blocking and as short as possible so no other processes starves.
The Sonar and PixyCam functionalities are not implemented at the moment and are crossed out.
The interface is documented in DriveCtrl, EnvironmentDetection and HoistCtrl.
Click on the image to open doxygen-documentation.
Extern libraries:
Click on the image to open doxygen-documentation.
In HardwareConfiguration.h, all important settings for the vehicle-hardware are defined:
- Setup for Drive
- Speed, Motor-pins, PID-values
- Setup for the Linedetector
- Pin-number
- Setup for Hoist
- Pin-number, delay, minimal and maximal position
Setup for SonarSetup for Vision
All you need to do is adding the GitHub-Link to this repository under lib_deps in your platformio.ini file and you're set. All dependencies are downloaded automatically. The interface is documented in DriveCtrl, EnvironmentDetection and HoistCtrl.
- The battery of the vehicle must be recharged manually. Inductive charging while waiting would be desirable.
- Sensors for line recognition have an unfavourable distance to the turning point. They should be placed closer to the vehicle axis to increase the accuracy of alignment.
- The line recognition functions unreliably. This may be caused by an imperfect white background and needs to be optimized.
The open ToDo's can be found in the documentation on the GitHub-Page
- Implement Sonar
- Implement Vision
- Luca Mazzoleni
- Glenn Patrick Huber
- Robert Paly
V 1.0 - Release BA FS19 - Luca Mazzoleni
MIT License