Hệ Thống Nhúng

An embedded system is a device or product which contains one or more tiny computers hidden inside it. Hệ thống nhúng là một thiết bị hoặc một sản phẩm bao gồm một hoặc nhiều máy tính siêu nhỏ ẩn bên trong nó.

This ‘hidden computer’, usually a microcontroller, is used to control the device and give it added ‘intelligence’. “Máy tính ẩn” ở đây thường là bộ vi xử lý, nó dùng để điều khiển thiết bị và được cho “trí thông minh” (Nghĩa là được lập trình để xử lý một cách nhanh chóng và hiệu quả).

Embedded systems are a key aspect of modern engineering and are applied in areas as diverse as automotive, medical, and industrial, and in the home and office. Hệ thống nhúng là một chìa khóa của kĩ thuật hiện đại và được ứng dụng trong các lĩnh vực khác nhau như tự động, y học và trong công nghiệp, trong nhà và văn phòng.

In many cases, embedded systems are linked together in networks. Trong rất nhiều trường hợp, hệ thống nhúng được liên kết với nhau thành một mạng lưới.

Embedded systems are the basis of a new wave of engineering design and practice, notably in machine-to machine communication and in the Internet of Things. Hệ thống nhúng là nền tảng của một làn sóng thiết kế kĩ thuật và thực hành, đặc biệt là trong giao tiếp giữa các máy móc và trong mối liên kết giữa mọi thứ.

This unit builds on introductory knowledge students have already gained in electronic circuits. Môn học này được xây dựng dựa trên nhựng kiến thức đã có về mạch điện của sinh viên.

It develops their knowledge of computer hardware, focusing on the small, low-cost type of computer (i.e. a microcontroller), usually used in embedded systems. Môn học phát triển kiến thức cho sinh viên về phần cứng máy tính, tập trung vào loại máy tính nhỏ, giá thành thấp (ví dụ như bộ vi xử lí).

It then develops skill in devising circuits which operate external to the microcontroller and interface with it; generally, these relate to sensors, actuators, human interface or data transfer. Phát triển kĩ năng trong các mạch hoạt động mở rộng với bộ vi xử lý và giao tiếp với chúng, nhìn chung là trong các mối quan hệ với cảm biến, động cơ, giao diện người dùng hoặc truyền tải dữ liệu.

In parallel with this, students will be developing programming skills, writing programmers. Song song với đó, sinh viên sẽ phát triển kĩ năng lập trình, viết chương trình.

Recommended Resources

Textbooks

BLUM, J. (2013) Exploring Arduino. Wiley.

TOULSON, R. and WILMSHURST, T. (2012) Fast and Effective Embedded System

Design: Applying the ARM. Newnes.

WILMSHURST, T. (2009) Designing Embedded Systems with PIC Microcontrollers:

Principles and Applications. 2nd Ed. Newnes.

Links

This unit links to the following related units: Unit 52: Further Electrical, Electronic and Digital Principles

Unit 54: Further Control Systems Engineering download straight to the microcontroller and cause it to interact with its external circuit. Môn học 54: Kĩ thuật điều khiển hệ thống nâng cao cung cấp một kiến thức cho vi điều khiển và là nguyên nhân ảnh hưởng đến các mạch ngoại vi.

Students will also explore the wider context of embedded systems, learning how they are applied in ‘hi-tech’ applications, in many cases revolutionizing our ability to undertake certain activities. Sinh viên sẽ khảo sát những nội dung mở rộng của hệ thống nhúng, học cách áp dụng trong các ứng dụng công nghệ cao

Unit assessment will require the design, development, construction and commissioning of an embedded system, meeting a given design brief; this will develop skills which are in much demand in industry. Bài đánh giá của môn học sẽ thiết kế, phát triển, xây dựng và thực hiện một hệ thống nhúng, một thiết kế ngắn gọn; điều này sẽ phát triển các kĩ năng cần thiết trong công nghiệp.

A written assignment, exploring one or more of the many fast-moving embedded system applications in use today, will also be completed. Một bài kiểm tra viết, khảo sát một hoặc nhiều ứng dụng hệ thống nhúng thông dụng.

Learning Outcomes

By the end of this unit students will be able to: Kết thúc môn học này sinh viên có thể:

1. Explore the principle features of a microcontroller and explain the purpose of its constituent parts. 1. Khảo sát các nguyên lí đặc trưng của vi điều khiển và giải thích mục tiêu của các thành phần cấu tạo.

2. Design and implement simple external circuitry, interfacing with a given microcontroller. 2. Thiết kế và thực hiện mạch ngoại vi cơ bản, giao tiếp với vi điều khiển.

3. Write well-structured code in an appropriate programming language, to simulate, test and debug it. 3. Viết cấu trúc chương trình với ngôn ngữ phù hợp để mô phỏng, kiểm tra và khắc phục lỗi.

4. Evaluate the applications of embedded systems in the wider environment, including in networked systems. 4. Đánh giá các ứng dụng của hệ thống nhúng trong môi trường mở rộng, bao gồm hệ thống mạng.

