# Stationary 3D Scanning System for IoT Applications
## 5 Control System  
The authors enclosed the entire control system in the form of two separate PCBs, which were connected by means of a ribbon connector. The board shown in Figure 4 is responsible for the general processing of the scanning data. The control unit based on a 32-bit microcontroller, enabled communication between the user and the system, control and monitoring the general functionality of the 3D scanning system, as well as full collection, conversion, transmission, and processing of the data necessary to create a mesh of the scanned object in the form of a point cloud.  
The system is powered by a voltage of 12 V, which is reduced to a value equal to 5 V by means of a \"step-down\" converter (No. 12), which is subsequently reduced to a voltage equal to 3.3 V powering the entire logic of the microcontroller using a linear voltage regulator (No. 13). The 3D scanning system has the ability to connect to a 20 V touch screen powered by 20 V, which is obtained using a step-up converter (No. 1). The 32-bit microcontroller (No. 5) also has an external non-volatile Flash memory (No. 3) to save specific system parameters during its operation, which are always taken into account before and after restart, e.g., the start and end positions of the head. This is especially important in the event of a power outage, i.e., an unexpected restart or shutdown caused by external factors. In the event of power loss or other external disturbances that may directly affect the functionality of the 3D scanning system, the last position of the head is stored as a linear displacement in mm along the Z axis, based on the specified height of the scanned object. Using this information, the system reads the given parameter stored in external Flash memory or internal EEPROM emulated in internal Flash memory. Both boards are connected by a connector marked with the number 6. The scanning system also has two USB connectors (No. 7) allowing for parameter control and the quick transfer of a large number of cloud points of the scanned object. Communication is also provided by a radio module (No. 11), for which the authors also designed an RF receiver. To reduce the risk of losing individual data samples during the online upload process, the samples were first stored in the device's memory and later forwarded to external systems. Due to their quantity and the limitations of the microcontroller used, it was necessary to extend its memory. Volatile SDRAM (No. 2) was used as a temporary buffer to store the downloaded data, which also requires a certain amount of time for appropriate conversion. The SDRAM memory capacity was 64 MB. Data can also be transported to a file stored on an external SD card, which is also important because of the potential failure of the power supply. The connector for this is located in the place marked with the number 8. Completed scanning is signaled by a buzzer (no. 9), which is possible with the use of the described infrared sensor measuring the distance from the profile of the scanned surface (no. 4).  
The PCB that complements the entire control system is shown in Figure 5. It contains outputs for the stepper motors (no. 5), conditioning the kinematics of the structure, two identical drivers (no. 4), and a 32-bit microcontroller (no. 6) responsible for the functionality of the entire LCD display (no. 2) and touch panel (no. 1), as well as a second SDRAM volatile memory (no. 7), supporting the display of specific pixels on the display. The connection between the boards was made using a ribbon connector marked with the number 3. The separation of the electronic circuit into two independent PCBs, one responsible for taking measurements and the other for the impulse control of the stepper motor, saved the measurement system from the risk of generating interference.