Lab Workbook ESD 23EC2221F
Lab Workbook ESD 23EC2221F
DESIGN
23EC2221F
1. Session01:Introductory Session.................................................................................#
2. Session02: Embedded System Development and Applications................................#
3. Session03: An Overview of ARM Development system...........................................#
4. Session04: Blinking of LED using LPC2148
microcontroller………………………………………………………………..………#
5. Session05: Buzzer interfacing using LPC2148 microcontroller..............................#
6. Session06: Controlling an LED or buzzer using a switch with LPC2148
microcontroller.............................................................................................................#
7. Session07: Display string on LCD using LPC2148 microcontroller……………... #
8. Session08: Serial Transmission of data using LPC2148 microcontroller...............#
9. Session09: Serial Communication using LPC2148 microcontroller, an echo
program........................................................................................................................#
10. Session10: Interfacing relay to LPC2148 microcontroller to control any
peripheral device..........................................................................................................#
11. Session11: Acquisition of Gas Sensor data using LPC2148 developmental board
.......................................................................................................................................#
12. Session12: Interfacing seven segment display to LPC2148 microcontroller and
displaying the values on SSD .....................................................................................#
13. Session13: Interfacing temperature sensor to LPC2148 microcontroller and
displaying the values on serial window .....................................................................#
14. Session14: Mini-Project based on LPC2148 microcontroller..................................#
A.Y.2024-25 LAB CONTINUOUS EVALUATION
S.No Date Experiment Name Pre- In-Lab(25M) Post- Viva Total Faculty
Lab Program/ Data and Analysis Lab Voce (50M) Signature
(10M) Procedure Results &Inferenc (10M) (5M)
(5M) (10M) e
(10M)
1. Introductory Session -NA-
Embedded System Development and
2. Applications
Description:
Embedded system development refers to the process of designing, implementing, and deploying
computer systems that are embedded within a larger electronic device or product. These systems are
dedicated to performing specific functions and are typically designed to operate with minimal human
intervention.
Embedded system development involves various stages, including requirements analysis, hardware
and software design, coding, testing, integration, and deployment. It requires expertise in
microcontrollers, programming languages, real-time operating systems (RTOS), and hardware design
principles.
Overall, embedded systems are ubiquitous in our daily lives and are instrumental in enhancing the
functionality, efficiency, and connectivity of numerous devices and industries.
Pre-Requisites:
Pre-Lab:
1. What is an embedded system?
2. Analyze some real time examples where embedded systems are used.
4. Summarize about any one development board that you have studied earlier.
5. Give an overview of the features of the board that you listed in the above question.
In-Lab:
1. Illustrate the block diagram of any one micro controller that you have learnt.
2. Compare the features and specifications of different microcontrollers and select the most suitable
one for a given application.
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
Post-Lab:
1. Develop a case study on wearable devices which is based on the technology of embedded systems
2. Develop a case study on Internet of things which is based on the technology of embedded
systems
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
Marks Secured_______out of 50
Description:
The ARM development system is a comprehensive framework designed for developing software and
hardware solutions based on ARM architecture. ARM, which stands for Advanced RISC Machines, is a
leading processor architecture widely used in various devices such as smartphones, tablets,
embedded systems, and IoT (Internet of Things) devices.
In summary, the ARM development system provides a comprehensive set of tools, software libraries,
hardware platforms, and community support to enable developers to create applications for ARM-
based devices. It empowers developers to harness the capabilities of ARM architecture efficiently and
expedite the development process for a wide range of applications across different industries.
Pre-Requisites:
Pre-Lab:
1. What is the purpose of the ARM development system?
3. Can you provide examples of popular hardware platforms used in the ARM development
system?
4. How do debugging and testing tools enhance the development process in the ARM system?
5. Highlight any specific industries or applications where the ARM development system is
commonly utilized.
In-Lab:
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
Post-Lab:
1. Identify and explain two specific industries or domains where the ARM development system finds
significant applications. Provide examples of how ARM-based solutions are utilized in those
industries.
2. Imagine you are developing an application for an ARM-based device. Outline the steps you would
follow, including the choice of tools, libraries, and hardware platforms, to ensure a successful
development process.
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
Marks Secured_______out of 50
Aim/Objective: To blink an LED and ring a buzzer by interfacing with LPC2148 using keil μVision
software
Description:
Blinking an LED refers to the process of turning an LED (Light-Emitting Diode) on and off at regular
intervals to create a flashing effect. It is a common beginner-level project in electronics and
programming, often used to demonstrate the basics of controlling electronic components.
To blink an LED, you typically need the following components:
1. An LED: This is a small electronic component that emits light when an electric current passes
through it.
2. A resistor: LEDs require a current-limiting resistor to prevent excessive current flow, which can
damage the LED.
3. A power source: This can be a battery or a power supply.
Here's a step-by-step description of how to blink an LED:
1. Connect the longer leg (anode) of the LED to the positive terminal of the power source.
2. Connect one end of the resistor to the shorter leg (cathode) of the LED.
3. Connect the other end of the resistor to the negative terminal of the power source.
4. Make sure the connections are secure and free from any loose wires or shorts.
Pre-Requisites:
Hardware tools: ARM7(LPC2148) kit, LED’s, resistors, connecting wires.
Software tools: keil μVision5, Flash Magic.
Pre-Lab:
2. How can you determine the appropriate delay duration for achieving the desired blinking rate?
3. How will you configure the microcontroller's pin to control the LED?
5. Which microcontroller or development board will you be using for this lab and what
programming language will you use to write the code for blinking the LED?
In-Lab:
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
1. What is the function of the delay loop in the LED blinking program?
2. What are some other applications where LED blinking using a microcontroller is useful?
3. What is the role of a GPIO pin in controlling the buzzer?
4. How do you generate different tones or melodies using a buzzer and LPC2148?
5. Which registers are involved in controlling the GPIO pins for LED blinking?
Post-Lab:
1. Develop a C program to implement traffic light control using the LPC2148 development board.
2. Develop a C program to generate a ringing tone using the LPC2148 development board.
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
Marks Secured_______out of 50
Description:
Controlling an LED or buzzer using a switch with a microcontroller is a common and fundamental
application of microcontroller-based systems. It involves the use of a microcontroller, such as
LPC2148, to interface with a switch, and control the operation of an LED or buzzer based on the state
of the switch.
In this setup, the microcontroller acts as the brain of the system, responsible for reading the state of
the switch and controlling the LED or buzzer accordingly. The switch serves as an input device,
allowing the user to trigger specific actions by pressing or releasing it.
The basic principle behind this operation is to utilize the GPIO (General Purpose Input/Output) pins of
the microcontroller to detect the state of the switch and drive the LED or buzzer output accordingly.
The GPIO pins can be configured as either inputs or outputs, allowing the microcontroller to read the
switch state and control the LED or buzzer state.
When the switch is pressed, it changes its state from open to closed, and the microcontroller detects
this change in input state. Upon detecting the switch press, the microcontroller can trigger an action
to turn on the LED or activate the buzzer. Similarly, when the switch is released, it changes its state
back to open, and the microcontroller can respond by turning off the LED or deactivating the buzzer.
To achieve this functionality, the microcontroller program includes specific instructions to read the
state of the switch using GPIO pins, and based on the input, control the output state of the LED or
buzzer. The program may also incorporate debounce techniques to handle any unintended switch
bouncing effects that can occur due to mechanical inconsistencies in the switch.
Pre-Requisites:
Hardware tools: ARM7(LPC2148) kit, LED’s, resistors, connecting wires.
Software tools: keil μVision5, Flash Magic.
Pre-Lab:
1. What is the purpose of using a switch to control an LED or buzzer?
2. How do you configure the input pin of a microcontroller to read the state of a switch?
3. What commands or functions are used to turn on or off an LED in the program?
4. What precautions should be taken when wiring and connecting the components for controlling
an LED or buzzer with a switch?
In-Lab:
Develop a C program to interface an LED and a switch to control ON/OFF of the led through it
using LPC 2148 micro controller.
Develop a C program to interface a buzzer and a switch to the ringing of buzzer through it
using LPC 2148 micro controller.
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
1. How do you connect a switch to the LPC2148 microcontroller for this application?
2. Which pins of the LPC2148 microcontroller are typically used for interfacing with a switch?
3. How do you configure a GPIO pin as an input for reading the state of the switch in LPC2148?
4. What is switch debouncing, and why is it important in this application?
5. What are some other applications where controlling an LED or buzzer using a switch with a
microcontroller is useful?
Post-Lab:
1. Develop a case study on home automation systems using the knowledge gained in the
experiment.
2. Develop a case study on interactive game using the knowledge gained in the
experiment.
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
Marks Secured_______out of 50
Description:
Controlling an LED or buzzer using a switch with a microcontroller is a common and fundamental
application of microcontroller-based systems. It involves the use of a microcontroller, such as
LPC2148, to interface with a switch, and control the operation of an LED or buzzer based on the state
of the switch.
In this setup, the microcontroller acts as the brain of the system, responsible for reading the state of
the switch and controlling the LED or buzzer accordingly. The switch serves as an input device,
allowing the user to trigger specific actions by pressing or releasing it.
The basic principle behind this operation is to utilize the GPIO (General Purpose Input/Output) pins of
the microcontroller to detect the state of the switch and drive the LED or buzzer output accordingly.
The GPIO pins can be configured as either inputs or outputs, allowing the microcontroller to read the
switch state and control the LED or buzzer state.
When the switch is pressed, it changes its state from open to closed, and the microcontroller detects
this change in input state. Upon detecting the switch press, the microcontroller can trigger an action
to turn on the LED or activate the buzzer. Similarly, when the switch is released, it changes its state
back to open, and the microcontroller can respond by turning off the LED or deactivating the buzzer.
To achieve this functionality, the microcontroller program includes specific instructions to read the
state of the switch using GPIO pins, and based on the input, control the output state of the LED or
buzzer. The program may also incorporate debounce techniques to handle any unintended switch
bouncing effects that can occur due to mechanical inconsistencies in the switch.
Pre-Requisites:
Hardware tools: ARM7(LPC2148) kit, LED’s, resistors, connecting wires.
Software tools: keil μVision5, Flash Magic.
Pre-Lab:
3. What is the purpose of using a switch to control an LED or buzzer?
5. How do you configure the input pin of a microcontroller to read the state of a switch?
6. What commands or functions are used to turn on or off an LED in the program?
7. What precautions should be taken when wiring and connecting the components for controlling
an LED or buzzer with a switch?
In-Lab:
Develop a C program to interface an LED and a switch to control ON/OFF of the led through it
using LPC 2148 micro controller.
Develop a C program to interface a buzzer and a switch to the ringing of buzzer through it
using LPC 2148 micro controller.
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
6. How do you connect a switch to the LPC2148 microcontroller for this application?
7. Which pins of the LPC2148 microcontroller are typically used for interfacing with a switch?
8. How do you configure a GPIO pin as an input for reading the state of the switch in LPC2148?
9. What is switch debouncing, and why is it important in this application?
10. What are some other applications where controlling an LED or buzzer using a switch with a
microcontroller is useful?
Post-Lab:
3. Develop a case study on home automation systems using the knowledge gained in the
experiment.
4. Develop a case study on interactive game using the knowledge gained in the
experiment.
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
Marks Secured_______out of 50
Experiment Title: 5 Controlling an LED or buzzer using a switch with LPC2148 microcontroller
Description:
Controlling an LED or buzzer using a switch with a microcontroller is a common and fundamental
application of microcontroller-based systems. It involves the use of a microcontroller, such as
LPC2148, to interface with a switch, and control the operation of an LED or buzzer based on the state
of the switch.
In this setup, the microcontroller acts as the brain of the system, responsible for reading the state of
the switch and controlling the LED or buzzer accordingly. The switch serves as an input device,
allowing the user to trigger specific actions by pressing or releasing it.
The basic principle behind this operation is to utilize the GPIO (General Purpose Input/Output) pins of
the microcontroller to detect the state of the switch and drive the LED or buzzer output accordingly.
The GPIO pins can be configured as either inputs or outputs, allowing the microcontroller to read the
switch state and control the LED or buzzer state.
When the switch is pressed, it changes its state from open to closed, and the microcontroller detects
this change in input state. Upon detecting the switch press, the microcontroller can trigger an action
to turn on the LED or activate the buzzer. Similarly, when the switch is released, it changes its state
back to open, and the microcontroller can respond by turning off the LED or deactivating the buzzer.
To achieve this functionality, the microcontroller program includes specific instructions to read the
state of the switch using GPIO pins, and based on the input, control the output state of the LED or
buzzer. The program may also incorporate debounce techniques to handle any unintended switch
bouncing effects that can occur due to mechanical inconsistencies in the switch.
Pre-Requisites:
Hardware tools: ARM7(LPC2148) kit, LED’s, resistors, connecting wires.
Software tools: keil μVision5, Flash Magic.
Pre-Lab:
5. What is the purpose of using a switch to control an LED or buzzer?
8. How do you configure the input pin of a microcontroller to read the state of a switch?
9. What commands or functions are used to turn on or off an LED in the program?
10. What precautions should be taken when wiring and connecting the components for controlling
an LED or buzzer with a switch?
In-Lab:
Develop a C program to interface an LED and a switch to control ON/OFF of the led through it
using LPC 2148 micro controller.
Develop a C program to interface a buzzer and a switch to the ringing of buzzer through it
using LPC 2148 micro controller.
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
11. How do you connect a switch to the LPC2148 microcontroller for this application?
12. Which pins of the LPC2148 microcontroller are typically used for interfacing with a switch?
13. How do you configure a GPIO pin as an input for reading the state of the switch in LPC2148?
14. What is switch debouncing, and why is it important in this application?
15. What are some other applications where controlling an LED or buzzer using a switch with a
microcontroller is useful?
Post-Lab:
5. Develop a case study on home automation systems using the knowledge gained in the
experiment.
6. Develop a case study on interactive game using the knowledge gained in the
experiment.
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
Marks Secured_______out of 50
Description:
Displaying a string on an LCD (Liquid Crystal Display) using a microcontroller is a common and useful
application in various electronic projects. It involves the use of a microcontroller, such as the LPC2148,
to interface with an LCD module and display characters or strings of text on the screen.
The LCD acts as an output device, providing a visual interface for users to receive information or
messages. By using a microcontroller, we can easily control and update the content displayed on the
LCD screen dynamically.
In this setup, the microcontroller communicates with the LCD module through specific control and
data lines. It sends commands and data to the LCD, instructing it to display specific characters or
strings. The microcontroller program determines the content to be displayed on the LCD and sends
the appropriate instructions to the LCD module.
The process of displaying a string on an LCD involves several steps. Firstly, the microcontroller must be
configured to communicate with the LCD module using suitable GPIO pins. Secondly, initialization
commands are sent to the LCD to set up the display parameters and initialize its internal registers.
Once the LCD is properly initialized, the microcontroller can send data in the form of ASCII characters
or strings to be displayed on the screen.
To display a string, the microcontroller program typically includes instructions to convert the string
into individual characters and send them sequentially to the LCD module. The program may also
handle additional functionalities such as scrolling, clearing the display, or positioning the cursor at
specific locations on the screen.
Pre-Requisites:
Hardware tools: ARM7(LPC2148) kit
Software tools: keil μVision5, Flash Magic.
Pre-Lab:
7. How do you connect an LCD to the LPC2148? Which pins of the microcontroller are
used?
8. Which library or header files are necessary for working with the LCD module and the
LPC2148 microcontroller?
9. How do you configure the data pins (D4-D7), RS (Register Select), RW (Read/Write),
and EN (Enable) pins of the LCD module using the LPC2148?
10. In the program, how do you specify the position on the LCD where the string should be
displayed?
11. What library functions or commands can be used to send a string to the LCD module
for display?
In-Lab:
1. Develop a C program to interface an LCD with LPC 2148 micro controller and display the subject
name “ADVANCED EMBEDDED SYSTEMS”.
2. Develop a C program to interface an LCD with LPC 2148 micro controller and display your Id no
in the second line second position.
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
1. Which pins of the LPC2148 microcontroller are typically used for interfacing with an LCD module?
2. What is the role of the RS (Register Select) pin in communication with the LCD?
3. Can you explain the purpose of the RW (Read/Write) pin when interfacing with the LCD module?
4. What are the initialization steps involved in setting up the LCD for communication with the LPC2148
microcontroller?
5. How do you send commands to the LCD module using the LPC2148 microcontroller?
Post-Lab:
1. Develop a case study on real time weather station display to display the current weather
conditions on an LCD.
Course Title Embedded System Design Academic Year: 2024-25
Course Code(s) 23EC2221F Page: 36 of 71
Experiment # Student ID
Date Student Name
2. Develop a case study on health monitoring display with the knowledge you gained from In-lab
session.
Procedure/Program:
Marks Secured_______out of 50
Description:
Serial transmission of data refers to the process of sending data sequentially, one bit at a time, over a
communication channel. It is a common method used for data transfer between devices in various
applications, such as computer networking, telecommunications, and embedded systems.
In serial transmission, data is transmitted in a sequential manner over a single communication line,
often referred to as a serial communication channel. This is in contrast to parallel transmission, where
multiple bits are sent simultaneously over separate lines. Serial transmission is advantageous in many
scenarios due to its simplicity, cost-effectiveness, and compatibility with various communication
mediums.
The basic components involved in serial transmission are:
Data: The information or payload that needs to be transmitted from the sender to the receiver. It can
be in the form of characters, numbers, or any other data format.
Transmitter: The device or component responsible for converting the data into a serial bit stream and
sending it over the communication channel. It encodes the data into a series of electrical or optical
signals suitable for transmission.
Communication Channel: The physical medium or path through which the serial data is transmitted. It
can be a wire, cable, fiber optic link, or wireless connection.
Receiver: The device or component at the receiving end that decodes the serial bit stream and
reconstructs the original data. It converts the received signals back into the original data format.
Pre-Requisites:
Hardware tools: ARM7(LPC2148) kit
Software tools: keil μVision5, Flash Magic.
Pre-Lab:
1. Explain the concept of serial communication and how it differs from parallel
communication.
2. What parameters need to be configured for UART communication, such as baud rate,
data bits, stop bits, and parity? Explain the significance of each parameter.
3. What is the role of the UART module in the LPC2148 microcontroller for serial
transmission?
5. Explain the purpose and usage of flow control mechanisms in serial communication
and how they can be implemented using the LPC2148 microcontroller.
In-Lab:
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
1. What is the purpose of serial transmission of data using the LPC2148 microcontroller?
2. What are the different serial communication protocols supported by the LPC2148 microcontroller?
3. Which pins of the LPC2148 microcontroller are typically used for serial communication?
4. What is the baud rate, and how does it affect the serial communication speed?
5. Can you explain the difference between synchronous and asynchronous serial communication?
Post-Lab:
1. Develop a case study on Human-Machine Interface using serial communication of data from
LPC2148 microcontroller.
2. Analyze the example of Sensor Data Acquisition and Transmission using LPC2148
microcontroller.
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
Marks Secured_______out of 50
6. Explain the concept of serial communication and how it differs from parallel
communication.
7. What parameters need to be configured for UART communication, such as baud rate,
data bits, stop bits, and parity? Explain the significance of each parameter.
8. What is the role of the UART module in the LPC2148 microcontroller for serial
transmission?
10. Explain the purpose and usage of flow control mechanisms in serial communication
and how they can be implemented using the LPC2148 microcontroller.
In-Lab:
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
6. What is the purpose of serial transmission of data using the LPC2148 microcontroller?
7. What are the different serial communication protocols supported by the LPC2148 microcontroller?
8. Which pins of the LPC2148 microcontroller are typically used for serial communication?
9. What is the baud rate, and how does it affect the serial communication speed?
10. Can you explain the difference between synchronous and asynchronous serial communication?
Post-Lab:
3. Develop a case study on Human-Machine Interface using serial communication of data from
LPC2148 microcontroller.
4. Analyze the example of Sensor Data Acquisition and Transmission using LPC2148
microcontroller.
Procedure/Program:
Marks Secured_______out of 50
Experiment Title: 9 Interfacing relay to LPC2148 microcontroller to control any peripheral device
Description:
Interfacing a relay to control a peripheral device is a common technique used in electronic systems to
enable the switching of high-power or high-current loads. A relay acts as an electromechanical switch
that can be controlled by a low-power signal, such as from a microcontroller or any other control
device. This allows the control device to manage the operation of various peripheral devices, such as
motors, lights, heaters, and more.
The relay serves as an intermediary between the control device and the peripheral device, providing
isolation and protection. When the control signal activates the relay, it triggers the switch mechanism
inside the relay, which either completes or interrupts the circuit connected to the peripheral device.
This enables the control device to turn the peripheral device on or off, thereby providing control over
its operation.
The use of a relay offers several advantages. It allows for the control of devices that require higher
voltage or current than the control device can directly handle. It also provides electrical isolation,
preventing any potential disturbances or damage to the control device. Additionally, relays are often
robust and reliable, making them suitable for various applications.
To interface a relay with a control device, you typically need to connect the control pins of the relay
module to the output pins of the control device. These control pins receive signals from the control
device to activate or deactivate the relay. The output pins of the relay module are then connected to
the peripheral device, enabling the control device to switch the peripheral device on or off.
By utilizing relays for controlling peripheral devices, electronic systems can efficiently manage the
operation of various devices while maintaining a safe and reliable control interface. This technique
finds applications in automation, robotics, industrial control systems, home automation, and many
other fields where the control of high-power loads is required.
Pre-Requisites:
Hardware tools: ARM7(LPC2148) kit, relay, connecting wires
Software tools: keil μVision5, Flash Magic.
Pre-Lab:
1. What is the purpose of using a relay in the context of controlling a peripheral device with a
microcontroller?
2. What are the necessary components required for interfacing a relay to an LPC2148 microcontroller?
3. How does a relay work? Explain the basic operating principle of a relay.
4. How do you identify the control pins, normally open (NO), normally closed (NC), and common (COM)
terminals on a relay module?
5. What are some practical applications where interfacing a relay to a microcontroller to control peripheral
devices is commonly used?
In-Lab:
2. Develop a C program to interface a relay and control an LED using LPC2148 microcontroller.
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
1. What is the purpose of interfacing a relay to the LPC2148 microcontroller to control peripheral
devices?
2. What is a relay and how does it work?
3. How do you connect a relay to the LPC2148 microcontroller?
4. Which pins of the LPC2148 microcontroller are typically used for interfacing with a relay?
5. Can you explain the difference between a normally open (NO) and a normally closed (NC) relay
configuration?
Post-Lab:
1. Develop a case study of Industrial control system with the knowledge gained from in
lab session.
Procedure/Program:
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
Marks Secured_______out of 50
Experiment Title: 10 Acquisition of Gas Sensor data using LPC2148 developmental board
Description:
Interfacing a temperature sensor to a microcontroller and displaying the values on a serial window is a
practical and widely used application in various fields, including temperature monitoring,
environmental control, and industrial automation. It involves connecting a temperature sensor to a
microcontroller, such as the LPC2148, and using the microcontroller to read the sensor data and
display it on a serial communication interface.
Pre-Requisites:
Hardware tools: ARM7(LPC2148) kit
Software tools: keil μVision5, Flash Magic.
Pre-Lab:
1. What type of gas sensor are aailable to use with the LPC2148 microcontroller?
2. What are the specifications and operating parameters of the gas sensor, such as voltage supply
range, output format, and communication protocol (if applicable)?
3. What is the pin configuration of the gas sensor, and which pins of the LPC2148 will you connect
to it?
4. Which analog input pin of the LPC2148 will you use to read the gas sensor's output? Why did
you choose that particular pin?
5. Do you have the datasheet or technical documentation for the LPC2148 microcontroller and
the gas sensor? If so, have you reviewed them to understand the necessary steps and
considerations for interfacing the two?
In-Lab:
1. Develop a C program to interface a gas sensor to LPC2148 and display the values in
serial window/LCD.
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
Course Title Embedded System Design Academic Year: 2024-25
Course Code(s) 23EC2221F Page: 57 of 71
Experiment # Student ID
Date Student Name
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
1. Which types of gas sensors can be interfaced with the LPC2148 microcontroller?
2. How do you connect a gas sensor to the LPC2148 microcontroller?
3. What are the important considerations when selecting a gas sensor for interfacing with the
LPC2148?
4. Can you explain the process of transmitting gas values through the UART module to display them on
a lcd?
5. How can you ensure the correct formatting of the sensor values before transmitting them via UART?
Post-Lab:
Procedure/Program:
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
Marks Secured_______out of 50
Description:
A seven-segment display is made up of seven individual segments labeled from 'a' to 'g',
arranged in a specific configuration. The segments can be either lit up (ON) or not lit (OFF) to
represent different numbers or characters. By turning on specific combinations of segments, a
seven-segment display can show digits from 0 to 9 and some alphabetic characters.
There are two main types of seven-segment displays based on the configuration of the LED’s
anode and cathode:
1. Common Anode:
o All the anodes (positive terminals) of the LEDs in the display are connected
together.
o To light up a segment, the corresponding cathode (negative terminal) of that LED
needs to be connected to the ground.
o Logic Level: A segment turns ON when a low (0) signal is applied to it.
2. Common Cathode:
o All the cathodes (negative terminals) of the LEDs in the display are connected
together.
o To light up a segment, the corresponding anode (positive terminal) of the LED needs
to be connected to the supply voltage.
o Logic Level: A segment turns ON when a high (1) signal is applied to it.
The Common Cathode configuration is more common in simple circuits since it requires less
complex driving circuits compared to Common Anode displays.
Pre-Lab:
6. What type of gas sensor are aailable to use with the LPC2148 microcontroller?
7. What are the specifications and operating parameters of the gas sensor, such as voltage supply
range, output format, and communication protocol (if applicable)?
8. What is the pin configuration of the gas sensor, and which pins of the LPC2148 will you connect
to it?
9. Which analog input pin of the LPC2148 will you use to read the gas sensor's output? Why did
you choose that particular pin?
10. Do you have the datasheet or technical documentation for the LPC2148 microcontroller and
the gas sensor? If so, have you reviewed them to understand the necessary steps and
considerations for interfacing the two?
In-Lab:
2. Develop a C program to interface a SSD to LPC2148 and display the values in serially
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
1. How are the segments in a Seven-Segment Display controlled (using logic or microcontroller)?
2. How do you display the number '5' on a seven-segment display? Which segments are lit up?
3. What is the role of the decimal point in a seven-segment display, and how do you control it?
4. What are the advantages of using a Seven-Segment Display compared to a traditional 7-segment LED
array or LCD display?
5. How do you connect a Seven-Segment Display to a microcontroller or other logic circuits?
6. What kind of resistors do you need to use when connecting a seven-segment display to a power source
or microcontroller?
Post-Lab:
1. Develop a case study of Interfacing OLED
2. Develop a case study of Interfacing LCD
Marks Secured_______out of 50
Experiment Title: 12 Interfacing temperature sensor to LPC2148 microcontroller and displaying the
values on serial window
Aim/Objective: To Interface a temperature sensor to LPC2148 microcontroller and display the values
on serial window
Description:
Interfacing a temperature sensor to a microcontroller and displaying the values on a serial window is a
practical and widely used application in various fields, including temperature monitoring,
environmental control, and industrial automation. It involves connecting a temperature sensor to a
microcontroller, such as the LPC2148, and using the microcontroller to read the sensor data and
display it on a serial communication interface.
The temperature sensor plays a crucial role in measuring the ambient temperature. There are various
types of temperature sensors available, such as the popular analog temperature sensors like LM35 or
digital sensors like DS18B20. These sensors provide an electrical output that corresponds to the
temperature being measured.
To interface the temperature sensor with a microcontroller, appropriate connections are made
between the sensor and the microcontroller's input pins. The microcontroller is responsible for
reading the sensor data and processing it to obtain the temperature value.
The microcontroller program is developed to configure the necessary communication protocols or
interfaces to read the sensor data accurately. In the case of an analog temperature sensor, an analog-
to-digital converter (ADC) is often used to convert the analog sensor output to a digital value that the
microcontroller can process.
Once the temperature data is acquired by the microcontroller, it can be displayed on a serial window
through a serial communication interface such as UART (Universal Asynchronous
Receiver/Transmitter). The microcontroller transmits the temperature value as a series of characters
or digits via the UART to a computer or a terminal application, where it is displayed on the serial
window in a readable format.
The temperature values can be displayed in various units such as Celsius, Fahrenheit, or Kelvin,
Course Title Embedded System Design Academic Year: 2024-25
Course Code(s) 23EC2221F Page: 64 of 71
Experiment # Student ID
Date Student Name
depending on the application and user requirements. The microcontroller program may include
calculations or conversions to transform the raw sensor data into meaningful temperature values
before transmitting them through the serial interface.
Interfacing a temperature sensor to a microcontroller and displaying the values on a serial window
allows for real-time temperature monitoring and data logging. It provides a convenient way to access
and analyse temperature data from the sensor and enables the integration of temperature
measurement capabilities into various systems.
Pre-Requisites:
Hardware tools: ARM7(LPC2148) kit
Software tools: keil μVision5, Flash Magic.
Pre-Lab:
11. What type of temperature sensor are you planning to use with the LPC2148 microcontroller?
12. What are the specifications and operating parameters of the temperature sensor, such as
voltage supply range, output format, and communication protocol (if applicable)?
13. What is the pin configuration of the temperature sensor, and which pins of the LPC2148 will
you connect to it?
14. Which analog input pin of the LPC2148 will you use to read the temperature sensor's output?
Why did you choose that particular pin?
15. Do you have the datasheet or technical documentation for the LPC2148 microcontroller and
the temperature sensor? If so, have you reviewed them to understand the necessary steps and
considerations for interfacing the two?
In-Lab:
3. Develop a C program to interface a temperature sensor to LPC2148 and display the
values in serial window
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
1. Which types of temperature sensors can be interfaced with the LPC2148 microcontroller?
2. How do you connect a temperature sensor to the LPC2148 microcontroller?
3. What are the important considerations when selecting a temperature sensor for interfacing with
the LPC2148?
4. Can you explain the process of transmitting temperature values through the UART module to
display them on a serial window?
5. How can you ensure the correct formatting of the temperature values before transmitting them
via UART?
Post-Lab:
Procedure/Program:
(Note: Present the results neatly with figures and tables wherever applicable)
(Note: This section is meant to analyze the data, perform calculations Include questions or
prompts to encourage critical thinking and interpretation of the data)
Marks Secured_______out of 50
Marks Secured_______out of 50