0% found this document useful (0 votes)
14 views67 pages

Automation and Robotics Record1

Bbbhdfhbs

Uploaded by

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

Automation and Robotics Record1

Bbbhdfhbs

Uploaded by

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

Date: Exp No:01 Page No:01

Inductive Proximity Sensor connected with Buzzer

Aim: To program the Inductive Proximity Sensor connected with Buzzer


Apparatus required:
• PC with Arduino Software
• Arduino kit
• Jumper Wires
• Inductive Proximity Sensor
Code:
int irpin=13;
int b=12;
void setup()
{
pinMode(13,INPUT);
pinMode(12,OUTPUT);
}
void loop()
{
int irpic=digitalRead (13);
if(irpin=HIGH)
{
digitalWrite(12,HIGH);
}else{
digitalWrite(12,LOW);
}
}

Result: Inductive Proximity Sensor connected with Buzzer is Programmed and


verified
Date: Exp No:02 Page No:02

Sound Sensor connected with Buzzer

Aim: To program the Sound Sensor connected with Buzzer


Apparatus required:
• PC with Arduino Software
• Arduino kit
• Jumper Wires
• Sound Sensor
Code:
const int soundSensor = A0;
const int buzzer = 9;
void setup() {
pinMode(soundSensor, INPUT);
pinMode(buzzer, OUTPUT);
}
void loop() {
int soundLevel = analogRead(soundSensor);
if (soundLevel > 500) {
digitalWrite(buzzer, HIGH);
}
else
{
digitalWrite(buzzer, LOW);
}
}

Result: Sound Sensor connected with Buzzer is Programmed and verified


Date: Exp No:03 Page No:03

Verification of working of light sensor (LDR) and interfacing with Arduino

Aim: To verify the working of light sensor (LDR) and interfacing with Arduino
Apparatus required:
• PC with Arduino Software
• Arduino kit
• Jumper Wires
• LDR
Code:
const int lightSensorPin = A0;
int lightSensorValue;
void setup()
{
pinMode(lightSensorPin, INPUT);
}
void loop()
{
lightSensorValue = analogRead(lightSensorPin);
Serial.println(lightSensorValue);
delay(1000);
}
Result: The working of light sensor (LDR) and interfacing with Arduino is build and
verified
Date: Exp No:04 Page No:04

Verification of working of Analog sensor (Potentiometer)and interfacing with


Arduino

Aim: To verify the working of Analog sensor (Potentiometer) and interfacing with
Arduino
Apparatus required:
• PC with Arduino Software
• Arduino kit
• Jumper Wires
• Potentiometer
Code:
const int potPin = A0;
void setup()
{
Serial.begin(9600);
}
void loop() {
int potValue = analogRead(potPin);
float voltage = map(potValue, 0, 1023, 0, 5000) / 1000.0;
Serial.print("Potentiometer Value: ");
Serial.print(potValue);
Serial.print("\tVoltage: ");
Serial.print(voltage, 2);
Serial.println("V");
{
delay(500);
}
}
Result: The working of Analog sensor (Potentiometer) and interfacing with Arduino is
build and verified
Date: Exp No:05 Page No:05

Verification of working of Analog sensor (Temperature)and interfacing with


Arduino

Aim: To verify the working of Analog sensor (Temperature) and interfacing with
Arduino
Apparatus required:
• PC with Arduino Software
• Arduino kit
• Jumper Wires
• Temperature Sensor
Code:
float temp;
int tempPin = 13;
void setup() {
Serial.begin(9600);
}
void loop()
{
temp = analogRead(tempPin);
temp = temp * 0.48828125;
Serial.print("TEMPERATURE = ");
Serial.print(temp);
Serial.println("*C");
delay(1000);
}
Result: The working of Analog sensor (Temperature) and interfacing with Arduino is
build and verified
Date: Exp No:06 Page No:06

Illustrate identification of metal object and non-metallic object.

Aim: To identify the metal object and non-metallic object.


Apparatus required:
• PC with Arduino Software
• Arduino kit
• Jumper Wires
• Inductive Proximity Sensor
Code:
int irpin=13;
int b=12;
void setup()
{
pinMode(13,INPUT);
pinMode(12,OUTPUT);
}
void loop()
{
int irpic=digitalRead (13);
if(irpin=HIGH)
{
digitalWrite(12,HIGH);
}else{
digitalWrite(12,LOW);
}
}

Result: Identification of metal object and non-metallic object is Verified.


Date: Exp No:07 Page No:07

Read the temperature of the liquid filled container, if temperature is less than
25 degreeC turn on the heater, turn off the heater if temperature is 27 degree C.

Aim: To Read the temperature of the liquid filled container, if temperature is less than
25 degree C turn on the heater, turn off the heater if temperature is 27 degree C.
Apparatus required:
• PC with Arduino Software
• Arduino kit
• Jumper Wires
• Temperature Sensor (LM35)
Code:
float temp;
int tempPin = A0;
int led=13;
void setup()
{
pinMode(13,OUTPUT);
Serial.begin(9600);
}
void loop()
{
temp = analogRead(tempPin);
temp = temp * 0.48828125;
Serial.print("TEMPERATURE = ");
Serial.print(temp);
Serial.println("*C");
delay(1000);
if(temp>=25)
{
digitalWrite(13,HIGH);
Date: Exp No:07 Page No:08

}
else
{
digitalWrite(13,LOW);
}
if(temp<=27)
{
digitalWrite(13,HIGH);
}
else
{
digitalWrite(13,LOW);
}
}

