Вы находитесь на странице: 1из 46

Hardware

Arduino board
An Arduino microcontroller board can be thought of as a user-friendly, open-
source input-output system. An input can range from anything from a finger
pressing a button to a change in light intensity, and outputs can range from
lighting up a simple LED light to sending out a Twitter message.

Technical features of Arduino


 Microcontroller ATmega328
 Operating Voltage 5V
 Input Voltage (recommended) 7-12V
 Input Voltage (limits) 6-20V
 Digital I/O Pins 14 (of which 6 provide PWM output)
 Analog Input Pins 6
 DC Current per I/O Pin 40 mA
 DC Current for 3.3V Pin 50 mA
 Flash Memory 32 KB of which 0.5 KB used by
 bootloader
 SRAM 2 KB
 EEPROM 1 KB
 Clock Speed 16 MHz
What Makes It Special
There are several features of Arduino that truly make is stand out from the rest
of the microcontrollers on the market. For example, the software is open
source, so you can “ look under the hood ” so to speak, and is free to
download, modify, and re-use (which is always a plus for more advanced
developers). Even the basic plans for the Arduino are open source, so users can
build their own without having to buy one. There are several companies that
make the Arduinio boards, too, and you can buy full kits breadboards, wiring
sensors, and more. Even fully assembled, Arduino is on the lower end of the
cost spectrum, and is compatible with Windows, Mac, and Unix systems. Most
importantly for beginners, perhaps, is the fact that the development
environment for the Arduino is aimed at people with little to no
microcontroller experience, but powerful and flexible enough for
experienced users. There is a great deal of quality information out there to
help even the most inexperienced user navigate the Arduino and put it to use
in exciting and creative ways In short, it had made microcontrollers accessible
to everybody, even those with a minimal computer background, regardless of
age.
There are many different flavors or Arduino boards, too.
What You Need
To work with the Arduino, we need a laptop, desktop, or tablet that you can
download the Arduino development environment onto. It is written in Java,
and can be downloaded on Windows, Mac OS X 10.7 Lion or newer, and Linux
32 or 64 bit. To connect your board with your computer, you will need a USB
data cable. Unlike USB charging or synching cables, they have a square, blocky-
shaped interface instead of a small interface like the micro-usb. It is
recommended that, unless you are a well-established electronics hobbyists
with tons of cool sensors and the like lying around, you invest in a kit. These
vary in price, and can save you time and money by helping you obtain the
electronic components that are compatible with your board – and they usually
come with tutorials and source code.
For testing and prototyping, your laptop provides the power for the Arduino
via the USB data cable. However, for laptop independent projects you will
probably want to provide an independent, portable power source for your
project. A link is provided under online resources that shows how to use
battery power for your Arduino.

Online Resource:
Arduino Products: https://www.arduino.cc/en/Main/Products
Arduino Board Specifications: https://www.arduino.cc/en/Products.Compare
Arduino Uno: https://www.arduino.cc/en/Main/ArduinoBoardUno
Batter Power for Arduino: http://www.instructables.com/id/Powering-
Arduino-with-a-Battery/
EEPROM
EEPROM stands for Electrically Erasable Programmable Read-Only Memory.
This is a type of computer chip that can be written and re-written with code
(instructions). Notice that it is electrically erasable. This means that an electric
current can be used to erase it so that it can be used again. However, when it is
erased, the entire chip must be erased. This is different from RAM, or Random
Access Memory, which can have just certain bytes erased. RAM is more like
writing on sheet of paper with a pencil, where you can erase and rewrite just
the
parts you want. EEPROM is like a writing on a sheet of paper with a pen, where
if you erase you need start with a fresh sheet of paper. The electrical erasure is
the equivalent to providing a clean, empty sheet of paper.

External Interrupt
We all know what it means to be interrupted. An external interrupt means
that something has occurred outside of the computer system or processor and
needs attention.

Flash Memory
Flash memory is another type of memory. It retains data whether power is
supplied to it or not. A good example is the typical flash drive: it still stores you
files even when it is not plugged into your computer. It is good for storing
memory that may change, but needs to remain even when powered down.

Input/Output
Digital Input/Output
Digital pins can have one of two values: low or high, where low corresponds to
0 or false and high corresponds to 1 or true. The number of available digital
pins is another major difference between the different Arduino boards.
The largest boards have 54 input pins and 15 output pins. These would be the
MEGA 2560 and the MEGA ADK (both using the ATmega2650 processor). The
next largest is the DUE (with an ATSAM3X8E processor), with 54 input pins and
12 output pins. The smallest is the Gemma (using the ATtiny85 processor) with
only 3 input pins and 2 output pins.

14 digital pins on the Uno can be used as an input or output, using pinMode(),
digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can
provide or receive a maximum of 40 mA and has an internal pull-up resistor
(disconnected by default) of 20-50 kOhms. In addition, some pins have
specialized functions:
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
TThese pins are
connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip
.
External Interrupts: 2 and 3. These pins can be configured to trigger an
interrupt on a low value, a rising or falling edge, or a change in value. See the
attachInterrupt() function for details.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite()
function.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI
communication, which, although provided by the underlying hardware, is not
currently included in the Arduino language.
LED: 13. There is a built-in LED connected to digital pin 13. When the pin is
HIGH value, the LED is on, when the pin is LOW, it's off.

