0% found this document useful (0 votes)
27 views

Embedded Systems 2023

This document discusses embedded systems and provides details about their characteristics, types of sensors, computer ports, software, actuators, Arduino boards and code. It describes embedded systems as having real-time operation, low power consumption and limited resources. It compares analogue and digital sensors, as well as active and passive sensors. It also outlines an Arduino project proposal for an automated school bell system using an LCD display, real-time clock module and relay module to control the bell based on a schedule.

Uploaded by

massablaisetamfu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Embedded Systems 2023

This document discusses embedded systems and provides details about their characteristics, types of sensors, computer ports, software, actuators, Arduino boards and code. It describes embedded systems as having real-time operation, low power consumption and limited resources. It compares analogue and digital sensors, as well as active and passive sensors. It also outlines an Arduino project proposal for an automated school bell system using an LCD display, real-time clock module and relay module to control the bell based on a schedule.

Uploaded by

massablaisetamfu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Embedded Systems

Section A
1. Characteristics of embedded systems:

 Real-time operation
 Low power consumption
 Limited resources (memory, processing power)
 Task-specific functionality
 Integration with physical environment

2a. Comparison between Analogue and Digital sensor:


 Analogue sensor measures continuous analog signals, while
digital sensor provides discrete digital output.
 Analogue sensors are typically affected by noise and
interference, whereas digital sensors are more immune to such
effects.
 Analogue sensors generally offer higher resolution in
capturing subtle changes, while digital sensors offer easier
interfacing and processing.

2b. Comparison between Active and Passive sensor:

 Active sensors require an external power source for


operation, while passive sensors do not.
 Active sensors generally have a faster response time
compared to passive sensors.
 Active sensors may have a higher initial cost due to the
need for power sources and conditioning circuitry, while
passive sensors are often simpler and cheaper.

3. Computer ports used in developing embedded systems:

 USB (Universal Serial Bus)


 UART (Universal Asynchronous Receiver-Transmitter)
 SPI (Serial Peripheral Interface)

4. Software used in developing embedded systems:


 Integrated Development Environments (IDEs) like Arduino IDE,
MPLAB X, or Keil uVision.
 Compilers such as GCC (GNU Compiler Collection) for C/C++
programming.
 Debuggers and simulators like Proteus or SimulIDE.

5. Electrical actuators:

 DC motors
 Servo motors
 Solenoids

6. Comparison between a microcontroller system and an Arduino system:


A microcontroller system typically consists of a
microcontroller chip, external components, and custom firmware
tailored for a specific application. An Arduino system often
utilizes a microcontroller board with pre-defined pinouts, a
standardized development environment, and a vast community-
supported library of code snippets and examples.

8. Arduino Boards:

 Arduino Uno
 Arduino Mega
 Arduino Nano
 Arduino Leonardo

9. Key elements found on the Arduino Uno board:

 Microcontroller (ATmega328P): It is the main processing unit


responsible for executing the program instructions.
 Digital I/O pins: These pins can be configured as either
inputs or outputs for interfacing with external devices. They
are used for digital communication and controlling digital
signals.
 Analog input pins: These pins allow the Arduino to read
analog voltage levels from sensors. They enable the Arduino
to interface with analog sensors and devices.
10. Functions used in the Arduino IDE:

 pinMode(): Used to set the mode of a pin (input or output).


 digitalWrite(): Used to set a pin to either HIGH (logic 1) or
LOW (logic 0).
 digitalRead(): Used to read the status of a digital pin (HIGH
or LOW).
 analogRead(): Used to read the value from an analog pin as a
digital value.

Section B
1. Project name: "Dynamic school bell system with LCD"

a. The general functionality of this Arduino and Proteus-related project is to automate the school
bell system. It involves programming the Arduino to control the timing of the bell rings based on
a predefined schedule. An LCD screen can display the current time and bell schedule
information. It may also include features such as manual override and adjustable settings.

b. [Block Diagram Proposal]

[Arduino] <---> [LCD Display]

<---> [Real-time Clock Module]


<---> [Relay Module for Bell Control]

c. [Arduino Code]

[This code is a basic outline and may require customization based on specific requirements and
hardware configurations]

```//Arduino codes

#include <LiquidCrystal.h>

#include <RTClib.h> // Include the RTC library

#include <Wire.h> // Include the Wire library for I2C communication

// Pin definitions

#define LCD_RS 12
#define LCD_EN 11

#define LCD_D4 5

#define LCD_D5 4

#define LCD_D6 3

#define LCD_D7 2

#define RELAY_PIN 6

// Initialize the LiquidCrystal library

LiquidCrystal lcd(LCD_RS, LCD_EN, LCD_D4, LCD_D5, LCD_D6, LCD_D7);

// Initialize the RTC object

RTC_DS3231 rtc;

void setup() {

// Initialize the LCD screen

lcd.begin(16, 2);

// Initialize the RTC

if (!rtc.begin()) {

lcd.print("RTC not found");

while (1);

// If the RTC isn't running, set the time

if (!rtc.isrunning()) {

rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));

// Set the relay pin as an output

pinMode(RELAY_PIN, OUTPUT);
}

void loop() {

// Read the current time from the RTC

DateTime now = rtc.now();

// Display the current time on the LCD

lcd.setCursor(0, 0);

lcd.print("Time: ");

lcd.print(now.hour());

lcd.print(":");

lcd.print(now.minute());

lcd.print(":");

lcd.print(now.second());

// Check the current time and control the relay accordingly

// Example: Turn on the bell from 8:00 to 8:30

if (now.hour() == 8 && now.minute() >= 0 && now.minute() < 30) {

digitalWrite(RELAY_PIN, HIGH); // Turn on the bell

} else {

digitalWrite(RELAY_PIN, LOW); // Turn off the bell

delay(1000); // Update every second

```

You might also like