This shows you the differences between two versions of the page.
pm:prj2023:apredescu:laser_distance [2023/05/28 14:12] flaviu.popescu |
pm:prj2023:apredescu:laser_distance [2023/05/28 14:35] (current) flaviu.popescu |
||
---|---|---|---|
Line 11: | Line 11: | ||
The Laser Measurement Device uses the following components: | The Laser Measurement Device uses the following components: | ||
- | - Arduino microcontroller | + | - Arduino microcontroller |
- | - OLED display | + | - OLED display |
- | - Laser distance sensor | + | - Laser distance sensor |
- | - Laser diode | + | - Laser diode |
- | - Gyroscope | + | - Gyroscope |
- | - Microswitch | + | - Microswitch |
These components are interconnected based on electrical schematics derived from the datasheets and usage guides of each component. Simulations during the design phase aided in fine-tuning the operation of the device | These components are interconnected based on electrical schematics derived from the datasheets and usage guides of each component. Simulations during the design phase aided in fine-tuning the operation of the device | ||
+ | |||
+ | In addition to the electronic components, a significant part of the hardware design involved creating a custom enclosure for the device. The enclosure was designed using Fusion360, a popular 3D modeling software, and subsequently 3D printed. This approach allowed for a tailored fit of all the components, ensuring a compact and portable device. The design of the box was carefully thought out to provide easy access to the device's controls while protecting the sensitive electronic components inside | ||
+ | |||
+ | {{:pm:prj2023:apredescu:img_20230528_135113.jpg?800|}} | ||
+ | {{:pm:prj2023:apredescu:img_20230528_135149.jpg?400|}} | ||
===== Software Design ===== | ===== Software Design ===== | ||
Line 25: | Line 30: | ||
The software first measures the initial distance and orientation, stores these values, and then measures the final distance and orientation. It then calculates the actual distance moved in 3D space using these measurements. However, due to potential inaccuracies in sensor readings and the assumptions made in the calculations, the computed distance might not always match the actual distance moved | The software first measures the initial distance and orientation, stores these values, and then measures the final distance and orientation. It then calculates the actual distance moved in 3D space using these measurements. However, due to potential inaccuracies in sensor readings and the assumptions made in the calculations, the computed distance might not always match the actual distance moved | ||
+ | |||
+ | The software part of the project is designed in C++ and is intended to run on an Arduino board. The codebase is modular and includes several custom libraries to manage the different functions of the project: | ||
+ | |||
+ | **common.h** – A header file that contains definitions, configurations, and utility functions that are used across the entire project. | ||
+ | |||
+ | **distance.h** – A header file responsible for measuring distances. This is especially important for the project as the primary function is to calculate the distance between two points. | ||
+ | |||
+ | **display.h** – A header file that manages the display of information on an external device. | ||
+ | |||
+ | **gyro.h** – A header file that manages the gyroscope sensor data. This information is used in conjunction with the distance measurements to calculate the three-dimensional displacement of the device. | ||
+ | |||
+ | The main algorithm is responsible for the calculation of the displacement of the device. The device records two distance measurements, and from these, it calculates the displacement in three dimensions (x, y, z). The calculation uses the pitch and yaw data from the gyroscope to account for the rotation of the device | ||
+ | |||
+ | The code uses the MadgwickAHRS library for sensor fusion, which is a method used to combine data from multiple sensors to improve the quality and reliability of the data | ||
+ | |||
+ | The software is designed to be robust and accurate, with the ability to handle errors and uncertainties in the sensor data | ||
===== Rezultate Obţinute ===== | ===== Rezultate Obţinute ===== | ||
Line 41: | Line 62: | ||
===== Download ===== | ===== Download ===== | ||
+ | |||
+ | {{:pm:prj2023:apredescu:electronic_meter.zip|}} | ||
+ | |||
+ | ===== Bibliografie/Resurse ===== | ||
+ | |||
+ | Various resources were utilized in the development of the Laser Measurement Device. These resources include datasheets for the hardware components, libraries for managing the components, and online tutorials and guides for the Arduino platform |