Analog Input/Output
Analog is the opposite of digital. Analog involves a continuous electrical signal,
while digital focuses on a signal that has a value of either one or zero (binary).
Another way that the Arduino boards differs is based on how many analog
input and analog output pins they have. An analog input pin can receive an
analog signal as input to the processor. An analog output pin can provide an
analog signal as output from the processor.
The Uno has 6 analog inputs, each of which provide 10 bits of resolution (i.e.
1024 different values). By default they measure from ground to 5 volts, though
is it possible to change the upper end of their range using the AREF pin and the
analogReference() function. Additionally, some pins have specialized
Functionality:
I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire
library.
There are a couple of other pins on the board:
AREF. Reference voltage for the analog inputs. Used with analogReference().
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a
reset button to shields which block the one on the board.

The Esplora (with an ATmega32U4 processor) does not have any analog I/O
pins. Most boards have input pins but not output pins, like the Fio (with an
ATmega328P processor) which has 8 analog input pins and no output pins. The
exceptions are the Zero (with an ATSAMD21G18 processor) which has 6 analog
input pins and one analog output pin, and the Due (with an ATSAM3X8E
processor) which has 12 analog input pins and 2 analog output pins.
One of the interesting things is that you can use analog pins and digital pins by
just setting the either to a high value (to represent a digital 1, or true) or a low
value (to represent a digital 0, or false).

Processor
The processor is what takes computer instructions, figures out what to do with
them, and then runs them – or “ executes ” them, as the classic computer lingo
goes. The Arduino boards typically use one of the following processors:
ATtiny85, ATmega168V, ATmega2560, ATmega168, ATmega328P,
ATmega32U4, AR9331 Linux, ATSAMD21G18, or the ATSAM3X8E/A processors
speed is a measure of how fast it can process instructions, and is given in units
of MHz (or GHz for laptops, desktops, and tablets). Most of the processors
listed above run between 8 MHz and 16 MHz with two exceptions: the AR9331
Linux 400 MHz, and the ASTSAMD21G18 runs at 48MHz.
PWM Pins
PWM stands for Pulse-width modulation, which is used to encode data in a
pulsing signal (as opposed to, say, a serial signal). A PWM pin supports
transmitting data using pulse-width modulation.

Serial Communication
When serial communication is occurring, it means that two systems are
sending digital pulses back and forth between each other at an agreed upon
rate.
Let’s say you and a friend are talking on a cell phone. You agree to take turns
with each person saying what they want to say for five seconds. When you five
seconds are up, you have to stop – even if you aren’t finished. When their five
seconds are up, it’s your turn to talk again and you will need to pick up where
you let off. That is serial communication in a nutshell.
SPI
The acronym SPI stands for serial peripheral interface, and is a synchronous
data communication protocol for use over short distances.

SRAM
SRAM is an acronym for Static Random Access Memory. It differs from RAM,
also known as DRAM for Dynamic Random Access Memory, in that it does not
need to be periodically refreshed. As long as an SRAM has power, it retains
memory. That makes it faster than RAM or DRAM. You can think of RAM as a
forgetful person who needs to keep checking something to remember what it
is. SRAM doesn ’ t need to double check because it always remembers.

UART
The acronym UART stands for Universal Asynchronous Receiver/Transmitter. It
is a microchip that is used to convert between serial and parallel data. For
example, it may receive information from several parallel streams of data, but
it can convert those multiple, parallel stream into a single serial stream. On the
other hand, it may receive a single serial stream of data from an outside source
(such
as a modem) and converts that into a set of multiple, parallel streams that the
system can work with better.
In short, a UART chip empowers your system to communicate not just using
data sent in parallel, but also data sent in a single, serial stream.
The Arduino Uno has a number of facilities for communicating with a
computer, another Arduino, or other microcontrollers. The ATmega328
provides UART TTL (5V) serial communication, which is available on digital pins
0 (RX) and 1 (TX). An ATmega8U2 on the board channels this serial
communication over USB and appears as a virtual com port to software on the
computer. The '8U2 firmware uses the standard USB COM drivers, and no
external driver is needed. However, on Windows, an *.inf file is required..
The Arduino software includes a serial monitor which allows simple textual
data to be sent to and from the Arduino board. The RX and TX LEDs on the
board will flash when data is being transmitted via the USB-to serial chip and
USB connection to the computer (but not for serial communication on pins 0
and 1).
A SoftwareSerial library allows for serial communication on any of the Uno's
digital pins.
Power pins

The Arduino Uno can be powered via the USB connection or with an external
power supply. The power source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-
wart) or battery. The adapter can be connected by plugging a 2.1mm center-
positive plug into the board's power jack. Leads from a battery can be inserted
in the Gnd and Vin pin headers of the POWER connector.
The board can operate on an external supply of 6 to 20 volts. If supplied with
less than 7V, however, the 5V pin may supply less than five volts and the board
may be unstable. If using more than 12V, the voltage regulator may overheat
and damage the board. The recommended range is 7 to 12 volts.

VIN. The input voltage to the Arduino board when it's using an external power
source (as opposed to 5 volts from the USB connection or other regulated
power source). You can supply voltage through this pin, or, if supplying voltage
via the power jack, access it through this pin.
5V. The regulated power supply used to power the microcontroller and other
components on the board. This can come either from VIN via an on-board
regulator, or be supplied by USB or another regulated 5V supply.
3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current
draw is 50 mA.
GND. Ground pins.

3.6 POWER SUPPLY


Adaptor
POWER SUPPLY
The input to the circuit is applied from the regulated power supply. The a.c. input
i.e., 230V from the mains supply is step down by the transformer to 12V and is
feeded to rectifier to convert the AC to DC with help of diodes and capacitor.