Essential Content Nội dung chủ yếu

LO1 Explore the principle features of a microcontroller and explain the purpose of its constituent parts LO1 Khảo sát các nguyên lí đặc trưng của vi điều khiển và giải thích mục tiêu của các thành phần cấu tạo.

Microcontroller architecture: Cấu trúc vi điều khiển

CPU (Central Processing Unit), the instruction set, programmer memory, data memory, input/output (I/O), data and address buses, van Neumann and Harvard structures

CPU (Bộ điều khiển trung tâm) cấu tạo của khối, bộ nhớ lập trình, bộ nhớ dữ liệu, ngõ vào/ngõ ra, dữ liệu và các bus điện chỉ, kiến trúc Van Neumann và Harvard.

Peripherals, to include digital I/O, counter/timers, analogue to digital converter (ADC), pulse width modulation (PWM), Serial Peripheral Interface (SPI), Universal Asynchronous Receiver/Transmitter (UART). Các thiết bị ngoại vi bao gồm các ngõ vào/ ra số, bộ đếm/ bộ định thời, bộ chuyển đổi tương tự sang số (ADC), bộ truyền nhận tín hiệu không đồng bộ (UART)

Memory types (overview only): Flash, Static RAM (Random Access Memory), EEPROM (Electrically Erasable Read Only Memory) and their applications Simple interrupt concepts. Các dạng bộ nhớ (chỉ ôn lại): flash, bộ nhớ tĩnh Ram (Random Access Memory), các khái niệm ngắt đơn giản

LO2 Design and implement simple external circuitry, interfacing with a given microcontroller. LO2 Thiết kế và thực hiện mạch ngoại vi cơ bản, giao tiếp với vi điều khiển.

Simple digital interfacing: Giao tiếp số cơ bản:

Switches, light emitting diodes (LEDs), keypads, and 7-segment displays. Chuyển mạch, diode phát quan, bàn phím và hiển thị 7 đoạn.

DC and ADC applications:Các ứng dụng DC và ADC:

DC load switching (e.g. of small motor or solenoid), use of PWM to provide variable DC motor speed control. Chuyển mạch tải DC (ví dụ như động cơ nhỏ hoặc cuộn từ tính), sử dụng điều chế độ rộng xung (PWM) để cung cấp tốc độ khác nhau điều khiền motor.

ADC application, including range and resolution. Các ứng dụng ADC, bao gồm phạm vi và hướng thực hiện

Signal conditioning for analogue inputs, including simple op amp circuits to provide gain or level shifting. Các tín hiệu ngõ vào là tương tự, bao gồm các mạch opamp, cung cấp độ lợi hoặc mức chuyển mạch.

Interfacing to external devices with serial capability, applying SPI and UART. Giao tiếp tới các thiết bị ngoại vi có khả năng nối tiếp, ứng dụng SPI và UART

Power supply and clock oscillator. Nguồn cung cấp và dao động xung

LO3 Write well-structured code in an appropriate programming language, to simulate, test and debug it. LO3 Viết cấu trúc chương trình với ngôn ngữ phù hợp để mô phỏng, kiểm tra và khắc phục lỗi.

The development cycle:Chu kì phát triển

Integrated Development Environment, Assembler and High Level Languages, compilers, simulators, completing an in-circuit debug. Môi trường phát triển tích hợp, hợp ngữ và các ngôn ngữ cấp cao, trình biên dịch, mô phỏng, hoàn thiện sửa lỗi

Devising a code structure e.g. using flow diagrams and pseudo code. Soạn thảo một cấu trúc mã ví dụ: sử dụng sơ đồ khối và mã giả lập

Programming languages and codes: Ngôn ngữ lập trình và mã:

Review of an appropriate high level programming language (which is likely to be C).

Xem lại một ngôn ngữ lập trình cấp cao thích hợp (có thể là C)

Language structure, data types, programmer flow, looping, branching, and conditional

Cấu trúc ngôn ngữ, kiểu dữ liệu, khối lập trình, vòng lặp, phân nhánh và điều kiện

Developing application code: initialization, data input, conditional branching and looping, data output

Phát triển mã ứng dụng: khởi tạo, nhập dữ liệu, phân nhánh có điều kiện và vòng lặp, đầu ra dữ liệu

Code simulation, download, test and debug

Mô phỏng mã, tải xuống, kiểm tra và sửa lỗi

LO4 Evaluate the applications of embedded systems in the wider environment, including in networked systems

LO4 Đánh giá các ứng dụng của hệ thống nhúng trong môi trường mở rộng, bao gồm hệ thống mạng.

Review of application of embedded systems:

Xem xét việc áp dụng các hệ thống nhúng:

Using example sectors e.g. motor vehicle, smart buildings, medical, and office, wearable. Sử dụng trong các lĩnh vực ví dụ: xe cơ giới, y tế và văn phòng, có thể đeo. Review possible limiting factors in an embedded design e.g. power supply, reliability, security