Result: Read and Perform the application of Liquid filled container is Verified.
Date: Exp No:08 Page No:09

Open the sliding door of shopping mall automatically in the presence of


movement in front of the door, wait for 5 sec and if no movement in front the
door close the door.

Aim: To open the sliding door of shopping mall automatically in the presence of
movement in front of the door, wait for 5 sec and if no movement in front the door
close the door.
Apparatus required:
• PC with Arduino Software
• Arduino kit
• Jumper Wires
• IR Sensor
Code:
int irpin=13;
int b=12;
void setup ()
{
pinMode(13,INPUT);
pinMode(12,OUTPUT);
}
void loop ()
{
int irpin= digitalRead(13);
if(irpin == LOW)
{
digitalWrite(12,HIGH);
delay(5000);
}else {
digitalWrite(12,LOW);
}
}
Date: Exp No:09 Page No:10

Illustrate how we can build a RF id based main gate.

Aim: To build a RF id based main gate.


Apparatus required:
• PC with Arduino Software
• Arduino kit
• RFID Tag
• Jumper Wires
Code:
int count = 0;
char input[12];
boolean flag = 0;
#include <Servo.h>
Servo myservo;

void setup() {
Serial.begin(9600);
myservo.attach(9);
}
void loop() {
if (Serial.available()) {
count = 0;
while (Serial.available() && count < 12) {
input[count] = Serial.read();
count++;
delay(5);
}
input[count] = '\0';
Serial.println(input);
Date: Exp No:09 Page No:11

if (strcmp(input, "14004AAD699A") == 0) {
Serial.println("The door is open");
myservo.write(0);
delay(1000);
myservo.write(180);
delay(1000);
} else {
Serial.println("Error");
}
}
}

Result: RFID based main gate is build and Verified.


Date: Exp No:10 Page No:12

Build a circuit to illustrate how we can build a wavy moving robot with
obstacle sensing.

Aim: To Build a circuit to illustrate how we can build a wavy moving robot with
obstacle sensing.
Apparatus required:
• PC with Arduino Software
• Arduino kit
• IR Sensor
• Jumper Wires
Code:
const int LED1=10;

const int LED2=11;

const int IR1=9; void setup()

{
Serial.print(9600); pinMode(LED1,OUTPUT); pinMode(LED2,OUTPUT);

pinMode(IR1,INPUT);
}
void loop()
{
if(IR1==HIGH)
{
digitalWrite(LED1,HIGH);
}else{
digitalWrite(LED1,HIGH);

delay(1500);

digitalWrite(LED2,HIGH);

delay(1500);

}
}

Result: Wavy moving robot with obstacle sensing is build and Verified.
Date: Exp No:11 Page No:13

Build a circuit to monitor room brightness and turn on room light during
darkness.

AIM:- To built an circuit to turn ON the lights during dark using LDR.

Apraturs required:

• PC with aurduino software installed.

• Arduino kit & jumper Wires

• LDR

Code:

int LDR=A0;//Set A0(Analog Input) for LDR. int LED1=3;

int value=0;

void setup()

Serial.begin(9600);

pinMode(LDR,INPUT);

pinMode(LED1,OUTPUT);

void loop()

value=analogRead(LDR);//Reads the Value of LDR(light). Serial.println("LDR value


is :");//Prints the value of LDR to

Serial Monitor. Serial.println(value);

if(value<300)
Date: Exp No:11 Page No:14

digitalWrite(LED1,HIGH);//Makes the LED glow in Dark.

else

digitalWrite(LED1,LOW);//Turns the LED OFF in Light.

Result: Monitor the room brightness and turn on the room led is build and verified.
Date: Exp No:12 Page No:15

Build a circuit to monitor the pH value of orange juice, if pH is less than 6.7
add neutralising agent till the pH reduced to 5.7

AIM:- To build a circuit to monitor the pH value of orange juice, if pH is less than 6.7
add neutralising agent till the pH reduced to 5.7

Apraturs required:

• PC with aurduino software installed.

• Arduino kit & jumper Wires.

• Inductive proximity sensor.

Code:
#define POTENTIOMETER_PIN A0
float var;
const float led=13;
const float buzz=12;
void setup()
{
Serial.begin(9600); pinMode(led,OUTPUT); pinMode(buzz,OUTPUT);
}
void loop()
{
float data=analogRead(POTENTIOMETER_PIN);
Serial.print(data);
float per=map(data,0,1023,0,70);
per=per/10;
Serial.print("PH value at"); Serial.println(per);
Date: Exp No:12 Page No:16

delay(1000);
if(per>5.7)
{

digitalWrite(led,HIGH); digitalWrite(buzz,HIGH); delay(100); digitalWrite(buzz,LOW);


delay(100);

digitalWrite(buzz,HIGH); delay(100);

digitalWrite(buzz,LOW); delay(1000000);
}
else
{
digitalWrite(led,LOW);
}
}

Result: A circuit to monitor the pH value of orange juice, if pH is less than 6.7 add
neutralising agent till the pH reduced to 5.7 is build and verified.
Date: Exp No:13 Page No:17

8. Build a circuit to transfer room temperature to mobile phone using


Bluetooth.