Transformer

Usually, DC voltages are required to operate various electronic equipment and


these voltages are 5V, 9V or 12V. But these voltages cannot be obtained directly.
Thus the a.c input available at the mains supply i.e., 230V is to be brought down to
the required voltage level. This is done by a transformer. Thus, a step down
transformer is employed to decrease the voltage to a required level.
The output from the transformer is fed to the rectifier. It converts A.C. into
pulsating D.C. The rectifier may be a half wave or a full wave rectifier. In this
project, a bridge rectifier is used because of its merits like good stability and full
wave rectification.

The Bridge rectifier is a circuit, which converts an ac voltage to dc voltage using


both half cycles of the input ac voltage. The Bridge rectifier circuit is shown in the
figure. The circuit has four diodes connected to form a bridge. The ac input
voltage is applied to the diagonally opposite ends of the bridge. The load
resistance is connected between the other two ends of the bridge.

For the positive half cycle of the input ac voltage, diodes D1 and D3 conduct,
whereas diodes D2 and D4 remain in the OFF state. The conducting diodes will be
in series with the load resistance RL and hence the load current flows through RL.
For the negative half cycle of the input ac voltage, diodes D2 and D4 conduct
whereas, D1 and D3 remain OFF. The conducting diodes D2 and D4 will be in
series with the load resistance RL and hence the current flows through RL in the
same direction as in the previous half cycle. Thus a bi-directional wave is
converted into a unidirectional wave.

Filter

Capacitive filter is used in this project. It removes the ripples from the output of
rectifier and smoothens the D.C. Output received from this filter is constant until
the mains voltage and load is maintained constant. However, if either of the two is
varied, D.C. voltage received at this point changes. Therefore a regulator is applied
at the output stage.
The Bridge rectifier is a circuit, which converts an ac voltage to dc voltage using
both half cycles of the input ac voltage. The Bridge rectifier circuit is shown in the
figure. The circuit has four diodes connected to form a bridge. The ac input
voltage is applied to the diagonally opposite ends of the bridge. The load
resistance is connected between the other two ends of the bridge.

For the positive half cycle of the input ac voltage, diodes D1 and D3 conduct,
whereas diodes D2 and D4 remain in the OFF state. The conducting diodes will be
in series with the load resistance RL and hence the load current flows through RL.
For the negative half cycle of the input ac voltage, diodes D2 and D4 conduct
whereas, D1 and D3 remain OFF. The conducting diodes D2 and D4 will be in
series with the load resistance RL and hence the current flows through RL in the
same direction as in the previous half cycle. Thus a bi-directional wave is
converted into a unidirectional wave.

Voltage regulator

As the name itself implies, it regulates the input applied to it. A voltage regulator
is an electrical regulator designed to automatically maintain a constant voltage
level. In this project, power supply of 5V and 12V are required. In order to obtain
these voltage levels, 7805 and 7812 voltage regulators are to be used. The first
number 78 represents positive supply and the numbers 05, 12 represent the
required output voltage levels. The L78xx series of three-terminal positive
regulators is available in TO-220, TO-220FP, TO-3, D2PAK and DPAK packages and
several fixed output voltages, making it useful in a wide range of applications.
These regulators can provide local on-card regulation, eliminating the distribution
problems associated with single point regulation. Each type employs internal
current limiting, thermal shut-down and safe area protection, making it essentially
indestructible. If adequate heat sinking is provided, they can deliver over 1 A
output current. Although designed primarily as fixed voltage regulators, these
devices can be used with external components to obtain adjustable voltage and
currents.

3.6 POWER SUPPLY


Lead acid battery

A lead acid battery consists of a negative electrode made of spongy or porous


lead. The lead is porous to facilitate the formation and dissolution of lead. The
positive electrode consists of lead oxide. Both electrodes are immersed in a
electrolytic solution of sulfuric acid and water. In case the electrodes come into
contact with each other through physical movement of the battery or through
changes in thickness of the electrodes, an electrically insulating, but chemically
permeable membrane separates the two electrodes. This membrane also
prevents electrical shorting through the electrolyte. Lead acid batteries store
energy by the reversible chemical reaction shown below.
The overall chemical reaction is:

At the negative terminal the charge and discharge reactions are:

At the positive terminal the charge and discharge reactions are:

As the above equations show, discharging a battery causes the formation of


lead sulfate crystals at both the negative and positive terminals, as well as the
release of electrons due to the change in valence charge of the lead. The
formation of this lead sulfate uses sulfate from the sulfuric acid electrolyte
surrounding the battery. As a result the electrolyte becomes less concentrated.
Full discharge would result in both electrodes being covered with lead sulfate
and water rather than sulfuric acid surrounding the electrodes. At full
discharge the two electrodes are the same material, and there is no chemical
potential or voltage between the two electrodes. In practice, however,
discharging stops at the cutoff voltage, long before this point. The battery
should not therefore be discharged below this voltage.

In between the fully discharged and charged states, a lead acid battery will
experience a gradual reduction in the voltage. Voltage level is commonly used
to indicate a battery's state of charge. The dependence of the battery on the
battery state of charge is shown in the figure below. If the battery is left at low
states of charge for extended periods of time, large lead sulfate crystals can
grow, which permanently reduces battery capacity. These larger crystals are
unlike the typical multicrystalline or porous structure of the lead electrode,
and are difficult to convert back into lead.

Voltage of lead acid battery upon charging.

