Robotics Module-3
L T P
LIST OF PRACTICALS
0 0 2
[Link] EXPERIMENT NAME
1. Design and Implantation of Two wheel wired Robot
2.
3.
Design and implantation of Electronics circuits on Bread Board
To understand the function and operation of a relay in robotics, and to demonstrate
4.
its use in controlling a high-power device with a low-power microcontroller signal.
5.
6. Design and implementation of Runner Robot
7. To design and implement of 5 volt linear power supply
8. Making a Clap switch
1|Page
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
Experiment No. 1
Object: Design and Implantation of Two wheel wired Robot
Requirement:
1. DPDT Switch
2. 2 DC Geared Motor 12 Volt
3. Wire
4. Battery 12 Volt or Power Supply
There are following tools are required for this project:
[Link] iron
[Link] saw/ blade
[Link] drivers
[Link]
[Link]
[Link] stripper
[Link]
[Link]
There are following components are required for this project-
Battery (12 volt , 4.5 Ah) - 1 nos.
DPDT Switch- 2nos. or 4 nos robot gripper
Ribbon wire strip- 3 meters+
DC Geared Motors 4nos 4x4 or 2 nos 4x2
Chassis(having holes for motor) - 1
box 1
Metal strip 12
Wheels 4 nos.
Castor wheel 1 no. (4x2)
Soldering wire - as required
PAPER PLANNING:
Before you start making your robot you need a paper plan. Measure length of the motor
(excluding shaft), diameter of shaft of the motor, inner hole diameter of the motor. Draw a rough
sketch of the base you need to cut keeping in mind the placement of motors and wheels.
2|Page
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
Chassis
Chassis is a mechanical assembly for making a 4 wheel drive platform. Where you can mount
any controller board to drive your bot. This is just the mechanical chassis, optionally as shown in
the figure you can use 4 DC geared motors, 1 castor and 4 wheels with rubber rings so you can
make both variants.
Mechanical assembly:
Fit the caster wheel at position show in above diagram with 1.5-2 inches (approx.) screw. Fit the
dc motor into the holes of chassis and couple the wheel by using screw or rubber tube.
What Is Caster Wheel
A Caster wheel is an un driven, single wheel that is designed to be mounted to the bottom of a
larger object so as to enable that object to be easily moved. They are available in various sizes,
and are commonly made of rubber, plastic, nylon, aluminum, or stainless steel, etc.
3|Page
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
DPDT Switches Using Circuit
To make anti-clockwise motion of motor, the polarity of supply must be inverted of polarity of
supply in clockwise motion. For "Polarity Reversal" DPDT switches are generally used. This can
be done by using following circuit.
DPDT Switch Connections for wired control
the wire should solder on metal strip not on switches directly. This precaution helps us if there is
wrong connection occurs in circuit. So we can change the circuit by changing metal strip
position. The procedure is shown in figure below-
Motor Connections
The rechargeable battery of rating 12 Volt and 4.5 ampere rating should connected with remote
switch and ...you can 9v ! 8 pcs AA battery (12V) holder with on/off switch.
The above circuit shows you how to connect the dpdt switchs to the motors and the 12V supply
4|Page
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
and by pressing the switch you can check the direction of the robot and change it accordingly.
thus you are ready with your first WIRED ROBOT
Result: Successfully implemented 2 wheel wired robot using 2 DPTD switch also learn the basic
function of robot.
5|Page
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
Experiment No. 3
Object: Design and implantation of Electronics circuits on Bread Board
Requirement:
1. L293D Motor driver IC
2. Bread Board
3. 3. 2 DC Motor
4. Arduino UNO Board
5. Jumper Wire
Circuit Diagram:
6|Page
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
The experiment titled "Design and Implementation of Electronic Circuits on Breadboard" is apt
for using the L293D Motor Driver IC. It focuses on designing, assembling, and testing motor
control circuits on a breadboard, fostering hands-on skills in circuit construction, IC integration,
and functionality verification, ensuring a comprehensive learning experience in electronics.
The L293D is a 16-pin Motor Driver IC which can control a set of two DC motors
simultaneously in any direction. The L293D is designed to provide bidirectional drive
currents of up to 600 mA (per channel) at voltages from 4.5 V to 36 V (at pin 8!). You can
use it to control small dc motors - toy motors. Sometimes it can be extremely hot.
In this tutorial you will learn how to use it with Arduino uno to control two dc motors.
Code:
Here's the code, embedded using codebender!
Try downloading the codebender plugin and clicking on the Run on Arduino button to
program your Arduino with this sketch. And that's it, you've programmed your Arduino
board.
//L293D
//Motor A
const int motorPin1 = 5; // Pin 14 of L293
const int motorPin2 = 6; // Pin 10 of L293
//Motor B
const int motorPin3 = 10; // Pin 7 of L293
const int motorPin4 = 9; // Pin 2 of L293
//This will run only one time.
void setup()
{ //Set pins as outputs
pinMode(motorPin1, OUTPUT);
pinMode(motorPin2, OUTPUT);
7|Page
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
pinMode(motorPin3, OUTPUT);
pinMode(motorPin4, OUTPUT);
//Motor Control - Motor A: motorPin1,motorpin2 & Motor B: motorpin3,motorpin4
//This code will turn Motor A clockwise for 2 sec.
digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, LOW);
delay(2000);
//This code will turn Motor A counter-clockwise for 2 sec.
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, HIGH);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, LOW);
delay(2000);
//This code will turn Motor B clockwise for 2 sec.
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, HIGH);
digitalWrite(motorPin4, LOW);
delay(2000);
//This code will turn Motor B counter-clockwise for 2 sec.
digitalWrite(motorPin1, LOW);
8|Page
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, HIGH);
delay(2000);
//And this code will stop motors
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, LOW);
void loop()
Result: Successfully learn the connection and working of motor driver L293D
9|Page
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
Experiment No. 4
Object: To understand the function and operation of a relay in robotics, and to demonstrate its
use in controlling a high-power device with a low-power microcontroller signal.
Materials Required
1. Relay module (5V, single-channel, with optocoupler for safety)
2. Arduino Uno or compatible microcontroller
3. Jumper wires
4. 12V DC motor or LED with appropriate resistor
5. 12V power supply
6. Breadboard
7. USB cable for Arduino
8. Computer with Arduino IDE installed
Theory
A relay is an electrically operated switch that allows a low-power circuit (e.g., a microcontroller)
to control a high-power device (e.g., a motor or lamp) safely. It acts as a bridge between low-
voltage control circuits and high-voltage loads, ensuring isolation and safety. Relays are widely
used in robotics for controlling actuators, sensors, or other high-power components.
Key Components of a Relay
Coil: When energized with a low-voltage signal, it generates a magnetic field.
Armature: A movable component that opens or closes the switch contacts.
Contacts: Normally Open (NO) or Normally Closed (NC) contacts that connect or
disconnect the high-power circuit.
Common Terminal: The connection point for the load circuit.
Working Principle
When a small voltage (e.g., 5V from a microcontroller) is applied to the relay coil, it creates a
magnetic field that moves the armature, closing (or opening) the contacts. This connects (or
disconnects) the high-power circuit, allowing the relay to control devices like motors or lights
without direct connection to the microcontroller.
10 | P a g e
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
Circuit Diagram:
Arduino Relay Sketch Code
const int relayPin = 7; // Pin connected to relay module
void setup() {
pinMode(relayPin, OUTPUT); // Set relay pin as output
digitalWrite(relayPin, HIGH); // Ensure relay is off initially (Active Low Relay)
void loop() {
digitalWrite(relayPin, LOW); // Turn relay ON
delay(3000); // Wait for 3 seconds
digitalWrite(relayPin, HIGH); // Turn relay OFF
delay(3000); // Wait for 3 seconds
Result: Relay switched ON/OFF every 3 seconds, controlling 12V motor. Arduino signal (5V)
effectively managed high-power circuit with isolation.
11 | P a g e
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
Experiment No. 6
Object: Design and implementation of Runner Robot
Requirement:
1. BO DC motor Double shaft
2. 3.7 Volt/240 mAH Li-Po Battery
3. PVC pipe 7 mm Diameter
4. At 5 mm from edge make a 2 mm diameter hole on BO motor
Here is a simple running robot. You can easily make it for your own. It has two C wheels made
from PVC pipe driven by one single geared DC motor. It is actually hopping between the steps.
See the slow motion part. Its motion is like Kangaroo.
Electrical Connection- The motor ( RPM-100) is connected with a switch in series. It is power by
a 3.7V , 240mAH, Li-Po battery.
It has two C wheels driven by one plastic geared DC motor ( 100 RPM). The legs are made from
PVC pipe. Small small humps were made on the outer side of each leg using hot glue. These
kinds of legs are known as Wheg. Wheeled leg. It is actually hopping between the steps.
12 | P a g e
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
Link Video for more help: [Link]
Result: Successfully implemented runner robot using BO motor and battery.
13 | P a g e
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
Experiment No. 7
Object: To design and implement of 5 volt linear power supply
In most of our electronic products or projects we need a power supply for converting mains AC
voltage to a regulated DC voltage. For making a power supply designing of each and every
component is essential. Here I’m going to discuss the designing of regulated 5V Power Supply.
Let’s start with very basic things the choosing of components
Component List:
1. Step down transformer
2. Voltage regulator
3. Capacitors
4. Diodes
Let’s get into detail of rating of the devices:
Voltage regulator:
1. As we require a 5V we need LM7805 Voltage Regulator IC.
2. 7805 IC Rating :
3. Input voltage range 7V- 35V
4. Current rating Ic = 1A
5. Output voltage range VMax=5.2V ,VMin=4.8V
14 | P a g e
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
Selecting a suitable transformer is of great importance. The current rating and the secondary
voltage of the transformer is a crucial factor.
The current rating of the transformer depends upon the current required for the load to be
driven.
The input voltage to the 7805 IC should be at least 2V greater than the required 2V
output, therefore it requires an input voltage at least close to 7V.
So I chose a 6-0-6 transformer with current rating 500mA (Since 6*√2 = 8.4V).
NOTE: Any transformer which supplies secondary peak voltage up to 35V can be used but as the
voltage increases size of the transformer and power dissipation across regulator increases.
Rectifying circuit: The best is using a full wave rectifier
Its advantage is DC saturation is less as in both cycle diodes conduct.
Higher Transformer Utilization Factor (TUF).
1N4007 diodes are used as its is capable of withstanding a higher reverse voltage of
1000v whereas 1N4001 is 50V
Center Tap Full Wave Rectifier
15 | P a g e
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
Capacitors:
Knowledge of Ripple factor is essential while designing the values of capacitors
It is given by
Y=1/(4√3fRC) (as the capacitor filter is used)
1. f= frequency of AC ( 50 Hz)
2. R=resistance calculated
R= V/Ic
V= secondary voltage of transformer
V=6√2=8. 4
R=8.45/500mA=16.9Ω standard 18Ω chosen
3. C= filtering capacitance
We have to determine this capacitance for filtering
Y=Vac-rms/Vdc
Vac-rms = Vr/2√3
Vdc= VMax-(Vr/2)
Vr= VMax- VMin
Vr = 5.2-4.8 =0. 4V
Vac-rms = .3464V
Vdc = 5V
Y=0 .06928
Hence the capacitor value is found out by substituting the ripple factor in Y=1/(4√3fRC)
Thus, C= 2314 µF and standard 2200µF is chosen
Datasheet of 7805 prescribes to use a 0.01μF capacitor at the output side to
avoid transient changes in the voltages due to changes in load and a 0.33μF at the input side of
regulator to avoid ripples if the filtering is far away from regulator.
16 | P a g e
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
Circuit Diagram
Final Output: + 5 Volt Regulated Smooth DC
Result: Successfully build the 5 Volt Regulated power supply using 7805 and bridge rectifier
and also study the operation of circuit.
17 | P a g e
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
Experiment No. 8
Object: Making a Clap switch
Clapping hands together switches an LED on or off in this Arduino breadboard project for
beginners. The sound made by clapping is detected by an electret microphone connected to one
of the Arduino analog input pins.
The first time that the clap is detected by the Arduino, an LED will be switched on. The second
time that a clap is detected the LED will be switched off.
Hardware Requirements
The following hardware is required to build the Arduino clap switch project:
1. Capacitor microphone
2. 100n capacitor
3. 10k resistor
4. 100k resistor
5. 220 ohm to 470 ohm resistor
6. LED
7. Arduino Uno or similar Arduino board
8. Electronic breadboard and jumper wires
Clap Switch Breadboard Layout and Circuit Diagram
Build the circuit as shown in the breadboard layout and circuit diagram below. The negative or
GND pin of the electret microphone is the pin that connects to the body of the microphone.
A resistor with value between 220 ohm and 470 ohm is used in series with the LED (R3 in the
circuit diagram).
18 | P a g e
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
Circuit Diagram:
Arduino Clap Switch Sketch Code
After building the above circuit, load the following sketch to the Arduino. Open the Arduino
serial monitor window as shown in the video to see what the value is that is read from the analog
pin. This value is what is being checked in the sketch to trigger the clap switch and switch the
LED. The check is done in the following line of code.
if (analog_val > 10) { // trigger threshold
The value used in this check can be changed if the switch is too sensitive or not sensitive enough.
19 | P a g e
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
CODE:
//---------------------------------------------------------------------
// Program: clap switch
//
// Description: Switches on an LED when hands are clapped.
// Electret microphone connected to A2, LED and series
// resistor connected to digital pin 2
//
// Date: 6 April 2016 Author: W.A. Smith
// [Link]
//---------------------------------------------------------------------
void setup() {
[Link](9600); // using serial port to check analog value
pinMode(2, OUTPUT); // LED on digital pin 2
}
void loop() {
int analog_val; // analog value read from A2
static bool led_state = false; // current state of LED
analog_val = analogRead(A2);
if (analog_val > 10) { // trigger threshold
// toggle LED
if (led_state) {
led_state = false; // LED was on, now off
digitalWrite(2, LOW);
[Link](analog_val); // print analog value for debug purposes
}
else {
led_state = true;
digitalWrite(2, HIGH); // LED was off, now on
[Link](analog_val);
}
delay(50); // wait for clap noise to subside
}
}
How the Circuit Works
The electret microphone needs resistor R1 to supply voltage to the transistor inside the
microphone. C1 stops any d.c. voltage from reaching the Arduino analog pin and only allows the
audio voltage from the microphone through.
R2 pulls the Arduino analog pin down to GND to ensure that an analog value of zero is read
when the microphone is not picking up the sound of a clap. The analog input would otherwise be
floating at some value and picking up noise from the microphone.
When someone claps, the microphone picks up the sound and a tiny voltage reaches the analog
pin which is read by the sketch running on the Arduino. If the value read from the analog pin is
big enough, the LED will be toggled from off to on or on to off.
20 | P a g e
MAHARISHI UNIVERSITY OF INFORMATION TECHNOLOGY ROBOTICS MODULE-3
This is a very easy project for beginners to build. Some improvements could be made by
building a circuit to amplify the microphone and feeding the amplified signal to the Arduino. The
sensitivity of the microphone could then be adjusted by adjusting the gain of the amplifier.
Result: Successfully build the clap switch and study the working of circuit.
21 | P a g e