AIM:- To built an circuit to transfer a room temperature to mobile phone using


Bluetooth module.

Apraturs required:

• PC with aurduino software installed.

• Arduino kit & jumper Wires.

• Bluetooth (HC 05).

Code:

#include <SoftwareSerial.h>

SoftwareSerial bt(0,1);

const int LM=A0;

float temp=0;

void setup()

Serial.begin(9600);

void loop()

temp=analogRead(LM);

temp=temp/2.62; Serial.print("temperature");

Serial.print(temp); delay(1000);
Result: transfer a room temperature to mobile phone using Bluetooth module is build
and verified
Date: Exp No:14 Page No:18

How to check the availability of 3phase input and turn ON the induction motor
using PLC

Aim: To check the availability of 3phase input and turn ON the induction motor using
PLC
Apparatus required:
• PC with CX-Programmer Software
GX Works:
1.Open GX WORKS 3, choose FX5CPU and create a project.
2. Write the following ladder in the editor window
3. Save the project.
4. Convert
5. Simulate and verify whether the program meets all conditions

Ladder Diagram:

Result: The availability of 3phase input and turn ON the induction motor using PLC is
Build and Verified
Date: Exp No:15 Page No:19

DOL starter and record its output.

Aim: To build and verify the DOL starter and record its output.
Apparatus required:
• PC with CX-Programmer Software
• PLC trainer kit
• Connecting probes
Program:

Case 1: When push button switch a is pressed Motor q should turn ON. When the
switch is released motor q should remain ON by the help of latching.
Case 2: When push button switch b is pressed Motor q should turn OFF.

Result: DOL starter is built and Verified.


Date: Exp No:16 Page No:20

Water level controller application.

Aim: To build and verify the water level controller application.


Apparatus required:
• PC with CX-Programmer Software
• PLC trainer kit
• Connecting probes
Program:

Truth Table:
Switch 1 (a) Switch 2 (b) Switch 3 (c) Motor (q)
HIGH HIGH HIGH HIGH
HIGH LOW HIGH HIGH
HIGH LOW LOW LOW
HIGH HIGH LOW LOW
LOW LOW HIGH LOW

Case 1: When there is no water in the tank sensor a and b detects and if the sump is
have water motor will be turn ON, if there is no water in the sump motor will be turn
OFF.
Case 2: When sensor a detects water motor remain turn ON by the help of latching
and when sensor b detects water motor will be turn OFF.
Case 3: If there is no water in the sump motor will always turn OFF.

Result: Water level controller Application is build and Verified.


Date: Exp No:17 Page No:21

Stair case light application.

Aim: To build and verify the working of Stair case light application.
Apparatus required:
• PC with CX-Programmer Software
• PLC trainer kit
• Connecting probes
Program:

Truth Table:

Switch 1 (a) Switch 2 (b) Lamp (q)


ON (1) ON (1) OFF (0)
ON (1) OFF (0) ON (1)
OFF (0) ON (1) ON (1)
OFF (0) OFF (0) OFF (0)

Case 1: When both the switch are ON lamp will be OFF and When both the switch
are OFF lamp will be OFF.
Case 2: When switch a is ON and switch b is OFF lamp will be turn ON.
Case 3: When switch a is OFF and switch b is ON lamp will be turn ON.

Result: Working of Stair case light application is build and Verified.


Date: Exp No:18 Page No:22

Monitor powder level in the hoper & control powder loading conveyor

Aim: To monitor powder level in the hoper & control powder loading conveyor
Apparatus required:
• PC with CX-Programmer software

Case:
1. When hooper is empty the conveyor motor and valve will be turns ON
2. When the powder reaches the maximum level the ultrasonic sensor detects
and it turns OFF the conveyor motor and the valve
Result: Monitor powder level in the hoper & control powder loading conveyor is build
and verified
Date: Exp No:19 Page No:23

Monitor the outlet valve of a tank, if valve is opened increase the pressure of
the tank by turning ON pressure air inlet valve

Aim: To Monitor the outlet valve of a tank, if valve is opened increase the pressure of
the tank by turning ON pressure air inlet valve
Apparatus required:
• PC with CX-Programming software

Case:
1. If the outlet valve is opened turn ON the pressure air inlet valve
2. If the outlet valve is closed turn OFF the pressure air inlet valve

Result: Monitor the outlet valve of a tank, if valve is opened increase the pressure of
the tank by turning ON pressure air inlet valve is build and verified
Date: Exp No:20 Page No:24

Illustrate how paper bundle cutter can be controlled by a PLC

Aim: To Illustrate how paper bundle cutter can be controlled by a PLC


Apparatus required:
• PC with CX-Programming software

Case:
1. If any 1 switch pressed cutting blade motor stay turned OFF
2. When both the switches are pressed the cutting blade motor turns ON

Result: Paper bundle cutter can be controlled by a PLC is build and Verified
Date: Exp No:21 Page No:25

Implement plastic bar cutter, cut the plastic bar uniformly for 3cm length

Aim: To Implement plastic bar cutter, cut the plastic bar uniformly for 3cm length
Apparatus required:
• PC with CX-Programming software

Case:
1. Sensor 1 always ON if no bundle in it OFF
2. Sensor 2 when detect conveyor OFF and cutter turns ON
3. Cutter turns ON for 2 seconds
4. After 2 seconds conveyor turns ON