The charging reaction converts the lead sulfate at the negative electrode to lead.
At the positive terminal the reaction converts the lead to lead oxide. As a by-
product of this reaction, hydrogen is evolved. During the first part of the charging
cycle, the conversion of lead sulfate to lead and lead oxide is the dominant
reaction. However, as charging proceeds and most of the lead sulfate is converted
to either lead or lead dioxide, the charging current electrolyzes the water from
the electrolyte and both hydrogen and oxygen gas are evolved, a process known
as the "gassing" of the battery. If current is being provided to the battery faster
than lead sulfate can be converted, then gassing begins before all the lead sulfate
is converted, that is, before the battery is fully charged.

Gassing introduces several problems into a lead acid battery. Not only does the
gassing of the battery raise safety concerns, due to the explosive nature of the
hydrogen produced, but gassing also reduces the water in the battery, which must
be manually replaced, introducing a maintenance component into the system. In
addition, gassing may cause the shedding of active material from the electrolyte,
thereby permanently reducing battery capacity. For these reasons, the battery
should not regularly be charged above the voltage which causes gassing. The
voltage across the battery and the gassing voltage are shown in the figure below.
Gassing voltage change with varying charge rates.

Lead sulphate is an insulator, and therefore the way in which lead sulfate
forms on the electrodes determined how easily the battery can be discharged.

Self-discharge involves severn reactions. Give seperate reaction for H2 and O2


formation. Rate of oxygen evolution strongly influenced by imourties. Is O2
evolution a side reaction that contributes to self discharge? Anodic corrosion
contributes to self-discharge. Negative self discharge is Pb + H2SO4 -> PbSO4
+ H2. Formation of H2 gas is the slow step. High H2 overvoltage on lead, so
process is slow with lead or lead calcium grids. Hoever, proceeds rapidly with
SB. Sb Lowers O2 overvotlage. 1/2O2 + Pb+ H2SO4 -> PbSO$ + H20. IN open
cells an issue. In closed cells can do an oxygen cylce.

Filter
Capacitive filter is used in this project. It removes the ripples from the output of
rectifier and smoothens the D.C. Output received from this filter is constant until
the mains voltage and load is maintained constant. However, if either of the two is
varied, D.C. voltage received at this point changes. Therefore a regulator is applied
at the output stage.
Voltage regulator

Voltage Regulator :

A voltage regulator is a system designed to automatically maintain a


constant voltage level. A voltage regulator may use a simple feed-forward
design or may include negative feedback. It may use an electromechanical
mechanism, or electronic components.

A voltage regulator is used to regulate voltage level. When a steady, reliable


voltage is needed, then voltage regulator is the preferred device. It generates a
fixed output voltage that remains constant for any changes in an input voltage
or load conditions. It acts as a buffer for protecting components from damages.
A voltage regulator is a device with a simple feed- forward design and it uses
negative feedback control loops. There are mainly two types of voltage
regulators: Linear voltage regulators and switching voltage regulators; these
are used in wider applications. Linear voltage regulator is the easiest type of
voltage regulators. It is available in two types, which are compact and used in
low power, low voltage systems. Let us discuss about different types of voltage
regulators.

Types of Voltage Regulators and Their Working


Principle
Basically, there are two types of Voltage regulators: Linear voltage regulator and
Switching voltage regulator.

 There are two types of Linear voltage regulators: Series and Shunt.
 There are three types of Switching voltage regulators: Step up, Step down
and Inverter voltage regulators.

Linear Regulator

Linear regulator acts like a voltage divider. In Ohmic region, it uses FET. The
resistance of the voltage regulator varies with load resulting in constant output
voltage.

Advantages of linear voltage regulator

 Gives a low output ripple voltage


 Fast response time to load or line changes
 Low electromagnetic interference and less noise
Disadvantages of linear voltage regulator

 Efficiency is very low


 Requires large space – heatsink is needed
 Voltage above the input cannot be increased

Series Voltage Regulator

A series voltage regulator uses a variable element placed in series with the
load. By changing the resistance of that series element, the voltage dropped
across it can be changed. And, the voltage across the load remains constant.

Series Voltage Regulator

The amount of current drawn is effectively used by the load; this is the main
advantage of the series voltage regulator. Even when the load does not require
any current, the series regulator does not draw full current. Therefore, a series
regulator is considerably more efficient than shunt voltage regulator.
Series Voltage Regulator
CircuitSeries Voltage Regulator Circuit

Shunt Voltage Regulator

A shunt voltage regulator works by providing a path from the supply voltage to
ground through a variable resistance. The current through the shunt regulator
is diverted away from the load and flows uselessly to the ground, making this
form usually less efficient than the series regulator. It is, however, simpler,
sometimes consisting of just a voltage-reference diode, and is used in very low-
powered circuits wherein the wasted current is too small to be of concern. This
form is very common for voltage reference circuits. A shunt regulator can
usually only sink (absorb) current.

Shunt Voltage Regulator

Applications of Shunt Regulators

Shunt regulators are used in:

 Low Output Voltage Switching Power Supplies


 Current Source and Sink Circuits
 Error Amplifiers
 Adjustable Voltage or Current Linear and Switching Power Supplies
 Voltage Monitoring
 Analog and Digital Circuits that require precision references
 Precision current limiters
Switching Voltage Regulator

A switching regulator rapidly switches a series device on and off. The switch’s
duty cycle sets the amount of charge transferred to the load. This is controlled
by a feedback mechanism similar to that of a linear regulator. Switching
regulators are efficient because the series element is either fully conducting or
switched off because it dissipates almost no power. Switching regulators are
able to generate output voltages that are higher than the input voltage or of
opposite polarity, unlike linear regulators.

