0% found this document useful (0 votes)
173 views

Bacis Arduino Workshop

This document provides an overview of an Arduino workshop presented by the Automation Club at Marwadi University in Rajkot, India. It discusses what automation is, types of automation including hydraulic, pneumatic, and industrial automation using sensors. It then introduces Arduino, describing what it is, types of Arduino boards, and the pin layout of the Arduino Nano board. Finally, it discusses the Arduino IDE software, basic coding syntax for Arduino, and some common components used with Arduino like breadboards, jumper wires, LEDs, buttons, light dependent resistors, and relays.

Uploaded by

nikhil
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
173 views

Bacis Arduino Workshop

This document provides an overview of an Arduino workshop presented by the Automation Club at Marwadi University in Rajkot, India. It discusses what automation is, types of automation including hydraulic, pneumatic, and industrial automation using sensors. It then introduces Arduino, describing what it is, types of Arduino boards, and the pin layout of the Arduino Nano board. Finally, it discusses the Arduino IDE software, basic coding syntax for Arduino, and some common components used with Arduino like breadboards, jumper wires, LEDs, buttons, light dependent resistors, and relays.

Uploaded by

nikhil
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 72

Basic Arduino Workshop

By
Automation Club
MECHANICAL & AUTOMOBILE DIPLOMA STUDIES
MARWADI UNIVERSITY
RAJKOT
What is Automation

 Automation is the technology by which a process or procedure is performed


without human assistance.
 Automation helps to reduce the piece to piece variation in product manufacturing.
Hydraulic Automation

• The force given by fluid is given by the


multiplication of pressure and area of cross section.
• As the pressure is same in all the direction, piston
feels a large force. Therefore, a large force can be
generated with smaller force input by using
hydraulic systems.
Pneumatic Automation
 Pneumatics automation. ...The technique
of using liquid for power transmission is
called as hydraulics while which uses
compressed air for power transmission is
called Pneumatics.
 In most hydraulic systems, mineral oils
will be used while in most pneumatic
systems, compressed air will be used.
Sensor Industrial Automation

 In the industrial automation, sensors play a vital part to make the products
intellectual and exceptionally automatic.

 These permit one to detect, analyse, measure and process a variety of


transformations like alteration in position, length, height, exterior and dislocation
that occurs in the Industrial manufacture sites.
Arduino
Arduino Introduction
 Arduino is an open-source prototyping platform based on
easy-to-use hardware and software.

 Arduino boards are able to read inputs - light on a sensor, a


finger on a button, or a Twitter message - and turn it into
an output - activating a motor, turning on an LED,
publishing something online.

 You can tell your board what to do by sending a set of


instructions to the microcontroller on the board. It is like
the brain of a system. it is so flexible and open source.
Types of Arduino
Pin layout of Arduino (neon)

 Power USB
 Arduino board can be powered by using the USB cable from your
computer. All you need to do is connect the USB cable to the USB
connection
 Arduino Reset
 You can reset your Arduino board, i.e., start your program from the
beginning. You can reset the UNO board in two ways. First, by using
the reset button on the board. Second, you can connect an
external reset button to the Arduino pin labelled RESET .
 Pins (3.3, 5, GND, Vin)
 3.3V − Supply 3.3 output volt
 5V − Supply 5 output volt
 Most of the components used with Arduino board works fine with 3.3 volt and 5
volt.
 GND (Ground) − There are several GND pins on the Arduino, any of which can be
used to ground your circuit.
 Vin − This pin also can be used to power the Arduino board from an external
