Project Report Final
Project Report Final
Chapter 1
Introduction
This project is mainly implemented for industrial applications. Mainly for detecting
the damages inside the oil pipe that cannot be detected by human beings. Kroto is the Greek
word meaning to crack. Inside the pipe, there is very heavy temperature, pressure and toxic
gases. So we are implementing a robot that have a camera, temperature sensor, pressure
sensor etc which is used to detect the crack and conditions inside the pipe. This data from
all the high precision sensors will be transmitted using Wi-Fi protocol from the robot to the
control station. The robot incorporates a wireless camera and the data from the camera is
transmitted to the PC
There are a multitude of standards like WiFi that address mid to high data rates for
voice, PC LANs, video, etc. However, up till now there hasn't been a wireless network
standard that meets the unique needs of sensors and control devices. Sensors and controls
don't need high bandwidth but they do need low latency and very low energy consumption
for long battery lives and for large device arrays.
The Wifi Alliance is not pushing a technology; rather it is providing a standardized
base set of solutions for sensor and control systems...Wireless connectivity of a vast number
of industrial and home applications has modest transmission data requirements, but
demands reliable and secure communication using simple low-cost and low-power radio
systems. In the quest for high-bandwidth, multimedia-capable wireless networks, the need
for cost and power-effective radio solutions for this vast number of fairly simple
applications was only recently addressed by a standardized technology.
The IEEE 802.15.4 standard and Wifi wireless technology are designed to satisfy
the market's need for a low-cost, standard-based and flexible wireless network technology,
which offers low power consumption, reliability, interoperability and security for control
and monitoring applications with low to moderate data rates.
1.1 Objective Of The Project
To design and analyse a robot for detecting the damages inside the oil pipe that can
not be detected by human beings. Inside the pipe, there is very heavy temperature, pressure
and toxic gases. So we are implementing a robot that have a camera, temperature sensor,
pressure sensor etc. which is used to detect the crack and conditions inside the pipe.
Chapter 2
Literature Survey
There are many robots for pipe inspection, but generally they are conceived for
pipes of industrial applications, which have a diameter bigger than 80cm, like gas pipelines
or hydroelectric power stations. In this article we propose a small robot to explore pipes
with a camera to detect breakages, holes, leaks and any kind of defects in pipes of less than
30mm diameter. Due to the great variety of pipes that can be found, it is very useful to
reconfigure the micro robot depending on the task being performed. Multi configurable
systems are systems capable of having their modules rearranged. This characteristic makes
multi configurable robotic systems capable of performing much more types of tasks than
conventional systems (non-configurable). These systems can be classified according to the
configuration type into manual or automatic, depending on the different number of modules
they have into homogenous(only one type of module) and heterogeneous (several
types),and according to the configuration, into mobile, lattice or chain. The robotic system
described in this paper is manually reconfigurable, heterogeneous and has a chain
configuration.
One of the most important issues in modular robotics is the control of the modules.
In the robotic system described in this paper a centralized control has been chosen. There
is one master module that controls the other modules, but for some actions all modules have
to cooperate and take decisions at the same time. In the development of the modules three
lines of investigation have been taken: worm-like micro robots, SMA based micro robots
and planar micro motor drive module.
Regarding the purpose for which this system was design, low diameter pipe
inspection, the size of every module is minimized as much as possible, achieving a final
diameter for each module of less than 26mm. This miniaturization adds agreat complexity
to the design of the modules, because of the limitation in components, electronics and
fabrication techniques. Two fabrication techniques used in these prototypes are stereo
lithography and micromachining.
Most pipelines operate for many years without much attention to mechanical
changes in the pipe. Some of these pipes are left partially full for some period and this can
lead to corrosion as some of these products that are being transported are corrosive in
nature. The design and construction of the pipeline could lead to leakages at some poor
construction joints. Likewise, the operation design guidelines need to be studied. There are
times where the pipes are designed for a certain maximum temperature and pressure and
usage under a higher degree can lead to the pipeline failure. Intentional damage
unfortunately seems to be on the high side than the unintentional or accidental damage.
This is more common with pipelines transporting high-value products and is usually highly
flammable and this has led to loss of lives and properties in so many regions. Therefore,
the oil and gas industries and other fluid transport based industries tend to pay attention to
leakage detection as failure to detect can lead to loss of life and property, direct cost of loss
of products and lie down time leading to direct financial loss to the industry, environmental
pollution and this will necessitate the need for environmental clean-up thereby incurring
more production/management cost.
Chapter 3
Block Diagram
The Device is a monolithic integrated high voltage,high current four channel driver
designed toaccept standard DTL or TTL logic levels and drive inductive loads (such as
relays solenoides, DC and stepping motors) and switching power transistors. To simplify
use as two bridges each pair of channelsis equipped with an enable input. A separate supply
input is provided for the logic, allowing operation at a lower voltage and internal clamp
diodes are included.This device is suitable for use in switching applicationsat frequencies
up to 5 kHz.
3.2.7 DC Motor
A DC motor is a mechanically commutated electric motor powered from direct
current (DC). The stator is stationary in space by definition and therefore so is its current.
The current in the rotor is switched by the commutator to also be stationary in space. This
is how the relative angle between the stator and rotor magnetic flux is maintained near 90
degrees, which generates the maximum torque.
Chapter 4
Hardware Required
➢ Microcontroller
➢ Gas Sensor
➢ Temperature sensor
➢ Relay circuit
➢ DC motors
➢ Motor Driver
➢ Pressure sensor
➢ Wireless camera
NodeMCU is an open source IoT platform. It includes firmware which runs on the
ESP8266 Wi-Fi SoC from Espressif , and hardware which is based on the ESP-12 module.
The term "NodeMCU" by default refers to the firmware rather than the development kits.
NodeMCU was created shortly after the ESP8266 came out. On December 30,
2013, Espressif Systems began production of the ESP8266. The ESP8266 is a Wi-Fi Socket
integrated with a Tensilica Xtensa LX106 core, widely used in IoT applications. NodeMCU
started on 13 Oct 2014, when Hong committed the first file of nodemcu-firmware to
GitHub. Two months later, the project expanded to include an open-hardware platform
when developer Huang R committed the gerber file of an ESP8266 board, named devkit
v0.9. Another important update was made on 30 Jan 2015, when Devsaurus ported to
NodeMCU project, enabling NodeMCU to easily drive LCD, Screen, OLED, even VGA
displays.
In summer 2015 the creators abandoned the firmware project and a group of
independent but dedicated contributors took over. By summer 2016 the NodeMCU
included more than 40 different modules. Due to resource constraints users need to select
the modules relevant for their project and build a firmware tailored to their needs.
However, as a chip, the ESP8266 is also hard to access and use. You have to solder
wires, with the appropriate analog voltage, to its PINs for the simplest tasks such as
powering it on or sending a keystroke to the "computer" on the chip. And, you have to
program it in low-level machine instructions that can be interpreted by the chip hardware.
While this level of integration is not a problem when the ESP8266 is used as an embedded
Borrowing a page from the successful playbooks of Arduino or a Raspberry Pi, the
Node MCU project aims to simplify ESP8266 development. It has two key components.
• An open source ESP8266 firmware that is built on top of the chip manufacturer's
proprietary SDK. The firmware provides a simple programming environment based
on eLua (embedded Lua), which is a very simple and fast scripting language with
an established developer community. For new comers, the Lua scripting language
is easy to learn.
• A DEVKIT board that incorporates the ESP8266 chip on a standard circuit board.
The board has a built-in USB port that is already wired up with the chip, a hardware
reset button, Wi-Fi antenna, LED lights, and standard-sized GPIO (General Purpose
Input Output) pins that can plug into a bread board. Figure 1 shows the DEVKIT
board, and Figure 2 shows the schema of its pins.
Development boards, such as Arduino and Raspberry Pi, are common choices when
prototyping new IoT devices. Those development boards are essentially mini-computers
that can connect to and be programmed by a standard PC or Mac. After it has been
programmed, the development boards can then connect to and control sensors in the field.
Because the "I" in IoT stands for internet, the development boards need a way to
connect to the internet. In the field, the best way to connect to the internet is by using
wireless networks. However, Arduino and Raspberry Pi do not have built-in support for
wireless networks. Developers will have to add a Wi-Fi or cellular module to the board and
write code to access the wireless module.
One of its most unique features of NodeMCU is that it has built-in support for wifi
connectivity, and hence makes IoT application development much easier.
Applications:
• Home Automation
• Home Appliances i.e TV, Refrigerators, Light Bulbs, Fans etc. Control
• Motor Speed control
• Can be used in IP Cameras , Sensor Networks, Wearable electronics
• Security ID tags & Baby Monitors
• Wi-Fi location aware devices and Wi-Fi position systems etc.
Node MCU Development kit provides access to these GPIOs of ESP8266. The only
thing to take care is that Node MCU Dev kit pins are numbered differently than internal
GPIO notations of ESP8266 as shown in below figure and table. For example, the D0 pin
on the Node MCU Dev kit is mapped to the internal GPIO pin 16 of ESP8266.
Below table gives Node MCU Dev Kit IO pins and ESP8266 internal GPIO pins
mapping.
Table 1 - Node MCU Dev Kit IO pins and ESP8266 internal GPIO pins mapping
Pin Names on Node MCU Development Kit ESP8266 Internal GPIO Pin number
D0 GPIO16
D1 GPIO5
D2 GPIO4
D3 GPIO0
D4 GPIO2
D5 GPIO14
D6 GPIO12
D7 GPIO13
D8 GPIO15
D9/RX GPIO3
D10/TX GPIO1
D11/SD2 GPIO9
D12/SD3 GPIO10
The GPIO’s shown in table (1, 3, 9, 10) are mostly not used for GPIO purpose on
Dev Kit
ESP8266 is a system on a chip (SoC) design with components like the processor
chip. The processor has around 16 GPIO lines, some of which are used internally to
interface with other components of the SoC, like flash memory.
Since several lines are used internally within the ESP8266 SoC, we have about 11
GPIO pins remaining for GPIO purpose.
Now again 2 pins out of 11 are generally reserved for RX and TX in order to
communicate with a host PC from which compiled object code is downloaded. Hence
finally, this leaves just 9 general purpose I/O pins i.e. D0 to D8.
As shown in above figure of NodeMCU Dev Kit. We can see RX, TX, SD2, SD3
pins are not mostly used as GPIOs since they are used for other internal process. But we
can try with SD3 (D12) pin which mostly like to respond for GPIO/PWM/interrupt like
functions.
Note that D0/GPIO16 pin can be only used as GPIO read/write, no special functions
are supported on it.
GND P Ground
Gas sensors are available in wide specifications depending on the sensitivity levels,
type of gas to be sensed, physical dimensions and numerous other factors.
The Grove - Gas Sensor (MQ5) module is useful for gas leakage detection (in home
and industry). It is suitable for detecting H2, LPG, CH4, CO, Alcohol ranging frpm 100ppm
to 3000ppm. Due to its high sensitivity and fast response time, measurements can be taken
as soon as possible. The sensitivity of the sensor can be adjusted by using the potentiometer.
Pin Connection
Specifications
➢ Supply Voltage: 5V
➢ Detecting concentration :200-10000ppm LPG,LNG,Natural gas,Iso-butane
➢ Analog and Digital Output
➢ Digital Out is High or Low based on a adjustable preset threshold.
Features
When a gas interacts with this sensor, it is first ionized into its constituents and is
then adsorbed by the sensing element. This adsorption creates a potential difference on the
element which is conveyed to the processor unit through output pins in form of current.
The gas sensor module consists of a steel exoskeleton under which a sensing element is
housed. This sensing element is subjected to current through connecting leads. This current
is known as heating current through it, the gases coming close to the sensing element get
ionized and are absorbed by the sensing element. This changes the resistance of the sensing
element which alters the value of the current going out of it.
When a gas interacts with this sensor, it is first ionized into its constituents and is
then adsorbed by the sensing element. This adsorption creates a potential difference on the
element which is conveyed to the processor unit through output pins in form of current.
The gas sensor module consists of a steel exoskeleton under which a sensing
element is housed. This sensing element is subjected to current through connecting leads.
This current is known as heating current through it, the gases coming close to the sensing
element get ionized and are absorbed by the sensing element. This changes the resistance
of the sensing element which alters the value of the current going out of it.
➢ A steel mesh
➢ Copper clamping ring
➢ Connecting leads.
The top part is a stainless steel mesh which takes care of the following:
1. Filtering out the suspended particles so that only gaseous elements are able to pass to
insides of the sensor.
2. Protecting the insides of the sensor.
3. Exhibits an anti-explosion network that keeps the sensor module intact at high
temperatures and gas pressures.
The connecting leads of the sensor are thick so that sensor can be connected firmly
to the circuit and sufficient amount of heat gets conducted to the inside part. They are casted
from copper and have tin plating over them. Four of the six leads (A, B, C, D) are for signal
fetching while two (1, 2) are used to provide sufficient heat to the sensing element.
The pins are placed on a Bakelite base which is a good insulator and provides firm
gripping to the connecting leads of the sensor.
This DHT11 Temperature and Humidity Sensor features a calibrated digital signal
output with the temperature and humidity sensor capability. It is integrated with a high-
performance 8-bit microcontroller. Its technology ensures the high reliability and excellent
long-term stability. This sensor includes a resistive element and a sensor for wet NTC
temperature measuring devices. It has excellent quality, fast response, anti-interference
ability and high performance.
Specifications
The DHT11 is a commonly used Temperature and humidity sensor. The sensor
comes with a dedicated NTC to measure temperature and an 8-bit microcontroller to output
the values of temperature and humidity as serial data. The sensor is also factory calibrated
and hence easy to interface with other microcontrollers.
The sensor can measure temperature from 0°C to 50°C and humidity from 20% to
90% with an accuracy of ±1°C and ±1%. So if you are looking to measure in this range
then this sensor might be the right choice for you.
The DHT11 Sensor is factory calibrated and outputs serial data and hence it is
highly easy to set it up. The connection diagram for this sensor is shown below.
As you can see the data pin is connected to an I/O pin of the MCU and a 5K pull-
up resistor is used. This data pin outputs the value of both temperature and humidity as
serial data.
Features
• Low cost
• Long-term stability
• Relative humidity and temperature measurement
• Excellent quality
• Fast response
• Strong anti-interference ability
• Long distance signal transmission
• Digital signal output and precise calibration.
Sampling interval 1 - - s
Humidity
Temperature
Accuracy ±1 - ±2 ℃
Measurement range 0 - 50 ℃
Ok now let’s see how these sensors actually work. They consist of a humidity
sensing component, a NTC temperature sensor (or thermistor) and an IC on the back side
of the sensor.
For measuring humidity they use the humidity sensing component which has two
electrodes with moisture holding substrate between them. So as the humidity changes, the
conductivity of the substrate changes or the resistance between these electrodes changes.
This change in resistance is measured and processed by the IC which makes it ready to be
read by a microcontroller.
A thermistor is actually a variable resistor that changes its resistance with change
of the temperature. These sensors are made by sintering of semiconductive materials such
as ceramics or polymers in order to provide larger changes in the resistance with just small
changes in temperature. The term “NTC” means “Negative Temperature Coefficient”,
which means that the resistance decreases with increase of the temperature.
The DC Motor or Direct Current Motor to give it its full title, is the most commonly used
actuator for producing continuous movement and whose speed of rotation can easily be
controlled, making them ideal for use in applications were speed control, servo type control,
and/or positioning is required. A DC motor consists of two parts, a "Stator" which is the
stationary part and a "Rotor" which is the rotating part. The result is that there are basically
three types of DC Motor available.
• Brushed Motor- This type of motor produces a magnetic field in a wound rotor
(the part that rotates) by passing an electrical current through a commutator and
carbon brush assembly, hence the term "Brushed". The stators (the stationary part)
magnetic field is produced by using either a wound stator field winding or by
permanent magnets. Generally brushed DC motors are cheap, small and easily
controlled.
• Brushless Motor - This type of motor produce a magnetic field in the rotor by using
permanent magnets attached to it and commutation is achieved electronically. They
are generally smaller but more expensive than conventional brushed type DC
motors because they use "Hall effect" switches in the stator to produce the required
stator field rotational sequence but they have better torque/speed characteristics, are
more efficient and have a longer operating life than equivalent brushed types.
• Servo Motor - This type of motor is basically a brushed DC motor with some form
of positional feedback control connected to the rotor shaft. They are connected to
and controlled by a PWM type controller and are mainly used in positional control
systems and radio controlled models.
Normal DC motors have almost linear characteristics with their speed of rotation being
determined by the applied DC voltage and their output torque being determined by the
current flowing through the motor windings. The speed of rotation of any DC motor can be
varied from a few revolutions per minute (rpm) to many thousands of revolutions per
minute making them suitable for electronic, automotive or robotic applications. By
connecting them to gearboxes or gear-trains their output speed can be decreased while at
the same time increasing the torque output of the motor at a high speed.
A conventional brushed DC Motor consist basically of two parts, the stationary body of the
motor called the Stator and the inner part which rotates producing the movement called
the Rotor or "Armature" for DC machines.
The motors wound stator is an electromagnet circuit which consists of electrical coils
connected together in a circular configuration to produce the required North-pole then a
South-pole then a North-pole etc, type stationary magnetic field system for rotation, unlike
AC machines whose stator field continually rotates with the applied frequency. The current
which flows within these field coils is known as the motor field current.
These electromagnetic coils which form the stator field can be electrically connected in
series, parallel or both together (compound) with the motors armature. A series wound DC
motor has its stator field windings connected in series with the armature. Likewise, a shunt
wound DC motor has its stator field windings connected in parallel with the armature as
shown.
The magnetic field setup by the rotor tries to align itself with the stationary stator field
causing the rotor to rotate on its axis, but cannot align itself due to commutation delays.
The rotational speed of the motor is dependent on the strength of the rotors magnetic field
and the more voltage that is applied to the motor the faster the rotor will rotate. By varying
this applied DC voltage the rotational speed of the motor can also be varied.
Permanent magnet (PMDC) brushed motors are generally much smaller and cheaper than
their equivalent wound stator type DC motor cousins as they have no field winding. In
permanent magnet DC (PMDC) motors these field coils are replaced with strong rare earth
(i.e. Samarium Cobolt, or Neodymium Iron Boron) type magnets which have very high
magnetic energy fields. This gives them a much better linear speed/torque characteristic
than the equivalent wound motors because of the permanent and sometimes very strong
magnetic field, making them more suitable for use in models, robotics and servos.
Although DC brushed motors are very efficient and cheap, problems associated with the
brushed DC motor is that sparking occurs under heavy load conditions between the two
surfaces of the commutator and carbon brushes resulting in self generating heat, short life
span and electrical noise due to sparking, which can damage any semiconductor switching
device such as a MOSFET or transistor. To overcome these disadvantages, Brushless DC
Motors were developed.
The control of the brushless DC motors is very different from the normal brushed
DC motor, in that it this type of motor incorporates some means to detect the rotors angular
position (or magnetic poles) required to produce the feedback signals required to control
the semiconductor switching devices. The most common position/pole sensor is the "Hall
Effect Sensor", but some motors also use optical sensors.
Using Hall effect sensors, the polarity of the electromagnets is switched by the
motor control drive circuitry. Then the motor can be easily synchronized to a digital clock
signal, providing precise speed control. Brushless DC motors can be constructed to have,
an external permanent magnet rotor and an internal electromagnet stator or an internal
permanent magnet rotor and an external electromagnet stator.
Advantages of the Brushless DC Motor compared to its “brushed” cousin are higher
efficiencies, high reliability, low electrical noise, good speed control and more importantly,
no brushes or commutator to wear out producing a much higher speed. However their
disadvantage is that they are more expensive and more complicated to control.
DC Servo motors are used in closed loop type applications were the position of the
output motor shaft is fed back to the motor control circuit. Typical positional "Feedback"
devices include Resolvers, Encoders and Potentiometers as used in radio control models
such as airplanes and boats etc. A servo motor generally includes a built-in gearbox for
speed reduction and is capable of delivering high torques directly. The output shaft of a
servo motor does not rotate freely as do the shafts of DC motors because of the gearbox
and feedback devices attached.
DC motor behaviour
At a simplistic level, using DC motors is pretty straightforward -- you put power in,
and get rotary motion out. Life, of course, is never this simple -- there are a number of
subtleties of DC motor behaviour that should be accounted for in BEAMbot design.
High-speed output
This is the simplest trait to understand and treat -- most DC motors run at very high
output speeds (generally thousands or tens of thousands of RPM). While this is fine for
some BEAMbots (say, photo poppers or solar rollers), many BEAMbots (walkers, heads)
require lower speeds -- you must put gears on your DC motor's output for these
applications.
Back EMF
Just as putting voltage across a wire in a magnetic field can generate motion,
moving a wire through a magnetic field can generate voltage. This means that as a DC
motor's rotor spins, it generates voltage -- the output voltage is known as back EMF.
Because of back EMF, a spark is created at the commutator as a motor's brushes switch
from contact to contact. Meanwhile, back EMF can damage sensitive circuits when a motor
is stopped suddenly.
A number of things will cause a DC motor to put noise on its power lines:
commutation noise (a function of brush / commutator design & construction), roughness in
bearings (via back EMF), and gearing roughness (via back EMF, if the motor is part of a
gear motor) are three big contributors.
Even without these avoidable factors, any electric motor will put noise on its power
lines by virtue of the fact that its current draw is not constant throughout its motion. Going
back to our example two-pole motor, its current draw will be a function of the angle
between its rotor coil and field magnets:
Since most small DC motors have 3 coils, the coils' current curves will overlay each other:
Added together, this ideal motor's current will then look something like this:
Reality is a bit more complex than this, as even a high-quality motor will display a
current transient at each commutation transition. Since each coil has inductance (by
definition) and some capacitance, there will be a surge of current as the commutator's
brushes first touch a coil's contact, and another as the brushes leave the contact (here, there's
a slight spark as the coil's magnetic field collapses).
In this case, the peak-to-peak current ripple is approximately 0.29 mA, while the
average motor current is just under 31 mA. So under these conditions, the motor puts about
less than 1% of current ripple onto its power lines (and as you can see from the "clean"
traces, it outputs essentially no high-frequency current noise). Note that since this is a 3-
pole motor, and each coil is energized in both directions over the course of a rotor rotation,
one revolution of the rotor will correspond to six of the above curves (here, 6 x 2.4 ms =
0.0144 sec, corresponding to a motor rotation rate of just under 4200 RPM).
Motor power ripple can wreak havoc in Nv nets by destabilizing them inadvertently.
Fortunately, this can be mitigated by putting a small capacitor across the motor's power
lines (you'll only be able to filter out "spikey" transients this way, though -- you'll always
see curves like the ones above being imposed on your power). On the flip side of this coin,
motor power ripple can be put to good use -- as was shown above, ripple frequency can be
used to measure motor speed, and its destabilizing tendencies can be used to reverse a motor
without the need for discrete "back-up" sensors
Where:
V = input voltage
Eb = back EMF
Ia = armature current
R = total resistance
Fig 13-
A:shunt
B:series
C:compound
f = field coil
A shunt wound motor has a high-resistance field winding connected in parallel with
the armature. It responds to increased load by trying to maintain its speed and this leads to
an increase in armature current. This makes it unsuitable for widely-varying loads, which
may lead to overheating.
A series wound motor has a low-resistance field winding connected in series with
the armature. It responds to increased load by slowing down; the current increases and the
torque rises in proportional to the square of the current since the same current flows in both
the armature and the field windings. If the motor is stalled, the current is limited only by
the total resistance of the windings and the torque can be very high, but there is a danger of
the windings becoming overheated. Series wound motors were widely used as traction
motors in rail transport of every kind, but are being phased out in favor of AC induction
motors supplied through solid state inverters. The counter-EMF aids the armature
resistance to limit the current through the armature. When power is first applied to a motor,
the armature does not rotate. At that instant, the counter-EMF is zero and the only factor
limiting the armature current is the armature resistance. Usually the armature resistance of
a motor is less than 1 Ω; therefore the current through the armature would be very large
when the power is applied. Therefore the need arises for an additional resistance in series
with the armature to limit the current until the motor rotation can build up the counter-EMF.
As the motor rotation builds up, the resistance is gradually cut out.
The output speed torque characteristic is the most notable characteristic of series wound
d.c. motors. The speed being almost entirely dependent on the torque required to drive the
load. This suits large inertial loads as the speed will drop until the motor slowly starts to
rotate & these motors have a very high stalling torque.
Originally all large industrial DC motors used wound field or rotor magnets.
Permanent magnets have traditionally only been useful on small motors because it was
difficult to find a material capable of retaining a high-strength field. Only recently have
advances in materials technology allowed the creation of high-intensity permanent
magnets, such as neodymium magnets, allowing the development of compact, high-power
motors without the extra real-estate of field coils and excitation means. But as these high
performance permanent magnets become more applied in electric motor or generator
systems, other problems are realized.
Speed Control
Generally, the rotational speed of a DC motor is proportional to the EMF in its coil
(= the voltage applied to it minus voltage lost on its resistance), and the torque is
proportional to the current. Speed control can be achieved by variable battery tapings,
variable supply voltage, resistors or electronic controls. The direction of a wound field DC
motor can be changed by reversing either the field or armature connections but not both.
This is commonly done with a special set of contactors (direction contactors).
In a circuit known as a chopper, the average voltage applied to the motor is varied
by switching the supply voltage very rapidly. As the "on" to "off" ratio is varied to alter the
average applied voltage, the speed of the motor varies. The percentage "on" time multiplied
by the supply voltage gives the average voltage applied to the motor. Therefore, with a
100 V supply and a 25% "on" time, the average voltage at the motor will be 25 V. During
the "off" time, the armature's inductance causes the current to continue through a diode
called a "fly back diode", in parallel with the motor. At this point in the cycle, the supply
current will be zero, and therefore the average motor current will always be higher than the
supply current unless the percentage "on" time is 100%. At 100% "on" time, the supply and
motor current are equal. The rapid switching wastes less energy than series resistors. This
method is also called pulse-width modulation (PWM) and is often controlled by a
microprocessor. An output filter is sometimes installed to smooth the average voltage
applied to the motor and reduce motor noise.
Since the series-wound DC motor develops its highest torque at low speed, it is
often used in traction applications such as electric locomotives, and trams. Another
application is starter motors for petrol and small diesel engines. Series motors must never
be used in applications where the drive can fail (such as belt drives). As the motor
accelerates, the armature (and hence field) current reduces. The reduction in field causes
the motor to speed up until it destroys itself. This can also be a problem with railway motors
in the event of a loss of adhesion since, unless quickly brought under control, the motors
can reach speeds far higher than they would do under normal circumstances. This can not
only cause problems for the motors themselves and the gears, but due to the differential
speed between the rails and the wheels it can also cause serious damage to the rails and
wheel treads as they heat and cool rapidly. Field weakening is used in some electronic
controls to increase the top speed of an electric vehicle. The simplest form uses a contactor
and field-weakening resistor; the electronic control monitors the motor current and switches
the field weakening resistor into circuit when the motor current reduces below a preset
value (this will be when the motor is at its full design speed). Once the resistor is in circuit,
the motor will increase speed above its normal speed at its rated voltage. When motor
current increases, the control will disconnect the resistor and low speed torque is made
available.
One interesting method of speed control of a DC motor is the Ward Leonard control.
It is a method of controlling a DC motor (usually a shunt or compound wound) and was
developed as a method of providing a speed-controlled motor from an AC supply, though
it is not without its advantages in DC schemes. The AC supply is used to drive an AC
motor, usually an induction motor that drives a DC generator or dynamo. The DC output
from the armature is directly connected to the armature of the DC motor (sometimes but
not always of identical construction). The shunt field windings of both DC machines are
independently excited through variable resistors. Extremely good speed control from
standstill to full speed, and consistent torque, can be obtained by varying the generator
and/or motor field current. This method of control was the de facto method from its
development until it was superseded by solid state thyristor systems. It found service in
almost any environment where good speed control was required, from passenger lifts
through to large mine pit head winding gear and even industrial process machinery and
electric cranes. Its principal disadvantage was that three machines were required to
implement a scheme (five in very large installations, as the DC machines were often
duplicated and controlled by a tandem variable resistor). In many applications, the motor-
generator set was often left permanently running, to avoid the delays that would otherwise
be caused by starting it up as required. Although electronic (thyristor) controllers have
replaced most small to medium Ward-Leonard systems, some very large ones (thousands
of horsepower) remain in service. The field currents are much lower than the armature
currents, allowing a moderate sized thyristor unit to control a much larger motor than it
could control directly. For example, in one installation, a 300 amp thyristor unit controls
the field of the generator. The generator output current is in excess of 15,000 amperes,
which would be prohibitively expensive (and inefficient) to control directly with thyristors.
Protection
To extend a D.C. motor’s service life, protective devices and motor controllers are
used to protect it from mechanical damage, excessive moisture, high dielectric stress and
high temperature or thermal overloading. These protective devices sense motor fault
conditions and either annunciate an alarm to notify the operator or automatically de-
energize the motor when a faulty condition occurs. For overloaded conditions, motors are
protected with thermal overload relays. Bi-metal thermal overload protectors are embedded
in the motor's windings and made from two dissimilar metals. They are designed such that
the bimetallic strips will bend in opposite directions when a temperature set point is reached
to open the control circuit and de-energize the motor. Heaters are external thermal overload
protectors connected in series with the motor’s windings and mounted in the
motor contactor. Solder pot heaters melt in an overload condition, which cause the motor
control circuit to de-energize the motor. Bimetallic heaters function the same way as
embedded bimetallic protectors. Fuses and circuit breakers are over current or short
circuit protectors. Ground fault relays also provide over current protection. They monitor
the electrical current between the motor’s windings and earth system ground. In motor-
generators, reverse current relays prevent the battery from discharging and motorizing the
generator. Since D.C. motor field loss can cause a hazardous runaway or over speed
condition, loss of field relays are connected in parallel with the motor’s field to sense field
current. When the field current decreases below a set point, the relay will deenergize the
motor’s armature. A locked rotor condition prevents a motor from accelerating after its
starting sequence has been initiated. Distance relays protect motors from locked-rotor
faults. Under voltage motor protection is typically incorporated into motor controllers or
starters. In addition, motors can be protected from overvoltages or surges with solation
transformers, power conditioning equipment, MOVs, arrestors and harmonic filters.
Environmental conditions, such as dust, explosive vapors, water, and high ambient
temperatures, can adversely affect the operation of a DC motor. To protect a motor from
these environmental conditions, the National Electrical Manufacturers Association
(NEMA) and the International Electro technical Commission (IEC) have standardized
motor enclosure designs based upon the environmental protection they provide from
contaminants.
DC Motor Starters:
The counter-emf aids the armature resistance to limit the current through the
armature. When power is first applied to a motor, the armature does not rotate. At that
instant the counter-emf is zero and the only factor limiting the armature current is the
armature resistance and inductance. Usually the armature resistance of a motor is less than
1 Ω; therefore the current through the armature would be very large when the power is
applied. This current can make an excessive voltage drop affecting other equipment in the
circuit and even trip overload protective devices.
Therefore the need arises for an additional resistance in series with the armature to limit the
current until the motor rotation can build up the counter-emf. As the motor rotation builds
up, the resistance is gradually cut out.
DC motor manual starting rheostat with no-voltage and overload release features.
When electrical and DC motor technology was first developed, much of the
equipment was constantly tended by an operator trained in the management of motor
systems. The very first motor management systems were almost completely manual, with
an attendant starting and stopping the motors, cleaning the equipment, repairing any
mechanical failures, and so forth.
The first DC motor-starters were also completely manual, as shown in this image.
Normally it took the operator about ten seconds to slowly advance the rheostat across the
contacts to gradually increase input power up to operating speed. There were two different
classes of these rheostats, one used for starting only, and one for starting and speed
regulation. The starting rheostat was less expensive, but had smaller resistance elements
that would burn out if required to run a motor at a constant reduced speed.
This starter includes a no-voltage magnetic holding feature, which causes the
rheostat to spring to the off position if power is lost, so that the motor does not later attempt
to restart in the full-voltage position. It also has over current protection that trips the lever
to the off position if excessive current over a set amount is detected.
The incoming power is indicated as L1 and L2. The components within the broken lines
form the three-point starter. As the name implies there are only three connections to the
starter. The connections to the armature are indicated as A1 and A2. The ends of the field
(excitement) coil are indicated as F1 and F2. In order to control the speed, a field rheostat
is connected in series with the shunt field. One side of the line is connected to the arm of
the starter (represented by an arrow in the diagram). The arm is spring-loaded so, it will
return to the "Off" position when not held at any other position.
• On the first step of the arm, full line voltage is applied across the shunt field. Since the
field rheostat is normally set to minimum resistance, the speed of the motor will not be
excessive; additionally, the motor will develop a large starting torque.
• The starter also connects an electromagnet in series with the shunt field. It will hold the
arm in position when the arm makes contact with the magnet.
• Meanwhile that voltage is applied to the shunt field, and the starting resistance limits
the current to the armature.
• As the motor picks up speed counter-emf is built up; the arm is moved slowly to short.
Four-point starter
The four-point starter eliminates the drawback of the three-point starter. In addition
to the same three points that were in use with the three-point starter, the other side of the
line, L1, is the fourth point brought to the starter when the arm is moved from the "Off"
position. The coil of the holding magnet is connected across the line. The holding magnet
and starting resistors function identical as in the three-point starter.
• The possibility of accidentally opening the field circuit is quite remote. The four-point
starter provides the no-voltage protection to the motor. If the power fails, the motor is
disconnected from the line.
Energy Losses in DC Motors:
Losses occur when electrical energy is converted to mechanical energy (in the
motor), or mechanical energy is converted to electrical energy (in the generator). For the
machine to be efficient, these losses must be kept to a minimum. Some losses are electrical,
others are mechanical. Electrical losses are classified as copper losses and iron losses;
mechanical losses occur in overcoming the friction of various parts of the machine.
Copper losses occur when electrons are forced through the copper windings of the armature
and the field. These losses are proportional to the square of the current. They are sometimes
called I2R losses, since they are due to the power dissipated in the form of heat in the
resistance of the field and armature windings.
Iron losses are subdivided in hysteresis and eddy current losses. Hysteresis losses are
caused by the armature revolving in an alternating magnetic field. It, therefore, becomes
magnetized first in one direction and then in the other. The residual magnetism of the iron
or steel of which the armature is made causes these losses. Since the field magnets are
always magnetized in one direction (dc field), they have no hysteresis losses.
Eddy current losses occur because the iron core of the armature is a conductor revolving in
a magnetic field. This sets up an e.m.f. across portions of the core, causing currents to flow
within the core. These currents heat the core and, if they become excessive, may damage
the windings. As far as the output is concerned, the power consumed by eddy currents is a
loss. To reduce eddy currents to a minimum, a laminated core usually is used. A laminated
core is made of thin sheets of iron electrically insulated from each other. The insulation
between laminations reduces eddy currents, because it is "transverse" to the direction in
which these currents tend to flow. However, it has no effect on the magnetic circuit. The
thinner the laminations, the more effectively this method reduces eddy current losses.
• Speed control over a wide range both above and below the rated speed: The
attractive feature of the dc motor is that it offers the wide range of speed control
both above and below the rated speeds. This can be achieved in dc shunt motors by
methods such as armature control method and field control method. This is one of
the main applications in which dc motors are widely used in fine speed applications
such as in rolling mills and in paper mills.
• High starting torque: dc series motors are termed as best suited drives for traction
applications used for driving heavy loads in starting conditions. DC series motors
will have a staring torque as high as 500% compared to normal operating torque.
Therefore dc series motors are used in the applications such as in electric trains and
cranes.
• Accurate steep less speed with constant torque: Constant torque drives is one
such the drives will have motor shaft torque constant over a given speed range. In
such drives shaft power varies with speed.
• Quick starting, stopping, reversing and acceleration
• Free from harmonics, reactive power consumption and many factors which make
dc motors more advantageous compared to an ac induction motors.
This is a piezoelectric sensor that uses the piezoelectric effect, to measure changes in
pressure, acceleration, strain or force by converting them to an electrical charge. The prefix
piezo is Greek for 'press' or 'squeeze'. A pressure sensor is a device equipped with a
pressure-sensitive element that measures the pressure of a gas or a liquid against a
diaphragm made of stainless steel, silicon, etc., and converts the measured value into an
electrical signal as an output
➢ 1. Transverse
➢ 2. Longitudinal
➢ 3. Shear
1. Transverse effect
A force applied along a neutral axis (y) displaces charges along the (x) direction,
perpendicular to the line of force. The amount of charge (Cx) depends on the geometrical
dimensions of the respective piezoelectric element. When dimensions a,b,c apply,
where a is the dimension in line with the neutral axis, b is in line with the charge
generating axis and d is the corresponding piezoelectric coefficient.
2. Longitudinal effect
The amount of charge displaced is strictly proportional to the applied force and independent
of the piezoelectric element size and shape. Putting several elements mechanically in series
and electrically in parallel is the only way to increase the charge output. The resulting
charge is
Cx= dxx Fx n,
where dxx is the piezoelectric coefficient for a charge in x- direction released by forces
applied along x-direction, Fx the applied Force in x-direction and n corresponds to the
number of elemnts.
3. Shear effect
➢ The charges produced are strictly proportional to the applied forces and independent
of the element size and shape. For n elements mechanically in series and electrically
in parallel the charge is
➢ Cx= 2dxx Fx n,
➢ In contrasr to the longitudinal and shear effects, the transverse effect make it
possible to fine-tune sensitivity on the applied force and element dimension.
Sensor Design
➢ Sensors often tend to be sensitive to more than one physical quantity. Pressure
sensor show false signal when they are exposed tp vibrations. Sophisticated
pressure sensors therefore use acceleration compensation elements in addition to
the pressure sensing elements. By carefully matching those elements, the
acceleration signal is subtracted from the combined signal of pressure and
acceleration to derive the true pressure information.
➢ Vibration sensors can also harvest otherwise wasted energy from mechanical
vibrations. This is accomplished by using piezoelectric materials to convert
mechanical strain into usable electrical energy.
➢ Two main groups of material are used for piezoelectric semsors: piezoelectric
ceramics and single crystal materials.
➢ The ceramic materials have a piezoelectric constant/sensitivity that is roughly two
orders of the natural single crystal materials and can be produced by inexpensive
sintering processes. The piezoeffect in the piezoceramics is trained , so their high
sensitivity degrades over time. This degradation is highly correlated with increased
temperature.
➢ The less sensitive, natural, single-crystal materials (gallium, phosphate, quartz,
tournaline) have a higher- when carefuuy handled, alost unlimited - long term
stability. There are also new single - crystal materials commercially available such
as Lead Magnesium Niobate-Lead Titanate (PMN-PT). These materials offer
improved sensitivity over PZT but have a lower maximum operating temperature
and are currently more expensive to manufacture.
Piezo-resistance Effect
The electrical resistance of the above conductor is expressed by the following formula:R =
ρ × L/S.When this conductor is pulled to the right or left as shown below, the length
increases and the cross-sectional area decreases.
The electrical resistance of the above conductor is expressed by the following formula:R'
= ρ ×(L+1)/S-s.Accordingly,R' > R.This shows how the application of a mechanical force
changes the electrical resistance.
4.6.4 ADVANTAGE OF PIEZOELECTRIC SENSOR
➢ The LM2596 series of regulators are monolithic integrated circuits that provide all
the active functions
➢ for a step-down (buck) switching regulator, capable of driving a 3-A load with
excellent line and load
➢ regulation. These devices are available in fixed output voltages of 3.3 V, 5 V, 12 V,
and an adjustable output
➢ version.
Requiring a minimum number of external components, these regulators are simple to use
and include internal frequency compensation, and a fixed frequency oscillator. The
LM2596 series operates at a switching frequency of 150 kHz, thus allowing smaller sized
filter components than what would be required with lower frequency switching regulators.
Available in a standard 7-pin TO-220 package with several different lead bend options, and
a 7-pin TO-263 surface mount package.A standard series of inductors are available from
several different manufacturers optimized for use with theLM2596 series. This feature
greatly simplifies the design of switch-mode power supplies.
Other features include a ±4% tolerance on output voltage under specified input voltage and
output load conditions, and ±15% on the oscillator frequency. External shutdown is
included, featuring typically 80 μA standby current. Self-protection features include a two
stage frequency reducing current limit for the output switch and an over temperature
shutdown for complete protection under fault conditions
The basic operation of the buck converter has the current in an inductor controlled
by two switches (usually a transistor and a diode). In the idealised converter, all the
components are considered to be perfect. Specifically, the switch and the diode have zero
voltage drop when on and zero current flow when off, and the inductor has zero series
resistance. Further, it is assumed that the input and output voltages do not change over the
course of a cycle (this would imply the output capacitance as being infinite).
The conceptual model of the buck converter is best understood in terms of the
relation between current and voltage of the inductor. Beginning with the switch open (off-
state), the current in the circuit is zero. When the switch is first closed (on state), the current
will begin to increase, and the inductor will produce an opposing voltage across its
terminals in response to the changing current. This voltage drop counteracts the voltage of
the source and therefore reduces the net voltage across the load. Over time, the rate of
change of current decreases, and the voltage across the inductor also then decreases,
increasing the voltage at the load. During this time, the inductor stores energy in the form
of a magnetic field. If the switch is opened while the current is still changing, then there
will always be a voltage drop across the inductor, so the net voltage at the load will always
be less than the input voltage source. When the switch is opened again (off-state), the
voltage source will be removed from the circuit, and the current will decrease. The
decreasing current will produce a voltage drop across the inductor (opposite to the drop at
on-state), and now the inductor becomes a Current Source. The stored energy in the
inductor's magnetic field supports the current flow through the load. This current, flowing
while the input voltage source is disconnected, when concatenated with the current flowing
during on-state, totals to current greater than the average input current (being zero during
off-state). The "increase" in average current makes up for the reduction in voltage, and
ideally preserves the power provided to the load. During the off-state, the inductor is
discharging its stored energy into the rest of the circuit. If the switch is closed again before
the inductor fully discharges (on state), the voltage at the load will always be greater than
zero.
Features
• Adjustable Version Output Voltage Range: 1.2-V to 37-V ± 4% Maximum Over Line and
Load Conditions
• High Efficiency
• Create a Custom Design Using the LM2596 with the WEBENCH Power Designer
cameras, can send ad receive data via a computer network and the internet. Although most
of the cameras that do this are webcameras, the term IP camera or netcamera is usually
applied only to thoseused for surveillance that can be directly accessed over a
networkconnection.
1. Download and install "Plug&Play" app from Google Play Store by typing in "9527" into
the search bar.
2. Switch on the wireless webcam, making sure that the AP/P2P switch is in th eP2P
position.
3. Wait about30 seconds until the device boots up and the wireless signal is transmitted
from the device.
4. The "Wifi Analyser" app is usefullto look for the signal. When running a signal should
beseen from "MD81S"
5. Open "Settings" in the Android devic eand go to "Wifi" and MD81S should be seen.
Connect to MD81S using the password 12345678.
6. Once connected open "Plug&Play" app on the Android device and connect to camera by
tapping the LAN button. On the "Cameras" screen the camera should appear. Tap on the
thumbnail image to open the connection and view the picture from the camera.
1. Star tup P2P connectio nas inthe previous section and go to "cameras" screen on Android
device. The Wifi camera should show up as a thumbnail.
2. Tap on the blue arrow on the right of the screen beside the Camera thumbnail to open
the "Settings" window.
3. In the settings window select "Wifi" and tap the blue "Search" button. This should show
the SSID of the local wireless router. Enter the password for the router and click "OK" and
the "Setting Success" screen should appear and the camera should reboot and connect itself
to the wireless LAN as shown.
4. Re connect the Android device to the WLAN and restart "Plug & Play".
5. Open the “Cameras" screen and tap on the camera thumb nail.
2. As P2P is decentralised i.e services are spread out over various peers, it makes the system
quite reliable.
6. Allow secure connections between the camera and viewing client with encrypted
streams.
8. The camera doesn't use bandwidth to constantly upload data bandwidth when aviewing
device logs in to receive the feed.
9. Not eas yto hack the P2P platform as we must authenticate with atleat2 different servers
for the connectio n to establish.
Chapter 5
Software Required
➢ Embedded C
➢ Arduino IDE
➢ Blynk Application
Embedded C is one of the most popular and most commonly used Programming Languages
in the development of Embedded Systems. So, in this article, we will see some of the Basics
of Embedded C Program and the Programming Structure of Embedded C.
Embedded C is perhaps the most popular languages among Embedded Programmers for
programming Embedded Systems. There are many popular programming languages like
Assembly, BASIC, C++ etc. that are often used for developing Embedded Systems but
Embedded C remains popular due to its efficiency, less development time and portability.
Before digging in to the basics of Embedded C Program, we will first take a look at what
an Embedded System is and the importance of Programming Language in Embedded
Systems.
An Embedded System can be best described as a system which has both the hardware and
software and is designed to do a specific task. A good example for an Embedded System,
which many households have, is a Washing Machine.
We use washing machines almost daily but wouldn’t get the idea that it is an embedded
system consisting of a Processor (and other hardware as well) and software.
Embedded Systems can not only be stand-alone devices like Washing Machines but also
be a part of a much larger system. An example for this is a Car. A modern day Car has
several individual embedded systems that perform their specific tasks with the aim of
making a smooth and safe journey.
Some of the embedded systems in a Car are Anti-lock Braking System (ABS), Temperature
Monitoring System, Automatic Climate Control, Tyre Pressure Monitoring System, Engine
Oil Level Monitor, etc.
All these devices have one thing in common: they are programmable i.e. we can write a
program (which is the software part of the Embedded System) to define how the device
actually works.
Embedded Software or Program allow Hardware to monitor external events (Inputs) and
control external devices (Outputs) accordingly. During this process, the program for an
Embedded System may have to directly manipulate the internal architecture of the
From the above statement, it is clear that the Software part of an Embedded System is
equally important to the Hardware part. There is no point in having advanced Hardware
Components with poorly written programs (Software).
There are many programming languages that are used for Embedded Systems like
Assembly (low-level Programming Language), C, C++, JAVA (high-level programming
languages), Visual Basic, JAVA Script (Application level Programming Languages), etc.
In the process of making a better embedded system, the programming of the system plays
a vital role and hence, the selection of the Programming Language is very important.
The following are few factors that are to be considered while selecting the Programming
Language for the development of Embedded Systems.
• Size: The memory that the program occupies is very important as Embedded
Processors like Microcontrollers have a very limited amount of ROM.
• Speed: The programs must be very fast i.e. they must run as fast as possible. The
hardware should not be slowed down due to a slow running software.
• Portability: The same program can be compiled for different processors.
• Ease of Implementation
• Ease of Maintenance
• Readability
Earlier Embedded Systems were developed mainly using Assembly Language. Even
though Assembly Language is closest to the actual machine code instructions, the lack of
portability and high amount of resources spent on developing the code, made the Assembly
Language difficult to work with.
There are other high-level programming languages that offered the above mentioned
features but none were close to C Programming Language.
The C Programming Language, developed by Dennis Ritchie in the late 60’s and early 70’s,
is the most popular and widely used programming language. The C Programming Language
provided low level memory access using an uncomplicated compiler (a software that
converts programs to machine code) and achieved efficient mapping to machine
instructions.
There is actually not much difference between C and Embedded C apart from few
extensions and the operating environment. Both C and Embedded C are ISO Standards that
have almost same syntax, datatypes, functions, etc.
Now that we have seen a little bit about Embedded Systems and Programming Languages,
we will dive in to the basics of Embedded C Program. We will start with two of the basic
features of the Embedded C Program: Keywords and Datatypes.
A Keyword is a special word with a special meaning to the compiler (a C Compiler for
example, is a software that is used to convert program written in C to Machine Code). For
example, if we take the Keil’s Cx51 Compiler (a popular C Compiler for 8051 based
Microcontrollers) the following are some of the keywords:
➢ bit
➢ sbit
➢ sfr
➢ small
➢ large
These are few of the many keywords associated with the Cx51 C Compiler along with the
standard C Keywords.
Data Types in C Programming Language (or any programming language for that matter)
help us declaring variables in the program. There are many data types in C Programming
Language like signed int, unsigned int, signed char, unsigned char, float, double, etc. In
addition to these there few more data types in Embedded C.
The following are the extra data types in Embedded C associated with the Keil’s Cx51
Compiler.
➢ bit
➢ sbit
➢ sfr
➢ sfr16
The next thing to understand in the Basics of Embedded C Program is the basic structure
or Template of Embedded C Program. This will help us in understanding how an Embedded
C Program is written.
➢ Comments: Comments are readable text that are written to help us (the reader)
understand the code easily. They are ignored by the compiler and do not take up
any memory in the final code (after compilation).
➢ There are two ways you can write comments: one is the single line comments
denoted by // and the other is multiline comments denoted by /*….*/.
➢ Global Variables: Global Variables, as the name suggests, are Global to the
program i.e. they can be accessed anywhere in the program.
➢ Main Function: Every C or Embedded C Program has one main function, from
where the execution of the program begins.
Writing Sketches
Programs written using Arduino Software (IDE) are called sketches. The editor has features
for cutting/pasting and for searching/replacing text. The message area gives feedback while
saving and exporting and also displays errors. The console displays text output by the
Arduino Software (IDE), including complete error messages and other information. The
bottom right hand corner of the window displays the configured board and serial port. The
toolbar buttons allow you to verify and upload programs, create, open, and save sketches,
and open the serial monitor.
Verify
Checks your code for errors compiling it.
Upload
Compiles your code and uploads it to the configured board.
See uploading below for details.
Note: If you are using an external programmer with your board, you can hold
down the "shift" key on your computer when using this icon. The text will
change to "Upload using Programmer"
New
Creates a new sketch.
Open
Presents a menu of all the sketches in your sketchbook. Clicking one will open
it within the current window overwriting its content.
Note: due to a bug in Java, this menu doesn't scroll; if you need to open a sketch
late in the list, use the File | Sketchbookmenu instead.
Save
Saves your sketch.
Serial Monitor
Opens the serial monitor.
File
➢ New
Creates a new instance of the editor, with the bare minimum structure of a sketch already
in place.
➢ Open
Allows to load a sketch file browsing through the computer drives and folders.
➢ Open Recent
Provides a short list of the most recent sketches, ready to be opened.
➢ Sketchbook
Shows the current sketches within the sketchbook folder structure; clicking on any name
opens the corresponding sketch in a new editor instance.
➢ Examples
Any example provided by the Arduino Software (IDE) or library shows up in this menu
item. All the examples are structured in a tree that allows easy access by topic or library.
➢ Close
Closes the instance of the Arduino Software from which it is clicked.
➢ Save
Saves the sketch with the current name. If the file hasn't been named before, a name will
be provided in a "Save as.." window.
➢ Save as...
Allows to save the current sketch with a different name.
➢ Page Setup
It shows the Page Setup window for printing.
➢ Print
Sends the current sketch to the printer according to the settings defined in Page Setup.
➢ Preferences
Opens the Preferences window where some settings of the IDE may be customized, as the
language of the IDE interface.
➢ Quit
Closes all IDE windows. The same sketches open when Quit was chosen will be
automatically reopened the next time you start the IDE.
Edit
➢ Undo/Redo
Goes back of one or more steps you did while editing; when you go back, you may go
forward with Redo.
➢ Cut
Removes the selected text from the editor and places it into the clipboard.
➢ Copy
Duplicates the selected text in the editor and places it into the clipboard.
Sketch
• Verify/Compile
Checks your sketch for errors compiling it; it will report memory usage for code and
variables in the console area.
• Upload
Compiles and loads the binary file onto the configured board through the configured Port.
• Upload Using Programmer
This will overwrite the bootloader on the board; you will need to use Tools > Burn
Bootloader to restore it and be able to Upload to USB serial port again. However, it
allows you to use the full capacity of the Flash memory for your sketch. Please note that
this command will NOT burn the fuses. To do so a Tools -> Burn Bootloader command
must be executed.
• Export Compiled Binary
Saves a .hex file that may be kept as archive or sent to the board using other tools.
• Show Sketch Folder
Opens the current sketch folder.
• Include Library
Adds a library to your sketch by inserting #include statements at the start of your code.
For more details, see libraries below. Additionally, from this menu item you can access
the Library Manager and import new libraries from .zip files.
• Add File...
Adds a source file to the sketch (it will be copied from its current location). The new file
appears in a new tab in the sketch window. Files can be removed from the sketch using
the tab menu accessible clicking on the small triangle icon below the serial monitor one
on the right side o the toolbar.
Tools
• Auto Format
This formats your code nicely: i.e. indents it so that opening and closing curly braces line
up, and that the statements inside curly braces are indented more.
• Archive Sketch
Archives a copy of the current sketch in .zip format. The archive is placed in the same
directory as the sketch.
• Fix Encoding & Reload
Fixes possible discrepancies between the editor char map encoding and other operating
systems char maps.
• Serial Monitor
Opens the serial monitor window and initiates the exchange of data with any connected
board on the currently selected Port. This usually resets the board, if the board supports
Reset over serial port opening.
• Board
Select the board that you're using. See below for descriptions of the various boards.
• Port
This menu contains all the serial devices (real or virtual) on your machine. It should
automatically refresh every time you open the top-level tools menu.
• Programmer
For selecting a hardware programmer when programming a board or chip and not using the
on board USB-serial connection. Normally you won't need this, but if you're burning a
bootloader to a new microcontroller, you will use this.
• Burn Bootloader
The items in this menu allow you to burn a bootloader onto the microcontroller on an
Arduino board. This is not required for normal use of an Arduino or Genuino board but is
useful if you purchase a new ATmega microcontroller (which normally come without a
bootloader). Ensure that you've selected the correct board from the Boards menu before
burning the bootloader on the target board. This command also set the right fuses.
• Sketchbook
• The Arduino Software (IDE) uses the concept of a sketchbook: a standard place to
store your programs (or sketches). The sketches in your sketchbook can be opened
from the File > Sketchbook menu or from the Open button on the toolbar. The first
time you run the Arduino software, it will automatically create a directory for your
sketchbook. You can view or change the location of the sketchbook location from
with the Preferences dialog.
• Uploading
• Before uploading your sketch, you need to select the correct items from the Tools
> Board and Tools > Port menus. The boards are described below. On the Mac,
the serial port is probably something like /dev/tty.usbmodem241 (for an Uno or
Mega2560 or Leonardo) or /dev/tty.usbserial-1B1 (for a Duemilanove or earlier
USB board), or /dev/tty.USA19QW1b1P1.1 (for a serial board connected with a
Keyspan USB-to-Serial adapter). On Windows, it's probably COM1 or COM2 (for
a serial board) or COM4, COM5, COM7, or higher (for a USB board) - to find out,
you look for USB serial device in the ports section of the Windows Device
Manager. On Linux, it should be /dev/ttyACMx , /dev/ttyUSBx or similar. Once
you've selected the correct serial port and board, press the upload button in the
toolbar or select the Upload item from the Sketch menu. Current Arduino boards
will reset automatically and begin the upload. With older boards (pre-Diecimila)
that lack auto-reset, you'll need to press the reset button on the board just before
starting the upload. On most boards, you'll see the RX and TX LEDs blink as the
sketch is uploaded. The Arduino Software (IDE) will display a message when the
upload is complete, or show an error.
• When you upload a sketch, you're using the Arduino bootloader, a small program
that has been loaded on to the microcontroller on your board. It allows you to upload
code without using any additional hardware. The bootloader is active for a few
seconds when the board resets; then it starts whichever sketch was most recently
uploaded to the microcontroller. The bootloader will blink the on-board (pin 13)
LED when it starts (i.e. when the board resets).
• Libraries
• Libraries provide extra functionality for use in sketches, e.g. working with hardware
or manipulating data. To use a library in a sketch, select it from the Sketch >
Import Library menu. This will insert one or more #include statements at the top
of the sketch and compile the library with your sketch. Because libraries are
uploaded to the board with your sketch, they increase the amount of space it takes
up. If a sketch no longer needs a library, simply delete its #includestatements from
the top of your code.
5.3 BLYNK
Blynk is a Platform with iOS and Android apps to control Arduino, Raspberry Pi and the
likes over the Internet.
It's a digital dashboard where you can build a graphic interface for your project by simply
dragging and dropping widgets.
It's really simple to set everything up and you'll start tinkering in less than 5 mins.
Blynk is not tied to some specific board or shield. Instead, it's supporting hardware of your
choice. Whether your Arduino or Raspberry Pi is linked to the Internet over Wi-Fi,
Ethernet or this new ESP8266 chip, Blynk will get you online and ready for the Internet Of
Your Things.
5.3.1 Introduction:
Blynk is a Platform with IOS and Android apps to control Arduino, Raspberry Pi and the
likes over the Internet. It's a digital dashboard where you can build a graphic interface for
your project by simply dragging and dropping widgets.
After downloading the app, create an account and log in. (If possible than log in with your
real mail id for better connectivity later.)
Either you can login using your facebook account or you can login using your preffered
E-mail id.
Fig 28: Log In Into Blynk Fig 29: Auth Token Sent To E-Mail From Blynk
Click the “Create New Project” in the app to create a new Blynk app. Give it any
name.Blynk works with hundreds of hardware models and connection types. Select the
Hardware type. After this, select connection type. In this project we have select WiFi
connectivity
The Auth Token is very important – you’ll need to stick it into your ESP8266’s
firmware. For now, copy it down or use the “E-mail” button to send it to yourself.
Then you’ll be presented with a blank new project. To open the widget box, click in the
project window to open.
1. Click on Button.
2. Give name to Button say led.
3. Under OUTPUT tab- Click pin and select the pin to which led is connected to Node
MCU, here it is digital pin 2, hence select digital and under pin D2. And Click
continue.
Under MODE tab- Select whether you want this button as "push button" or "Switch".
Fig 31: Adding widgets to the project Fig 32: configuring the widgets
Now that your Blynk project is set-up, open Arduino and navigate to the
ESP8266_Standalone example in the File > Examples > Blynk > Boards_WiFi>
ESP8266_Standalone menu.
Before uploading, make sure to paste your authorization token into the auth [] variable.
Also make sure to load your Wifi network settings into the Blynk.begin(auth, "ssid",
"pass") function.
#include <dht11.h>
dht11 DHT;
#include<ESP8266WiFi.h>
#include<BlynkSimpleEsp8266.h>
#include<SimpleTimer.h>
char auth[]="544e01a0983a42279c09b6";
char ssid[]="helloo";
char pass[]="helloo123";
SimpleTimer timer;
int PR=D6;
#define m11 D0
#define m12 D1
#define m21 D2
#define m22 D3
#define m31 D5
#define m41 D7
//#define relay D6
#define DHT11_PIN D8
#define GAS D4
void setup(){
Serial.begin(9600);
Blynk.begin(auth,ssid,pass);
//dht.begin();
pinMode(m11,OUTPUT);
pinMode(m12,OUTPUT);
pinMode(m21,OUTPUT);
pinMode(m22,OUTPUT);
pinMode(m31,OUTPUT);
pinMode(m41,OUTPUT);
pinMode(relay,OUTPUT);
pinMode(soil, INPUT);
timer.setInterval(1000L,sendUptime);
}
void sendUptime()
{
Blynk.virtualWrite(10,DHT.temperature);
Blynk.virtualWrite(11,DHT.humidity);
}
void loop()
{
Blynk.run();
timer.run();
int chk;
chk=DHT.read(DHT11_PIN);
delay(1000);
int x=digitalRead(D4);
if(x==1)
{
Blynk.virtualWrite(5,"GAS DETECTED");
}
else
{
Blynk.virtualWrite(5,"NORMAL");
}
int val=digitalRead(PR);
delay(500);
if(val==1)
{
Blynk.virtualWrite(1,"PRESSURE DETECTED");
}
else
{
Blynk.virtualWrite(1,"NORMAL");
}
5.3.6 Execution
After the app has uploaded, open the serial monitor, setting the baud rate to 9600. Wait for
the “Ready” message.
Then click the “Run” button in the top right corner of the Blynk app. Press the button and
watch the LED
Then add more widgets to the project. They should immediately work on the ESP8266
without uploading any new firmware.
Chapter 6
Conclusion
• This Project is mainly for detecting the damages inside the oil pipe that cannot be
detected by human beings.
• Inside the pipe, there is very heavy temperature, pressure and toxic gases. So we are
implementing a robot that have a camera, temperature sensor, gas sensor etc which
is used to detect the crack and conditions inside the pipe.
• Kroto Finder is a robot made for industry service requirements where human
intervention is not required in a dangerous environment. Implementation of a robot
that is used to detect the crack and conditions inside the pipe has been implemented
successfully.
• This data from all the high precision sensors are transmitted using wifi protocol
from the robot to the control station. The robot incorporates a wireless camera and
the data from the camera is transmitted to the frontend Visual studio
REFERENCES
[1] Xin-an Yuan, Wei Li, Guo-ming chen, Xiao-kang yin, Jiu-hao ge, Chuan-rong Zhang,
“Thedetection of axial cracks in pipe string using a feed-through ACFM probe”, IEEE
Xplore , 20th0ctober 2014.
[2] Thomas.F. QAlexandre Santos, Mohamed Younis, “ A sensor network for non-intrusive
andefficient leak detection in long pipelines” , IEEE Xplore, December 2011.
[3] An Jian, Wu Jiande, Pu Gnangyne, Qu cheng zhong, Huang chaobing, Pang chunlei,
Liu Hungwei, “A kind of pressure detection method in long distance ore slurry pipeline” ,
3rd International symposium on Knowledge Acquisition and Modeling, November 2010.
[4] Kenneth Ayala , “ The 8051 Microcontroller & Embedded Systems Using Assembly
and C”, India edition -2010.
[5] Muhammad Ali Mazidi, “Microcontrollers and Interfacing (For GTU) Pearson
Education, 2nd edition– 2012.