Switching Voltage Regulator

Switching voltage regulator switches on and off rapidly to alter the output. It
requires a control oscillator and also charges storage components.

In a switching regulator with Pulse Rate Modulation varying frequency,


constant duty cycle and noise spectrum imposed by PRM vary; it is more
difficult to filter out that noise.

A switching regulator with Pulse Width Modulation, constant frequency,


varying duty cycle, is efficient and easy to filter out noise.
In a switching regulator, continuous mode current through an inductor never
drops to zero. It allows highest output power. It gives better performance.

In a switching regulator, discontinuous mode current through the inductor


drops to zero. It gives better performance when the output current is low.

BLUETOOTH COMMUNICATION

Usually, when two electronic devises communicate with each other, they use
cables, infrared rays, Wi-Fi etc. These are some of the various complicated
methods used in connecting one device to another. Bluetooth is a similar
technology, which is used to connect one electronic device to another, without
the usage of any wires and cables. It is a wireless technology to send and
receive data between two devices. The radio-wave connection between two
devices is used to send and receive data between two Bluetooth devices. The
data send and received at a time is equal to 720 Kilo bytes per second. There
are 79 frequency channels of a frequency 2.45 Giga Hertz through which the
devices send and receive data to each other. When two devices are trying to
be paired, they are actually searching for a common frequency through which
they can send and receive data. When such a frequency is discovered, the
devices are "found". The connecting of two devices does not hamper the
connecting of two other devices because they usually use different channels of
frequency and hence do not overlap. In simple terms, this is the principle
behind Bluetooth Technology.

A host Bluetooth device is capable of communicating with up to seven


Bluetooth modules at same time through one link [1] Bluetooth is a system in
which connections are made between a master and a slave. These connections
are maintained until they are broken, either by deliberately disconnecting the
two, or by the link radio link becoming so poor that communications cannot be
maintained - typically this occurs as the devices go out of range of each other.
Within the connection process, there are four types of Bluetooth connection
channel: Basic piconet channel: This Bluetooth connection channel is used only
when all 79 channels are used within the hop-set - it is now rarely used as the
Adaptive piconet channel is more often used as it provides greater flexibility

this will allow other Bluetooth devices in the vicinity to detect its presence and
attempt to establish a connection. Two Bluetooth devices find each other:

When the two devices:

Device 1 and device 2 find each other it is possible to detect what they are.
Normally the discoverable device will indicate what type of device it is -
cellphone, headset, etc., along with its Bluetooth device name. The Bluetooth
device name is the can be allocated by the user, or it will be the one allocated
during manufacture. Prompt for Passkey: Often the default passkey is set to
"0000", but it is advisable

 to use something else as hackers will assume most people will not change
this. However many more sophisticated devices - smartphones and computers
- both users must agree on a code which must obviously be the same for both.
Device 1 sends passkey: The initiating device, Device 1 sends the passkey that
has been entered to Device 2. Device 2 sends passkey: The passkeys are
compared and if they are both the same, a trusted pair is formed, Bluetooth
pairing is established.

HC -05 Bluetooth

HC‐05 module is an easy to use Bluetooth SPP (Serial Port Protocol) module,
designed for transparent wireless serial connection setup. The HC-05 Bluetooth
Module can be used in a Master or Slave configuration, making it a great
solution for wireless communication. This serial port bluetooth module is fully
qualified Bluetooth V2.0+EDR (Enhanced Data Rate)3Mbps Modulation with
complete 2.4GHz radio transceiver and baseband. It uses CSR Bluecore
04‐External single chip Bluetooth system with CMOS technology and with AFH
(Adaptive Frequency Hopping Feature).

Bluetooth Module HC-05


The Bluetooth module HC-05 is a MASTER/SLAVE module. By default the
factory setting is SLAVE.The Role of the module (Master or Slave) can be
configured only by AT COMMANDS.The slave modules cannot initiate a
connection to another Bluetooth device, but can accept connections.Master
module can initiate a connection to other devices.The user can use it simply for
a serial port replacement to establish connection between MCU and GPS, PC to
your embedded project, etc.Just go through the datasheet for more
details File:Datasheet.pdf
Hardware Features

 Typical ‐80dBm sensitivity.


 Up to +4dBm RF transmit power.
 3.3 to 5 V I/O.
 PIO(Programmable Input/Output) control.
 UART interface with programmable baud rate.
 With integrated antenna.
 With edge connector.

Software Features

 Slave default Baud rate: 9600, Data bits:8, Stop bit:1,Parity:No parity.
 Auto‐connect to the last device on power as default.
 Permit pairing device to connect as default.
 Auto‐pairing PINCODE:”1234” as default.

APPLICATIONS OF BLUETOOTH

1.) Control and communication wirelessly of a handsfree headset and mobile


phone.

2.) Wireless communication between computer and its peripherals like


keyboard, mouse, printer.

3.) Intercom and wireless Bluetooth headset.

4.) Transferring files, reminders, calendar appointments, details of contacts


with Object Exchange (OBEX).

5.) Transmission over short range of the data from the health sensor of the
medical devices to set-top-box, mobile phone or dedicated telehealth devices.

6.) Places where low bandwidth and cable-free connection is desired.

7.) Wireless replacement of RS-232 serial cable used in variety of applications


e.g. bar code scanners, traffic control devices, medical equipment.
8.) Dial-up internet access using mobile phone (data capable) as wireless
modem.

9.) Real time identification of the location of objects by the use of tags and
nodes embedded in the objects to be tracked or attached to them.