Result: Plastic bar cutter, cut the plastic bar uniformly for 3cm length is build and
verified
Date: Exp No:22 Page No:26

Yaskawa VFD Simulator

Aim: To Install Yaskawa VFD Simulator software


Apparatus required:
• PC with Internet
Procedure:
• Search Yaskawa simulation software from the google
• Download A1000 simulation Software
• Search drive programming simulator software informer
• Download from the website
• Install by accepting terms and conditions

Result: Installation of Yaskawa VFD Simulator software download and Verified


Date: Exp No:23 Page No:27

VFD programming using PLC for switching the motor ON/OFF

Aim: To Simulate VFD programming using PLC for switching the motor ON/OFF
Apparatus required:
• PC with Drive Programming Simulator Industrial Software
Procedure:
• Open and Start a simulator Project
• Select the Drives
• Click on view and edit parameter
• Adjust the base frequency and max frequency in motor
parameter
• Change reference selection and operation method selection
to digital operator
• Click on programming simulator
• Change forward and reverse direction by clicking F2 button
• Adjust the frequency in the simulator display
• Read and Notedown the output

Result: Simulate VFD programming using PLC for switching the motor ON/OFF is
build and verified
Date: Exp No:24 Page No:28

VFD programming using PLC for variable motor speed

Aim: To Simulate VFD programming using PLC for variable motor speed
Apparatus required:
• PC with Drive Programming Simulator Industrial Software
Procedure:
• Open and Start a simulator Project
• Select the Drives
• Click on view and edit parameter
• Adjust the base frequency and max frequency in motor
parameter
• Change reference selection and operation method selection
to digital operator
• Click on programming simulator
• Adjust the frequency in the simulator display to control the
speed
• Read and Note down the output

Result: Simulate VFD programming using PLC for variable motor speed is build and
verified
Date: Exp No:25 Page No:29

Crimping practice of CAT5 cables

Aim: To practice crimping of CAT5 cable


Apparatus Required:
• CAT5 cable
• RJ45 connector
• Crimping Tool

Procedure:
• Strip the cable 1 inch from the end
• Untwist and straighten the wires inside the cable
• Arrange the wires into the right order
• Cut the wires into an even line ½ inch from a sheeting
• Insert the wires into RJ45 connector
• Stick the connector into the crimping part of the tool and squeeze twice
• Remove the cable from the tool and check that all the pins are down.
Result: Crimping practice of CAT5 cables is conduct and verified
Date: Exp No:26 Page No:30

Crimping of co – axial cables (RG6) and demonstrate its uses

Aim: To practice Crimping of co – axial cables (RG6) and demonstrate its uses
Apparatus required:
• Co-axial cable
• Crimping Tool

Procedure:
• Strip the outer jacket of cable to expose the fiber stands inside
• Be careful not to damage the delicate fiber
• Use a fiber cleaver to cut the optical fiber with a precise length
• Polish the cleaved ends of the fiber to reduce surface imperfection
• Apply epoxy or adhesive to secure the fiber in the connector ferrule
• Connect housing – Place the connector and fiber assembly into a connector
housing
• Crimping – some connectors may require a crimping or compression step to
secure the housing

Result: Crimping of co – axial cables (RG6) and demonstrate its uses are build and
verified
Date: Exp No:27 Page No:31

Automate a simple bottle filling plant using PLC & HMI with Animation

Aim: To Automate a simple bottle filling plant using PLC & HMI with Animation
Apparatus required:
• PC with GX-Programmer Software
• PC with GT-Designer
Cases to be Perform:
• Process should be activated upon the activation of START
Key.
• When empty bottle is loaded to conveyor and no filling
process and no filled bottle at unload end, conveyor motor
should turn ON
• When empty bottle reaches filling station conveyor must stop
till bottle gets filled up for prescribed time.
• Filled bottle then conveyed to unload end of the conveyor.
• After filled bottle is unloaded next cycle repeats
• HMI is used to display the status of Activated sensors,
activated actuators, production count

GX Works:
1.Open GX WORKS 3, choose FX5CPU and create a project.
2. Write the following ladder in the editor window
3. Save the project.
4. Convert
5. Simulate and verify whether the program meets all conditions

Input Output addresses of PLC:


X0 – START/STOP Process
X1 – Emergency STOP
X2 – Empty bottle at loading end of conveyor
X3 – Sensor to sense empty bottle at filling station
X4 – Sensor to sense filled bottle at unloading end of the conveyor
Date: Exp No:27 Page No:32

Y0 – Conveyor motor
Y1 – Solenoid Valve
T0 – Timer 0 to monitor solenoid valve ON period
C0 – Counter 0 for counting processed bottles
D0 – To store count and send to HMI

GT Designer:
• Open GT DESIGNER, choose NEW project
• Complete the GOT2000 setup wizard, specify all 5
parameters
• Before finishing choose the background and screen design
• HMI Screen is ready to design
• Insert bit lamps from the tool and arrange in desired places
Date: Exp No:27 Page No:33

Animation Code:

[b:GB200]=[b:y00000];
[b:GB201]=[b:y00001];
if([b:GB200]==1)
{
[w:GD200]=[w:GD200]+1;
if([b:GB201]==1){if([w:GD200]=400;}
if([w:GD200]==800)
{[w:GD200]=0;}
}

Result: Simple bottle filling plant using PLC & HMI with Animation is built and
Automated
Date: Exp No:28 Page No:34

Automate a controlling of liquid level of a tank using PLC & HMI include
Animation

Aim: To Automate a controlling of liquid level of a tank using PLC & HMI include
Animation
Apparatus required:
• PC with GX-Programmer Software
• PC with GT-Designer

Cases to be Perform:
• When 3 phases are available, when the start button is
pressed, when low level sensor is on and when there is water
in the sump the motor should be turn ON.
• When water reaches the senor 2 or sump water is low or
when emergency switch is pressed or when there is no
availability of any one phase supply the motor should be turn
OFF.
GX Works:
1.Open GX WORKS 3, choose FX5CPU and create a project.
2. Write the following ladder in the editor window
3. Save the project.
4. Convert
5. Simulate and verify whether the program meets all conditions
Date: Exp No:28 Page No:35

Input Output addresses of PLC:


X0 - Single Phase Switch
X1 - Two Phase Switch
X2 - Three Phase Switch
X3 - Stop Switch
X4 - Start Switch
X5 - Low Level Sensor of Tank
X6 - High Level Sensor of Tank
X7 - Sump Sensor
M0 - Mains Lamp
Y0 - Motor

GT Designer:
• Open GT DESIGNER, choose NEW project
• Complete the GOT2000 setup wizard, specify all 5
parameters
Date: Exp No:28 Page No:36

• Before finishing choose the background and screen design


• HMI Screen is ready to design
• Insert bit lamps from the tool and arrange in desired places
Animation Code:
[b:GB200] =[b:Y0000];
if([b:GB200] ==1)
{
[w:GD200] =[w:GD200] +1;
if([w:GD200] ==60)
{
[w:GD200] =0;
}
}

Result: A controlling of liquid level of a tank using PLC & HMI include Animation is
built and Automated
Date: Exp No:29 Page No:37

A parking plot has a certain capacity of cars, number of empty spots should be
displayed on the display outside the Parking slot and the spots available are to
be indicated by LEDs

Aim: To conduct an experiment that A parking plot has a certain capacity of cars,
number of empty spots should be displayed on the display outside the Parking slot
and the spots available are to be indicated by LEDs

Apparatus required:
• PC with Arduino Software
• Arduino kit
• Jumper Wires
Program:
#include <Servo.h>
#include <LiquidCrystal.h>
const int ledPins[] = {6, 10, 11, 12, 13, A1, A2, A3};
const int irSensorPin = A0;
const int exitButtonPin = 7; // Connect the push button to this digital pin
const int servoPin = 9;
const int rs = 0, en = 1, d4 = 2, d5 = 3, d6 = 4, d7 =5;
LiquidCrystal lcd (rs, en, d4, d5, d6, d7);
Servo gateServo;
int vehicleCount = 0; // Start counting from 0
bool gateOpen = false;
void setup () {
for (int i = 0; i < 8; i++) {
pinMode(ledPins[i], OUTPUT);
}
gateServo.attach(servoPin);
gateServo.write(0);
lcd.begin(16, 2);
Date: Exp No:29 Page No:38

lcd.print("Vehicle Count: 0"); // Start with count 0


pinMode(exitButtonPin, INPUT_PULLUP); // Use INPUT_PULLUP to enable internal
pull-up resistor
}
void loop () {
int irValue = analogRead(irSensorPin);
if (vehicleCount < 8) {
if (irValue < 500&&! gateOpen) {
gateServo.write(180);
delay (2000);
gateServo.write(0);
gateOpen = true;
digitalWrite(ledPins[vehicleCount], HIGH);
vehicleCount++;
updateDisplay ();
}
else if (irValue >= 500 && gateOpen) {
gateOpen = false;
}
}
else {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print ("Parking Slots full ");
if (gateOpen) {
gateServo.write(0);
gateOpen = false;
}
}
Date: Exp No:29 Page No:39

// Check the exit button state


if (digitalRead(exitButtonPin) == LOW && vehicleCount> 0) {
gateServo.write(90);
delay (2000);
gateServo.write(0);
gateOpen = true;
digitalWrite (ledPins [vehicleCount - 1], LOW);
vehicleCount--;
updateDisplay ();
}
}
void updateDisplay () {
lcd.setCursor(14, 0); // Position the cursor to
update vehicle count
lcd.print(" "); // Clear the previous count
lcd.setCursor(14, 0);
lcd.print(vehicleCount); // Display the updated count
}

Result: An experiment that A parking plot has a certain capacity of cars, number of
empty spots should be displayed on the display outside the Parking slot and the
spots available are to be indicated by LEDs is conducted and verified.
Date: Exp No:30 Page No:40

If Sump water level is minimum, allow the inlet water. When the sump level is
maximum, stop the inlet water. Switch on the motor if the overhead water tank
is empty, only when the water in the sump is sufficient using Arduino.

Aim: To conduct an experiment that If Sump water level is minimum, allow the inlet
water. When the sump level is maximum, stop the inlet water. Switch on the motor if
the overhead water tank is empty, only when the water in the sump is sufficient using
Arduino.

Apparatus required:
• PC with Arduino Software
• Arduino kit
• Jumper Wires
Program:
const int emptySensorPin = 2;
const int fullSensorPin = 3;
const int pumpPin = 4;
const int sumpPin = 5;

void setup () {
pinMode (emptySensorPin, INPUT);
pinMode (fullSensorPin, INPUT);
pinMode (pumpPin, OUTPUT);
pinMode (sumpPin, INPUT_PULLUP);

digitalWrite (pumpPin, LOW);


}

void loop () {
int emptySensorValue = digitalRead(emptySensorPin);
int fullSensorValue = digitalRead(fullSensorPin);
Date: Exp No:30 Page No:41

int sumpValue = digitalRead(sumpPin);


if (sumpValue == LOW) {
digitalWrite (pumpPin, LOW);
} else {
if (emptySensorValue == LOW) {
digitalWrite (pumpPin, HIGH);
} else if (fullSensorValue == HIGH) {
digitalWrite (pumpPin, LOW);
}
}
}

Result: An experiment that If Sump water level is minimum, allow the inlet water.
When the sump level is maximum, stop the inlet water. Switch on the motor if the
overhead water tank is empty, only when the water in the sump is sufficient using
Arduino is built and verified.
Date: Exp No:31 Page No:42

Display the number of students in a classroom at any time of the day using
Arduino.

Aim: To conduct an experiment that Display the number of students in a classroom


at any time of the day using Arduino.
Apparatus required:
• PC with Arduino Software
• Arduino kit
• Jumper Wires
Program:
#include <LiquidCrystal.h>
LiquidCrystal lcd (0, 1,4, 5, 6, 7, 8, 9, 10, 11);
int studentCount = 0;
int irSensorPin = 3;
int buttonPin = 12;
void setup () {
lcd.begin(16, 2);
lcd.print ("Students: ");
lcd.setCursor(0, 1);
lcd.print(studentCount);
pinMode (irSensorPin, INPUT);
pinMode (buttonPin, INPUT_PULLUP);
}
void loop () {
if (digitalRead(irSensorPin) == HIGH) {
studentCount++;
updateLCD();
delay (100);
while (digitalRead(irSensorPin) == HIGH) {
}
Date: Exp No:31 Page No:43

delay (100);
}
if (digitalRead(buttonPin) == LOW) {
studentCount--;
updateLCD ();
delay (100);
while (digitalRead(buttonPin) == LOW) {
}
delay (100);
}
}
void updateLCD () {
lcd.setCursor(0, 1);
lcd.print (" ");
lcd.setCursor(0, 1);
lcd.print(studentCount);
}

Result: Display the number of students in a classroom at any time of the day using
Arduino is built and verified.
Date: Exp No:32 Page No:44

Control the street light automatically using Arduino.

Aim: To conduct an experiment that to Control the street light automatically using
Arduino.
Apparatus required:
• PC with Arduino Software
• Arduino kit
• Jumper Wires
Program:
const int ldr=A0;
const int led=10;
int temp =0;
void setup ()
{
Serial.begin(9600);
pinMode(ldr,INPUT);
pinMode(led,OUTPUT);
}
void loop ()
{
temp =analogRead(ldr);
if(temp<=500)
{
digitalWrite(led,HIGH);
Serial.println("Its Night Time");
delay (2000);
}
else
{
Date: Exp No:32 Page No:45

digitalWrite(led,LOW);
Serial.println("Its Day Time");
delay (2000);
}
}

Result: Control the street light automatically using Arduino is built and verified.
Date: Exp No:33 Page No:46

Implement a system- lights and fans should switch OFF, if no one is present in
the room.

Aim: To conduct an experiment that to Implement a system- lights and fans should
switch OFF, if no one is present in the room.
Apparatus required:
• PC with Arduino Software
• Arduino kit
• Jumper Wires
Program:
const int irpin = 2;
const int light = 13;
const int fanmotor = 12;
void setup () {
pinMode (irpin, INPUT);
pinMode (light, OUTPUT);
pinMode (fanmotor, OUTPUT);
}
void loop () {
int irState = digitalRead(irpin);
if (irState == HIGH)
{
digitalWrite (light, HIGH);
digitalWrite (fanmotor, HIGH);
delay (1000);
}
else
{
digitalWrite (light, LOW);
digitalWrite (fanmotor, LOW);
Date: Exp No:33 Page No:47

}
}

Result: Implement a system- lights and fans should switch OFF, if no one is present
in the room is built and verified.
Date: Exp No:34 Page No:48

Build a simple Line Following Robot

Aim: To build a simple Line Following Robot


Apparatus required:
• Arduino
• Basic car Building Kit with DC Motors
• IR Sensors
• Motor Driver
• Computer with Arduino IDE Software
Circuit Diagram:

Procedure:
• Build a circuit as per the circuit diagram
• Join a components as per the Robo (tyre, chase, Etc)
• Dump the required code
• Switch on the Robo and verify the Output
Code:
#include <AFMotor.h>
#define left A1
#define right A2
AF_DCMotor motor1(1, MOTOR12_1KHZ);
AF_DCMotor motor2(2, MOTOR12_1KHZ);
AF_DCMotor motor3(3, MOTOR34_1KHZ);
Date: Exp No:34 Page No:49

AF_DCMotor motor4(4, MOTOR34_1KHZ);


void setup() {
pinMode(left,INPUT);
pinMode(right,INPUT);
//begin serial communication
Serial.begin(9600);
}
void loop()
{
Serial.println(digitalRead(left));
Serial.println(digitalRead(right));
//line detected by both
if(digitalRead(left)==0 && digitalRead(right)==0){
//Forward
motor1.run(FORWARD);
motor1.setSpeed(100);
motor2.run(FORWARD);
motor2.setSpeed(100);
motor3.run(FORWARD);
motor3.setSpeed(100);
motor4.run(FORWARD);
motor4.setSpeed(100);
}
//line detected by left sensor
else if(digitalRead(left)==0 && !analogRead(right)==0){
motor1.run(FORWARD);
motor1.setSpeed(150);
motor2.run(FORWARD);
Date: Exp No:34 Page No:50

motor2.setSpeed(150);
motor3.run(BACKWARD);
motor3.setSpeed(150);
motor4.run(BACKWARD);
motor4.setSpeed(150);
}
//line detected by right sensor
else if(!digitalRead(left)==0 && digitalRead(right)==0){
//turn right
motor1.run(BACKWARD);
motor1.setSpeed(150);
motor2.run(BACKWARD);
motor2.setSpeed(150);
motor3.run(FORWARD);
motor3.setSpeed(150);
motor4.run(FORWARD);
motor4.setSpeed(150);
}
//line detected by none
else if(!digitalRead(left)==0 && !digitalRead(right)==0)
{
//stop
motor1.run(RELEASE);
motor1.setSpeed(0);
motor2.run(RELEASE);
motor2.setSpeed(0);
motor3.run(RELEASE);
motor3.setSpeed(0);
Date: Exp No:34 Page No:51

motor4.run(RELEASE);
motor4.setSpeed(0);
}
}
Result: A simple Line Following Robot is Built and Verified.
Date: Exp No:35 Page No:52

Build a simple obstacle avoiding Robot

Aim: To build a simple obstacle avoiding Robot


Apparatus required:
• Arduino
• Basic car Building Kit with DC Motors
• Ultrasonic Sensors
• Motor Driver
• Computer with Arduino IDE Software
Circuit Diagram:

Procedure:
• Build a circuit as per the circuit diagram
• Join a components as per the Robo (tyre, chase, Etc)
• Dump the required code
• Switch on the Robo and verify the Output
Code:
#include <AFMotor.h>
#include <NewPing.h>
#include <Servo.h>
#define TRIG_PIN A4
#define ECHO_PIN A3
#define MAX_DISTANCE 200
#define MAX_SPEED 190 // sets speed of DC motors
Date: Exp No:35 Page No:53

#define MAX_SPEED_OFFSET 20
NewPing sonar(TRIG_PIN, ECHO_PIN, MAX_DISTANCE);
AF_DCMotor motor1(1, MOTOR12_1KHZ);
AF_DCMotor motor2(2, MOTOR12_1KHZ);
AF_DCMotor motor3(3, MOTOR34_1KHZ);
AF_DCMotor motor4(4, MOTOR34_1KHZ);
Servo myservo;
boolean goesForward=false;
int distance = 100;
int speedSet = 0;
void setup() {
myservo.attach(10);
myservo.write(115);
delay(2000);
distance = readPing();
delay(100);
distance = readPing();
delay(100);
distance = readPing();
delay(100);
distance = readPing();
delay(100);}
void loop() {
int distanceR = 0;
int distanceL = 0;
delay(40);
if(distance<=15)
{
Date: Exp No:35 Page No:54

moveStop();
delay(100);
moveBackward();
delay(300);
moveStop();
delay(200);
distanceR = lookRight();
delay(200);
distanceL = lookLeft();
delay(200);
if(distanceR>=distanceL)
{
turnRight();
moveStop();
}else
{
turnLeft();
moveStop();
}
}else
{
moveForward();
}
distance = readPing();
}
int lookRight()
{
myservo.write(50);
Date: Exp No:35 Page No:55

delay(500);
int distance = readPing();
delay(100);
myservo.write(115);
return distance;
}
int lookLeft()
{
myservo.write(170);
delay(500);
int distance = readPing();
delay(100);
myservo.write(115);
return distance;
delay(100);
}
int readPing() {
delay(70);
int cm = sonar.ping_cm();
if(cm==0)
{
cm = 250;
}
return cm;
}
void moveStop() {
motor1.run(RELEASE);
motor2.run(RELEASE);
Date: Exp No:35 Page No:56

motor3.run(RELEASE);
motor4.run(RELEASE);
}
void moveForward() {
if(!goesForward)
{
goesForward=true;
motor1.run(FORWARD);
motor2.run(FORWARD);
motor3.run(FORWARD);
motor4.run(FORWARD);
for (speedSet = 0; speedSet < MAX_SPEED; speedSet +=2) // slowly bring the
speed up to avoid loading down the batteries too quickly
{
motor1.setSpeed(speedSet);
motor2.setSpeed(speedSet);
motor3.setSpeed(speedSet);
motor4.setSpeed(speedSet);
delay(5);
}
}
}
void moveBackward() {
goesForward=false;
motor1.run(BACKWARD);
motor2.run(BACKWARD);
motor3.run(BACKWARD);
motor4.run(BACKWARD);
Date: Exp No:35 Page No:57

for (speedSet = 0; speedSet < MAX_SPEED; speedSet +=2) // slowly bring the
speed up to avoid loading down the batteries too quickly
{
motor1.setSpeed(speedSet);
motor2.setSpeed(speedSet);
motor3.setSpeed(speedSet);
motor4.setSpeed(speedSet);
delay(5);
}
}

void turnRight() {
motor1.run(FORWARD);
motor2.run(FORWARD);
motor3.run(BACKWARD);
motor4.run(BACKWARD);
delay(500);
motor1.run(FORWARD);
motor2.run(FORWARD);
motor3.run(FORWARD);
motor4.run(FORWARD);
}
void turnLeft() {
motor1.run(BACKWARD);
motor2.run(BACKWARD);
motor3.run(FORWARD);
motor4.run(FORWARD);
delay(500);
motor1.run(FORWARD);
Date: Exp No:35 Page No:58

motor2.run(FORWARD);
motor3.run(FORWARD);
motor4.run(FORWARD);
}
Result: A simple obstacle avoiding Robot is Build and Verified.
Date: Exp No:36 Page No:59

Simulate any industry application of picking and placing an object from one
place to another using Robo Analyser Software or any simulator

Aim: To Simulate any industry application of picking and placing an object from one
place to another using Robo Analyser Software or any simulator
Apparatus required:
• PC with RoboDK software

Procedure:
• Open the software and create a new file
• Select the required robot and the grippers
• Insert the table and the box
• Rearrange the robot and box on the table
• Create the targets
• Add joints and attach and detach the object when it need to pic and place the
object
• Run the program and add loop for repeat the program
• Verify the output
Result: Industry application of picking and placing an object from one place to
another using Robo Analyser Software or any simulator is simulated and Verified
Date: Exp No:37 Page No:60

Simulate Painting Robot using simulation software

Aim: To Simulate Painting Robot using simulation software


Apparatus required:
• PC with RoboDK software

Procedure:
• Open the software and create a file
• Select the required robot
• Insert the Table, Painting plate and Paint gun
• Create the Targets to paint on the plate
• Add joints to move the Paint gun on the Target path
• Run the simulation by clicking on the program
• Verify the result

Result: Painting Robot using simulation software is Simulated and Verified


Date: Exp No:38 Page No:61

Program a ROBO to trace a circular path using simulation software

Aim: To Program a ROBO to trace a circular path using simulation software


Apparatus required:
• PC with RoboDK software

Procedure:
• Open the software and create a file
• Select the required robot
• Insert the Table
• Create the Targets
• Add joints to move the Robo in a Target path
• Run the simulation by clicking on the program
• Verify the result

Result: A ROBO to trace a circular path is Simulated and Verified


Date: Exp No:39 Page No:62

Program a ROBO to trace a rectangular and square path using simulation


software

Aim: To Program a ROBO to trace a rectangular and square path using simulation
software
Apparatus required:
• PC with RoboDK software

Procedure:
• Open the software and create a file
• Select the required robot
• Insert the Table
• Create the Targets
• Add joints to move the Robo in a Target path
• Run the simulation by clicking on the program
• Verify the result

Result: A ROBO to trace a rectangular and square path is Simulated and Verified
Date: Exp No:40 Page No:63

Program a ROBO to trace a elliptical path using simulation software

Aim: To Program a ROBO to trace a elliptical path using simulation software


Apparatus required:
• PC with RoboDK software

Procedure:
• Open the software and create a file
• Select the required robot
• Insert the Table
• Create the Targets
• Add joints to move the Robo in a Target path
• Run the simulation by clicking on the program
• Verify the result

Result: A ROBO to trace a elliptical path is Simulated and Verified


Date: Exp No:41 Page No:64

Program a ROBO to trace different Triangular path using simulation


software

Aim: To Program a ROBO to trace different Triangular path using simulation


software
Apparatus required:
• PC with RoboDK software

Procedure:
• Open the software and create a file
• Select the required robot
• Insert the Table
• Create the Targets
• Add joints to move the Robo in a Target path
• Run the simulation by clicking on the program
• Verify the result

Result: A ROBO to trace different Triangular path is Simulated and Verified


Date: Exp No:42 Page No:65

Program a ROBO to trace a trapezoidal path using simulation software

Aim: To Program a ROBO to trace a trapezoidal path using simulation software


Apparatus required:
• PC with RoboDK software

Procedure:
• Open the software and create a file
• Select the required robot
• Insert the Table
• Create the Targets
• Add joints to move the Robo in a Target path
• Run the simulation by clicking on the program
• Verify the result

Result: A ROBO to trace a trapezoidal path is Simulated and Verified


Date: Exp No:43 Page No:66

Simulate a program to move a robot in a cubic and cuboidal shape

Aim: To Program a ROBO to trace a cubic and cuboidal path using simulation
software
Apparatus required:
• PC with RoboDK software

Procedure:
• Open the software and create a file
• Select the required robot
• Insert the Table
• Create the Targets
• Add joints to move the Robo in a Target path
• Run the simulation by clicking on the program
• Verify the result

Result: A ROBO to trace a cubic and cuboidal path is Simulated and Verified
Date: Exp No:44 Page No:67

Simulate a program to move a robot in a conical and cylindrical shape

Aim: To Program a ROBO to trace a conical and cylindrical path using simulation
software
Apparatus required:
• PC with RoboDK software

Procedure:
• Open the software and create a file
• Select the required robot
• Insert the Table
• Create the Targets
• Add joints to move the Robo in a Target path
• Run the simulation by clicking on the program
• Verify the result

Result: A ROBO to trace a conical and cylindrical path is Simulated and Verified

You might also like