0% found this document useful (0 votes)
2 views5 pages

Assignment 2 Ann

The document outlines a homework assignment focused on creating an Analog to Digital Converter (ADC) using an Arduino Uno and various components. The objective is to digitize an analog signal, display its voltage, and control LEDs based on the voltage level. The assignment includes a program code for the Arduino, a description of the apparatus, and conclusions on its application for voltage monitoring.

Uploaded by

cjzrdkqcp8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views5 pages

Assignment 2 Ann

The document outlines a homework assignment focused on creating an Analog to Digital Converter (ADC) using an Arduino Uno and various components. The objective is to digitize an analog signal, display its voltage, and control LEDs based on the voltage level. The assignment includes a program code for the Arduino, a description of the apparatus, and conclusions on its application for voltage monitoring.

Uploaded by

cjzrdkqcp8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Tafila Technical University

College of Engineering Department of Computer and Communication Engineering


Homework Assignment3: Analog to Digital converter (ABC)

By
<Ehab Ahmad Soud Elamaireh 320200109187>
9/4/2025

Submitted to
Dr. Abdel Ilah Alshbatat>
Embedded Systems /0107445/1

AQC-90-24113
Page |
Ref.: Deans' Council Session (31/2024), 1
Decision No.: 282, Date:29/10/2024
 Objective
 The objective is to digitize an analog signal, display the voltage level of the signal
ontheserialmonitorand
accordingly excite an output device.

Apparatus
1. Tinker Cad Simulation
2. Embedded board (Arduino Uno)
3. Arduino IDE software
4. 2-Light Emitting Diode (LED)
5. 2-resistor
6. 1-10K potentiometer
7. Jumpers
8. Breadboard
 Block Diagram / Circuit Schematics

(Include a diagram showing the connections between the Arduino, LED, resistors, and push-
button switches.)

AQC-90-24113
Page |
Ref.: Deans' Council Session (31/2024), 2
Decision No.: 282, Date:29/10/2024
AQC-90-24113
Page |
Ref.: Deans' Council Session (31/2024), 3
Decision No.: 282, Date:29/10/2024
 Program Code
 int potentiometerPin = A0;
 int ledPin1 = 12;
 int ledPin2 = 7;

 void setup() {
 Serial.begin(9600);
 pinMode(ledPin1, OUTPUT);
 pinMode(ledPin2, OUTPUT);
 }

 void loop() {
 int sensorValue = analogRead(potentiometerPin);
 float voltage = sensorValue * (5.0 / 1023.0); // Convert sensor value to voltage
(assuming 5V reference)

 Serial.print("Analog Voltage: ");
 Serial.print(voltage);
 Serial.println("V");

 if (voltage > 3.0) {
 digitalWrite(ledPin1, HIGH);
 digitalWrite(ledPin2, LOW);
 } else {
 digitalWrite(ledPin1, LOW);
 digitalWrite(ledPin2, HIGH);
 }
 delay(10); // Optional delay to slow down the reading frequency
 }

AQC-90-24113
Page |
Ref.: Deans' Council Session (31/2024), 4
Decision No.: 282, Date:29/10/2024
Theory / Calculations/ Plots
No Calculations

Observation / Data / System under Tes

In this experiment, we used the pointmeter as an input and used the LED as an output
so that the voltage value is controlled from the pionometer. If the voltage is less than
3V, the LED will light up, and if it is greater, another light will light up.

Conclusion and recommendations

It can be used to study and control the state of voltage and use it with devices that need
to know the value of voltage to do a specific thing

AQC-90-24113
Page |
Ref.: Deans' Council Session (31/2024), 5
Decision No.: 282, Date:29/10/2024

You might also like