Robotics Module 3 PRINT
Robotics Module 3 PRINT
Robotics Module 3 PRINT
L T P
LIST OF PRACTICALS
0 0 2
1|Page
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
1.Soldering iron
2.Hack saw/ blade
3.Screw drivers
4.Multimeter
5.Pliers
6.Wire stripper
7.Spanner
8.Hammer
2|Page
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.
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.
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
3|Page
various sizes, and are commonly made of rubber, plastic, nylon, aluminum, or stainless
steel, etc.
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.
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 switches to the motors and the 12V supply
4|Page
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
Experiment No. 2
Object: Motor On/Off using touch switch.
Requirement:
1. Arduino UNO
2. Power supply 12 Volt 1A
3. 2 pushbuttons
4. 2 resistors 220Ω or 330Ω, 2 resistors 10kΩ or 4.7kΩ
5. 1 transistor 2N2222
6. 1 red LED, 1 green LED
7. 1 diode 1N4001 (or 1N4002)
8. 1 small dc motor
1. Soldering iron
2. Screw drivers
3. Multimeter
4. Pliers
5. Wire stripper
Circuit Diagram:
6|Page
Code:
void setup() {
pinMode(motorPin, OUTPUT);
pinMode(greenLedPin, OUTPUT);
pinMode(redLedPin, OUTPUT);
pinMode(buttonPin1, INPUT);
pinMode(buttonPin2, INPUT);
}
void loop() {
buttonStatus1 = digitalRead(buttonPin1);
buttonStatus2 = digitalRead(buttonPin2);
7|Page
Working:
Step1: If the start button is pressed, it sending the HIGH signal to the Arduino Pin 2 than Pin 6
(Green LED) and Pin 9 goes HIGH.
Step2: If the stop button is pressed, it sending the HIGH signal to the Arduino Pin 3 than Pin 6
(Red LED) goes high and Pin 9 goes LOW.
8|Page
Experiment No. 3
Object: Implantation and calculation of force sensor.
Requirement:
1. Arduino Uno
2. Power Supply
3. Force Sensor
4. Jumper wire
FSRs are sensors that allow you to detect physical pressure, squeezing and weight. They are
simple to use and low cost.
FSR's are basically a resistor that changes its resistive value (in ohms) depending on how much
its pressed. These sensors are fairly low cost, and easy to use but they're rarely accurate. They
also vary some from sensor to sensor perhaps 10%. So basically when you use FSR's you should
only expect to get ranges of response. While FSRs can detect weight, they're a bad choice for
detecting exactly how many pounds of weight are on them.
Some basic stats
these stats are specifically for the Interlink 402, but nearly all FSRs will be similar. Checking the
datasheet will always illuminate any differences
➢ Size: 1/2" (12.5mm) diameter active area by 0.02" thick (Interlink does have some that
are as large as 1.5"x1.5")
➢ Resistance range: # Infinite/open circuit (no pressure), 100K ohms (light pressure) to
200 ohms (max. pressure)
➢ Force range: Force range: 0 to 20 lb. (0 to 100 Newtons) applied evenly over the 0.125
sq in surface area
➢ Power supply: Any! Uses less than 1mA of current (depends on any pullup/down
resistors used and supply voltage)
9|Page
Circuit Diagram:
Code:
This Arduino sketch that assumes you have the FSR wired up as above, with a 10Kohm pull
down resistor and the sensor is read on Analog 0 pin. It is pretty advanced and will measure the
approximate Newton force measured by the FSR. This can be pretty useful for calibrating what
forces you think the FSR will experience
10 | P a g e
int fsrPin = 0; // the FSR and 10K pulldown are connected to a0
int fsrReading; // the analog reading from the FSR resistor divider
int fsrVoltage; // the analog reading converted to voltage
unsigned long fsrResistance; // The voltage converted to resistance, can be very big so make
"long"
unsigned long fsrConductance;
long fsrForce; // Finally, the resistance converted to force
void setup(void) {
Serial.begin(9600); // We'll send debugging information via the Serial monitor
}
void loop(void) {
fsrReading = analogRead(fsrPin);
Serial.print("Analog reading = ");
Serial.println(fsrReading);
// analog voltage reading ranges from about 0 to 1023 which maps to 0V to 5V (= 5000mV)
fsrVoltage = map(fsrReading, 0, 1023, 0, 5000);
Serial.print("Voltage reading in mV = ");
Serial.println(fsrVoltage);
if (fsrVoltage == 0) {
Serial.println("No pressure");
} else {
// The voltage = Vcc * R / (R + FSR) where R = 10K and Vcc = 5V
// so FSR = ((Vcc - V) * R) / V yay math!
fsrResistance = 5000 - fsrVoltage; // fsrVoltage is in millivolts so 5V = 5000mV
fsrResistance *= 10000; // 10K resistor
fsrResistance /= fsrVoltage;
Serial.print("FSR resistance in ohms = ");
Serial.println(fsrResistance);
11 | P a g e
fsrForce = fsrConductance - 1000;
fsrForce /= 30;
Serial.print("Force in Newtons: ");
Serial.println(fsrForce);
}
}
Serial.println("--------------------");
delay(1000);
}
12 | P a g e
Experiment No. 4
Object: Implantation and calculation of Light sensor.
Requirement:
1. Arduino UNO
2. Light Dependent Resistor (LDR)
3. 100 KΩ POT
4. Buzzer
Component Description
An LDR is a type of variable resistor that change its resistance according to intensity of the light
incident on it. Generally, when the intensity of light is less i.e. in dark conditions, the resistance
of LDR will be in the order of Mega Ohms (MΩ).
As the intensity of the light increases, it resistance decreases and falls down to few Ohms at
maximum intensity of light.
Photo Resistors are semiconductor devices with photo sensitive cells. Photo cells are made with
different compounds depending on the frequency of the light and application they are used.
Cadmium Sulphide cell based photo resistors are most common in consumer applications as they
are inexpensive. Some applications are night lights, alarm systems, solar tracking systems etc.
Lead Sulphide and Indium Antimonide cell based photo resistors are frequently used for low to
mid infrared frequencies.
Germanium Copper cell based light dependent resistors are used in far infrared frequency
applications and they are used in infrared based astronomy and spectroscopy.
100 KΩ Potentiometer
This is a variable resistor whose resistance can be varied from 0Ω to 100 KΩ.
Arduino UNO
It is the main controlling part of the project. It has both analog and digital pins. It has 6 analog
input pins and 14 digital I/O pins.
As the photo resistor or LDR is a variable resistor, a voltage divider network must be used to
gets the analog equivalent output from it.
13 | P a g e
A 100 KΩ POT and the LDR form a voltage divider and the output of the voltage divider is
given to the analog input A0 of Arduino.
A buzzer is connected to pin 11 of Arduino.
Light Sensors are very useful devices in wide range of applications. One of the common
applications is an automatic night lamp, where a light bulb is automatically turned on as soon as
the sun sets down.
Another good application is solar tracker, which tracks the sun and rotates the solar panel
accordingly.
All these applications use a simple photo resistor or an LDR as the main sensing device. Hence,
in this project, we designed a simple light sensor that indicates when the light is indicated. The
working of the project is very simple and is explained below.
All the connections are made as per the circuit diagram. The code for Arduino is written and
dumped in the board. When the LDR detects a light over certain intensity, the Arduino will
trigger the buzzer. When the intensity of light decreases, the buzzer is turned off.
The 100 KΩ POT used in the voltage divider network can be used to adjust the intensity levels at
which the buzzer is triggered.
Circuit Diagram:
14 | P a g e
Code:
int sensorPin = A0; // select the input pin for the potentiometer
int sensorValue = 0; // variable to store the value coming from the sensor
void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
pinMode(11,OUTPUT);
void loop()
sensorValue=analogRead(sensorPin);
digitalWrite(11,HIGH);
else
digitalWrite(11,LOW);
Serial.println(sensorValue);
delay(2);
Applications
15 | P a g e
➢ Light Sensors are used in variety of applications.
➢ They can be used in security systems like burglar alarm systems where an alarm is
triggered when the light falling on the sensor is interrupted.
➢ Another common application of light sensor is night lamp. As long as the sun light falls
on the light sensor, the lamp will be switched off. When the sun light starts decreasing
and is completely off, the lamp will be turned on automatically.
➢ One of the important applications of light sensors is in generation of efficient solar
energy. Light sensors are often used in Solar Tracking systems. The solar panel will be
rotated according to the movement of the sun and its intensity.
16 | P a g e
Experiment No. 5
Object: Implantation and calculation of Range sensor.
Requirement:
1. Arduino Uno
2. HC-SR04 Module
3. Breadboard
4. Jumper wires
You'll need a laptop or a PC to upload code to the Arduino and view the Distance on the Serial
Monitor.
An Ultrasonic Sensor is a device that measures distance to an object using Sound Waves. It
works by sending out a sound wave at ultrasonic frequency and waits for it to bounce back from
the object. Then, the time delay between transmission of sound and receiving of the sound is
used to calculate the distance.
We divide the distance formula by 2 because the sound waves travel a round trip i.e from the
sensor and back to the sensor which doubles the actual distance.
The HC-SR04 is a typical ultrasonic sensor which is used in many projects such as obstacle
detector and electronic distance measurement tapes.
The HC-SR04 is an ultrasonic ranging module. This economical sensor provides 2cm to 400cm
of non-contact measurement functionality with a ranging accuracy that can reach up to 3mm.
Each HC-SR04 module includes an ultrasonic transmitter, a receiver and a control circuit.
17 | P a g e
The key features to be noted are:
• Operating Voltage: 5V DC
• Operating Current: 15mA
• Measure Angle: 15°
• Ranging Distance: 2cm - 4m
Refer the schematics for more clarity on the connections. Few things to remember while building
the circuit
• Avoid placing the sensor on metal surfaces to avoid short circuits which might burn the
sensor.
• It is recommended to put electrical tape on the back side of the sensor.
• You can also directly connect the Ultrasonic sensor to the Arduino with jumper wires
directly.
Circuit Diagram:
18 | P a g e
Code:
*/
// defining variables
long duration;
int distance;
void setup() {
void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
19 | P a g e
// Calculating the distance
distance= duration*0.034/2;
Serial.print("Distance: ");
Serial.println(distance);
Note: Once you've uploaded the code, the board will begin to transmit data to the
computer. You will know this when you see the Tx LED on the Arduino blinking each time
it transmits a data. Now if you open the Serial Monitor, you'll see the distance being
displayed.
20 | P a g e
Experiment No. 6
Object: Design and implementation of Runner Robot
Requirement:
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.
21 | P a g e
Link Video for more help: https://youtu.be/VrJ5G2-GbdU
22 | P a g e
Experiment No. 7
Object: Building a Floor cleaning Robot
Cleaning the house on regular basis is a very demanding and challenging task especially when
there are kids in the house. In this Intractable, we might take a step towards the solution of this
problem. Let’s make a Remote Controlled Floor Cleaning Robot as well as a toy that can make
your kids help you in cleaning the house and fun part is they will be playing all the time and the
house will still be clean.
Requirement:
1. 6v Geared DC Motor
2. Two way Switch
3. 3.7v Li-ion Battery
4. General Purpose PCB Board
5. Office paper Clips
6. Hot Glue Gun
7. Soldering Iron
8. Pliers
1. Take a small piece of Electrical cable raceway, open it and on the bigger piece make 2 holes
at both the sides.
2. Take a geared DC motor, align the motor shaft to the hole and mark the points on both sides.
3. Make holes at both the marked points.
4. Apply hot glue and attach the motors to the electrical cable raceway on both sides.
5. Take 4 different colored wires and solder the wires to the motor terminals.
6. Take two spare CD's and using super glue, paste a plastic circular piece at the center of both
the CD's.
7. Now, apply some hot glue and fix the CD to the motor shaft.
8. Take a circular cloth and insert a thread around the edges using a needle.
9. Place the CD at the center of the cloth pull the thread tightly to wrap the CD in the cloth.
10. Repeat the step for other CD as well.
11. Our Floor Cleaning Robot is ready. It is now time to make a Controller for the Robot.
23 | P a g e
12. Make a half cut PVC pipe and 4 two way switches.
13. Using hot glue, paste two switches together and make two such pairs.
14. Refer to the schematic and make connection between the switches.
15. Make 4 holes in the PVC pipe, insert and attach the switches to the PVC pipe.
16. Refer to the schematic and connect motor wires to the switch pairs.
17. Now, Take a General Purpose PCB Board and cut out an adequate size to fit two 3.7v Li-
Ion Batteries.
Result: Successfully implemented the floor cleaner and learn the working of robot.
24 | P a g e
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
25 | P a g e
Circuit Diagram:
The value used in this check can be changed if the switch is too sensitive or not sensitive enough.
26 | P a g e
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
// http://startingelectronics.org
//---------------------------------------------------------------------
void setup() {
Serial.begin(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);
27 | P a g e
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.
28 | P a g e
Experiment No. 9
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.
Component List:
Voltage regulator:
29 | P a g e
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.
30 | P a g e
Capacitors:
• 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)
31 | P a g e
Circuit Diagram
Result: Successfully build the 5 Volt Regulated power supply using 7805 and bridge rectifier
and also study the operation of circuit.
32 | P a g e