VISVESVARAYA TECHNOLOGICAL UNIVERSITY
Jnana Sangama, VTU Main Road, Belagum, Karnataka 590018
An Internship Report
On
“EMBEDDED SYSTEMS”
Submitted in partial fulfilment of the requirements for the award of the Degree of
BACHELOR OF ENGINEERING
In
ELECTRONICS & COMMUNICATION ENGINEERING
Submitted by
ROHAN V
1TJ21EC021
Internship carried out at
“ETECH PROWESS”
Under the Guidance
Of
Mrs. Varsha C P
Assistant Professor
Department of ECE
T. JOHN INSTITUTE OF TECHNOLOGY
(Affiliated to Visvesvaraya Technological University)
#86/1, Gottigere, Bannerghatta Road, Bengaluru-560083
2024-2025
CERTIFICATE
This is to certify that internship work entitled “EMBEDDED SYSTEMS” carried
out by ROHAN V (1TJ21EC021) in partial fulfillment for the award of Bachelor of
Engineering in Electronics and Communication of Visvesvaraya Technological
University, Belagavi during the academic year 2024-2025. It is certified that all the
corrections/suggestions indicated for the internal assessment have been
incorporated in the report deposited in the department library. The internship report
has been approved as it satisfies the academic requirements in respect of internship
work as prescribed for the said degree.
________________ ________________ ________________
GUIDE HOD PRINCIPAL
Assistant Prof. Varsha C P Dr. Drakshayani M N Dr. H P Srinivasa
Name of the Examiner Signature with date
1.
2.
DECLARATION
I, “ROHAN V(1TJ21EC021)” student of T. John Institute of Technology, Bengaluru,
hereby declare that the dissertation entitled, “EMBEDDED SYSTEMS”, which has been
submitted by me as partial fulfilment for the final year semester examination of Engineering
degree from Visvesvaraya Technological University, Belgaum, is an authentic record of my
own work carried out by me during final year at ETECH PROWESS, under the supervision
of my internal supervisor Asst. Prof. Varsha C P ,TJIT, Bengaluru and external supervisor
Mr. KRISHNAN
I further undertake that the matter embodied in the dissertation has not been submitted previously
for the award of any degree or diploma by me to any institution.
ROHAN V
1TJ21EC021
Place: Bengaluru.
Date:
ACKNOWLEDGEMENT
The satisfaction and euphoria that accompanies the successful completion of any task would be
incomplete without mentioning the people who made it possible, whose constant guidance and
encouragement crowned my efforts with success.
I thank our Principal, Dr. H P. SRINIVASA and Head of the Department, Dr. Drakshayani M
N , Department of Electronics & Communication Engineering who has given us confidence to
believe in ourselves and complete the Internship.
Guidance and deadlines play a very important role in successful completion of the internship
report on time. I convey my gratitude to my internal supervisor, Asst Prof. Varsha C P and
external supervisor Mr. KRISHNAN who helped me carry out my internship work.
ROHAN V
1TJ21EC021
ACKNOWLEDGEMENT
I hereby express my happiness for completing “INTERNSHIP” Training successfully for the
period of one month. I generally thank all the employees for giving me an opportunity to learn
many important features of training. I extend my special thanks and gratitude to Mr.
KRISHNAN for guidance given in spite of a busy work schedule and made course very
interesting for which act of kindness remain ever grateful. I also thank department of ECE and
gratitude to my internal guide Asst. Prof. VARSHA C P for guidance and support for
completing the report on time.
Finally, I hope this course will help me in building my career of engineering with the aid of
equipment provided by your factory in a cordial atmosphere.
ROHAN V
1TJ21EC021
ABSTRACT
This report provides an in-depth analysis of Embedded Systems, focusing on microcontrollers,
sensors, communication protocols, motor control, and AI integration. It covers STM32
microcontrollers, UART, SPI, I2C, and USB communication, along with real-time operating
systems (RTOS) for efficient task management.
Additionally, the report explores servo motors (SG90, MG90), WS2812 programmable LEDs
(Neopixel), and memory management techniques for optimizing embedded applications. It also
examines computer vision applications using OpenCV (cv2) and MediaPipe, highlighting real-
time object tracking and gesture recognition.
Lastly, development tools like STM32CubeIDE and Arduino IDE, along with version control
strategies using Git, are discussed. This report serves as a valuable resource for understanding
the latest advancements in embedded systems.
OFFER LETTER
TABLE OF CONTENTS
CHAPTER No. CONTENT PAGE No.
Abstract
Certificate
Chapter 1 Etech Prowess overview 10
1.1 Introduction 10
Chapter 2 Embedded Systems 11-12
2.1 Introduction 11
2.2 Characteristeics of embedded systems 11
Chapter 3 Microcontrollers and embedded development 13-17
3.1 Microcontrollers 13
3.2 STM32 14
3.3 ESP32 16
Chapter 4 Programming embedded systems 17-21
4.1 Introduction 18
4.2 Programming languages used in embedded systems 18
4.3 Data types in embedded C 19
4.4 Memory management in embedded systems 19
4.5 Interrupts in embedded systems 20
4.6 Timers in embedded system 20
Chapter 5 Communication protocols 22-25
5.1 UART 22
5.2 SPI 23
5.3 I2C 24
5.4 USB 25
Chapter 6 Motors 26-30
6.1 DC motor 26
6.2 Stepper motor 27
6.3 Servo motor 28
6.4 Rotrics DexArm- an all-in-one robotic arm 28
Chapter 7 AI in embedded systems 31-32
7.1 openCV(cv2) 31
7.2 Mediapipe- AI framework for real-time perception 31
7.3 Ultralytics YOLO- real-time object detection 32
Conclusion 33
EMBEDDED SYSTEMS
LIST OF FIGURES
FIGURE No. FIGURE NAME PAGE No.
3.1 STM32 microcontroller 15
3.2 ESP32 microcontroller 17
5.1 UART protocol 23
5.2 SPI protocol 23
5.3 I2C protocol 24
5.4 USB protocol 25
6.1 DC motor 26
6.2 Stepper motor 27
6.3 Servo motor 28
6.4 Rotrics DexArm 30
Dept. of ECE, TJIT 2024-2025
EMBEDDED SYSTEMS
CHAPTER 1
ETECT PROWESS OVERVIEW
1.1 Introduction
Etech Prowess Private Limited, established on December 6, 2022, is a Bengaluru-based
company specializing in education and training within the technology sector.
Founded by directors Vasu Jayarama Kammachi and Bangalore Gopala Krishna Srikanth,
Etech Prowess focuses on delivering courses in embedded systems, Internet of Things (IoT),
artificial intelligence (AI), machine learning (ML), and Windows device drivers. Their
training methodology emphasizes comprehensive, project-specific, and job-oriented
approaches.
The company offers a range of courses tailored for different audiences, including students,
freshers, professionals, and corporate clients. Notable programs include VLSI Physical
Design, VLSI Design Verification, Semiconductor Embedded Engineering, Front-End
Development, and Full-Stack Web Development. These courses combine classroom training
with real-time projects to enhance practical skills.
Etech Prowess has established partnerships with various companies for placements, with
recent hires at organizations like UST Global, AMD, and Mirafra Technologies. Their
commitment to quality education was recognized when they received the "Most Promising
Start-Up" award at the 38th International Conference on VLSI Design in 2025.
In summary, Etech Prowess Private Limited is a young and dynamic company in Bengaluru,
dedicated to providing specialized training in advanced technological domains, with a focus
on practical, industry-relevant education.
Dept. of ECE, TJIT 2024-2025 10
EMBEDDED SYSTEMS
CHAPTER 2
EMBEDDED SYSTEMS
2.1 Introduction
Embedded systems are specialized computing devices that are designed to perform specific
tasks within a larger system. Unlike general-purpose computers, embedded systems are
optimized for particular applications and are often integrated directly into the devices they
control. These systems may be simple or complex, but they all consist of four main
components:
1. Microcontroller/Microprocessor: This is the central processing unit (CPU) of the
embedded system, responsible for executing instructions and processing data.
2. Memory: Embedded systems typically have memory (RAM, ROM, EEPROM, etc.)
to store both the program code (software) and the data they work with.
3. Input/Output Peripherals: These components allow the system to interact with its
environment. Input devices might include sensors or user interfaces, while output
devices might include displays or actuators.
4. Embedded Software: The software running on the system is designed specifically to
perform the embedded tasks. This software may be embedded in the system's
firmware or stored in non-volatile memory.
Embedded systems are essential in a wide range of applications, from controlling household
appliances to monitoring industrial machinery, and even managing critical functions in
healthcare and automotive systems. They are designed for reliability, efficiency, and cost-
effectiveness.
2.2 Characteristics of Embedded Systems
1. Real-time Operation:
Embedded systems often operate in real-time, meaning they need to respond to inputs
or events within strict time constraints. Real-time systems are crucial in applications
where timing is critical, such as in automotive control systems, medical devices, or
robotics.
The system must guarantee that it responds to events within a predetermined time,
ensuring the system's overall functionality is maintained. For example, a car's anti-
lock braking system (ABS) must react immediately to changes in road conditions or
pressure from the brake pedal.
2. Specific Functionality:
Embedded systems are designed to carry out a specific set of functions and are not
general-purpose like personal computers. They are typically optimized for one or a
Dept. of ECE, TJIT 2024-2025 11
EMBEDDED SYSTEMS
small set of tasks, which allows them to be highly efficient and reliable for those
tasks.
For example, the embedded system in a microwave oven is programmed to perform
tasks like heating food, while a smart thermostat's embedded system is programmed
to control room temperature based on sensors.
3. Resource Constraints:
Many embedded systems operate with limited resources, including memory,
processing power, and energy. Due to the nature of embedded systems, they are
designed to be highly efficient in terms of both hardware and software. Their compact
form factor often results in trade-offs regarding the power and resources they can
utilize.
For example, in wearable health devices, the system may need to perform complex
health monitoring functions with limited memory and processing capacity, while
maintaining low power consumption to extend battery life.
4. High Reliability:
Reliability is one of the most critical aspects of embedded systems, especially in
industries where failure can have severe consequences. These systems need to operate
continuously without failure, making them highly dependable.
Applications such as medical devices (e.g., pacemakers), aerospace systems, and
nuclear power plants depend on embedded systems for safety and precision. In these
scenarios, even a minor malfunction could be catastrophic, so the system must be
rigorously designed for fault tolerance, error handling, and system recovery.
Other Considerations
Cost-effectiveness: Embedded systems are typically designed to be cost-efficient, which
is a key factor in their widespread use. By focusing on a specific function, designers can
optimize the system's cost and ensure that it meets the required performance standards
without excessive overhead.
Long Lifecycle: Many embedded systems are designed to operate for many years. For
example, embedded systems in automotive safety equipment or industrial robots need to
be highly durable and support long-term maintenance cycles.
Low Power Consumption: Many embedded systems are battery-operated, requiring low
power consumption to ensure longevity. For example, smartwatches, sensor nodes, and
portable medical devices must operate efficiently on limited power sources.
Dept. of ECE, TJIT 2024-2025 12
EMBEDDED SYSTEMS
CHAPTER 3
MICROCONTROLLERS AND EMBEDDED DEVELOPMENT
3.1 Microcontrollers
A microcontroller (MCU) is a compact integrated circuit (IC) designed to control embedded
devices. Unlike general-purpose processors, microcontrollers are optimized for specific tasks
and integrate a CPU, memory, input/output (I/O) interfaces, and communication peripherals
into a single chip. These devices are widely used in consumer electronics, automotive
systems, industrial automation, healthcare, and IoT applications.
Popular Microcontroller Families
Microcontrollers are classified based on their architecture, processing power, and power
efficiency. Some of the most widely used microcontroller families include:
1. STM32 (by STMicroelectronics)
Based on ARM Cortex-M cores, offering high performance, low power consumption,
and a rich set of peripherals.
Used in IoT applications, robotics, industrial automation, and smart home devices.
Supports multiple development tools, including STM32CubeIDE and Keil.
2. AVR (by Microchip Technology)
Known for its 8-bit RISC architecture, making it power-efficient and simple to program.
Found in Arduino boards, home automation, and small-scale embedded applications.
Provides essential peripherals such as timers, GPIO, ADC, and communication protocols
(UART, SPI, I2C).
3. PIC (by Microchip Technology)
Available in 8-bit, 16-bit, and 32-bit variants, offering flexibility for different
applications.
Used in automotive, industrial control, and sensor-based systems.
Features low-power modes and reliable performance for battery-operated devices.
4. ESP32 (by Espressif Systems)
A high-performance, low-power microcontroller with built-in Wi-Fi and Bluetooth
capabilities.
Widely used in IoT applications, smart home automation, and wearable devices.
Supports multiple communication interfaces, including UART, SPI, I2C, and Ethernet.
Dept. of ECE, TJIT 2024-2025 13
EMBEDDED SYSTEMS
Features a dual-core Tensilica Xtensa LX6 processor, making it more powerful than
many traditional microcontrollers.
Compatible with Arduino IDE, ESP-IDF (Espressif IoT Development Framework), and
MicroPython.
5. ARM Cortex-M Series (by ARM Holdings)
A widely adopted microcontroller architecture used by manufacturers like
STMicroelectronics, NXP, Texas Instruments, and Nordic Semiconductor.
Designed for high-performance computing with real-time processing capabilities.
Commonly used in IoT, AI-driven applications, medical devices, and industrial
automation.
3.2 STM32 Microcontrollers
The STM32 family, developed by STMicroelectronics, is a popular choice for embedded
system designers due to its scalability, performance, and rich peripheral set. These
microcontrollers are based on the ARM Cortex-M architecture, providing a balance between
processing power and power efficiency.
Key Features of STM32 Microcontrollers
1. GPIO (General-Purpose Input/Output)
Used for interfacing with external components such as LEDs, buttons, sensors,
motors, and displays.
Supports various modes like input, output, alternate function, and analog.
Features interrupt capabilities for real-time event handling.
2. Timers and Counters
Used for measuring time intervals, generating precise delays, and event counting.
Supports Pulse Width Modulation (PWM), which is essential for motor control, LED
dimming, and communication protocols.
Can be used for capturing external events, such as frequency or signal measurement.
3. Communication peripherals
STM32 microcontrollers support multiple communication protocols, enabling connectivity
with sensors, memory devices, and other microcontrollers:
UART (Universal Asynchronous Receiver-Transmitter) - Serial communication with
computers, GPS modules, and Bluetooth devices.
SPI (Serial Peripheral Interface) - High-speed communication with displays, flash
memory, and sensors.
Dept. of ECE, TJIT 2024-2025 14
EMBEDDED SYSTEMS
I2C (Inter-Integrated Circuit) - Used for low-speed communication with multiple
devices, such as temperature sensors and EEPROMs.
USB (Universal Serial Bus) - Supports USB device and host functionality, enabling
data transfer and device communication.
CAN (Controller Area Network) - Commonly used in automotive and industrial
applications for real-time communication between multiple devices.
4. ADC & DAC (Analog-to-Digital and Digital-to-Analog Converters)
ADC (Analog-to-Digital Converter) - Converts analog sensor signals (e.g.,
temperature, pressure, light intensity) into digital values.
DAC (Digital-to-Analog Converter) - Converts digital signals into analog outputs,
useful for audio applications and signal generation.
Why Choose STM32?
STM32 microcontrollers are highly versatile and come in different series, such as:
STM32F Series - General-purpose microcontrollers with high performance.
STM32L Series - Low-power MCUs for battery-operated applications.
STM32H Series - High-performance MCUs for demanding applications.
STM32G Series - General-purpose, energy-efficient MCUs for cost-sensitive designs.
Advantages of STM32 MCUs
High Processing Power - ARM Cortex-M cores enable efficient execution of complex
tasks.
Rich Peripheral Set - Supports advanced communication and control features.
Low Power Consumption - Suitable for IoT and battery-powered applications.
Strong Development Support - STM32CubeIDE, HAL (Hardware Abstraction Layer),
and community support enhance development.
Fig 3.1: STM32F401
3.3 ESP32 Microcontroller
Dept. of ECE, TJIT 2024-2025 15
EMBEDDED SYSTEMS
The ESP32, developed by Espressif Systems, is a powerful Wi-Fi and Bluetooth-enabled
microcontroller designed for IoT applications and real-time processing.
Key Features of ESP32
1. Dual-Core Processor
Based on the Tensilica Xtensa LX6 architecture.
Supports multitasking and real-time data processing.
2. Built-in Wi-Fi & Bluetooth
Supports Wi-Fi (802.11 b/g/n) and Bluetooth 4.2 (including BLE) for wireless
communication.
Used in smart home automation, wearable technology, and industrial IoT
applications.
3. Low Power Modes
Features Deep Sleep and Light Sleep modes, making it ideal for battery-powered
applications.
4. Rich Peripherals & Connectivity
Supports UART, SPI, I2C, I2S, Ethernet, and SDIO.
Includes capacitive touch sensors, enabling gesture-based control.
5. Strong Development Ecosystem
Programmable using Arduino IDE, ESP-IDF, MicroPython, and PlatformIO.\
Use Cases
Deep Sleep Mode - Ideal for battery-operated IoT devices like weather stations and
remote sensors.
Hibernation Mode - Used in applications where the device needs to wake up periodically
(e.g., smart meters).
Programming Environments
Arduino IDE - Beginner-friendly environment with support for ESP32 libraries.
ESP-IDF (Espressif IoT Development Framework) - Official development framework for
ESP32, offering advanced features and performance tuning.
MicroPython - Allows developers to use Python for embedded applications.
Dept. of ECE, TJIT 2024-2025 16
EMBEDDED SYSTEMS
PlatformIO - A modern, powerful, and flexible IoT development platform supporting
multiple languages.
Fig 3.2: ESP32
CHAPTER 4
Dept. of ECE, TJIT 2024-2025 17
EMBEDDED SYSTEMS
PROGRAMMING EMBEDDED SYSTEMS
4.1 Introduction
Embedded systems programming involves writing software that directly interacts with hardware
to perform dedicated functions. Unlike general-purpose computing, embedded systems operate
with limited resources, real-time constraints, and specific hardware requirements. Programming
in embedded systems requires an understanding of low-level programming, memory
management, real-time constraints, and hardware-software interfacing.
Embedded systems consist of microcontrollers or microprocessors that run software to control
various peripherals and execute predefined tasks. These systems are widely used in automotive,
industrial automation, healthcare, consumer electronics, and IoT applications.
Embedded programming typically involves low-level coding using languages like C and C++ for
efficient hardware control, and sometimes assembly language for performance optimization.
4.2 Programming Languages Used in Embedded Systems
1. C Language in Embedded Systems
C is the most widely used programming language in embedded systems because of its
efficiency, portability, and direct hardware access. Features of C that make it suitable for
embedded programming include:
Direct access to memory addresses and hardware registers.
Efficient handling of pointers for managing hardware interactions.
Low-level bitwise operations for controlling devices.
2. C++ for Embedded Development
C++ extends C by offering object-oriented programming (OOP), which helps in managing
complex projects. It includes:
Encapsulation for better code modularity.
Abstraction and inheritance for reusable code.
Template programming to optimize resource usage.
However, C++ introduces higher memory and processing overhead, so it is used selectively in
embedded systems with sufficient resources.
Other Languages Used
Assembly Language: Used for performance-critical tasks where direct hardware control
is necessary.
Dept. of ECE, TJIT 2024-2025 18
EMBEDDED SYSTEMS
Python and MicroPython: Used in higher-level embedded applications and prototyping.
Rust: Gaining popularity due to memory safety features in embedded programming.
4.3 Data Types in Embedded C
Embedded C uses various data types for handling variables and memory efficiently.
Choosing the right data type is crucial because embedded systems often have limited
memory and processing power.
Basic Data Types
1. Char :8 bits (1 byte) - Stores characters or small integers
2. int :16 or 32 bits - Stores integer values (size depends on architecture).
3. float :32 bits - Stores decimal numbers with single precision.
4. double :64 bits - Stores decimal numbers with double precision
Using the volatile Keyword
The volatile keyword prevents the compiler from optimizing variables that can change
unexpectedly (e.g., hardware registers, shared memory, interrupt-driven variables).
Without volatile, the compiler might optimize out a variable because it assumes its value
does not change.
Use Cases for volatile:
Reading sensor data (e.g., temperature, pressure).
Shared memory between main code and Interrupt Service Routine (ISR).
Memory-mapped peripheral registers (e.g., GPIO, UART).
4.4 Memory Management in Embedded Systems
Memory management is a crucial aspect of embedded programming, as embedded systems
have limited RAM. Efficient memory usage ensures better performance and stability.
Stack vs. Heap Memory
Embedded systems use stack and heap memory for different purposes.
1.Stack
It is used for function calls, local variables, and return addresses
The stack is fast but has a fixed size determined at compile-time.
If too many function calls or large local variables are used, stack overflow may
occur.
Dept. of ECE, TJIT 2024-2025 19
EMBEDDED SYSTEMS
2.Heap
It is used for dynamic memory allocation.
Heap memory is flexible but can lead to memory fragmentation and slower
performance if not managed properly.
Memory Optimization Techniques
Avoid excessive recursion (reduces stack overflow risk).
Use static/global variables wisely (minimizes stack usage).
Prefer static over dynamic memory allocation (malloc).
Another important consideration is structure padding and alignment. Some processors
require data to be aligned to specific memory addresses for efficient access. If a structure
contains mixed data types, the compiler may insert padding to align data correctly.
4.5 Interrupts in Embedded Systems
Interrupts allow a microcontroller to respond immediately to external/internal events without
continuously polling for updates.
Interrupt Service Routine (ISR)
An ISR is a special function that executes when an interrupt occurs.
It must be short and efficient to minimize delays in program execution.
Best Practices for ISRs
1. Keep ISRs short and efficient (avoid delays).
2. Use volatile for shared variables modified inside ISR.
3. Do not use functions like printf() or malloc() inside an ISR (they are time-consuming).
4.6 Timers in Embedded Systems
Timers are hardware peripherals that allow precise time measurement and scheduling in
embedded systems. They are used for generating delays, pulse-width modulation (PWM)
signals, and event counting.
Common Timer Functions:
1. Delays & Scheduling - Generate precise time delays.
2. Pulse Width Modulation (PWM) - Control LED brightness, motor speed.
Dept. of ECE, TJIT 2024-2025 20
EMBEDDED SYSTEMS
3. Event Counting - Measure frequency of external signals.
4. Triggering periodic interrupts to execute tasks at fixed intervals
CHAPTER 5
COMMUNICATION PROTOCOLS
Dept. of ECE, TJIT 2024-2025 21
EMBEDDED SYSTEMS
Efficient and reliable data exchange between embedded devices, sensors, and peripherals is
achieved through various wired and wireless communication protocols. These protocols enable
devices to send and receive data efficiently while considering factors like speed, power
consumption, and complexity.
The four main wired communication protocols used in embedded systems are:
UART (Universal Asynchronous Receiver/Transmitter)
SPI (Serial Peripheral Interface)
I2C (Inter-Integrated Circuit)
USB (Universal Serial Bus)
5.1 UART (Universal Asynchronous Receiver/Transmitter)
UART is a serial communication protocol used for asynchronous data transmission between
microcontrollers and external devices like sensors, GPS modules, Bluetooth modules, and
computers. Unlike synchronous communication protocols like SPI and I2C, UART does not
require a clock signal, making it simple and widely used in embedded applications.
How UART Works
UART communication involves two main signals:
TX (Transmit): Sends data from one device to another.
RX (Receive): Receives data from another device.
Each UART device has its own clock, and both sender and receiver must be configured with
the same baud rate (e.g., 9600, 115200 bps).
Key Features of UART
Asynchronous communication: No clock signal is required.
Full-duplex communication: Data can be sent and received simultaneously.
Simple and widely supported in microcontrollers and embedded devices.
Common Applications
Serial debugging using a PC’s serial port.
Communication with Bluetooth modules (HC-05, HC-06).
Interfacing GPS modules (e.g., NEO-6M).
Dept. of ECE, TJIT 2024-2025 22
EMBEDDED SYSTEMS
Fig 5.1: UART protocol
5.2 SPI (Serial Peripheral Interface)
SPI is a synchronous communication protocol designed for high-speed data exchange
between a master device (e.g., microcontroller) and one or more slave devices (e.g., sensors,
memory chips, displays). It is commonly used in applications requiring fast data transfer
rates.
How SPI Works
SPI uses four main signals:
SCLK (Serial Clock): Synchronizes data transmission between master and slave.
MOSI (Master Out, Slave In): Transfers data from master to slave.
MISO (Master In, Slave Out): Transfers data from slave to master.
SS (Slave Select): Selects the specific slave device to communicate with.
Key Features of SPI
Full-duplex communication: Data can be sent and received at the same time.
High-speed data transfer: Faster than I2C and UART.
Supports multiple slave devices using different SS lines.
Common Applications
Interfacing with flash memory (e.g., SD cards, EEPROMs).
Controlling displays (OLED, TFT, LCD).
Communicating with high-speed sensors (gyroscopes, accelerometers).
Fig 5.2: SPI protocol
Dept. of ECE, TJIT 2024-2025 23
EMBEDDED SYSTEMS
5.3 I2C (Inter-Integrated Circuit)
I2C is a two-wire synchronous communication protocol used for low-speed, short-distance
communication between multiple devices. It is widely used in applications where multiple
sensors or peripherals need to communicate with a microcontroller using minimal pins.
How I2C Works
I2C uses only two main signals:
SCL (Serial Clock Line): Synchronizes data transfer between master and slave.
SDA (Serial Data Line): Transfers data between master and slave.
Each slave device has a unique address, allowing multiple devices to communicate on the
same bus without additional chip select lines.
Key Features of I2C
Supports multiple devices on a single bus.
Only two wires required for communication.
Uses addressing to select slave devices.
Common Applications
Interfacing EEPROMs (24CXX series).
Real-Time Clock (RTC) modules (DS1307, DS3231).
LCD displays and touch controllers.
Fig 5.3: I2C protocol
Dept. of ECE, TJIT 2024-2025 24
EMBEDDED SYSTEMS
5.4 USB (Universal Serial Bus) Communication
USB is a widely used protocol for high-speed data exchange between embedded systems and
computers. Unlike UART, SPI, and I2C, USB supports plug-and-play functionality, enabling
embedded devices to communicate with PCs, external storage, and other peripherals.
USB Configurations in Embedded Systems
USB Host: The embedded system acts as a controller, managing connected USB devices
(e.g., a microcontroller controlling a USB flash drive).
USB Device: The embedded system acts as a peripheral (e.g., a microcontroller
appearing as a virtual COM port on a PC).
Key Features of USB
High-speed data transfer (USB 2.0, USB 3.0).
Supports multiple device types (keyboard, mouse, storage, serial communication).
Plug-and-play with automatic device recognition.
Common Applications
Data logging devices (storing sensor data to a USB drive).
Firmware updates via USB.
USB-to-serial communication (virtual COM ports).
Fig 5.4: USB protocol
Dept. of ECE, TJIT 2024-2025 25
EMBEDDED SYSTEMS
CHAPTER 6
MOTORS
Motor control is a crucial aspect of robotics, industrial automation, automotive systems, and
consumer electronics. Different types of motors are used based on the required precision, torque,
speed, and control complexity.
The three most commonly used motors in embedded systems are:
DC Motors – Used for continuous rotation with speed control.
Stepper Motors – Used for precise positioning applications.
Servo Motors – Used for precise angular control.
6.1 DC Motors
A DC (Direct Current) motor converts electrical energy into mechanical motion. These
motors are commonly used in robotics, conveyor belts, and electric vehicles due to their
ability to provide smooth, continuous rotation.
How DC Motors Work
A DC motor consists of a rotor (armature) and a stator. When current flows through the
motor’s windings, a magnetic field is generated, causing the rotor to spin. The speed of a DC
motor is controlled by varying the applied voltage using Pulse Width Modulation (PWM).
PWM Speed Control
PWM (Pulse Width Modulation) is used to regulate the speed of a DC motor by adjusting
the duty cycle of the control signal.
A higher duty cycle increases speed, while a lower duty cycle decreases it.
Common Motor Driver ICs for DC Motors
L298N – Dual H-Bridge driver, suitable for controlling two DC motors.
L293D – Another popular H-Bridge IC, capable of handling moderate currents.
Fig 6.1: DC motor
Dept. of ECE, TJIT 2024-2025 26
EMBEDDED SYSTEMS
6.2 Stepper Motors
Stepper motors are precisely controlled motors that rotate in discrete steps, making them
ideal for applications requiring precise positioning. They are widely used in CNC machines,
3D printers, and robotic arms.
How Stepper Motors Work
A stepper motor consists of multiple coils (phases) that are energized in a specific sequence
to move the rotor step by step. The key advantage is that the motor's position can be
controlled without a feedback system.
Types of Stepper Motors
Unipolar Stepper Motors – Easier to control but less efficient.
Bipolar Stepper Motors – Require H-Bridge control but offer higher torque.
Stepper Motor Drivers
Microcontrollers cannot directly drive stepper motors due to their high power requirements.
Common stepper motor driver ICs include:
ULN2003 – Used for unipolar stepper motors.
A4988 / DRV8825 – Used for bipolar stepper motors with microstepping.
Stepper Motor Control Methods
Full-step mode – The motor moves one full step per pulse.
Half-step mode – The motor moves half a step for finer resolution.
Microstepping – The motor moves in very small steps for smooth motion.
Fig 6.2: Stepper motor
Dept. of ECE, TJIT 2024-2025 27
EMBEDDED SYSTEMS
6.3 Servo Motors (SG90, MG90S)
Servo motors are designed for precise angular movement, making them ideal for robotic
arms, RC cars, drones, and automation systems. Unlike DC motors, servo motors do not
rotate continuously but instead hold a specific angle.
How Servo Motors Work
A servo motor consists of:
A DC motor – Provides rotation.
A gear system – Reduces speed and increases torque.
A control circuit – Adjusts the motor’s position based on PWM signals.
Servo motors require a PWM signal to maintain a specific position. The duty cycle of the PWM
signal determines the motor’s angle.
Controlling Servo Motors with PWM
A PWM signal with a pulse width of 1ms moves the servo to 0°.
A pulse width of 1.5ms moves it to 90°.
A pulse width of 2ms moves it to 180°.
Fig 6.3: Servo motor
6.4 Rotrics DexArm – An All-in-One Robotic Arm
The Rotrics DexArm is a versatile, modular robotic arm designed for multiple applications,
including pick-and-place operations, 3D printing, laser engraving, and drawing. It is widely
used in education, automation, and creative fields due to its high precision, user-friendly
software, and customizable toolheads.
Dept. of ECE, TJIT 2024-2025 28
EMBEDDED SYSTEMS
Key Features
Multi-functional – Supports 3D printing, laser engraving, pen drawing, and pick-and-
place.
Modular Design – Easy swapping of different toolheads.
High Precision – 0.05mm repeatability, ensuring smooth and accurate movements.
Easy Programming – Supports G-code, Python, Blockly (visual programming), and
SDKs.
Connectivity Options – USB, Bluetooth, Wi-Fi for remote control.
Smart Safety Features – Built-in safety mechanisms for stable operations.
Technical Specifications
Feature Specification
Working Area 220mm (X-axis), 220mm (Y-axis), 250mm (Z-axis)
Repeatability ±0.05mm
Max Payload 500g
Actuators Stepper Motors with Encoders
Connectivity USB, Bluetooth, Wi-Fi
Software Support Rotrics Studio, Python, Blockly, G-code
Power Supply 12V/5A DC
Rotrics DexArm Toolheads and Applications
1. Pick and Place (Robotic Gripper)
Used in automation, warehouse sorting, and assembly lines.
The robotic arm can pick up objects and place them in predefined locations.
Controlled via pre-programmed motion sequences or AI-powered object recognition.
2. 3D Printing (FDM Extruder)
Converts the robotic arm into a 3D printer for prototyping and manufacturing.
Supports PLA, ABS, TPU filaments for printing objects layer by layer.
Uses G-code for precise motion control.
3. Laser Engraving & Cutting
Can engrave and cut on wood, acrylic, leather, and paper.
Supports laser power levels up to 2.5W for different materials.
Dept. of ECE, TJIT 2024-2025 29
EMBEDDED SYSTEMS
Used for customized designs, signage, and artistic engravings.
4. Pen Drawing & Writing
The pen holder allows the DexArm to write text, sketch, and draw.
Ideal for art, calligraphy, and automated note-writing applications.
Works with SVG files and vector-based designs.
Software & Programming
1.Rotrics Studio (Official Software)
Drag-and-Drop Interface for beginners.
Advanced G-code Programming for experts.
Built-in Templates for engraving, printing, and drawing.
2.Programming Options
Python API for advanced automation.
G-code Support for CNC and 3D printing.
Blockly (Visual Coding) for beginners.
Use Cases
Education & Research – Used in robotics courses and STEM education.
Manufacturing & Automation – Ideal for pick-and-place operations.
Creative Design – Used for engraving, drawing, and 3D modeling.
Prototyping & Development – Helps in rapid prototyping of designs.
Fig 6.4: Rotrics DexArm
CHAPTER 7
Dept. of ECE, TJIT 2024-2025 30
EMBEDDED SYSTEMS
AI IN EMBEDDED SYSTEMS
Artificial Intelligence (AI) is revolutionizing embedded systems by enabling real-time image
processing, object detection, and machine learning (ML) applications on low-power devices.
AI-powered embedded systems are widely used in robotics, smart surveillance, industrial
automation, and IoT applications.
7.1 OpenCV (cv2) – Open-Source Computer Vision Library
OpenCV (Open Source Computer Vision Library) is a powerful open-source library for
image processing, computer vision, and machine learning. It is widely used in embedded
systems for object detection, facial recognition, and real-time video analysis.
Lightweight and optimized for real-time processing
Compatible with Python, C++, and embedded platforms like Raspberry Pi, ESP32, and
NVIDIA Jetson
Key Features of OpenCV in Embedded Systems
Image Processing – Edge detection, color filtering, noise reduction
Object Detection – Identifying and tracking objects in real-time
Face Recognition – Used in security systems and biometric authentication
Gesture Recognition – Hand tracking for touchless interfaces
Augmented Reality (AR) – Combining virtual objects with real-world environments
Applications of OpenCV in Embedded Systems
Smart CCTV systems – Real-time face recognition for security
Autonomous robots – Object tracking for navigation
Medical imaging – Analyzing X-rays and MRIs
Industrial automation – Quality control through image recognition
7.2 MediaPipe – AI Framework for Real-Time Perception
MediaPipe is a Google-developed open-source framework designed for real-time AI-based
perception applications. It provides pre-trained AI models for hand tracking, face detection,
and gesture recognition.
Lightweight and optimized for embedded platforms (Raspberry Pi, Edge TPU, Jetson
Nano, etc.)
Supports Python and C++ for easy implementation
Works on CPUs and GPUs, enabling efficient AI processing
Key Features of MediaPipe
Hand Tracking – Detects and tracks hand movements for gesture recognition
Face Detection & Recognition – Identifies faces in real-time
Dept. of ECE, TJIT 2024-2025 31
EMBEDDED SYSTEMS
Pose Estimation – Tracks body movements for fitness applications
Object Detection – Recognizes objects in images and video streams
Speech Recognition – Processes audio for smart assistants
Applications of MediaPipe in Embedded Systems
Smart home automation – Gesture-controlled devices
Health monitoring – Pose estimation for physiotherapy
Robotics – AI-driven object interaction
Augmented Reality (AR) – Face and hand tracking for virtual experiences
7.3 Ultralytics YOLO (You Only Look Once) – Real-Time Object Detection
Ultralytics YOLO is a state-of-the-art real-time object detection model that enables
embedded systems to identify and track objects efficiently. It is optimized for edge devices
like Raspberry Pi, NVIDIA Jetson Nano, and Coral Edge TPU.
Faster than traditional CNN-based object detection models
High accuracy and low latency for real-time AI applications
Supports PyTorch and TensorFlow for easy deployment
How YOLO Works in Embedded Systems
Single-pass detection – Identifies multiple objects in a single image pass.
Grid-based approach – Splits images into grids and predicts objects in each section.
Lightweight models – YOLOv5 and YOLOv8 optimized for edge AI.
Applications of YOLO in Embedded Systems
Autonomous vehicles – Real-time obstacle detection
Smart surveillance – AI-based security cameras
Robotic vision – Object detection for pick-and-place robots
Industrial quality control – Detecting defects in manufacturing
CONCLUSION
In conclusion, this report offers a comprehensive exploration of embedded systems, delving
into critical components such as microcontrollers, communication protocols (UART, SPI,
I2C, USB) and motor control, alongside advanced integrations like AI and computer vision
Dept. of ECE, TJIT 2024-2025 32
EMBEDDED SYSTEMS
using OpenCV and MediaPipe. The inclusion of real-time operating systems (RTOS) and
memory management techniques underscores the importance of efficient task handling and
resource optimization in embedded applications. Furthermore, the report highlights practical
applications, such as WS2812 programmable LEDs and real-time object tracking,
demonstrating the versatility of embedded systems in modern technology. By leveraging
development tools like STM32CubeIDE, Arduino IDE, the study emphasizes the
significance of robust development practices in advancing embedded system design.
Dept. of ECE, TJIT 2024-2025 33