Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Tisha Iot

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

IU2041230132 IOT

Practical:-1

Date:-4/1/2023

AIM:-Introduction to Arduino and Tinkercad Platform.


Introduction to Arduino :-
Arduino is an open-source prototyping platform in electronics based on easy-to-use hardware
and software. Subtly speaking, Arduino is a microcontroller based prototyping board which
can be used in developing digital devices that can read inputs like finger on a button, touch on
a screen, light on a sensor etc. and turning it in to output like switching on an LED, rotating a
motor, playing songs through a speaker etc.

The Arduino board can be programmed to do anything by simply programming the


microcontroller on board using a set of instructions for which, the Arduino board consists of a
USB plug to communicate with your computer and a bunch of connection sockets that can be
wired to external devices like motors, LEDs etc.

The aim of Arduino is to introduce the world of electronics to people who have small to no
experience in electronics like hobbyists, designers, artists etc.

Arduino is based on open source electronics project i.e. all the design specifications,
schematics, software are available openly to all the users. Hence, Arduino boards can bought
from vendors as they are commercially available or else you can make your own board by if
you wish i.e. you can download the schematic from Arduino’s official website, buy all the
components as per the design specification, assemble all the components, and make your own
board.

.
IU2041230132 IOT

Pin functions:-

Vin: This is the input voltage pin of the Arduino board used to provide input supply from an
external power source.

5V: This pin of the Arduino board is used as a regulated power supply voltage and it is used
to give supply to the board as well as onboard components.

3.3V: This pin of the board is used to provide a supply of 3.3V which is generated from a
voltage regulator on the board

GND: This pin of the board is used to ground the Arduino board.

Reset: This pin of the board is used to reset the microcontroller. It is used to Resets the
microcontroller.

Analog Pins: The pins A0 to A5 are used as an analog input and it is in the range of 0-5V.

Digital Pins: The pins 0 to 13 are used as a digital input or output for the Arduino board.

Serial Pins: These pins are also known as a UART pin. It is used for communication
between the Arduino board and a computer or other devices. The transmitter pin number 1
and receiver pin number 0 is used to transmit and receive the data resp.

External Interrupt Pins: This pin of the Arduino board is used to produce the External
interrupt and it is done by pin numbers 2 and 3.

PWM Pins: This pins of the board is used to convert the digital signal into an analog by
varying the width of the Pulse. The pin numbers 3,5,6,9,10 and 11 are used as a PWM pin.

SPI Pins: This is the Serial Peripheral Interface pin, it is used to maintain SPI
communication with the help of the SPI library. SPI pins include:

1. SS: Pin number 10 is used as a Slave Select


2. MOSI: Pin number 11 is used as a Master Out Slave In
3. MISO: Pin number 12 is used as a Master In Slave Out
4. SCK: Pin number 13 is used as a Serial Clock

LED Pin: The board has an inbuilt LED using digital pin-13. The LED glows only when the
digital pin becomes high.

AREF Pin: This is an analog reference pin of the Arduino board. It is used to provide a
reference voltage from an external power supply.
IU2041230132 IOT

Introduction to TINKERCAD:-

Tinkercad is a free-of-charge, online 3D modeling program that runs in a web browser.[1]


Since it became available in 2011 it has become a popular platform for creating models for
3D printing as well as an entry-level introduction to constructive solid geometry in schools.

The Circuits section of Tinkercad is a simulator for an electronic circuit with a Arduino Uno
or a Micro Bit board or a ATtiny chip in the browser. The code can be made with
CodeBlocks[13] which are graphical code pieces that can be put together by shifting them with
the mouse cursor. Programming with code text is also possible. Digi-Key wrote an article in
2022 about Tinkercad how to start with Tinkercad.[14] They call Tinkercad "intuitive". A
circuit can be built with components, but there are "Starters" which are complete circuits with
code.
Tinkercad has included libraries for some components, such as the Adafruit Neopixel library,
the Arduino Servo library and a library for a I2C display. It is not possible to select or upload
other libraries. The circuit can have analog components which are fully simulated.
Although Tinkercad is an easy introduction into programming and electronics, it has features
for advanced users:
1. Multiple boards can be simulated at the same time. For example, two Arduino
boards communicating with each other.
2. The analog circuit can be very complex.

How to use Autodesk Tinkercad?


The files created on Tinkercad can be saved in SVG, OBJ, and STL file formats. While the
STL file formats are used for creating files for slicing or printing programs. The OBJ files can
be used for importing and exporting to other Autodesk programs.

Tinkercad also works with scripting as well as the AR scenarios. Since Tinkercad works on the
CSG theory, which enables the user to create designs with solid basic shapes, in order to create
more complex designs the user needs to add or remove shapes from the original shape created.
The simplicity of this process makes Tinkercad an easily accessible program to students and
teachers.

With Tinkercad, the users can also create 3D electronic circuits and designs that are more
advanced with the lighting and camera features. Tinkercad is a fun and smart program that
helps the user to export 3d models to Minecraft and also uses JavaScript editor to create custom
geometrical 3d shapes.
IU2041230132 IOT

Practical-2

Date:-11/1/2023

A).AIM:-Blink an LED Connected to Arduino board.

Apparatus:- Arduino Board, Resistor, LED, Pushbutton ,USB Cable 2.0, Jumper Wires

