All Exp Shop Practice (EEE3100)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Heaven’s Light is Our Guide

Rajshahi University of Engineering &


Technology
Dept. of Electrical & Electronic Engineering

Experiment No: 01

Experiment Name: PCB design and soldering a charger circuit

Course Code: EEE 3100


Course Title: Electronics Shop Practice

Submitted By : Submitted To :
Name:Leson Prodhan Asif Zaman Rizve
Roll : 2001114
Lecturer
Section : B
Dept. of Electrical & Electronic
Engineering, RUET

Date of Experiment : 20-04-24

Date of Submission : 27-04-24


Experiment no:01

Experiment Name: PCB design and soldering a charger circuit

Theory : A Printed Circuit Board (PCB) is a crucial component in modern electronic systems,
serving as a mechanical platform to electrically connect various components. The process of PCB
design involves creating a blueprint of the electrical connections in a circuit and determining how
components such as resistors, capacitors, diodes, and integrated circuits will be physically placed
and connected. PCBs simplify complex wiring systems, reduce physical space requirements, and
improve the durability of electronic devices. A charger circuit is used to convert alternating
current (AC) from a power supply into direct current (DC) to charge a battery or power electronic
devices. The circuit typically steps down the high voltage from the mains to a lower, manageable
DC voltage. A Charger Circuit converts high-voltage AC from mains to low-voltage DC for
charging batteries or powering devices.

Fig 1.1 : Hardware implementation of cell phone charger circuit

Required Apparatus :
1.Transformer (e.g., 230V to 12V AC step-down)
2.Bridge Rectifier (4 diodes, e.g., 1N4007)
3.Voltage Regulator (e.g., LM7805 or LM317)
4.Capacitors
5.Resistors (as required by the circuit)
6.PCB Board
Circuit Diagram :

Fig 1.2 : circuit Diagram for charger circuit

Discussion & Conclusion :


In designing and soldering a charger circuit, several key aspects were considered
to ensure functionality, safety, and efficiency. The design phase involved selecting
components that would meet the voltage and current requirements for the specific
battery type. For instance, using appropriate resistors, capacitors, and diodes was
critical in regulating the charging process and protecting against overcharging.
The design and soldering of a charger circuit successfully demonstrated the
importance of careful planning and execution in PCB design. By selecting
appropriate components, optimizing the layout, and following best practices in
soldering, the project achieved a functional and reliable charger circuit. Testing
confirmed that the circuit met all design specifications, providing a stable and safe
charging solution.
Heaven’s Light is Our Guide

Rajshahi University of Engineering &


Technology
Dept. of Electrical & Electronic Engineering

Experiment No: 02

Experiment Name: Soldering & Testing of Astable Multivibrator

Course Code: EEE 3100


Course Title: Electronics Shop Practice

Submitted By : Submitted To :
Name:Leson Prodhan Asif Zaman Rizve
Roll : 2001114
Lecturer
Section : B
Dept. of Electrical & Electronic
Engineering, RUET

Date of Experiment : 27-04-24

Date of Submission : 04-05-24


Experiment No: 02
Experiment Name: Soldering & Testing of Astable Multivibrator

Objectives:

i. To study the operation and observe the wave forms of Astable Multivibrator.
ii. To Design an Astable Multivibrator PCB board and to generate a square wave of 1KHz
frequency output.
Theory:
A printed circuit board is a rigid structure that contains electrical circuitry made up of embedded
metal The Astable circuit is an oscillator that has two quasi-stable states. It is also called a free
running multivibrator and is used to generate a “Square Wave”. The Astable configuration will
make successive transitions from one quasi-stable state to the other without an external triggering
signal. This allows for fast switching. In the 555 Oscillator circuit, pin 2 and pin 6 are connected
together allowing the circuit to retrigger itself on each and every cycle allowing it to operate as a
free running oscillator. During each cycle capacitor C charges up through both timing resistors
R1 and R2 but discharges itself only through resistor R2 as the other side of R2 is connected to
the discharge terminal pin 7. The capacitor charges up to 2/3Vcc (the upper comparator limit)
which is determined by the 0.693(R1+R2)C combination and discharges itself down to 1/3Vcc
(the lower comparator limit) determined by the 0.693(R2*C) combination. This results in an
output whose output “ON” and “OFF” time periods are determined by the capacitor and resistors
combinations. When connected as an astable multivibrator, the output from the 555 Oscillator
will continue indefinitely charging and discharging between 2/3Vcc and 1/3Vcc until the power
supply is removed. As with the monostable multivibrator these charge and discharge times and
therefore the frequency are independent on the supply voltage.