How to connect HC05 bluetooth module with Arduino Uno?


Hardware and Software Required

 HC-05 Bluetooth Module


 Arduino Uno
 Arduino IDE(1.0.6V)
Hardware Connections

As we know that Vcc and Gnd of the module goes to Vcc and Gnd of
Arduino.The TXD pin goes to RXD pin of Arduino and RXD pin goes to TXD pin
of Arduino i.e(digital pin 0 and 1).The user can use the on board Led.But
here,Led is connected to digital pin 12 externally for betterment of the process.

Program for HC-05 Bluetooth Module


The program given below is the HC-05 bluetooth module program.This process
is quite different from others since we are going to use android mobile to
control and communicate with arduino.Here the bluetooth module acts as an
interface between our mobile and Arduino board.Before getting into the
execution process,follow the given procedure:

 First of all,the user should install an application called Bluetooth SPP


PRO from the playstore which is a free application.
 After installation,pair the bluetooth module to your mobile as like
connecting one device to other using bluetooth.The default pairing code
is 1234.
 Upload the given program to the Arduino Uno board.After uploading the
code,unplug the USB from the arduino.
 Now use external power adapter to power the Uno board.
 The Bluetooth SPP PRO has three types of communication mode.Here Byte
stream mode is used to communicate.So select that mode and give the
input as 1,as soon as the input has given the led will turn on and for 0 led
will turn off.

Servo motor
A servomotor is a rotary actuator or linear actuator that allows for precise
control of angular or linear position, velocity and acceleration.[1] It consists of a
suitable motor coupled to a sensor for position feedback. It also requires a
relatively sophisticated controller, often a dedicated module designed
specifically for use with servomotors.
Servomotors are not a specific class of motor although the term servomotor is
often used to refer to a motor suitable for use in a closed-loop controlsystem.
A servomotor is a closed-loop servomechanism that uses position feedback to
control its motion and final position. The input to its control is a signal (either
analogue or digital) representing the position commanded for the output shaft.
The motor is paired with some type of encoder to provide position and speed
feedback. In the simplest case, only the position is measured. The measured
position of the output is compared to the command position, the external
input to the controller. If the output position differs from that required,
an error signal is generated which then causes the motor to rotate in either
direction, as needed to bring the output shaft to the appropriate position. As
the positions approach, the error signal reduces to zero and the motor stops.

The very simplest servomotors use position-only sensing via


a potentiometer and bang-bang control of their motor; the motor always
rotates at full speed (or is stopped).

Types of servo motors


Types of Servo Motor

Servo motors are classified into different types based on their application, such
as AC servo motor, DC servo motor, brushless DC servo motor, positional
rotation, continuous rotation and linear servo motor etc. Typical servo motors
comprise of three wires namely, power control and ground. The shape and size
of these motors depend on their applications. RC servo motor is the most
common type of servo motor used in hobby applications, robotics due to their
simplicity, affordability and reliability of control by microprocessors.

DC Servo Motor

The motor which is used as a DC servo motor generally have a separate DC


source in the field of winding & armature winding. The control can be archived
either by controlling the armature current or field current. Field control
includes some particular advantages over armature control. In the same way
armature control includes some advantages over field control. Based on the
applications the control should be applied to the DC servo motor. DC servo
motor provides very accurate and also fast respond to start or stop command
signals due to the low armature inductive reactance. DC servo motors are used
in similar equipments and computerized numerically controlled machines.

DC Servo Motor

AC Servo Motor

AC servo motor is an AC motor that includes encoder is used with controllers


for giving closed loop control and feedback. This motor can be placed to high
accuracy and also controlled precisely as compulsory for the applications.
Frequently these motors have higher designs of tolerance or better bearings
and some simple designs also use higher voltages in order to accomplish
greater torque. Applications of an AC motormainly involve in automation,
robotics, CNC machinery, and other applications a high level of precision and
needful versatility.

AC Servo Motor
Positional Rotation Servo Motor

Positional rotation servo motor is a most common type of servo motor. The
shaft’s o/p rotates in about 180o. It includes physical stops located in the gear
mechanism to stop turning outside these limits to guard the rotation sensor.
These common servos involve in radio controlled water, radio controlled cars,
aircraft, robots, toys and many other applications.

Continuous Rotation Servo Motor

Continuous rotation servo motor is quite related to the common positional


rotation servo motor, but it can go in any direction indefinitely. The control
signal, rather than set the static position of the servo, is understood as the
speed and direction of rotation. The range of potential commands sources the
servo to rotate clockwise or anticlockwise as preferred, at changing speed,
depending on the command signal. This type of motor is used in a radar dish if
you are riding one on a robot or you can use one as a drive motor on a mobile
robot.

Continuous Rotation Servo Motor

Linear Servo Motor

Linear servo motor is also similar the positional rotation servo motor is
discussed above, but with an extra gears to alter the o/p from circular to back-
and-forth. These servo motors are not simple to find, but sometimes you can
find them at hobby stores where they are used as actuators in higher model
airplanes.
Linear Servo Motor
Servo Motor Working

A unique design for servo motors are proposed in controlling the robotics and
for control applications. They are basically used to adjust the speed control at
high torques and accurate positioning. Parts required are motor position
sensor and a highly developed controller. These motors can be categorized
according the servo motor controlled by servomechanism. If DC motor is
controlled using this mechanism, then it is named as a DC servo motor. Servo
motors are available in power ratings from fraction of a watt to 100 watts.The
rotor of a servo motor is designed longer in length and smaller in diameter so
that it has low inertia. To know more about this, please follow the link: Servo
motor working principle and interfacing with 8051 microcontroller

