Wa0003.
Wa0003.
Wa0003.
--------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
DEPARTMENT OF MECHANICAL ENGINEERING
--------------------------------------------------------------------------------------------
VISION:
MISSION:
VISION:
To look for greatness in the field of Mechanical Engineering training through information and
abilities to oblige the necessities of the general public.
MISSION:
M1: To constantly improve the instructing and learning cycle to empower understudies to
meet worldwide needs.
M2: To redesign the information and abilities of understudies, individuals from personnel and
supporting staff through standard training.
M3: To produce the best personalities of specialists equipped for meeting assumptions for
Industry, Society and Entrepreneurship improvement.
PROGRAM E D U C A T I O N A L O B J E C T I V E S (PEOs)
that proactively advances our society through team efforts and to solve various
PEO4
challenging technical, environmental and societal problems.
Apply the knowledge gained in Mechanical Engineering for design and development
PSO1 and manufacture of engineering systems.
Use the engineering analysis and data management tools for effective management
PSO3 of multidisciplinary projects.
INSTRUCTIONS
All the students must follow the instructions strictly as appended below:
All the students should enter the lab class with proper uniform.
Bring the observation note book and lab manual during all the lab
class.
Before entering the next lab classes ensure that the experiment is
neatly written in the respective record note book and the same
should be checked / corrected by the faculty in charge.
Get completed signature in the index page of the record note book
from the faculty in charge when all the experiments are completed.
OBJECTIVES:
The main learning objective of this course is to prepare the students able to:
To apprise students with basic knowledge of IoT that paves a platform to understand physical
and logical design of IoT.
To teach a student how to analyse requirements of various communication models and
protocols for cost-
Effective design of IoT applications on different IoT platforms.
To introduce the technologies behind Internet of Thing (IoT).
To explain the students how to code for an IoT application using Arduino/Raspberry Pi open
platform.
To apply the concept of Internet of Things in real world scenario.
CO2 – Understand the communication models and various protocols for IoT
CO4 – Apply data analytics and use cloud offerings related to IoT.
CO/
PO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2 PSO3
3 3 2 2 2 1 - - - - - 2 3 2 1
CO1
3 3 2 2 1 3 - - - - - 2 3 3 3
CO2
3 3 2 2 2 1 - - - - - 3 2 2 2
CO3
CO4 2 3 3 1 1 3 - - - - - 1 3 1 2
CO5 2 3 1 1 2 2 - - - - - 1 3 1 1
INDEX
INNOVATIVE PROJECT
Aim:
Apparatus Required:
1. 1 X LED
2. 1 X Resistor, 330 Ohm
3. Breadboard
4. Arduino UNO R4 or earlier versions.
5. Jumper wires
THEORY:
Introduction:
Select the serial device of the Arduino board from the Tools | Serial Port menu. This is likely
to be COM3 or higher (COM1 and COM2 are usually reserved for hardware serialports). To find out,
you can disconnect your Arduino board and re-open the menu; the entry that disappears should be the
Arduino board. Reconnect the board and select that serial port.
Now, simply click the "Upload" button in the environment. Wait a few seconds - you should
see the RX and TX leds on the board flashing. If the upload is successful, the message "Done
uploading." will appear in the status bar. (Note: If you have an ArduinoMini, NG, or other board, you'll
need to physically press the reset button on the board immediately before clicking the upload button on
the Arduino Software).
A few seconds after the upload finishes, you should see the pin 13 (L) LED on the board
start to blink (in orange). If it does, congratulations! You've gotten Arduino up-and- running.
If you have problems, please see the troubleshooting suggestions.
Coding:
Program 1:
Program 2:
void setup()
{
pinMode(1
3,OUTPU
T);
}
void loop()
{
digitalWrit
e(13,HIG
H);
delay(100
0);
digitalWrit
e(13,LOW
);
delay(100
0);
}
VIVA-QUESTIONS:-
a) What is Arduino?
ASSIGNMENT QUESTIONS
CO
S.No Questions BT level Complexity
Mapping
Explain the difference between Serial.print(),
C03
Serial.write(), and Serial.println() functions in Understand Medium
1.
Arduino programming. When should each be
used?
How would you develop an Arduino library to be
used in multiple projects? Explain the structure
2. and format of your library. C03 High
Create
RESULT:
Aim:
To write the Arduino program for communication between two trainers and control
the ledby switch.
Apparatus Required:
1. Arduino UNO
2. AtMega328 microcontroller
3. Zigbee Transmitter (ZTx)
4. Zigbee Receiver (ZRx)
5. USB cables
6. LEDs
Theory:
XBee(2,3);
void setup()
{
Serial.begin(9600
);
pinMode(SW1,
INPUT);
XBee.begin(9600
);
}
void loop()
{
if (digitalRead(SW1) == HIGH)
{
Serial.println("Turn on
LED");
XBee.write('1');
delay(1000);
}
else if (digitalRead(SW1) == LOW)
{
Serial.println("Turn off
LED");
XBee.write('0');
delay(1000);
}
}
void setup()
{
Serial.begin(9600);
zigbee.begin(9600);
pinMode(led, OUTPUT);
}
void loop()
{
//check if the data is
received
if (zigbee.available() >
0)
{
received = zigbee.read();
//if the data is 0, turn off the
LED
if (received == '0')
{
Serial.println("Turning off LED");
digitalWrite(led, LOW);
}
//if the data is 1, turn on the
LED
else if (received == '1')
{
Serial.println("Turning on LED");
digitalWrite(led, HIGH);
} } }
VIVA QUESTIONS:-
ASSIGNMENT QUESTIONS
CO
S.No Questions Mapping BT level Complexity
RESULT:
Thus, the Arduino is interfaced to the Zigbee module and the output is verified.
EX.NO:03 INTERFACING ARDUINO TO GSM MODULE
Aim:
To write the Arduino program for detect the flame and send a sms.
Apparatus Required:
Theory:
#include <SoftwareSerial.h>
ASSIGNMENT QUESTIONS
CO
S. No Questions Mapping BT level Complexity
RESULT:
Thus, the Arduino is interfaced to the GSM module and the output is verified.
EX.NO:04 INTERFACING ARDUINO TO BLUETOOTH MODULE
Aim:
To write the Arduino program for Electronics Notice Board.
Apparatus Required:
1. Arduino UNO
2. AtMega328 Microcontroller
3. HC-05 Bluetooth Module.
4. LED.
5. Breadboard.
6. Resistors - 1K & 2K Ohm.
7. Connecting Wires.
Note: DIP Switch S1 in 16X2 LCD Display Block should be all ON position.
Theory:
The HC-05 is a class 2 Bluetooth module designed for transparent wireless serial
communication. It is pre-configured as a slave Bluetooth device. Once it is paired to a master
Bluetooth device such as PC, smart phones and tablet, its operation becomes transparent to the
user.
Program:
ASSIGNMENT QUESTIONS
CO
S.No Questions Mapping BT level Complexity
RESULT:
Thus, the Arduino is interfaced to the Bluetooth module and the output is verified.
EX.NO:05 INTRODUCTION TO RASPBERRY PI PLATFORM AND PYTHON
PROGRAMMING
Aim:
To write the python program for Turn on & off a LED.
Apparatus Required:
1. Raspberry Pi
2. PiCo W
3. LED
4. Connecting Wires
Theory:
Python is the official programming language of the Raspberry Pi. It is known for its two unique characteristics:
cross-platform compatibility and easy-to-understand syntax. Unlike lower-level languages like C and C++, Python uses
a Python interpreter that translates the Python program into machine-specific instructions. So as long as you have a
Python interpreter on your computer, you can run any Python program written on whatever machine. Moreover,
compared to other languages, the syntax is simple. Syntax is the arrangement of symbols, words, and phrases needed
to make a Python program work. The friendly Python syntax makes programming fun, which is perfect for a credit card
computer that is made to acquaint people in the field of computer science.
Program:
import machine
import time
led=machine.Pin(15,machine.Pin.OUT)
while (True):
led.on()
time.sleep(1)
led.off()
time.sleep(1)
VIVA QUESTIONS:-
ASSIGNMENT QUESTIONS
S. CO
Questions Mapping BT level Complexity
No.
Open source prototype platform- Raspberry-
1. Pi/Beagle board/Arduino - Simple program digital
read/write using LED and Switch - Analog C03 Create High
read/write using sensor and actuators.
RESULT:
Thus, the LED was turned on and off and the output was verified.
EX.NO:06 INTERFACING SENSORS TO RASPBERRY PI
Aim:
To write the python program for measure the obstacle distance in cm using Ultrasonic Sensor.
Apparatus Required:
1. Raspberry Pi
2. PiCo W
3. Ultrasonic Sensor (HC-SR04)
4. Connecting Wires
Theory:
Program:
ASSIGNMENT QUESTIONS
S. CO
Questions Mapping BT level Complexity
No.
RESULT:
Thus, the sensors were interfaced to Raspberry Pi and the output was verified.
EX.NO:07 COMMUNICATE BETWEEN ARDUINO AND RASPBERRY PI USING ANY
WIRELESS MEDIUM
1. Raspberry Pi
2. PiCo W
3. Arduino UNO
4. AtMega328 Microcontroller
5. Zigbee Transmitter (ZTx)
6. Zigbee Receiver (ZRx)
7. Connecting Wires
}
VIVA QUESTIONS:-
ASSIGNMENT QUESTIONS
S. CO
Questions Mapping BT level Complexity
No.
RESULT:
Thus, the communication between Arduino and Raspberry Pi using ZigBee wireless medium
is done and the output was verified.
EX.NO:08 SETUP A CLOUD PLATFORM TO LOG THE DATA
Aim:
Apparatus Required:
1. Arduino UNO
2. Arduino IDE 1.8.2 or higher
3. Thingspeak Account
4. Thinhspeak Library
5. Arduino Wifi Shield 101
6. Photocell
7. Temperature Sensor (This example uses a TMP36)
8. 10K Ohm Resistor
Procedure:
Step-1: The first step is to create an account. The good part is that ThingSpeak does not require a
Credit card (like AWS/Azure) for signing up. You may sign up here.
Step-2: After signing up on ThingSpeak, login here.
Step-3: Create a new ThingSpeak channel by clicking on the "New Channel".
Step-4: In the new channel creation screen, fill out the details of the device from which data will be
received.
Step-5: In the new channel creation screen, scroll down further and make this channel public. So that
you can post data to it.
Step-6: After saving the channel, the channel details screen will get displayed (as shown below). Notice
that there will be 5 tabs: Private View, Public View, Channel Settings, API Keys and Data
Import/Export. You are all set! Browse through them to get a feeling of the contents. Make note of the
Channel ID, as you will need it for posting and reading data to ThingSpeak.
Step-7: Now we will see how to log data and read data to and from this channel. Browse to the API
Keys tab for your channel. Note down the read and write api_keys (as shown below), as you will need
it for posting and reading data to ThingSpeak. I have obscured the api keys for my channel intentionally.
Never share your channel api keys with unintented recipients as they might spam the channel
inadvertently.
Step-8: Use the following URL format to log data to ThingSpeak.
https://api.thingspeak.com/update.json?api_key=<your-write-api-key>&field1=58
Upon hitting the above URL, the data '58' will get logged in the ThingSpeak IoT cloud.
Correspondingly, you can also see the logged data in the ThingSpeak channel's Private/Public.
Step-9: Use the following URL format to read the logged data from ThingSpeak.
http://api.thingspeak.com/channels/<your-channel-id>/feeds.json?key=<your-read-api-
key>&results=1
On hitting the above URL in the browser, you will receive the last posted data row from ThingSpeak.
Code:
ASSIGNMENT QUESTIONS
CO
S.No Questions Mapping BT level Complexity
RESULT:
Thus, the IoT cloud platform ThinkSpeak was set up to log the data and the output was
verified.
EX.NO:09 LOG DATA USING RASPBERRY PI AND UPLOAD TO THE CLOUD
PLATFORM
Aim:
To write the python program for Log Temperature Data using Raspberry Pi and upload to
the Cloud Platform.
Apparatus Required:
1. Raspberry Pi
2. PiCo W
3. LM35 Temperature Sensor
Theory:
LM35 sensor uses the basic principle of a diode, whereas the temperature increases, the
voltage across a diode increases at a known rate. By precisely amplifying the voltage change, it is
easy to generate an analog signal that is directly proportional to temperature.
Program:
Import network
import urequests
from time import sleep
import machine
sensor_temp = machine.ADC(26)
#Network Initialization
ssid = "IElec Systems"
password = "9840838264"
def ConnectWiFi():
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(ssid, password)
while wlan.isconnected() == False:
print('Waiting for connection...')
sleep(1)
ip = wlan.ifconfig()[0]
print(f'Connected on {ip}')
return ip
#Connect to Network
ip = ConnectWiFi()
#ThingSpeak Initialization
server = "http://api.thingspeak.com/"
apikey = "74085BCYRZG0G9YJ"
field = 1
#Main Program
while True:
temperature = sensor_temp.read_u16()
temperature = ((temperature/65535)*3300)/10
print(temperature)
url = f"{server}/update?api_key={apikey}&field{field}={temperature}"
request = urequests.post(url)
request.close()
sleep(20)
VIVA QUESTIONS: -
ASSIGNMENT QUESTIONS
CO
S.No Questions Mapping BT level Complexity
RESULT:
Thus, the data was logged using Raspberry Pi and uploaded to the Cloud Platform.
EX.NO:10 DESIGN AN IOT BASED SYSTEM
Aim:
To write a program to design a Home Automation system using Ardunio and Bluetooth control.
Apparatus Required
1. PIR Motion Sensor (generic)
2. HC-05 Bluetooth Module
3. LDR (Light Dependent Resistor)
4. LED (generic)
5. Arduino UNO
6. Temperature Sensor
7. Relay (generic)
8. Jumper wires (generic)
9. Apps and platforms
10. Arduino IDE
11. Windows 10
Theory:
An Arduino UNO will control devices and reads sensor data. The figure "Room
Architecture" depicts how the Arduino UNO will connects with the devices and sensors. Room
have multiple controllable devices (i.e. Light(s), Fan, Wall Socket(s), etc.), one PassiveIR (to
detect human presence in the room), one temperature sensor (LM35 to collect room temperature)
and LDR (to detect light intensity near room window).
PIR:
PIR sensor consists of three pins, ground, signal, and power at the side or bottom.
Generally, the PIR sensor power is up to 5V, but, the large size PIR modules operate a relay instead
of direct output.
Program:
if(digitalRead(8)==HIGH) //pir
{
digitalWrite(9,HIGH);
}
Else
{ digitalWrite(9,LOW);}
digitalWrite(trigPin, HIGH); //ULTRA
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration/2) / 29.1;
if (distance >= 10 || distance <= 0)
{
// Serial.println("no object detected");
digitalWrite(ledPin,LOW);
}
else
{
Serial.println("object detected \
");
Serial.print("distance= ");
Serial.print(distance);
digitalWrite(ledPin,HIGH);
} //ULTRA
if(digitalRead(2)==HIGH) //gate first
{
my.write(0); //servo
}
Else
{
my.write(90); //servo
}
analogRead(5); //ldr
float a = analogRead(5);
Serial.println(a);
if (a <=200) {
digitalWrite(4,1);
Serial.println("LDR is DARK, LED is ON");
}
else {
digitalWrite(4,0);
Serial.println("-----");
} //ldr
if (Serial.available()) //bluetooth
{
val = Serial.read();
Serial.println(val);
if(val == 'TV')
digitalWrite(3,HIGH);
else if(val == 'tv')
digitalWrite(3,LOW);
} //Bluetooth
}
VIVA QUESTIONS: -
5. What is an IDE (Integrated Development Environment)? Which one would you use when
working with Arduino?
ASSIGNMENT QUESTIONS
CO
S.No Questions Mapping BT level Complexity
RESULT:
Thus, the program was written to design a Home Automation system using Ardunio and
Bluetooth control and the output was verified.
EX. NO: 11 INTERFACING ARDUINO TO ULTRASONIC SENSOR
To interface an Arduino with an ultrasonic sensor to measure distance and show it on the Serial
monitor.
Components Required
These waves bounce off objects in their path and are detected by the ultrasonic receiver.
The two LM324 ICs on the left side take this ultrasonic pulse converts it into electrical signal and
sends it to the echo pin. The receiver converts the reflected waves into electrical signals.
The time it takes for the sound waves to travel to the object and back is precisely measured
by signal processing circuitry within the sensor. This time measurement is crucial for calculating
distances and determining the presence of objects in proximity to the sensor. Now to calculate the
distance we will use the following formula.
long duration;
int distance;
void setup() {
Serial.begin(9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
void loop() {
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
delay(1000);
RESULT:
Finally, a delay of 1000 milliseconds (1 second) is added to control the rate at which
distance measurements are taken. You can adjust this delay to change the measurement frequency
as per your requirements.
EX. NO.: 12 INTERFACING 16x2 LCD WITH ARDUINO
Components Required
Hardware:
1. ARDUINO UNO,
2. power supply (5v),
3. JHD_162ALCD(16x2LCD),
4. 100uF capacitor.
Software:
In 16x2 LCD there are 16 pins over all if there is a back light, if there is no back light there
will be 14 pins. One can power or leave the back light pins. Now in the 14 pins there are 8 data
pins (7-14 or D0-D7), 2 power supply pins (1&2 or VSS&VDD or GND&+5v), 3rd pin for contrast
control (VEE-controls how thick the characters should be shown), and 3 control pins
(RS&RW&E).
In the circuit, you can observe I have only took two control pins, this gives the flexibility.
The contrast bit and READ/WRITE are not often used so they can be shorted to ground. This puts
LCD in highest contrast and read mode. We just need to control ENABLE and RS pins to send
characters and data accordingly.
The connections which are done for LCD are given below:
PIN5 or RW (Read/Write) to ground (puts LCD in read mode eases the communication for user)
The ARDUINO IDE allows the user to use LCD in 4 bit mode. This type of communication
enables the user to decrease the pin usage on ARDUINO, unlike other the ARDUINO need not to
be programmed separately for using it in 4 it mode because by default the ARDUINO is set up to
communicate in 4 bit mode. In the circuit you can see we have used 4bit communication (D4-D7).
So from mere observation from above table we are connecting 6 pins of LCD to controller in which
4 pins are data pins and 2 pins for control.
Code
#include <LiquidCrystal.h>
LiquidCrystal lcd(0, 1, 8, 9, 10, 11); /// REGISTER SELECT PIN,ENABLE PIN,D4 PIN,D5 PIN, D6
PIN, D7 PIN
void setup()
lcd.begin(16, 2);
void loop()
lcd.print("www.circuitdigest.com");//print name
delay(750);//delay of 0.75sec
}
RESULT:
Thus, the 16x2 LCD was interfaced with Arduino UNO and the output was verified.
INNOVATIVE PROJECT
EX. NO: 13 SOLAR POWER BANK WITH WIRELESS CHARGING
Aim of the Experiment:
To provide a multi-functional unique power bank product and the device is able to self-
charge anywhere during day time so that the user never runs out of power.
Apparatus Required:
Components
1. Solar Panels
2. Charge Controller
3. Charging Coil
4. Battery Panel
5. LED
6. Voltage Booster IC
7. Charging Circuitry
8. Resistors Capacitors
9. Diodes & transistors
10. Buttons & Switches
11. Electrical & Wirings
12. PCB Board
13. Coil Mounting
14. hinges
15. Plastic Cover
16. Connectors
17. Screws and Fittings
Theory:
Power banks are one of the need to have product these days. But even power banks need
charging. For that one needs to get the power bank charged in a power plug. This is not always
possible when travelling so here we design a smart solar powered folding power bank.
The solar power bank integrates solar charging with efficient battery support and wireless charging
to provide a multi-functional unique power bank product. The device is able to self-charge
anywhere during day time so that he user never runs out of power.
This Wireless charging solar power bank provides the following advantages:
The smart solar power bank integrates lithium battery pack with solar panels battery protection
and wireless charging coils using dc power boosters and charge controllers to provide for a feature
packed power bank.
This solar panels are used with charge controllers to charge the battery pack using charging
circuitry. The powerbank makes use of LED for indication of current battery capacity. AN Adapter
can also be used to directly charge the powerbank using AC power if needed.
The battery pack power is used to power the induction coil that is mounted on the top of the power
bank. When mobile phone is placed over the top of the power bank an electromagnetic induction
effect induces electric current in the coil mounted in the phone back. This is used to charge the
phone wirelessly.
Applications:
Advantages:
Easy Wireless Charging for compatible phones
Solar Self Charging
Foldable Design for Portability
20000maH battery backup
Added USB Type Charging port availability
Disadvantages:
It has a limited battery Life
Block Diagram:
RESULT
Thus, the solar power bank is charged through wireless charger and the output was
verified.