Xem lại các yếu tố hạn chế có thể trong một thiết kế nhúng ví dụ: cung cấp điện, độ tin cậy, an ninh

Review of current trends in embedded systems, including the Internet of Things and machine-to-machine

Xem lại các xu hướng hiện tại của các hệ thống nhúng, bao gồm kết nối mọi thứ và máy móc.

Learning Outcomes and Assessment Criteria

Các kết quả học tập và các tiêu chí đánh giá

Pass

Merit

Distinction

LO1 Explore the principle features of a microcontroller

and explain the purpose of its constituent parts

LO1 Khảo sát các nguyên lí đặc trưng của vi điều khiển và giải thích mục tiêu của các thành phần cấu tạo.

D1 Critically evaluate

Microcontroller architectures and

subsystems, exploring

characteristics such as

electrical, timing and

size (e.g. of memory or ALU)

D1 Đánh giá một cách chính xác kiến trúc vi điều khiển và các hệ thống con, tìm được các đặc tính như điện, thời gian và kích thước (ví dụ: bộ nhớ hoặc ALU)

P1 Examine the hardware interfaces and the software architecture of a selected microcontroller

P1 Kiểm tra giao diện phần cứng và kiến trúc phần mềm của vi điều khiển được chọn

P2 Explain the function of the main microcontroller elements

P2 Giải thích chức năng của các thành phần chính vi điều khiển

M1 Evaluate icrocontroller

architectures and subsystems, exploring characteristics such as electrical, timing and size

(e.g. of memory or ALU)

M1 Đánh giá kiến trúc vi điều khiển và các hệ thống con, tìm hiểu các đặc tính như điện, thời gian và kích thước (ví dụ về bộ nhớ hoặc ALU)

LO2 Design and implement simple external circuitry,

interfacing with a given microcontroller

LO2 Thiết kế và thực hiện mạch ngoại vi cơ bản, giao tiếp với vi điều khiển.

 

 

D2 Critically evaluate

the functionality of

external circuitry under a range of operating conditions

D2 Đánh giá chính xác các chức năng của mạch ngoại vi theo một loạt các hoạt động điều kiện

P3 Design simple external

circuits, sensors and actuators, from available designs

P3 Thiết kế được các mạch ngoại vi đơn giản, cảm biến và thiết bị truyền động, từ các thiết kế sẵn có

P4 Apply simple external

circuits, demonstrating effective interfacing and adequate functionality

P4 Áp dụng được các mạch ngoại vi đơn giản, mô phỏng hiệu quả giao diện và đầy đủ tính năng

M2 Adapt and improve simple external circuits, sensors and actuators, from

available designs

M2 Vận dụng và cải tiến

các mạch ngoại vi đơn giản, cảm biến và thiết bị truyền động, từ thiết kế có sẵn

M3 Assess simple external

circuits and evaluate functionality

M3 Đánh giá được các mạch ngoại vi đơn giản và chức năng

LO3 Write well-structured code in an appropriate programming language, to simulate, test and debug it

LO3 Viết cấu trúc chương trình với ngôn ngữ phù hợp để mô phỏng, kiểm tra và khắc phục lỗi.

 

D3 Critically evaluate

the code developed through simulation and in the hardware, demonstrating excellent functionality

D3 Đánh giá tốt mã phát triển thông qua mô phỏng phần cứng, mô phỏng chức năng một cách xuất sắc

P5 Write well-structured working code, to meet an identified need

P5 Viết chương trình làm việc đúng cấu trúc, xác nhận được yêu cầu để đáp ứng

P6 Test and de-bug code through simulation in the hardware, demonstrating functionality

P6 Kiểm tra và sửa lỗi thông qua mô phỏng phần cứng, mô phỏng chức năng

M4 Adapt and improve given examples to produce well-structured and reliable code with meaningful programmer identifiers, to meet an identified need

M4 Vận dụng và cải thiện các ví dụ đưa ra để tạo ra mã có cấu trúc đúng và phu, để đáp ứng nhu cầu đã được xác định

LO4 Evaluate the applications of embedded systems in

the wider environment, including in networked systems

LO4 Đánh giá các ứng dụng của hệ thống nhúng trong môi trường mở rộng, bao gồm hệ thống mạng.

D4 Critically evaluate

emerging applications of embedded systems,

clearly identifying trends and  recognizing technical and economic

factors

D4 Đánh giá chính xác các ứng dụng đang thực hiện của hệ thống nhúng, xác định rõ rang xu hướng và nhận ra các yếu tố kỹ thuật, kinh tế

P7 Explain the uses of

embedded systems in current and emerging applications

P7 Giải thích cách sử dụng hệ thống nhúng hiện nay và các ứng dụng đang thực hiện

M5 Evaluate current and

emerging applications of

embedded systems, e.g. in

motor vehicles, health or the Internet of Things

M5 Đánh giá các ứng dụng hiện nay và đang thực hiện của hệ thống nhúng, ví dụ: trong xe cơ giới, sức khoẻ hoặc liên kết mọi thứ