
Masaryk University Faculty of Informatics Device for Analysis of Movement Using Inertial Sensors Master’s Thesis Bc. Bedřich Said Brno, Spring 2018 Masaryk University Faculty of Informatics Device for Analysis of Movement Using Inertial Sensors Master’s Thesis Bc. Bedřich Said Brno, Spring 2018 This is where a copy of the official signed thesis assignment and a copy ofthe Statement of an Author is located in the printed version of the document. Declaration Hereby I declare that this paper is my original authorial work, which I have worked out on my own. All sources, references, and literature used or excerpted during elaboration of this work are properly cited and listed in complete reference to the due source. Bc. Bedřich Said Advisor: RNDr. Zdeněk Matěj, Ph.D. i Acknowledgements I wish to express my sincere thanks to RNDr. Zdeněk Matěj, Ph.D., my advisor, for his continuous support and answering my questions. I am also grateful to Robotárna in Brno for providing me with some necessary facilities for the research. Special thanks go to Bc. Alena Beč- ková and other horse riders with their horses for continuous support during measurements and analyses. I would like to thank to Monet+ company, which was a commercial partner for this research. iii Abstract Currently, the inertial sensors are more widely used, and their price is decreasing. The lower price allows creating new solutions with lower costs. Some examples can be found in wearable devices, mobile phones, navigation or control systems. There are several devices for various use cases on the market. These devices usually cover their use cases and do not have any additional features like power independence, enough logging memory or openness for user code. The remaining hardware that fulfills all the conditions above is usually expensive. I have developed a new wearable independent device for cap- turing and processing the measured data. The independence means no external wires and no external power supply here. The device is able to work outdoors, to log the measured data and to provide a direct output based on internal computations. The user can choose between completely wireless communication or wired connection to other electronics. The sensors measure inertial, attitude, position and atmospheric values. For outdoor testing of the device I have selected the task about movement analysis of a horse. I placed the devices on the horse’s body as wearable devices and I was developing algorithms for determina- tion of the basic types of its movement – stand, walk, trot, canter or gallop. In general, the developed device can be used for capturing data from sensors, onboard data processing, navigation or control of mov- ing mechanics. The electronics work independently, so it is easy to install it on the measured or controlled objects. iv Keywords Electronic Device, Printed Circuit Board, Inertial Sensors, Inertial Measurement Unit, Internet of Things, Movement Analysis, Horse v Contents List of Tables xi List of Figures xiii 1 Introduction 1 2 Hardware 3 2.1 Task Analysis .........................3 2.2 Requirements .........................5 2.2.1 High level requirements . .5 2.2.2 Low level requirements . .6 2.2.3 Additional requirements . .6 2.3 Available solutions ......................6 2.4 Selection of parts for the new device .............6 2.5 PCB design ..........................6 2.5.1 Schematics and board layout . .6 2.5.2 Mechanical layout and connectors . .6 2.5.3 Highlights of the board layout . 10 2.6 Manufacturing ........................ 13 2.6.1 Collecting source data . 15 2.6.2 Manufacturing of the Printed Circuit Board . 15 2.6.3 Machine surface mount technology . 15 2.6.4 Finalization of the prototype . 16 2.7 Testing ............................. 16 2.7.1 Errata . 16 2.7.2 Device testing . 16 2.7.3 Recommendations for the next version . 16 2.7.4 Analysis of additional costs . 20 2.7.5 Comparison of the used IMUs . 22 3 Software 23 3.1 Programming the Board .................... 23 3.1.1 Programming ESP32 . 23 3.1.2 Programming BMF055 . 27 3.2 Application Programming Interface (API) .......... 30 3.2.1 SensorBoard API . 30 vii 3.2.2 General Application Programming Interface (API) for the controllers . 31 3.3 Usage Examples ........................ 33 3.3.1 Sensors data logger . 33 3.3.2 Sensor fusion and Attitude and Heading Refer- ence System (AHRS) . 34 3.3.3 UAV Flight controller with non-critical user pro- grammable processor . 34 3.3.4 Indoor navigation using Time Difference of Ar- rival (TDOA) . 37 3.3.5 RTOS education board . 37 3.3.6 MicroPython Robot Controller . 37 3.3.7 WiFi AccessPoint with server services . 40 3.3.8 Grid computing education board . 40 3.3.9 Internet of Things (IoT) wireless sensors . 42 3.4 Movement Analysis Firmware ................ 42 3.4.1 Before first use . 42 3.4.2 Files on the SD card . 44 3.4.3 Using the firmware . 44 3.4.4 Horse movement analysis feature . 45 3.4.5 Controlling via Transmission Control Protocol (TCP) . 45 3.4.6 Using multiple SensorBoards . 46 4 Analysis of a Horse Movement 49 4.1 Definitions of types of the movement ............. 49 4.1.1 Stand . 50 4.1.2 Walk . 50 4.1.3 Trot . 51 4.1.4 Canter . 53 4.1.5 Gallop . 55 4.2 The input data ......................... 55 4.2.1 Positions of the sensors . 57 4.2.2 The measured data as digital signal . 57 4.2.3 Input data requirements . 59 4.3 Tools for the analysis ..................... 59 4.3.1 Step counter . 59 4.3.2 Spectral analysis . 60 viii 4.3.3 Machine learning . 63 4.3.4 Looking for structures . 63 4.4 Implemented algorithm .................... 65 4.4.1 Workflow of the algorithm . 65 4.4.2 Detection of touching the ground . 66 4.4.3 Definitions of the gaits . 66 4.4.4 Possibilities of extension of the algorithm . 69 4.4.5 Results . 69 4.4.6 Comparison of the SensorBoard to MetaWear . 69 5 Conclusion 71 Used Acronyms 72 Bibliography 75 Index 79 A Hardware Documentation 81 A.1 Overview ........................... 81 A.1.1 Features . 81 A.1.2 Properties . 82 A.1.3 Power Supply . 82 A.2 Getting Started ........................ 83 A.2.1 Assembling . 83 A.2.2 Components Description . 84 A.3 Pin Connections ....................... 85 A.3.1 Pin Numbering . 85 A.3.2 Pin Description . 87 A.3.3 Power Supply . 87 A.4 LED Meanings ........................ 88 A.5 Internal Connections ..................... 89 A.5.1 Connector for BMF055 board (UART) . 90 A.5.2 HM-TRP radio connector . 91 A.5.3 GY-953 connector . 92 A.5.4 External pins . 93 A.5.5 Battery connector . 93 A.6 BMF055 Extension Board .................. 94 ix A.6.1 Pin Connection . 94 A.6.2 LED Meanings . 95 B Schematics and PCB layout od the SensorBoard 97 B.1 Schematics .......................... 97 B.2 Board layout .......................... 97 B.3 Template for soldering paste .................. 97 B.4 SensorBoard Drawings .................... 97 x List of Tables 2.1 SensorBoard low level requirements 1 7 2.2 SensorBoard low level requirements 2 8 2.3 Additional requirements for the SensorBoard 9 2.4 Available solutions 10 2.5 Selection of parts for the new electronic device 1 11 2.6 Selection of parts for the new electronic device 2 12 2.7 Errata of the SensorBoard 1 17 2.8 Errata of the SensorBoard 2 18 2.9 Parts of the SensorBoard recommended for the future versions 19 2.10 Additional costs calculation 21 A.1 SensorBoard properties 82 A.2 Description of components of the SensorBoard 84 A.3 External pins mapping 85 A.4 External pins properties 86 A.5 Internal and external ports on the SensorBoard 90 A.6 Connector for BMF055 board (Universal Asynchronous Receiver-Transmitter (UART)) 91 A.7 HM-TRP radio connector 92 A.8 GY-953 connector 93 A.9 Battery connector 94 A.10 BMF055 extension board pinout 95 A.11 BMF055 extension board LED meaning 96 xi List of Figures 2.1 Flowchart of the hardware design process 4 2.2 SensorBoard dimensions 8 2.3 Schematics of the power LEDs 12 2.4 Schematics of the boot transistors 12 2.5 Schematics of the ESP32 pin distribution 14 2.6 Schematics of the buttons on the SensorBoard 15 3.1 Schema of available modules inside the SensorBoard hardware 24 3.2 Configuration of the ESP-IDF program in terminal before the first compilation 25 3.3 The SensorBoard project opened in Eclipse IDE 26 3.4 The SensorBoard project opened in Atom text editor with PlatformIO plugin 27 3.5 The running Python serial terminal on the SensorBoard 28 3.6 The separate BMF055 board on the left and the same board mounted to the SensorBoard on the right 29 3.7 An opened BMF055 project in Atmel Studio 7 29 3.8 Simple logging application with SensorBoard 33 3.9 Advanced logging application with SensorBoard 34 3.10 Configuration of the SensorBoard on a horse 35 3.11 Sensor fusion example on custom AHRS 35 3.12 Sensor fusion AHRS example with two controllers 36 3.13 SensorBoard used as a quadcopter flight controller 38 3.14 TDOA relative location service on the SensorBoard 39 3.15 FreeRTOS application diagram on ESP32 on the SensorBoard 39 3.16 MicroPython robot controller example on the SensorBoard 40 3.17 WiFi based services example on the SensorBoard 41 3.18 Example of a grid with two failures created from multiple SensorBoards 41 xiii 3.19 Example of using SensorBoard as an IoT device streaming data from sensors via WiFi or GSM network 42 3.20 Example of the configuration file on SD card 43 3.21 Example of the ’format.txt’ file on SD card.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages128 Page
-
File Size-