Circuit Diagram:

Fig: Circuit Diagram of Astable Multivibrator


Required Apparatus:

Sl no. Components Specification Quantity


1 PCB board Printed connection of 1 no.
astable multivibrator
2 Resistor 100kΩx1,10kΩx1 2 nos.
3 Capacitor 10µF 2 nos.
4 LED - 1 no.
5 Potentiometer 100kΩ 1 no.
6 555 timer with connector - 1 no.

7 DC supply 9V 1 no.
8 Jumper wires - 1 no.
9 Simulating and pcb Proteus 8 professional -
designing software

Tested in Project board (Setup photograph):

Fig: Setup Photograph

Design PCB:

Fig: PCB Design


Circuit diagram after soldering (Component side photograph and soldering side
photograph):

Fig: Circuit Diagram after soldering both side


Experimental results:

Duty Cycle=56.5%
Frequency=1.553Hz

Comparison between simulation and experimental:


Theoretical Calculations:
𝑶𝒏 𝒕𝒊𝒎𝒆, 𝒕𝟏 = 𝟎. 𝟔𝟗𝟑(𝑹𝟏 + 𝑹𝟐 ) × 𝑪 = 𝟎. 𝟔𝟗𝟑(𝟏𝟎 + 𝟏𝟎𝟎)𝒌 × 𝟏𝟎 × 𝟏𝟎−𝟔 = 𝟎. 𝟕𝟔𝟐𝟑 𝒔𝒆𝒄
Off time, 𝒕𝟐 = 𝟎. 𝟔𝟗𝟑 × 𝑹𝟐 × 𝑪 = 𝟎. 𝟔𝟗𝟑 × 𝟏𝟎𝟎𝒌 × 𝟏𝟎 × 𝟏𝟎−𝟔 = 𝟎. 𝟔𝟗𝟑 𝒔𝒆𝒄
Time Period, 𝑻 = 𝒕𝟏 + 𝒕𝟐 = 𝟎. 𝟕𝟔𝟐𝟑 + 𝟎. 𝟔𝟗𝟑 𝒔𝒆𝒄= 1.4553sec
𝟏
𝒇 = 𝑻 = 𝟎. 𝟔𝟖𝟕𝟏 𝑯𝒛 for full value of potentiometer
𝑶𝒏 𝒕𝒊𝒎𝒆
𝑫𝒖𝒕𝒚 𝑪𝒚𝒄𝒍𝒆 =
𝑻𝒊𝒎𝒆 𝒑𝒆𝒓𝒊𝒐𝒅
𝟎. 𝟕𝟔𝟐𝟑
= × 𝟏𝟎𝟎% = 𝟓𝟐. 𝟑𝟖%
𝟏. 𝟒𝟓𝟓𝟑
𝟓𝟔.𝟓−𝟓𝟐.𝟑𝟖
Error between calculated and measured value of duty cycle = 𝟓𝟐.𝟑𝟔 = 𝟕. 𝟗𝟎%
Discussion and conclusion:
During the soldering and testing of an astable multivibrator circuit, a number of crucial elements
affected the design's overall reliability and success. The astable multivibrator is a crucial circuit
for producing square waves without the need for an external trigger. It is commonly constructed
using transistors, resistors, and capacitors.The astable multivibrator circuit's soldering and
testing effectively illustrated the basic ideas behind oscillation and waveform creation. The
procedure demonstrated the value of careful soldering methods and appropriate component
selection, both of which enhanced the circuit's overall functionality. The circuit's performance
was confirmed through testing, which also confirmed the circuit produced a consistent output
waveform within the intended frequency range.
Heaven’s Light is Our Guide

Rajshahi University of Engineering &


Technology
Dept. of Electrical & Electronic Engineering

Experiment No: 03

Experiment Name: Building a Robot Using the L293D Motor Driver IC

Course Code: EEE 3100


