5 LIST OF FIGURE Figure 1: Rack setup for switching device .... 12 Figure 2: Message switching method diagram .... 13 Figure 3: Packet switching diagram .... 14 Figure 4: Circuit switch
Trang 1MINISTRY OF EDUCATION AND TRAINING
HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION
FACULTY FOR HIGH QUALITY TRAINING
Ho Chi Minh City, Febuary, 2023
NGUYEN DINH QUANG KHAI
ADVISOR: MS NGUYEN MINH TRIET STUDENT: NGUYEN VIET HIEP
SKL 0 1 0 4 2 0
GRADUATION THESIS MECHANICAL ENGINEERING TECHONOLOGY
RESEARCH, DESIGN AND IMPLEMENTATION OF SWITCH-IN NETWORK DEVICE CONNECTING WITH
FLASHING DEVICES AND MULTIPLE ECUS
Trang 2HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION
FACULTY OF HIGH QUALITY TRAINING
GRADUATION PROJECT
STUDENT’S NAME AND ID:
NGUYEN VIET HIEP - 18146017 NGUYEN DINH QUANG KHAI - 18146031
MAJOR: MECHATRONICS ENGINEERING INSTRUCTOR: MS NGUYEN MINH TRIET
HO CHI MINH CITY, 2/2023
RESEARCH, DESIGN AND IMPLEMENTATION OF SWITCH-IN NETWORK DEVICE CONNECTING WITH FLASHING DEVICES AND MULTIPLE ECUS
Trang 3HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION FACULTY FOR HIGH QUALITY TRAINING
Capstone Project Proposal
Student name: Nguyễn Đinh Quang Khải Student ID: 18146031 ✆ : 0338739318
Student name: Nguyễn Việt Hiệp Student ID: 18146017 ✆ : 0776262656
1 Title of Capstone Project:
RESEARCH, DESIGN AND IMPLEMENTATION OF SWITCH-IN NETWORK
DEVICE CONNECTING WITH FLASHING/DEBUG DEVICES AND MULTIPLE
ECUS USING FOR LABORATORIES
2 Initial materials:
Microcontroller: Raspberry Pi 4
Size and tolerance of device
The number of devices and ECU connected with the switch box
Using step motor for choosing communication port
3 Main Content:
Microcontroller: Raspberry Pi 4
Size and tolerance of device
The number of devices and ECU connected with the switch box
Using step motor for choosing communication port
4 Expected Results
Real prototype of switch device
Lab booking app
Project report
7 Language: Report: English • Vietnamese •
Oral presentation: English • Vietnamese •
Trang 4THE SOCIALIST REPUBLIC OF VIETNAM
Independence – Freedom– Happiness
-
Ho Chi Minh City, Day Month…….,
Year… …
MECHANTRONICS PROJECT ASSIGNMENT
ADVISOR’S EVALUATION SHEET
Student name: Nguyen Viet Hiep Student ID: 18146017
Student name: Nguyen Dinh Quang Khai Student ID: 18146031
Major: Mechatronics Engineering
Project title: Research, Design And Implementation Of Switch-In Network
Device Connecting With Flashing Devices And Multiple Ecus
Advisor: MS Nguyen Minh Triet
Defender Teacher: Ph.D Vu Quang Huy
EVALUATION
1 Content of the project:
2 Strengths:
3 Weaknesses:
Trang 5
4 Approval for oral defense? (Approved or denied)
5 Overall evaluation: (Excellent, Good, Fair, Poor)
Trang 6
1
ACKNOWLEDGEMENT
We would like to express our great gratitude to our honorable teacher, MS Nguyen Minh Triet, who supported us with proper guidance, sincere comments and advice, and led us in the right way to conduct our graduation thesis
We are grateful to Ho Chi Minh City University of Technology and Education, The Faculty For High Quality Training and The Faculty Of Mechanical Engineering for giving us an intensive learning environment so that we could equip ourselves with both practical experience and necessary skills to encounter realistic working conditions We also would love to thank all of my respected teachers who heartedly impart to us the knowledge during four years
At last, we are thankful to our family and friends for their help during our learning period Their faith in me has kept my spirits and motivation up throughout this process
We would like to express our heartfelt appreciation and gratitude to our colleagues at Bosch Global Software Technologies Your encouragement and guidance have enabled us to complete our process in this thesis Your guidance on both research and my career has been invaluable
We will strive to use gained skills and knowledge in the best possible way in order to attain desired career objectives
Sincerely,
Trang 7TABLE OF CONTENTS
Contents
ACKNOWLEDGEMENT 1
TABLE OF CONTENTS 2
LIST OF FIGURE 5
LIST OF TABLES 8
ABSTRACT 9
CHAPTER 1: INTRODUCTION 10
1.1 MOTIVATION FOR THE RESEARCH 11
1.2 REQUIREMENT FOR THE DEVICE 12
1.2.1 Scope And Objective of Project 12
1.2.2 Input Requirements 12
1.2.3 Output Requirements 12
1.3 METHOD TO SWITCH IN THE NETWORK 13
1.3.1 Messages Switching Method 13
1.3.2 Packet Switching Method 14
1.3.3 Circuit switching method 14
CHAPTER 2: LITERATURE REVIEW 16
2.1 DEVICE IN THE SYSTEM SPECIFICATIONS REVIEW 17
2.1.1 IC5000 17
2.1.2 Vector VX1000 series 19
2.2 JTAG Interface Of ECU 20
2.3 NETWORK SWITCHING REVIEW 21
2.3.1 Network topology 21
2.3.2 Internet of Things (IoT) 22
2.3.3 Architecture of a network 23
2.3.4 Database 24
2.4 MECHANISM ANALYSIS 26
2.4.1 Circuit switching method phase 26
2.4.2 Mechanical selection 26
2.4.3 Motor selection 32
Trang 83
2.5 MACHINE VISION 35
2.5.1 General About Image Processing 35
2.5.2 Features Haar – Like 37
2.5.3 AdaBoost Algorithm 39
2.5.4 Multi-tasking Cascaded Convolutional Networks (MTCNN) 39
CHAPTER 3: DESIGN AND IMPLEMENTATION 41
3.1 BLOCK DIAGRAM 42
3.1.1 Block Listing 42
3.1.2 Block Diagram 43
3.1.3 Mechanical Block Diagram 44
3.2 OPERATION DESCRIPTION 46
3.3 FLOWCHART DESIGN 47
3.3.1 Controlling Flowchart 47
3.3.2 Switch Box Controller And Function Flwchart 48
3.3.3 Machine Vision Method Flowchart 50
3.4 PACKAGING DESIGN 51
3.5 ELECTRICAL DESIGN 55
3.5.1 The Slection Of Electric Components 55
3.5.2 Schematic Diagram 63
3.6 MECHANICAL DESIGN 65
3.6.1 Mechanical Drive Design 65
3.6.2 Mechanical Guide Design 67
3.7 FACE RECOGNITION 70
3.8 SWITCH BOX TOOL DESIGN 73
CHAPTER 4: DESIGN ANALYSIS 79
4.1 ESTABLISH TARGET SPECIFICATIONS 80
4.1.1 Qualitative Statements 80
4.1.2 List of metrics 81
4.1.3 Proposed specifications and experimental methods 82
4.2 EXPERIMENTS 82
4.2.4.1 Static Tests 82
4.2.2 Dynamic test: 82
Trang 9CHAPTER 5: CONCLUSIONS 99
5.1 ACHIEVEMENTS 100
5.2 PROBLEMS AND SOLUTION 101
5.3 FUTURE WORK 101
REFERENCES 102
APPENDIX 1: 103
APPENDIX 2: 117
Trang 105
LIST OF FIGURE
Figure 1: Rack setup for switching device 12
Figure 2: Message switching method diagram 13
Figure 3: Packet switching diagram 14
Figure 4: Circuit switching diagram 15
Figure 5: IC500 specification table 17
Figure 6: Bluebox device IC5000 18
Figure 7: 14-pin 2.54mm MPC5xxx Debug Adapter 18
Figure 8: VX1060 Base module specsification 19
Figure 9: VX1060 Base module 19
Figure 10: Bosch USS ECU 21
Figure 11: Types of network topology 22
Figure 12: SQLite Database 25
Figure 13: LAN shared folders 25
Figure 14: Lead screw – nut drive 26
Figure 15: Lead scew structure 27
Figure 16: Gear bell drive 28
Figure 17: Rack and pinion gear drive 29
Figure 18: Linear Motion Bearing 31
Figure 19: Stepper Motor 32
Figure 20: Principle diagram of DC servo motor with feedback 33
Figure 21: DC Motor 34
Figure 22: Step in image proccessing diagram 35
Figure 23: Some feature of Haar-Like 37
Figure 24: How to calculate the Integral Image of an image 38
Figure 25: How to calculate the total pixel value of the area to be calculated 38
Figure 26: Block diagram of AdaBoost face detection stage 39
Figure 27: P-Net network architecture 40
Figure 28: R-Net network architecture 40
Figure 29:O-Net network architecture 40
Figure 30: Block diagram 43
Figure 31: Mechanical BLock Diagram Of Switch Box 44
Figure 32: Controlling Flowchart 47
Figure 33: Controlling Flowchart 48
Figure 34: Machine Vision Method Flowchart 50
Figure 35: Switch Box Body 3D design 51
Figure 36: Operating Header 3D Design 52
Figure 37: Bearing holder 3D design 53
Figure 38: Track Holder 3D Design 53
Figure 39: 8mm bearing 3D design 54
Trang 11Figure 40: Arduino Pin Diagram 56
Figure 41: Raspberry Pi 4 Model B 57
Figure 42: NIDEC Bipolar Type Stepper Catologue 59
Figure 43: MG90S Servo Specification 60
Figure 44: A4988 Driver 60
Figure 45: A4988 shield V3 61
Figure 46: Circuit connection diagram of motor driver A4988 61
Figure 47: Schematic diagram of switch box 63
Figure 48: Input board 3D model 64
Figure 49: Input board PCB design 64
Figure 50: Output board PCB design 64
Figure 51: Output board 3D model 65
Figure 52: Diagram of lead screw 66
Figure 53: Catalogue of Lead Screw Aluflex Group 67
Figure 54: Guide Shaft diagram 68
Figure 55: Bearing specification 69
Figure 56: Train model flowchart 70
Figure 57: Trained data set 72
Figure 58: Check lab tool 73
Figure 59: GUI of check lab tool 73
Figure 60:Cchoosing lab connect 74
Figure 61: List of available lab 74
Figure 62: Lab status table 75
Figure 63: Quick remote lab 75
Figure 64: Lab user history 75
Figure 65: Curent status of the lab 76
Figure 66: Face recognition for lock/unlock feature 76
Figure 67: Lock/Unlock status 77
Figure 68: Dataset of user 77
Figure 69:Data set of lab connection status 78
Figure 70:Data set of lab lock/unlock 78
Figure 71: Rack of lab use for testing 83
Figure 72: Setup switch box with lab device 83
Figure 73: Choosing lab to connect 84
Figure 74: Check communication of debugger with lab 84
Figure 75: Start flashing to ECU 84
Figure 76: Face recognition check 85
Figure 77: Collect data user face to train 86
Figure 78: Label data 87
Figure 79: Model compile parameters 88
Figure 80: Keras model architecture 89
Trang 127
Figure 81: Face recognition Test 90
Figure 82: Face recognition Test with dark environment 91
Figure 83: Face recognition test in office 92
Figure 84: Face recognition with many angles and headset 93
Figure 85: Face recognition with headset 93
Figure 86: Error in face recognition 94
Figure 87: Wrong detection when wearing mask 94
Figure 88: Model loss ratio in 10 epochs 95
Figure 89: Model accuracy ratio in 10 epochs 95
Figure 90: Loss and accuracy while training 96
Figure 91: Model loss ratio in 5 epochs 96
Figure 92: Model accuracy ratio in 5 epochs 97
Trang 13LIST OF TABLES
Table 1: Estimate cost of lab setup 11
Table 2: Estimate time to setup lab 11
Table 3: Arduino UNO Specification 56
Table 4: A4988 Control Mode 62
Table 5: List of metrics 81
Table 6: Proposed specifications and experimental methods 82
Table 7:Static tests parameters 82
Table 8: Result of switch box testing 85
Table 9: Face recognization testing result in many conditions 98
Table 10: Calculated cost save with switch box 100
Table 11: Calculated time save with switch box 100
Trang 149
ABSTRACT
Currently with the large demand of the project for testing, our lab system becomes overloaded Moreover, to be able to scale up the lab is very difficult due to the high cost of these flashing/debugging devices and the lack of chips in the industry, which makes testing equipment delayed and cannot be produced in time
Flashing and debugging devices are used by many labs and it requires someone
to assist in manual setup A simple setup job consumes a lot of effort to move from office to lab as well as waiting time for equipment
With the need to reduce investment costs for these devices by sharing them in many labs as well as reducing the effort of test engineers for a simple setup job that repeats continuously, we decided to develop a “switch- in network device”
Basically, this device is developed based on a controlled electronic circuit with
an intranet and web booking capabilities Along with that, this device also aims to become a part of the continuous automation testing system called Jenkins
Trang 15CHAPTER 1: INTRODUCTION
Chapter Outline
⮚ 1.1 Motivation For The Research
⮚ 1.2 Requirement For The Product
● 1.2.1 Input Requirements
● 1.2.2 Output Requirements
⮚ 1.3 Method To Switch In The Network
● 1.3.1 Messages Switching Method
● 1.3.2 Packet Switching Method
● 1.3.3 Circuit switching method
Trang 1611
1.1 MOTIVATION FOR THE RESEARCH
As mentioned above, our lab system is now becoming overloaded with a shortage of flashing equipment for labs Moreover, the setup of these devices is very simple, but it takes a lot of time for testing engineers to disassemble manually In addition, these devices do not have a clear management system for usage time When someone has a need to use them, they have to contact each person in the team to know which lab the device is connected to and whether it is being used or not That is the reason why we develop a switch-in network device
Price for each setup of IC5000 devices for lab could be take over €3000 So that if
we prepare for each lab 1 IC5000 it will cost overall €12000 The same as IC5000 for each XCP setup it will cost for device and license €1800 and for the whole lab in the rack is €7200 Full cost for debugger device in test lab is €19200 It could be a huge amount for test lab setup These devices is require for testing lab but we don’t need to plug it all the time for lab it can be use in sharing mode With sharing mode, it could save €14400
As our measure it takes around 15mins overall for each time for one person to switching debugger through the lab (10 mins in that for travel form the office to laboratory location) and it could be up to 30 mins of switching debugger support is require from another person due to it could take time to wait the setup success full confirmation from requester
Full lab setup Sharing mode
Table 1: Estimate cost of lab setup
Support setup require Project owner setup Moving from office to
Table 2: Estimate time to setup lab
Trang 171.2 REQUIREMENT FOR THE DEVICE
1.2.1 Scope And Objective of Project
This device will use to switch debugger ( XCP ) and flashing device ( IC5000 ) automatically and remotely control it through Raspberry Pi between 4 lab in available testing rack of EDA9 With the scope switching these device we would build a tool to monitor the lab user and locking lab access for which lab setup under test
1.2.2 Input Requirements
- Automatically setup flashing/debugging device
- Provide a booking system to book the device and also check the status of the flashing device
- Size of the device: fit with a laboratory rack(160cm x 50cm x 25cm)
- Run with AC voltage – 220V AC or 12V DC
- Implement with fastest solution to maintain the lack of device in lab
1.2.3 Output Requirements
- Work is stable
- Ease of replacement
- Run with full function as human setup and can control manuals when error occurs
- Reduce time to switch debugger more than 50% as manual work
- Product specification
Figure 1: Rack setup for switching device
Trang 1813
1.3 METHOD TO SWITCH IN THE NETWORK
Switched communication networks route data from a source to a destination through
a number of intermediary nodes The method by which nodes control or switch data to transmit it between particular points on a network is known as switching There are 3 common switching techniques:
1.3.1 Messages Switching Method
Message Switching is a connectionless network switching approach in which the complete message is routed from the sender node to the receiver node one hop at a time
It served as the predecessor to packet switching Before the invention of packet switching, message switching adequately replaced circuit switching Data transmissions over telex networks and paper tape relay systems were its first uses Ad hoc sensor networks, military networks, and satellite communications networks continue to use message switching even though packet switching has completely replaced it [1]
The message-switched network stores and delays the message if all of the network's resources are exhausted or if the network becomes congested until enough resources are available for efficient transmission In message switching, the source node and destination nodes are not directly coupled Instead, the task of sending messages from one node to the next is handled by intermediary nodes, most often switches Because of this, each intermediate node in the network must store each message before sending it again as soon as the necessary resources are available If the resources are not available, messages are kept on file indefinitely Store and forward is the name given to this procedure Every message must have a header, which typically includes routing details like the source and destination, expiration time, priority level, and other information Because message switching treats each message as a single complete entity, each switching node in a message switching network needs to have enough storage to buffer messages As a result, the message is strictly discarded if its size exceeds the switch's storage capacity One of the key drawbacks of using these switching methods is this
Figure 2: Message switching method diagram
Trang 191.3.2 Packet Switching Method
Packet Switching is a switching mechanism that divides a message into smaller bits and sends them separately rather than all at once The message is broken up into smaller pieces called packets, and each packet is assigned a specific number to indicate its position upon receipt The source address, destination address, and sequence number are all contained in a packet's header Throughout the network, packets will take the shortest route before being reassembled in the right order at the receiving end [2] Each packet in a packet switching technique consists of a header and a payload The addressing information used by the intermediate routers to guide the packet to its destination is contained in the packet header The payload carries the actual data
A packet is transmitted as soon as it becomes available in a node based on its header information The packets that make up a message are not all sent on the same path The message's packets consequently reach their destination out of order Rearranging the packets at the destination is necessary to find the original message
Figure 3: Packet switching diagram
1.3.3 Circuit switching method
Circuit switching is a network technology implemented in telecommunications networks In circuit switching, before two network nodes can communicate, they must first create a dedicated communications channel (circuit) through the network This technique creates and maintains a dedicated physical circuit between two nodes or locations for the duration of a connection Circuit switched networks are also known as connection-oriented networks because a dedicated circuit must be established before data can be sent over it [3]
The fundamental concept is to establish a connection path or link between two hosts
so they can exchange data (messages) Once the connection has been made, the two hosts are prepared to start speaking Because voice traffic needs a single, dedicated physical path with consistent timing to maintain a constant delay on the circuit,
Trang 2015
telephone networks are typically circuit switched The traditional telephone network is the largest circuit switched network (POTS) Circuit switching is also used in the original GSM network
Figure 4: Circuit switching diagram
Trang 21CHAPTER 2: LITERATURE REVIEW
CHAPTER OUTLINE
⮚ 2.1 DEVICE IN THE SYSTEM SPECIFICATIONS REVIEW
● 2.1.1 IC500
● 2.1.2 Vector VX1000 series
⮚ 2.2 JTAG INTERFACE OF ECU
⮚ 2.3 NETWORK SWITCHING REVIEW
- 2.4.2.1 Mechanical drive selection
- 2.4.2.2 Linear guide mechanism selection
- 2.5.1.4 Performance And Description
- 2.5.1.5 Identification And Interpolation
● 2.5.2 Features Haar – Like
● 2.5.3 AdaBoost Algorithm
● 2.5.4 Multi-tasking Cascaded Convolutional Networks (MTCNN)
Trang 23Figure 6: Bluebox device IC5000
Connector: 14-pin 2.54mm MPC5xxx Debug Adapter
This debug adapter is used to connect the iC5000 and the iC5700 BlueBox to the MPC5xxx/SPC5 based target It’s used to connect to the embedded target featuring a 14-pin 2.54mm pitch target debug connector with the MPC5xxx/SPC5 pinout The debug adapter connects to the 25 cm 40-pin ribbon cable coming from the BlueBox and
to the target debug connector on the other side
14-pin 2.54mm MPC5xxx Debug Adapter features resettable fuses on all connected pins These protect debug signals against overcurrent and cycle back to a conductive state after the excessive current fades away Mandatory pins on the microcontroller side are the GND, Vref, nRESET, TMS, TDI, TDO and TCK [5]
Figure 7: 14-pin 2.54mm MPC5xxx Debug Adapter
Trang 2419
2.1.2 Vector VX1000 series
The VX1000 system is a scalable solution with top performance for your measurement and calibration tasks It can be used in the vehicle – both in the interior and in the engine compartment – on test benches and in the laboratory Especially When developing ADAS ECUs, this allows you to control raw data captured by high resolution radar sensors in combination with XCP data, e g object/tracking lists [6] The system forms the interface between the ECU and a measurement and calibration tool such as CANape.For high data throughput with minimal impact on ECU run-time, data is accessed over the microcontroller-specific data trace and debug ports
The VX1000 Base Module is connected to the PC over XCP on Ethernet, an OEMindependent ASAM standard (www.asam.net) that is widely used in the automotive industry The VX1000 measurement hardware is connected to the ECU via
a POD (Plug-On device).Depending on the available microcontroller interface, either the data trace or a copying method can be used to acquire measurement data
● VX1060
Figure 8: VX1060 Base module specsification
Figure 9: VX1060 Base module
Trang 25The VX1000 System is a scalable solution with top performance for your ECU measurement and calibration tasks It can be used in the vehicle – both in the cabin and
in the engine compartment – on test benches and in the laboratory Especially when developing ADAS ECUs, this allows you to control raw data captured by high-resolution radar sensors in combination with XCP data The system forms the interface between the ECU and a measurement and calibration tool
The VX1000 Base Module is connected to the PC over XCP on Ethernet, an OEM-independent ASAM standard that is widely used in the automotive industry The VX1000 measurement hardware is connected to the ECU via a POD (Plug-On device)
2.2 JTAG Interface Of ECU
Joint Test Action Group (JTAG) is the common name used for a debugging, programming, and testing interface typically found on microcontrollers, ASICs, and FPGAs It makes it possible to test, program, and/or debug all components with this interface using a single connector on a PC board that can daisy chain them all together
The organization that created the IEEE 1149.1 standard is known as JTAG The Test Access Port (TAP) controller logic used in processors with JTAG interfaces is defined by this standard [7]
Required below pins :
TMS -Test Mode Select
TCK - Test Clock Input
TDI - Test Data Input
TDO - Test Data Output
TRST - Test Reset (optional)
TMS - selects the device under test
TCK - clocks data into TDI
TDI - the test or programming data input, cascaded through all JTAG compliant devices in the system
TDO - the resulting output
TRST - Test reset
JTAG Connector
There is no standard JTAG connector or pinout, so suppliers are able to define their own
Trang 2621
Figure 10: Bosch USS ECU
2.3 NETWORK SWITCHING REVIEW
2.3.1 Network topology
The physical and logical arrangement of nodes and connections in a network is referred to as network topology Switches, routers, and software with switch and router features are common components of nodes Graphs are commonly used to represent network topologies
The arrangement of networks and the relative location of traffic flows are described by network topologies Administrators can use network topology diagrams to determine the best node placements and the best traffic flow path Network topology has a significant impact on how a network operates The topology, in particular, has a direct impact on network functionality Choosing the right topology can help boost performance because a well-chosen and maintained network topology improves energy efficiency and data transfer rates
Physical network topologies and logical network topologies are the two types of network topologies The actual arrangement of nodes and links makes up a network's physical topology Logical network topologies specify a network's configuration, including the nodes that connect and how they do so, as well as the way that data is transferred
Trang 27Figure 11: Types of network topology
There are several types of topologies For example, physical topologies include the following:
• Bus network Every node in the bus network topology is linked in series by a single wire Today's cable broadband distribution networks are the main places where this configuration may be found
• Star network A central device in the star network design links to every other node via a central hub The majority of wired home and office networks as well
as switched local area networks using Ethernet switches have a physical star topology
• Ring network The nodes are linked together in a closed-loop manner in the ring network topology While some rings can only transmit data in one direction, others can transmit data in both directions As traffic can flow in either direction
to reach a node, bidirectional ring networks are more resilient than bus networks There are many different types of network topology tools available, such as setup and administration tools, network performance software, and network mapping software For instance, network configuration software automates repetitive activities while assisting in network configuration These technologies can automatically discover network nodes, highlight obvious risks, and are frequently used to create complex network topologies
2.3.2 Internet of Things (IoT)
IoT, or the Internet of Things, refers to the overall network of interconnected devices as well as the technology that enables communication between them as well as with the cloud We now have billions of devices connected to the internet as a result of the development of low-cost computer chips and high bandwidth telephony This
Trang 2823
implies that commonplace gadgets like vacuum cleaners, cars, and robots might employ sensors to gather data and respond directly to consumers
Benefits of Internet of Things:
• Boost innovation Businesses have access to cutting-edge analytics through the Internet of Things, which reveals new prospects Businesses, for instance, can develop highly focused advertising campaigns by gathering information on consumer behavior
• Use AI and ML to transform data into insights and actions Future results can be forecast using collected data and historical trends To forecast maintenance incidents, for instance, warranty information can be combined with IoT data This can be applied to provide customers with proactive support and foster client loyalty
• Increased security Digital and physical infrastructure may be continuously monitored to improve performance, efficiency, and safety issues To automatically schedule system updates, for instance, hardware and firmware version data might be paired with information from an onsite monitor
• Scale differentiated solutions IoT technologies can be utilized to boost satisfaction by putting the customer first For instance, it is possible to quickly replenish popular items to prevent shortages
In its most basic form, the IoT system architecture is composed of three tiers: Tier 1
is made up of devices, Tier 2 is the edge gateway, and Tier 3 is the cloud Networked items such as sensors and actuators included in IoT equipment are considered devices, especially when they link to an Edge Gateway using proprietary or Modbus, Bluetooth, Zigbee, or other wireless protocols The Edge Gateway layer is made up of sensor data aggregation platforms called Edge Gateways that offer features including data pre-processing, cloud connectivity security, event hub usage, edge analytics, and, in certain circumstances, fog computing For better management, the edge gateway layer is also necessary to provide the upper layers with a common picture of the devices The final tier includes an IoT cloud application built with the microservices architecture, which
is typically polyglot and inherently secure due to HTTPS/OAuth
2.3.3 Architecture of a network
To handle the surge of devices, the Internet of Things necessitates massive scalability in the network space To connect devices to IP networks, IETF 6LoWPAN can be used With billions of devices joining the Internet, IPv6 will play a critical role
in network layer scalability Constrained Application Protocol, ZeroMQ, and MQTT from the IETF can all provide lightweight data transport Many groups of IoT devices are hidden behind gateway nodes in practice and may not have unique addresses Also, the vision of everything being interconnected is not required for most applications because it is primarily the data that requires interconnection at a higher layer To avoid such a large burst of data flow through the Internet, fog computing is a viable option
Trang 29The computation power of edge devices to analyze and process data is extremely limited IoT devices have limited processing power because their purpose is to provide data about physical objects while remaining autonomous Heavy processing demands more battery power, reducing IoT's ability to operate Scalability is simple because IoT devices simply send data over the internet to a server with enough processing power
Withdraws:
• Because SQLite does not need to be configured, installed, does not support GRANT and REVOKE, the database access can only be the system file permissions
• SQLite uses coarse-gained locking mechanism, so it can support many people reading data at the same time, but only one person can write data
• SQLite is not suitable for systems that need to process a large amount of data, which arises continuously
Benefits:
• SQLite does not need a client-server model to work
• SQLite does not need to be configured ie you do not need to install
• With SQLite database is stored on a single file
• SQLite supports most of the features of the SQL Query language according to the SQL92 standard
• SQLite is very compact full version of the feature is less than 500kb, and can be smaller if some features are omitted
• Data operations on SQLite run faster than database management systems under the client - server model
• SQLite is very simple and easy to use
• With its compact nature, SQLite fast data retrieval is often used to embed projects
LAN and shared folders:
LAN (Local Area Network) is an internal network connection between computers and devices such as printers, fax machines in companies and private organizations within a small area LAN network has good security system and fast connection and data transmission speed
Trang 3025
Because LAN characteristics only link computers within a certain range, allowing high-speed data transmission, the error rate in the implementation process is almost non-existent The computers are connected within the distance between computers from a few meters to several hundred meters
The connection method of the LAN is as follows: The computers are linked to each other through network cards and network cables
Everyone on a network with the right authorisation or credentials can access a shared network folder, which is a file folder While being on the same internet network
as the network folder gives authorized users access to its contents, access to the folder does not ensure access to the complete drive
Figure 12: SQLite Database
Figure 13: LAN shared folders
Trang 312.4 MECHANISM ANALYSIS
2.4.1 Circuit switching method phase
There are 3 phases of circuit switching: [3]
+ Circuit Establishment: In this stage, an intermediary circuit between the sender and the receiver is established specifically for the transfer of the specified message with the aid of intermediate switching centers Signals are used by the sender and the receiver to request and confirm the creation of the circuit as well as to transfer data
+ Data Transfer: This phase is the equivalent of talking between people because in this phase data and voice signals are transferred between the sender and the receiver The connections between both the parties remain till the time they communicate + Circuit Disconnection: This phase is similar to human conversation because data and voice signals are transferred between the sender and the receiver during this phase Both parties' connections are maintained until they communicate
2.4.2 Mechanical selection
2.4.2.1 Mechanical drive selection
Lead screw – nut drive
The lead screw is a drive system, precision machined to transform rotational motion into reciprocating motion according to the screw-bolt mechanism For smooth and precise movement, continuous and durable operation in the long run, we must have reasonable lubrication measures.When the rotating screw causes the nut to reciprocate, the screw rotates by one turns, the nut will reciprocate a distance equal to the pitch of the screw
Figure 14: Lead screw – nut drive
Trang 32+ Low power transmission efficiency, high cost
There are two types of lead screws:
+ Regular lead screw: is a lead screw and nut that are in direct contact with each
other and slide over each other through threaded faces This type has the disadvantage
of high friction due to surface contact generating sliding friction, and error due to clearance between lead screw and nut when reversing movement
To eliminate the error of the clearance between the screw and the nut, a spring mechanism is attached to the nut to keep the nut in contact with one threaded face of the screw
+ Lead screw ball (ballscrew): Is a drive system, precision machined to convert
rotational motion into reciprocating motion according to the screw-bolt mechanism (screw nut, or nut) The contact between the screw rod and the screw belt is a layer of steel balls to minimize friction Helps to move smoothly and accurately, continuously operating for a long time
Operation: The contact between the ball screw and the nut has a groove (flute
groove) filled with steel balls When the screw rotates, the balls roll in the thread of the screw and the nut This is to reduce their friction Because the balls will eventually fall out, the nut has a return pipe (return) to catch the balls from the groove of the screw and return them to the beginning of the ball track at the end of the nut The thrust of the nut
is gentler due to the rolling motion of the ball balls, rather than sliding
Trang 33Gear belt drive
The toothed belt is a flat belt made in a closed loop, with teeth on the inside When in contact with the gears, the teeth of the belt will engage with the teeth on the pulley The power transmission by the belt drive coupling has the following advantages:
no slippage, large transmission ratio, high efficiency, no need for excessive belt tension, and small force acting on the shaft and on the bearing The toothed belt is made from rubber or molded from polyurethane rubber The load-bearing layer is mainly steel wire, glass fiber or polyamide fiber
Rack and pinion gear drive
The gear rack transmission operates on the principle of converting from the rotational motion of the motor to the reciprocating motion When the rack and pinion combine, it will form an articulating motion in the form of a rigid close to each other, without causing slip or vibration This allows for the transmission of small forces in precision engineering; or a very large force, like the actuator in a rolling mill, keeps the correct transmission ratio
Trang 3429
Figure 17: Rack and pinion gear drive
Advantage:
It is quite small in size but has a large load capacity
Has a stable gear ratio due to no slippage
0.97-0.99 is the gear efficiency
Working with high speed, high capacity
Durable use
Disadvantages:
Complicated manufacturing
Requires high accuracy
Noise at high speed
Conclusion
The requirement of the actuator in the switch box that the team designed is to transform rotation of the motor into reciprocating motion The selection of transmission mechanism depending on the machine's working conditions and control requirements,
in fact there are many transmission mechanism to convert rotational motion into reciprocating such as rack-and-pinion gear drive, lead screw, and belt drive (belt mounting part) because of the technical requirements techniques such as compactness, reasonable price, easy selection and use of the selected group of rack-and-pinion and lead screw - nut as the drive mechanism for the shafts:
+ Rack-and-pinion transmission for the head part (z axis)
+ Lead screw – nut drive for position control shaft ( y axis)
Trang 352.4.2.2 Linear guide mechanism selection
Purpose of the guide mechanism
Guides are used in machine tools for the following purposes:
+ Navigation or path control for bearer operations
load or tool holder or workpiece
+ Absorbs all dynamic or static forces
Points to be considered while designing the guide:
+ Hardness
+ The ability to absorb shock
+ Geometric parameters and kinematic accuracy
+ Velocity and slip
+ Friction property
+ Abrasion
+ Provides for editing in performance
+ Positioning in relation to the workspace
+ Protection from chips and damage
+ Requirements of guidance in precision control machines
+ Ensure the smallest movement of the machine
+ Avoid the phenomenon of sliding according to the jump
+ Reduce energy loss, have good lubricating ability
Long life and high reliability
Types of guides used in practice
V-shaped guide
V-shaped or reverse V-shape is widely used in cutting machines, especially lathes One of the advantages of the V-type or the V-type rotating lane can be oriented parallel to the guide axis with the axis of rotation, which has no effect on wear There
is closed motion as the component stabilizes in the lower components, and the component automatically maintains alignment Therefore, the shafts do not require a V-guide to provide tolerances caused by wear On some machines, the angle of the V-shape is different to reduce the possibility of erratic wear of the V-surface
Dovetail Guide
The dovetail guide is a basic, economical design that provides smooth motion Stages that use the dovetail guide are often low cost, slim in the direction of motion, and range in weight depending on the production material
Most dovetail stages are made out of lightweight aluminum alloy or low cadmium brass Some other is made of steel to handle heavier loads
If high accuracy and high rigidity are not a priority, but if cost and smooth motion are, the dovetail guide provides the most cost-effective solution for your application
Shaft Guide
Trang 3631
For shaft guides, the bore of the load-bearing part specifies the support around the guide For small relational obstructions and light loads, shaft guides prove effective The limitation to the use of these guides for long crossbars is that if the guide bar supports only each end, it may sag or bend in the middle of the load length
Linear Ball Guide
Rolling guides or reciprocating anti-friction guides are used to overcome the relatively high coefficient of friction in metal-to-metal contact and the result of addressing limiting in the list section above
They use rolling elements between the moving and stationary parts of the machine They offer the following advantages when compared to friction guides:
+ Low friction
+ No slip
+ Free to assemble
+ Profitable in ready-to-install condition
+ High load capacity
+ Capacity to accommodate heavier preset loads
+ Higher horizontal strike speed
The main disadvantage of these guides compared to friction guides is their lower damping ability
Figure 18: Linear Motion Bearing
The number of machines that use roller bearings to provide rolling operations is more than sliding The roller bearings are in contact with the guide machined on the molded parts of the machine These bearing types are very efficient in smooth machining and are easy to move, but still require precision machined geometry for
Trang 37castings The surfaces at the point of contact with the roller bearing need to be hardened and should have a smooth surface
+ Open-loop position control: A great advantage of stepper motors is that we can adjust the rotation position of the rotor at will without the need for position feedback like other motors encoder or accelerator (different from servo)
+ Independent of the load: With other types of motors, the characteristics of the load greatly affect the quality of control With a stepper motor, the rotor rotational speed is independent of the load (while still in the pullable torque region) When the load torque
is too large, it causes slippage, so the rotation angle cannot be controlled
Figure 19: Stepper Motor
Trang 3833
Servo Motor
Servo motor is a closed-cycle controlled device From the velocity/position feedback, the numerical control system controls the operation of a servo motor For the above reasons, position or speed sensors are necessary components for a servo motor The operating characteristics of a servo motor are highly dependent on the magnetic properties and control methods of the servo motor There are 3 types of servo motors in use today: AC servo motors based on the squirrel cage AC motor platform; DC servo motor is based on DC motor platform; and brushless AC servo motor based on asynchronous motor platform
Figure 20: Principle diagram of DC servo motor with feedback
DC motor
A direct current (DC) motor is a type of rotary electric motor that converts direct current (DC) electrical energy into mechanical energy The most common types rely on the forces produced by induced magnetic fields caused by current flowing through a coil Almost all types of DC motors have an internal mechanism, either electromechanical or electronic, that changes the direction of current in a portion of the motor on a regular basis
DC motors were the first widely used type of motor because they could be powered by existing direct-current lighting power distribution systems The speed of a direct current motor can be varied over a wide range by varying the supply voltage or
Trang 39changing the current strength in its field windings Small direct current motors are found
in tools, toys, and appliances The universal motor is a lightweight brushed motor used
in portable power tools and appliances that can run on both direct and alternating current Larger DC motors are currently used in electric vehicle propulsion, elevator and hoist drives, and steel rolling mill drives With the advent of power electronics, it
is now possible to replace DC motors with AC motors in many applications
of a stepper motor is that we can adjust the rotor's rotational position as we want without the need for position feedback like other motors, without using an encoder or a speed generator (other than a stepper motor)
with servos)
With the actual requirements of the printer, the team chose the stepper motor as the driving motor of the machine
Trang 4035
2.5 MACHINE VISION
2.5.1 General About Image Processing
Image processing is an object of study in the field of machine vision, which is the process of transforming an original image into a new image with characteristics and according to the wishes of the user Image processing may include analysis, classification of features, enhancement, segmentation and edge separation, region labeling, or the compilation of images [8]
Like data processing with graphics, digital image processing is an area of applied informatics Graphical data processing refers to artificial images, which are considered
as a data structure and generated by programs Digital image processing includes transformation techniques and methods, for the transmission or encoding of natural images The purpose of image processing includes: Image transformation to increase image quality, automatic image recognition, image recognition, evaluation of image content
Image processing is applied in practice, bringing many benefits in many fields
like:
- Military field: processing and recognizing military images
- Field of human-machine communication: image recognition, sound processing, graphics
- Security field: human face recognition, fingerprint recognition,
- Entertainment field: video games
- Medical field: Biomedical image processing, X-ray, MRI,
- In industry: identification and classification of products, fruits,
Essential steps in image processing Previously, the images captured from the camera were the similar photo Recently, with the continuous development of technology, color or black and white images are taken from the camera, and then directly converted to digital images for easy processing Below is a description of the steps in image processing
Figure 22: Step in image proccessing diagram
Photo Segment
Performance and Description
Identification and Interpolation