Complete List of Experiments
Complete List of Experiments
EXP. NO.: 1
DATE: ________________
AIM:
To measure the analog voltage output of a temperature sensor using Arduino/ARM and display the
corresponding temperature value.
APPARATUS:
- Arduino/ARM Board
- Temperature Sensor (e.g., LM35 or DHT11)
- Analog-to-Digital Converter (if required)
- Jumper Wires
- USB Cable
- Computer with Arduino IDE
THEORY:
Temperature sensors convert temperature into an electrical signal. Analog sensors provide varying
voltage output, which is read using the microcontroller's ADC and converted into temperature.
PROCEDURE:
- Connect the temperature sensor's VCC, GND, and signal pin to the microcontroller.
- Initialize the ADC in the Arduino/ARM code.
- Read the analog voltage from the sensor.
- Convert the voltage to temperature using the sensor's formula.
- Display the temperature value on the serial monitor.
PROGRAM CODE:
void setup() {
Serial.begin(9600);
}
void loop() {
int tempValue = analogRead(A0);
float voltage = tempValue * (5.0 / 1023.0);
float temperature = voltage * 100;
Serial.println(temperature);
delay(1000);
}
RESULT:
The analog voltage from the temperature sensor is successfully measured, and the corresponding
temperature value is displayed on the serial monitor.
EXP. NO.: 2
DATE: ________________
AIM:
To generate a Pulse Width Modulation (PWM) signal using Arduino/ARM and observe its duty cycle
variations.
APPARATUS:
- Arduino/ARM Board
- LED (for visualization)
- Resistor (220Ohm)
- Oscilloscope (optional)
- Jumper Wires
- Computer with Arduino IDE
THEORY:
PWM is a technique to control power delivered to electrical devices using a square wave with a
varying duty cycle. It is commonly used in motor control and LED dimming.
PROCEDURE:
PROGRAM CODE:
void setup() {
pinMode(9, OUTPUT);
}
void loop() {
analogWrite(9, 128); // 50% Duty Cycle
delay(1000);
analogWrite(9, 255); // 100% Duty Cycle
delay(1000);
}
RESULT:
PWM output is successfully generated, and the LED brightness varies according to the duty cycle.
EXP. NO.: 3
DATE: ________________
AIM:
To send and display a single character from Arduino/ARM to the Hyper Terminal via serial
communication.
APPARATUS:
- Arduino/ARM Board
- USB to Serial Converter (if required)
- Computer with Hyper Terminal Software
- Jumper Wires
- USB Cable
THEORY:
Serial communication allows data transfer between the microcontroller and a computer. The UART
protocol is used to send characters to a terminal interface.
PROCEDURE:
PROGRAM CODE:
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.write('A');
delay(1000);
}
RESULT:
EXP. NO.: 4
DATE: ________________
AIM:
To send and display a string from Arduino/ARM to the Hyper Terminal via serial communication.
APPARATUS:
- Arduino/ARM Board
- USB to Serial Converter (if required)
- Computer with Hyper Terminal Software
- Jumper Wires
- USB Cable
THEORY:
Similar to single character transmission, a string can be sent over UART to display meaningful
messages on the Hyper Terminal.
PROCEDURE:
PROGRAM CODE:
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println("Hello, World!");
delay(1000);
}
RESULT:
The given string is successfully transmitted and displayed on the Hyper Terminal.
EXP. NO.: 5
DATE: ________________
To establish a full-duplex communication link between the microcontroller and Hyper Terminal.
APPARATUS:
- Arduino/ARM Board
- USB to Serial Converter (if required)
- Computer with Hyper Terminal Software
- Jumper Wires
- USB Cable
THEORY:
PROCEDURE:
PROGRAM CODE:
void setup() {
Serial.begin(9600);
}
void loop() {
if (Serial.available()) {
char received = Serial.read();
Serial.print("Echo: ");
Serial.println(received);
}
}
RESULT:
Full-duplex communication is successfully established with messages being echoed back in real
time.
EXP. NO.: 6
DATE: ________________
AIM:
To send an 8-bit digital value to a DAC using SPI and obtain an analog output.
APPARATUS:
- Arduino/ARM Board
- 8-bit Digital-to-Analog Converter (DAC)
- SPI Communication Wires
- Power Supply
- Oscilloscope (optional)
THEORY:
SPI (Serial Peripheral Interface) is used to send digital data to a DAC, which then converts it into an
equivalent analog voltage.
PROCEDURE:
PROGRAM CODE:
#include <SPI.h>
void setup() {
SPI.begin();
}
void loop() {
SPI.transfer(128); // Mid-range output
delay(1000);
}
RESULT:
The 8-bit digital value is successfully sent via SPI, and the corresponding analog output is obtained.
EXP. NO.: 7
DATE: ________________
AIM:
APPARATUS:
- Arduino/ARM Board
- Stepper Motor
- Motor Driver Module (ULN2003 or A4988)
- Power Supply
- Jumper Wires
THEORY:
A stepper motor moves in discrete steps and requires sequential energizing of its coils. GPIO pins of
the microcontroller send control signals to achieve rotation.
PROCEDURE:
PROGRAM CODE:
#include <Stepper.h>
Stepper motor(200, 8, 9, 10, 11);
void setup() {
motor.setSpeed(60);
}
void loop() {
motor.step(200);
delay(1000);
}
RESULT:
The stepper motor is successfully driven using GPIOs, achieving precise rotational movement.
EXP. NO.: 8
DATE: ________________
AIM:
To interface an accelerometer with a microcontroller and display real-time acceleration values on the
Hyper Terminal.
APPARATUS:
- Arduino/ARM Board
- Accelerometer Module (e.g., ADXL335, MPU6050)
- I2C/SPI Communication Wires
- Jumper Wires
- Computer with Hyper Terminal Software
THEORY:
An accelerometer measures acceleration forces along different axes. It provides analog or digital
output, which is processed by the microcontroller and displayed via serial communication.
PROCEDURE:
PROGRAM CODE:
#include <Wire.h>
void setup() {
Serial.begin(9600);
Wire.begin();
}
void loop() {
int x = analogRead(A0);
int y = analogRead(A1);
int z = analogRead(A2);
Serial.print("X: "); Serial.print(x);
Serial.print(" Y: "); Serial.print(y);
Serial.print(" Z: "); Serial.println(z);
delay(500);
}
RESULT:
Real-time acceleration values are successfully read and displayed on the Hyper Terminal.