Course Title: Electronics Shop Practice

Submitted By : Submitted To :
Name:Leson Prodhan Asif Zaman Rizve
Roll : 2001114
Lecturer
Section : B
Dept. of Electrical & Electronic
Engineering, RUET

Date of Experiment : 11-05-24

Date of Submission : 18-05-24


Experiment no: 03

Experiment Name: Building a Robot Using the L293D Motor Driver IC

Theory:

In the world of robotics, controlling the movement of a robot is a fundamental task. Most robots
use DC motors to drive the wheels. To control the direction and speed of these motors, we use
motor driver circuits. The L293D Motor Driver IC is a popular choice for this purpose because
it can control two DC motors independently, allowing the robot to move in multiple directions.

Fig 3.1: The L293D Motor Driver IC

The L293D motor driver IC is an essential component for driving DC motors in robotics. It works
on the H-bridge principle, which allows current to flow in both directions through a motor, thus
changing its direction. The L293D has four input pins and four output pins. Two inputs control
each motor, determining the direction of rotation. Additionally, the Enable pins control whether
the motors are activated.

To build the robot, we connect two DC motors to the L293D, one to control the left wheel and
one to control the right wheel. The L293D is connected to the Arduino, which controls the
movement of the motors by sending HIGH or LOW signals to the input pins of the IC.

Required Apparatus:

1. L293D Motor Driver IC


2. Arduino UNO
3. Two DC motors
4. Robot chassis
5. Wheels (2 for the motors and 1 free wheel)
6. Battery (9V)
7. Breadboard
8. Jumper wires
9. Switches (optional for manual control)
Circuit Diagram:

Fig 3.2: A Robot Using the L293D Motor Driver IC

Connections for the L293D IC:

• Pin 1 (Enable 1-2): Connected to 5V to enable Motor 1.


• Pin 2 (Input 1): Connected to Arduino digital pin (e.g., pin 2) for Motor 1 control.
• Pin 3 (Output 1): Connected to one terminal of Motor 1.
• Pin 4 (Ground): Connected to ground.
• Pin 5 (Ground): Connected to ground.
• Pin 6 (Output 2): Connected to the other terminal of Motor 1.
• Pin 7 (Input 2): Connected to Arduino digital pin (e.g., pin 3) for Motor 1 control.
• Pin 8 (Vcc2): Connected to the positive terminal of the battery (9V).
• Pin 9 (Enable 3-4): Connected to 5V to enable Motor 2.
• Pin 10 (Input 3): Connected to Arduino digital pin (e.g., pin 4) for Motor 2 control.
• Pin 11 (Output 3): Connected to one terminal of Motor 2.
• Pin 12 (Ground): Connected to ground.
• Pin 13 (Ground): Connected to ground.
• Pin 14 (Output 4): Connected to the other terminal of Motor 2.
• Pin 15 (Input 4): Connected to Arduino digital pin (e.g., pin 5) for Motor 2 control.
• Pin 16 (Vcc1): Connected to 5V.

Arduino code:

// Motor control pins


int motor1Pin1 = 2; // IN1 on the L293D for Motor 1
int motor1Pin2 = 3; // IN2 on the L293D for Motor 1
int motor2Pin1 = 4; // IN3 on the L293D for Motor 2
int motor2Pin2 = 5; // IN4 on the L293D for Motor 2

void setup() {
pinMode(motor1Pin1, OUTPUT);
pinMode(motor1Pin2, OUTPUT);
pinMode(motor2Pin1, OUTPUT);
pinMode(motor2Pin2, OUTPUT);
}

void loop() {
// Forward
digitalWrite(motor1Pin1, HIGH);
digitalWrite(motor1Pin2, LOW);
digitalWrite(motor2Pin1, HIGH);
digitalWrite(motor2Pin2, LOW);
delay(2000);

// Backward
digitalWrite(motor1Pin1, LOW);
digitalWrite(motor1Pin2, HIGH);
digitalWrite(motor2Pin1, LOW);
digitalWrite(motor2Pin2, HIGH);
delay(2000);

// Turn Right
digitalWrite(motor1Pin1, HIGH);
digitalWrite(motor1Pin2, LOW);
digitalWrite(motor2Pin1, LOW);
digitalWrite(motor2Pin2, LOW);
delay(1000);

// Turn Left
digitalWrite(motor1Pin1, LOW);
digitalWrite(motor1Pin2, LOW);
digitalWrite(motor2Pin1, HIGH);
digitalWrite(motor2Pin2, LOW);
delay(1000);
}