IR sensor
An infrared sensor is an electronic device, that emits in order to sense some
aspects of the surroundings. An IR sensor can measure the heat of an object as
well as detects the motion. These types of sensors measures only infrared
radiation, rather than emitting it that is called as a passive IR sensor. Usually in
the infrared spectrum, all the objects radiate some form of thermal radiations.
These types of radiations are invisible to our eyes, that can be detected by an
infrared sensor.The emitter is simply an IR LED (Light Emitting Diode) and the
detector is simply an IR photodiode which is sensitive to IR light of the same
wavelength as that emitted by the IR LED. When IR light falls on the
photodiode, The resistances and these output voltages, change in proportion
to the magnitude of the IR light received.
Working operation of IR sensor
An infrared sensor circuit is one of the basic and popular sensor module in
an electronic device. This sensor is analogous to human’s visionary senses,
which can be used to detect obstacles and it is one of the common applications
in real time. This circuit comprises of the following components
 LM358 IC 2 IR transmitter and receiver pair
 Resistors of the range of kilo ohms.
 Variable resistors.
 LED (Light Emitting Diode).
In this project, the transmitter section includes an IR sensor, which transmits
continuous IR rays to be received by an IR receiver module. An IR output
terminal of the receiver varies depending upon its receiving of IR rays. Since
this variation cannot be analyzed as such, therefore this output can be fed to a
comparator circuit. Here an operational amplifier (op-amp) of LM 339 is used
as comparator circuit.
When the IR receiver does not receive a signal, the potential at the inverting
input goes higher than that non-inverting input of the comparator IC (LM339).
Thus the output of the comparator goes low, but the LED does not glow. When
the IR receiver module receives signal to the potential at the inverting input
goes low. Thus the output of the comparator (LM 339) goes high and the LED
starts glowing. Resistor R1 (100 ), R2 (10k ) and R3 (330) are used to ensure
that minimum 10 mA current passes through the IR LED Devices like
Photodiode and normal LEDs respectively. Resistor VR2 (preset=5k ) is used to
adjust the output terminals. Resistor VR1 (preset=10k ) is used to set the
sensitivity of the circuit Diagram. Read more about IR sensors.
Different Types of IR Sensors and Their Applications
IR sensors are classified into different types depending on the applications.
Some of the typical applications of different types of sensors are
The speed sensor is used for synchronizing the speed of multiple motors.
The temperature sensor is used for industrial temperature control. PIR
sensor is used for automatic door opening system and Ultrasonic sensor are
used for distance measurement.
IR Sensor Applications
IR sensors are used in various Sensor based projects and also in various
electronic devices which measures the temperature that are discussed in the
below.

L293D Motor Driver


A motor driver is an integrated circuit chip which is usually used to control
motors in autonomous robots. Motor driver act as an interface between
Arduino and the motors . The most commonly used motor driver IC’s are from
the L293 series such as L293D, L293NE, etc. These ICs are designed to control 2
DC motors simultaneously. L293D consist of two H-bridge. H-bridge is the
simplest circuit for controlling a low current rated motor. We will be referring
the motor driver IC as L293D only. L293D has 16 pins.

DC Motor :
An electric motor is an electrical machine that converts electrical
energy into mechanical energy. The reverse of this is the conversion of
mechanical energy into electrical energy and is done by an electric generator,
which has much in common with a motor.
Most electric motors operate through the interaction between an electric
motor's magnetic field and winding currents to generate force. In certain
applications, such as in regenerative braking with traction motors in the
transportation industry, electric motors can also be used in reverse as
generators to convert mechanical energy into electric power.
Found in applications as diverse as industrial fans, blowers and pumps,
machine tools, household appliances, power tools, and disk drives, electric
motors can be powered by direct current (DC) sources, such as from batteries,
motor vehicles or rectifiers, or by alternating current(AC) sources, such as from
the power grid, inverters or generators. Small motors may be found in electric
watches. General-purpose motors with highly standardized dimensions and
characteristics provide convenient mechanical power for industrial use. The
largest of electric motors are used for ship propulsion, pipeline compression
and pumped-storage applications with ratings reaching 100 megawatts.
Electric motors may be classified by electric power source type, internal
construction, application, type of motion output, and so on.
Electric motors are used to produce linear or rotary force (torque), and should
be distinguished from devices such as magnetic solenoids and loudspeakers
that convert electricity into motion but do not generate usable mechanical
powers, which are respectively referred to as actuators and transducers.

Working Principle of DC motor :


A motor is an electrical machine which converts electrical energy into
mechanical energy. The principle of working of a DC motor is that "whenever a
current carrying conductor is placed in a magnetic field, it experiences a
mechanical force". The direction of this force is given by Fleming's left hand
rule and it's magnitude is given by F = BIL. Where, B = magnetic flux density, I =
current and L = length of the conductor within the magnetic field.

Fleming's left hand rule: If we stretch the first finger, second finger and thumb
of our left hand to be perpendicular to each other AND direction of magnetic
field is represented by the first finger, direction of the current is represented
by second finger then the thumb represents the direction of the force
experienced by the current carrying conductor.

Above animation helps in understanding the working principle of a DC motor.


When armature windingsare connected to a DC supply, current sets up in the
winding. Magnetic field may be provided by field winding (electromagnetism)
or by using permanent magnets. In this case, current carrying armature
conductors experience force due to the magnetic field, according to the
principle stated above.