power source, like AC mains power supply.
 Digital I/O
 The Arduino neno board has 14 digital I/O pins (of which 6 provide PWM (Pulse
Width Modulation) output. These pins can be configured to work as input digital
pins to read logic values (0 or 1) or as digital output pins to drive different modules
like LEDs, relays, etc. The pins labeled “~” can be used to generate PWM.
 Analog pins
 The Arduino nano board has five analog input pins A0 through A7.
These pins can read the signal from an analog sensor like the
humidity sensor or temperature sensor and convert it into a digital
value that can be read by the microprocessor.
 TX and RX LEDs
 On your board, you will find two labels: TX (transmit) and RX
(receive). They appear in two places on the Arduino UNO board.
First, at the digital pins 0 and 1, to indicate the pins responsible for
serial communication. Second, the TX and RX led (13). The TX led
flashes with different speed while sending the serial data. The speed
of flashing depends on the baud rate used by the board. RX flashes
during the receiving process.
Arduino IED software

 The Arduino IDE (Integrated Development Environment) is the program used to write code, and
comes in the form of a downloadable file on the Arduino website.

 The Arduino board is the physical board that stores and performs the code uploaded to it. Both
the software package and the board are referred to as "Arduino."
Setp-1
Step-2
Setp-3
Arduino coding syntax

Functions Description Syntax


digitalRead() Reads the value from a specified digital pin, either HIGH or LOW. digitalRead(pin)

digitalWrite() The code makes the digital pin an OUTPUT and toggles it by alternating digitalWrite(pin, value)
between HIGH and LOW
pinMode() The specified pin to behave either as an input or an output. pinMode(pin, mode)
Defined the digital pin as input or output in void setup() function section.
delay() Pauses the program for the amount of time (in milliseconds) specified as delay(1000)
parameter. (There are 1000 milliseconds in a second.)
void Functions are declarer in “setup” void setup()
actions are performed in the functions “loop" void loop()
#define #define is a useful component that allows the programmer to give a name #define constantName
to a constant value. value
#include #include is used to include outside libraries in your sketch. #include <Libraries>
Arduino coding syntax
Functions Description Syntax
Serial.begin() Sets the data rate in bits per second (baud) for serial data Serial.begin(speed, config)
transmission. For communicating with the computer, use one of Serial.begin(speed)
these rates: 300, 600, 1200, 2400, 4800, 9600, 14400, 19200,
28800, 38400, 57600, or 115200.
Serial.end() Disables serial communication, allowing the RX and TX pins to be Serial.end()
used for general input and output.
Serial.write() Writes binary data to the serial port. Serial.write(value)
buf: an array to send as a series of bytes Serial.write(string)
Serial.write(buf, len)
Serial.print() This command can take many forms. Numbers are printed using an Serial.print(value, format)
ASCII character for each digit. permitted values are BIN(binary, or
base 2), OCT(octal, or base 8), DEC(decimal, or base
10), HEX(hexadecimal, or base 16).
Serial.println() Prints data to the serial port to get output in serial port. Serial.println(value, format)
Serial.read() Reads incoming serial data. Serial.read()
Arduino coding syntax
Functions Description Syntax
pulseIn() Reads a pulse (either HIGH or LOW) on a pin. For pulseIn(pin, value)
example, if value is HIGH, pulseIn() waits for the pin pulseIn(pin, value,
to go from LOW to HIGH, starts timing, then waits for timeout)
the pin to go LOW and stops timing.
delayMicrosecon Pauses the program for the amount of time (in delayMicroseconds(us)
ds() microseconds) specified as parameter. There are a
thousand microseconds in a millisecond, and a
million microseconds in a second.
// Comments are lines in the program that are used to
inform yourself or others.
LiquidCrystal Libr Creates a variable of type LiquidCrystal LiquidCrystal()
ary
Basic component for Arduino
Breadboard
A breadboard is used to build and test circuits quickly before finalizing any
circuit design. The breadboard has many holes into which circuit components
like jumpers, ICs and resistors can be inserted. ... A node is a point in a circuit
where two components are connected.
Breadboard
Jumper wires

Male to male Female to Male Female to Female


LED
Blink

 Component:-
 Arduino
 Resistor
 LED
• CONNECTION:-
• D13 to Resistor
• Resistor to LED
• LED to GND
Fade

 Component:-
 Arduino
 Resistor
 LED
• CONNECTION:-
• D9 to Resistor
• Resistor to LED
• LED to GND
Button
 Component:-
 Arduino
 Resistor
 Button
• CONNECTION:-
• 5v to lag 1
• GND to Resistor
• Resistor to leg 2
• Leg 3 to D2
Debounce

 Component:-
 Arduino
 Resistor
 Button
LIGHT DEPENDEDENT RESISTOR
(LDR)

• A photoresistor (or light-dependent resistor, LDR,


or photo-conductive cell) is a light-controlled variable
resistor.
• The resistance of a photoresistor decreases with
increasing incident light intensity; in other words, it
exhibits photoconductivity. A photoresistor can be
applied in light-sensitive detector circuits, and light-
activated and dark-activated switching circuits.
relay

 Relay is a electrically operated switch.


 Relays use an electromagnet to mechanically operate switch.
 Relays are used where it is necessary to control a circuit by a
separate low-power signal, or where several circuits must be
controlled by one signal.
How its work ?

It work on the principle of an


electromagnetic attraction.
When the circuit of
the relay senses the fault
current, it energizes the
electromagnetic field which
produces the temporary
magnetic field. ... The current
flows through the coil
produces the magnetic field
around it. And common
contact change direction
NC to NO
PIR motion sensor

PIR sensors allow you to sense motion,


almost always used to detect whether
a human has moved in or out of the
sensors range. They are small,
inexpensive, low-power, easy to use
and don't wear out. For that reason
they are commonly found in
appliances and gadgets used in
homes or businesses.
PIR motion sensor component
Stepper motor

• Stepper motors are DC motors


that move in discrete steps.
They have multiple coils that
are organized in groups called
"phases". By energizing each
phase in sequence, the motor
will rotate, one step at a time.

• Stepper motor are use in


CNC,VMC and robotics
Stepper motor circuit
motion sensor door circuit
Infrared (IR) sensor

 IR sensor can measure the


heat of an object as well as
detects the motion. These
types of sensors measures
only infrared radiation.
Working principal

 In IR sensor IR transmitter
flow infrared radiation.
Radiation is strike and
change direction on
sensor side IR receiver
receive this radiation and
change in signal.
Ultrasonic sensor
Ultrasonic Sensors measure the distance
of target objects or materials through the
air using “non-contact” technology.
They measure distance without damage
and are easy to use and reliable.
Working principal

Ultrasonic sensors emit short, high-


frequency sound pulses at regular
intervals. These propagate in the air at the
velocity of sound. If they strike an object,
then they are reflected back as echo
signals to the sensor, which itself computes
the distance to the target based on the
time-span between emitting the signal
and receiving the echo.
• CONNECTION:-
• 5v to Vcc
• GND to GND
• D2 to Trigger
• D3 to echo
LCD

 An LCD is an electronic display module which uses liquid crystal to produce a


visible image. The 16×2 LCD display is a very basic module commonly used in DIYs
and circuits. The 16×2 translates o a display 16 characters per line in 2 such lines.
Potentiometer
CONNECTION:-

 LCD RS pin to digital pin 12


 LCD Enable pin to digital pin 11
 LCD D4 pin to digital pin 5
 LCD D5 pin to digital pin 4
 LCD D6 pin to digital pin 3
 LCD D7 pin to digital pin 2
 LCD R/W pin to ground
 LCD VSS pin to ground
 LCD VCC pin to 5V
 10K resistor:
 ends to +5V and ground
 wiper to LCD VO pin (pin 3)
distance measuring instrument
using UT and LCD
Connection

Add ultrasonic sensor in


display circuit

Trigger to D10
Echo to D9
Servo motor

 A servo motor is a motor that


pulses at a certain rate moving its
gear at a certain angle. It has
three connections: the brown is
ground, the red is connected to
5V, and the orange (yellow wire
here) is set to the digital pin.
 A standard Servo that its rotation is
limited to 180 degrees both ways,
• CONNECTION:-
• 5V TO Vcc
• GND to Ground
• Output to D9
4*4 matrix Keypad

• Keypad is input device of


Arduino

• The 4*4 matrix keypad usually is


used as input in an Arduino

• . It has 16 keys in total, which


means the same input values.
Keypad internal construction

• 4*4 Matrix Keypad Module is a


matrix non- encoded keypad
consisting of 16 keys in parallel.
The keys of each row and
column are connected through
the pins outside – pin R1-R4 as
labeled beside control the rows,
when C1-C4, the columns.

• Ex. When we can press 5 no. key


Row R2 connect with column C2
Keypad password circuit
Password protected lock circuit mechanism
Flame sensor
Circuit of flam sensor
Gas sensor
Humidity sensor
Temperature sensor

You might also like