Discussion & Conclusion:

Building a robot with the L293D motor driver IC provided an entertaining opportunity to learn
about motor control, circuit design, and robotics concepts. The L293D is a dual H-bridge motor
driver that can control the direction and speed of DC motors, making it an excellent choice for
robotics applications.The project of making a robot with the L293D motor driver IC
successfully demonstrated key ideas in robotics, such as motor control and circuit integration.
The L293D proven to be a dependable and efficient motor driver, providing for a wide range of
movement options. The robot performed as expected thanks to careful component selection,
deliberate circuit design, and comprehensive testing.
Heaven’s Light is Our Guide

Rajshahi University of Engineering &


Technology
Dept. of Electrical & Electronic Engineering

Experiment No: 04

Experiment Name: Making a Basic Line follower Robot

Course Code: EEE 3100


Course Title: Electronics Shop Practice

Submitted By : Submitted To :
Name:Leson Prodhan Asif Zaman Rizve
Roll : 2001114
Lecturer
Section : B
Dept. of Electrical & Electronic
Engineering, RUET

Date of Experiment : 18-05-24


Date of Submission : 25-05-24
Exp no: 04

Experiment Name: Making a Basic Line follower Robot

Objective:

The objective of this experiment was to design, build, and test a basic line follower robot. The
robot should be capable of detecting and following a continuous black line on a white surface
using sensors, with the motors controlled by a feedback mechanism.

Introduction:
A line follower robot is an autonomous robot that follows a black line on a white surface. This
type of robot relies on infrared (IR) sensors to detect the black line. The motors are controlled in
a simple manner: turning left when the right sensor detects the line and turning right when the left
sensor detects the line. The robot follows the path using basic control logic without advanced
feedback mechanisms.

Components Used:
Chassis: 4WD Smart Robot Chassis Kit
Microcontroller: Arduino UNO
Sensors: Digital IR Sensor x2
Motors: 12V 600RPM DC motor
Motor Driver: L298N H-Bridge Motor Driver
Power Supply: 18650 Li-Ion 3.7V battery x3 (12V)
Others: Jumper wires, Switch, Breadboard etc.

Circuit Diagram:

Figure 1: Component’s connection Diagram


Working Principle:
The robot uses infrared (IR) sensors to detect the contrast between the black line and the white
surface. When the sensor detects the black line, the output is low, and when it detects the white
surface, the output is high. The microcontroller reads the sensor data, processes it, and sends
commands to the motor driver to adjust the motor speeds, thus allowing the robot to follow the
line.

Code:

#include <L298N.h>

#define leftSensor 2
#define rightSensor 3

// Define motor pins for L298N motor driver


L298N leftMotor(9, 8, 7); // IN1, IN2, ENA
L298N rightMotor(6, 5, 4); // IN3, IN4, ENB

void setup() {
pinMode(leftSensor, INPUT);
pinMode(rightSensor, INPUT);
}

void loop() {
int leftVal = digitalRead(leftSensor);
int rightVal = digitalRead(rightSensor);

if (leftVal == LOW && rightVal == HIGH) {


leftMotor.forward(); // Turn right
rightMotor.stop();
} else if (rightVal == LOW && leftVal == HIGH) {
rightMotor.forward(); // Turn left
leftMotor.stop();
} else if(rightVal == LOW && leftVal == LOW){
rightMotor.forward(); // Going straight
leftMotor.forward();
}else {
leftMotor.stop();
rightMotor.stop();
}
}

Results:
The line follower robot successfully followed the black line using the digital IR sensors. The robot
was able to make corrections to its path based on simple left-right control by adjusting motor
rotation direction. But one major flaw was This robot was unable to turn on 90 degree turns. This
is the major flaw of this basic line follower robot. The solution to this problem is to use more than
two IR sensor for making advance control system. PD control system can also be used to improve
this line follower.
Discussion and Conclusion:
Developing a simple line follower robot required the integration of numerous robotics
components and principles, as well as electronics and programming concepts. The project's major
purpose was to create a robot capable of recognising and following a line on the ground, often
using infrared (IR) sensors to identify the line from the surrounding surface.The creation of a
rudimentary line follower robot revealed important insights into core robotics principles such as
sensor integration, motor control, and algorithm development. The research successfully
illustrated how multiple components interact to create a working robotic system capable of
autonomous navigation.
Heaven’s Light is Our Guide