Commutator is made segmented to achieve unidirectional torque. Otherwise,


the direction of force would have reversed every time when the direction of
movement of conductor is reversed the magnetic field.

This is how a DC motor works!

Back EMF

According to fundamental laws of nature, no energy conversion is possible


until there is something to oppose the conversion. In case of generators this
opposition is provided by magnetic drag, but in case of dc motors there is back
emf. When the armature of the motor is rotating, the conductors are also
cutting the magnetic flux lines and hence according to the Faraday's law of
electromagnetic induction, an emf induces in the armature conductors. The
direction of this induced emf is such that it opposes the armature current (Ia) .
The circuit diagram below illustrates the direction of the back emf and
armature current. Magnitude of Back emf can be given by the emf equation of
DC generator.
Significance Of Back EMF:
Magnitude of back emf is directly proportional to speed of the motor. Consider
the load on a dc motor is suddenly reduced. In this case, required torque will
be small as compared to the current torque. Speed of the motor will start
increasing due to the excess torque. Hence, being proportional to the speed,
magnitude of the back emf will also increase. With increasing back emf
armature current will start decreasing. Torque being proportional to the
armature current, it will also decrease until it becomes sufficient for the load.
Thus, speed of the motor will regulate.

On the other hand, if a dc motor is suddenly loaded, the load will cause
decrease in the speed. Due to decrease in speed, back emf will also decrease
allowing more armature current. Increased armature current will increase the
torque to satisfy the load requirement. Hence, presence of the back emf
makes a dc motor ‘self-regulating’.

Types Of DC Motors
DC motors are usually classified of the basis of their excitation configuration, as
follows -

 Separately excited (field winding is fed by external source)


 Self excited -
 Series wound (field winding is connected in series with the armature)
 Shunt wound (field winding is connected in parallel with the
armature)
 Compound wound -
 Long shunt
 Short shunt
Water Pump

A submersible pump (or sub pump, electric submersible pump)


(figure3.8) is a device which has a hermetically sealed motor close-coupled to
the pump body. The whole assembly is submerged in the fluid to be pumped.
The main advantage of this type of pump is that it prevents pump cavitation’s,
a problem associated with a high elevation difference between

pump and the fluid surface. Small DC Submersible water pumps push fluid to
the surface as opposed to jet pumps having to pull fluids. Submersibles are
more efficient than jet pumps. It is usually operated between 3v to 12v.

Figure 3.8 Submersible Water Pump.

Specifications:

Voltage : 2.5-10V
Maximum lift : 40-110cm / 15.75"-43.4"

Flow rate : 80-120L/H

Outside diameter : 7.5mm / 0.3"

Inside diameter : 5mm / 0.2"

Diameter : Approx. 24mm / 0.95"

Length : Approx. 45mm / 1.8"

Height : Approx. 30mm / 1.2"

Material : Engineering plastic

Driving mode : DC design, magnetic driving

Continuous working life for 500 hours

Relay is an electromagnetic device which is used to isolate two circuits


electrically and connect them magnetically. They are very useful devices and
allow one circuit to switch another one while they are completely separate.
They are often used to interface an electronic circuit (working at a low voltage)
to an electrical circuit which works at very high voltage. For example, a relay
can make a 5V DC battery circuit to switch a 230V AC mains circuit. Thus a
small sensor circuit can drive, say, a fan or an electric bulb.
Figure 3.9 Relay Switch

A relay switch can be divided into two parts: input and output. The input
section has a coil which generates magnetic field when a small voltage from an
electronic circuit is applied to it. This voltage is called the operating voltage.
Commonly used relays are available in different configuration of operating
voltages like 6V, 9V, 12V, 24V etc. The output section consists of contactors
which connect or disconnect mechanically. In a basic relay there are three
contactors: normally open (NO), normally closed (NC) and common (COM). At
no input state, the COM is connected to NC. When the operating voltage is
applied the relay coil gets energized and the COM changes contact to NO.

A BC547 transistor is a negative-positive-negative (NPN) transistor that is


used for many purposes. Together with other electronic components, such as
resistors, coils, and capacitors, it can be used as the active component for
switches and amplifiers. Transistors has an emitter terminal, a base or control
terminal, and a collector terminal. In a typical configuration, the current
flowing from the base to the emitter controls the collector current. A short
vertical line, which is the base, can indicate the transistor schematic for an
NPN transistor, and the emitter, which is a diagonal line connecting to the
base, is an arrowhead pointing away from the base (Figure 3.10).

Figure 3.10 BC-547 NPN Transistor


3.8 Diode (IN4007)

In electronics, a diode is a two-terminal electronic component that


conducts primarily in one direction (asymmetric conductance), it has low
(ideally zero) resistance to the flow of current in one direction, and high
(ideally infinite) resistance in the other. A semiconductor diode is a crystalline
piece of semiconductor material with a p–n junction connected to two
electrical terminals (figure 3.11).

Figure 3.11 Diode IN4007

Relay Circuit
The relay circuit consists of relay switch, diode and transistor as shown
in figure 3.12. This circuit controls 18-24v DC solenoid valve or 2.5-10v
submersible motor. The control signal from controller to the base of transistor
controls ON-OFF of actuators. The diode prevents the reverse flow of current
in input end of the relay switch. At output end of relay switch a series
connection of battery source and actuator. It is used because of actuators
needs supply of 3-24v DC, but controller output signal is of 3.3v DC.
Figure 3.12 Circuit Diagram to controls actuator (motor) using relay switch.

Вам также может понравиться