Theory:-

Resistor:-A resistor is a passive two-terminal electrical component that implements electrical


resistance as a circuit element. In electronic circuits, resistors are used to reduce current flow,
adjust signal levels, to divide voltages, bias active elements, and terminate transmission lines,
among other uses.

LED:- Compared with conventional light sources that first convert electrical energy into heat,
and then into light, LEDs (Light Emitting Diodes) convert electrical energy directly into light,
delivering efficient light generation with little-wasted electricity.

Pushbutton:-A Push Button is a type of switch which shorts or completes the circuit when
it is pressed. It is used in many circuits to trigger the systems.

USB Cable 2.0:- USB 2.0 is widely used in connecting devices, such as external hard
drives, printers, digital-photography devices, and more, this USB 2.0 cable helps you
maximise performance for your peripherals.

Jumper Wires:-A jumper wire is an electric wire that connects remote electric circuits
used for printed circuit boards. By attaching a jumper wire on the circuit, it can be short-
circuited and short-cut (jump) to the electric circuit.
IU2041230132 IOT

Circuit Diagram:-

Procedure:- Here LED includes two pins:


Cathode(-) pin: need to be connected to GND.
Anode(+) pin:- is used to control LED’s state.

After connecting the cathode(-) to GND:


If connecting GND to the anode(+), LED is OFF.
If connecting VCC to the anode(+), LED is ON.

Program:-

int buttonState = 0;
void setup()
{
pinMode(2, INPUT);
pinMode(8, OUTPUT);
}
void loop()
{
buttonState = digitalRead(2);

if (buttonState == HIGH) {
digitalWrite(8, HIGH);
}
else {
digitalWrite(8, LOW);
}
delay(10);
IU2041230132 IOT

B).AIM:-Blink Three LED’s Connected to Arduino board.

Apparatus:- Arduino Board, Resistors ,3 LED’s, USB Cable 2.0, Jumper Wires

Circuit Diagram:-

Procedure:-The connection of the above project is discussed below:-

● Connect the resistor of 220 Ohm in series with the three LEDs. Now connect it to the
pin number 13, 8, and 4 of the Arduino board.

● Connect the negative terminal of the three LEDs to the GND (Ground).

Program:-
void setup()

pinMode(13, OUTPUT);

pinMode(8, OUTPUT);

pinMode(4, OUTPUT);

}
IU2041230132 IOT

void loop()

digitalWrite(13, HIGH);

delay(1000);

digitalWrite(13, LOW);

delay(1000);

digitalWrite(8, HIGH);

delay(500);

digitalWrite(8, LOW);

delay(500);

digitalWrite(8, HIGH);

delay(500);

digitalWrite(8, LOW);

delay(500);

for( int i = 0; i < 3; i = i +1 )

digitalWrite(4, HIGH);

delay(500);

digitalWrite(4, LOW);

delay(500);

}
IU2041230132 IOT

Practical-3

Date:-11/1/2023

AIM:-Blink RGB LED Connected to Arduino board.

Apparatus:- Arduino Board, Resistor ,3(Red,Green,Blue) LED’s, USB Cable 2.0, Jumper
Wires

RGB LED:-An RGB LED has 4 pins, one for each color (Red, Green, Blue) and a
common cathode. It has tree different color-emitting diodes that can be combined to
create all sorts of color.

Circuit Diagram:-

Procedure:-
The connection of the above project is discussed below:-
Here RGB LED has 3 anode and 1 cathode.
Cathode(-) pin: need to be connected to GND.
Red,Green,Blue anode connect to according pin number 11,9,10 of Arduino Board.
And onec we start Simulation LED Lights blink.
IU2041230132 IOT

Program:-

void setup()
{
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
}

void loop()
{
analogWrite(11, 255);
analogWrite(10, 0);
analogWrite(9, 0);
delay(1000); // Wait for 1000 millisecond(s)
analogWrite(11, 255);
analogWrite(10, 255);
analogWrite(9, 102);
delay(1000); // Wait for 1000 millisecond(s)
}
IU2041230132 IOT

Practical-4
Date:- 18/01/23

AIM:-LDR interfacing with Arduino board and other necessary components.

Apparatus:- Arduino Board, Resistor , LED, USB Cable 2.0, Jumper Wires, 9V Battery, Relay
DPDT, Light Bulb, Bread Bord.

Theory

Battery:-A battery is a device that converts chemical energy contained within its active
materials directly into electric energy by means of an electrochemical oxidation-reduction
(redox) reaction.

Relay DPDT:-DPDT stands for double-pole double-throw relay which is an electromagnetic


device used to separate two circuits electrically and connect them magnetically.

Bread Bord:-A breadboard (sometimes called a plugblock) is used for building temporary
circuits. It is useful to designers because it allows components to be removed and replaced
easily.

Circuit Diagram:-
IU2041230132 IOT

Program:-

int relay =6;


int sensor =A0;
int sensorReading =0;
7void setup()
{
pinMode(relay,OUTPUT);
pinMode(A0,INPUT);
Serial.begin(9600);
}
void loop()
{
sensorReading=analogRead(A0);
Serial.println(sensorReading);
if (sensorReading < 680)
{
digitalWrite(relay, HIGH);
}
else
{

digitalWrite(relay, LOW);

}
delay(2000);

You might also like