Rajshahi University of Engineering &


Technology
Dept. of Electrical & Electronic Engineering

Experiment No: 05

Experiment Name: Making a Line follower Robot with Obstacle Avoiding

Course Code: EEE 3100


Course Title: Electronics Shop Practice

Submitted By : Submitted To :
Name:Leson Prodhan Asif Zaman Rizve
Roll :2001114
Lecturer
Section : B
Dept. of Electrical & Electronic
Engineering, RUET

Date of Experiment : 24-08-24

Date of Submission : 07-09-24


Experiment No : 05

Experiment Name : Making a Line follower Robot with Obstacle Avoiding

Objectives :
(i) To Enable the robot to autonomously follow a path and navigate through
environments.
(ii) To Apply the robot in real-world scenarios such as warehouse automation, or
autonomous delivery.
(iii) To Integrate the robot with a control system (e.g., microcontroller, Arduino) that
processes data from sensors and makes real-time decisions.

Theory :

A line follower robot with obstacle avoidance combines two key functionalities: following a
line and avoiding obstacles. It uses IR sensors to detect a line on the ground and an ultrasonic
sensor to detect obstacles in its path. The IR sensors help the robot stay on the line by adjusting
its direction based on the sensor readings, while the ultrasonic sensor measures the distance to
obstacles, prompting the robot to stop and avoid collisions.

A microcontroller (e.g., Arduino) processes sensor data and controls the motors using a motor
driver. The robot continuously follows the line unless an obstacle is detected, at which point it
pauses, maneuvers around the object, and returns to the line.

This robot is ideal for automation, autonomous navigation, and educational purposes,
providing practical learning in sensor integration, control systems, and robotics. It’s commonly
used in industrial automation for transporting goods and educational projects to teach basic
robotics concepts. Key challenges include sensor calibration and real-time decision-making for
effective obstacle avoidance.

Required Apparatus :

SL No Component Description
01 Arduino Uno
02 Chassis 2/4 wheels
03 Motor Driver L298N,5V
04 IR Sensor LM393,3.3-5V
05 Ultrasonic Sensor HC-SR04,5V
06 Rechargeable Battary 9V
07 Wheels 2 wheels+1 caster wheels
08 BreadBoard
09 Jumper Wires
Circuit diagram :

Fig.5.1: Simulation Diagram of line follower obstacle avoiding robot

Arduino Code :
#define ENA 9
#define IN1 8
#define IN2 7
#define IN3 6
#define IN4 5
#define ENB 10
#define IR_LEFT 2
#define IR_RIGHT 3
#define TRIG_PIN 12
#define ECHO_PIN 11

void drive(int leftSpeed, int rightSpeed) {


digitalWrite(IN1, leftSpeed > 0);
digitalWrite(IN2, leftSpeed < 0);
digitalWrite(IN3, rightSpeed > 0);
digitalWrite(IN4, rightSpeed < 0);
analogWrite(ENA, abs(leftSpeed));
analogWrite(ENB, abs(rightSpeed));
}

long measureDistance() {
digitalWrite(TRIG_PIN, LOW);
delayMicroseconds(2);
digitalWrite(TRIG_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG_PIN, LOW);
return pulseIn(ECHO_PIN, HIGH) * 0.034 / 2;
}
void setup() {
pinMode(ENA, OUTPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
pinMode(ENB, OUTPUT);
pinMode(IR_LEFT, INPUT);
pinMode(IR_RIGHT, INPUT);
pinMode(TRIG_PIN, OUTPUT);
pinMode(ECHO_PIN, INPUT);
Serial.begin(9600);
}
void loop() {
if (measureDistance() < 15) {
drive(-150, 150);
delay(1000);
} else {
int leftIR = digitalRead(IR_LEFT);
int rightIR = digitalRead(IR_RIGHT);
if (leftIR == LOW && rightIR == LOW) drive(150, 150);
else if (leftIR == LOW) drive(150, 0);
else if (rightIR == LOW) drive(0, 150);
else drive(0, 0);
}
}

Discussion and Conclusion :


Developing a line follower robot with obstacle avoidance is an exciting undertaking that combines
two critical capabilities: line identification and autonomous navigation. This robot can navigate a
predetermined path while avoiding obstacles, making it a versatile and useful use of robotics
principles.Building a line follower robot with obstacle avoidance demonstrated key topics in
robotics, including sensor integration, motor control, and algorithm development. The project
emphasised the need of meticulous component selection, circuit design, and algorithm logic in
attaining smooth functioning.
Heaven’s Light is Our Guide

Rajshahi University of Engineering &


Technology
Dept. of Electrical & Electronic Engineering

Experiment No: 06

Experiment Name: Interfacing HC-05 Bluetooth Module for Home


Automation Using Arduino UNO microcontroller

Course Code: EEE 3100


Course Title: Electronics Shop Practice

Submitted By : Submitted To :
Name:Leson Prodhan Asif Zaman Rizve
Roll : 2001114
Lecturer
Section : B
Dept. of Electrical & Electronic
Engineering, RUET

Date of Experiment : 07-09-24

Date of Submission : 14-09-24


Experiment No.: 06

Experiment Name: Interfacing HC-05 Bluetooth Module for Home Automation Using Arduino
UNO microcontroller

Theory: The HC-05 Bluetooth module typically operates within a range of about 33 feet,
although factors like obstacles and electromagnetic interference can reduce this distance. It uses
a serial communication interface compatible with UART, allowing for reliable data transmission
and reception. The module's settings, including device name, operating mode, and communication
parameters, can be configured using AT commands. It functions on a DC voltage between 3.6V
and 6V and features an integrated antenna, enhancing the efficiency and stability of its wireless
communication.

(a) (b)
Fig.6.1: (a)HC-05 module and (b) 2 channel relay module
A relay is an electrically controlled switch used to manage devices and systems operating at
higher voltages. In relay modules, the switching mechanism is typically driven by an
electromagnet. The main function of the relay module is to switch electrical devices and systems
on and off. It also offers isolation between the low-voltage control circuit and the high-voltage
system, improving safety and reliability during operation.
Interfacing the HC-05 Bluetooth module with an Arduino Uno R3 enables wireless control of
home automation devices through Bluetooth communication. The HC-05 can function in either
master or slave mode and pairs with smartphones or other Bluetooth-enabled devices. It
communicates with the Arduino via serial communication using the TX and RX pins. In a home
automation system, the Arduino receives commands from the connected Bluetooth device
through the HC-05, processes the data, and controls appliances such as lights, fans, or security
systems. This setup provides a simple, cost-effective solution for building a smartphone-
controlled wireless home automation system.

Required Apparatus:
1. Arduino Uno R3
2. Data Cable
3. Computer
4. HC-05 Bluetooth Module
5. AC Light Bulb (60W)
6. Bulb Holder
7. AC Power Chord
8. DC Gear Motor
9. Jumper Wires
10. AC Power (230V, 50Hz)

Circuit Diagram:

Fig.6.2: Switching light bulb using HC-05 through voice command

Code:
char val;
void setup() {
pinMode(13, OUTPUT);
Serial.begin(9600);
digitalWrite(13, HIGH);
}
void loop() {
if (Serial.available()) {
val = Serial.read();
Serial.println(val);
}
if (val == '1') {
digitalWrite(13, LOW);
}
else if (val == '2') {
digitalWrite(13, HIGH);
}
delay(100);
}
Practical Implementation:

Fig 6.3: Hardware Implementation of Switching light using HC-05

Discussions & Conclusion:


An example of how wireless communication and microcontroller programming can be
combined is with the practical project of connecting an Arduino UNO to the HC-05 Bluetooth
module for home automation. Many devices employ the HC-05 module for Bluetooth
connectivity, which enables remote device control via a smartphone or tablet.The HC-05
Bluetooth module and Arduino UNO interface project for home automation effectively
illustrated the fundamentals of microcontroller-based control systems and wireless
communication. Through careful component selection, circuit design, and logic programming, a
dependable home automation system was established.
Heaven’s Light is Our Guide

Rajshahi University of Engineering &


Technology
Dept. of Electrical & Electronic Engineering

Experiment No: 07

Experiment Name: Digital Arduino voltmeter

Course Code: EEE 3100


Course Title: Electronics Shop Practice

Submitted By : Submitted To :
Name:Leson Prodhan Asif Zaman Rizve
Roll : 2001114
Lecturer
Section : B
Dept. of Electrical & Electronic
Engineering, RUET

Date of Experiment : 14-09-24

Date of Submission : 21-09-24


Experiment no: 07

Experiment Name: Digital Arduino voltmeter

Theory:

A Voltmeter or a Voltage Meter is a measuring instrument that is used for measuring voltage or
potential difference between two points in a circuit. Voltmeters are an important piece of
equipment which are associated with any kind of electronics project. They are used in
measurement of both AC and DC voltages. Voltmeters are again classified in to two types
namely Analog Voltmeter and Digital Voltmeter. Analog Voltmeter consists of pointer that
moves across a scale and the movement is proportional to the voltage measured. Analog
Voltmeters generally have an error percentage of 5% and the parallax error is often an issue. But
analog voltmeters can be used to measure ranging from few volts to several thousand volts. To
overcome the defects of analog voltmeters, Digital Voltmeters are introduced. Unlike analog
voltmeters, which scale and a pointer to show the measured voltage, digital voltmeters directly
display the measured voltage numerical on a digital display. The Arduino’s microcontroller has
built-in ADC channels that convert an analog signal (voltage) into a digital value. The Arduino
Uno, for example, has a 10-bit ADC, meaning it can represent analog inputs as digital values
between 0 and 1023.

Fig.71: Digital Arduino voltmeter

Required Apparatus:

• Arduino UNO
• 16 x 2 LCD Display
• 10KΩ POT
• 100KΩ
• 10KΩ
• Connecting Wires
Circuit Diagram:

Fig 7.2: Arduino Digital Voltmeter Circuit Diagram

Connections for the Arduino Digital Voltmeter

For measuring voltages less than or equal to 5V, the circuit in Fig 7.2 can be used without any
modifications.

The LCD connections are as follows:

• Pins 1 and 2 (Vss and Vdd) are connected to ground and a +5V supply for power.
• Pin 3 (Vee) is for contrast adjustment, connected to a 10KΩ potentiometer, with the wiper
controlling contrast, and the other terminals connected to +5V and ground.
• Pins 4 (RS) and 6 (E) are control pins connected to digital pins 2 and 3 of the Arduino.
• Pin 5 (RW) is set to ground, configuring the LCD for write operations.
• Pins 11 to 14 (D4 to D7) are the data pins, connected to digital pins 4 to 7 of the Arduino
for 4-bit data communication.
• Pins 15 and 16 are for the backlight, connected to +5V (with a 220Ω resistor) and ground.

The voltage to be measured (up to 5V) is connected directly to the analog input pin A0 of
the Arduino. No extra components are needed in this case.

Arduino code:
#include
"LiquidCrystal.h"

LiquidCrystal lcd(2, 3, 4, 5, 6, 7);

float voltage = 0.0;


float temp=0.0;
int analog_value;

void setup()
{
lcd.begin(16, 2);
lcd.setCursor (0,0);
lcd.print(" Arduino based ");
lcd.setCursor(0,1);
lcd.print("Digital Voltmeter");
delay(2000);
}
void loop()
{

analog_value = analogRead(A0);
temp = (analog_value * 5.0) / 1024.0;

voltage = temp/(0.0909);
if (voltage < 0.1)
{
voltage=0.0;
}
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Voltage= ");
lcd.print(voltage);
lcd.setCursor(13,1);
lcd.print("V");
delay(30);
}

Discussion & Conclusion:


An great project for learning about voltage measurement concepts and analog-to-digital
conversion is building a digital voltmeter with an Arduino. This project shows how to interface
sensors and make use of the built-in features of the Arduino to build a working voltmeter.An
invaluable resource for learning programming, circuit design, and analogue voltage
measurement was the Arduino digital voltmeter project. The project effectively illustrated how
to divide voltage, convert analogue to digital, and display output.

You might also like