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

CHAPTER 3

MODEL FORMULATION

A waste container is a container for temporarily storing waste, and is usually


made out of metal or plastic. The main contribution of this work is the monitoring the
level of the garbage inside the dustbin. The problem that the cleaner face today is that
they need to check all the dustbin whether the dustbin is full or not. Therefore, by
doing that will increase the time taken to clean the garbage and to check all the
dustbin. The main objective of this smart dustbin is to monitor the garbage level
inside the dustbin. This dustbin also can notify the cleaner when the dustbin is full.
The output that display to the user through the LED display is the status of the
garbage. This smart dustbin used the ultrasonic sensor as the main sensor to detect the
distance of the garbage inside the dustbin. The LED display are used to show the
status of the garbage.

3.1. Components Used in Smart Garbage Bin


There are many components used in Bluetooth control lawn mower. They are
as follows:

3.1.1. General Description of Arduino Uno


Arduino is an open-source platform used for building electronics projects.
Arduino Uno is shown in figure 3.1.
21

Figure 3.1. Arduino UNO

The Arduino consists of a physical programmable circuit board and a piece of


software, used to write and upload computer code to the physical board. Arduino Uno
is shown in Figure 3.1. The Arduino platform has become quite popular with people
just starting out with electronics, and for good reason. Unlike most previous
programmable circuit boards, the Arduino does not need a separate piece of hardware
in order to load new code onto the board by using a USB cable. Additionally, the
Arduino IDE uses a simplified version of C++, making it easier to learn to program.
Finally, Arduino provides a standard form factor that breaks out the functions of the
micro-controller into a more accessible package.
The Uno is one of the more popular boards in the Arduino family and a great choice
for beginners. There are many varieties of Arduino boards that can be used for
different purposes. The different part of Arduino Uno is shown in figure 3.2.
22

Figure 3.2. Different Parts of Arduino Uno

3.1.1.1. Power (USB / Barrel Jack)


Every Arduino board needs a way to be connected to a power source. The
Arduino UNO can be powered from a USB cable coming from computer or a wall
power supply that is terminated in a barrel jack. In the picture above the USB
connection is labeled (1) and the barrel jack is labeled (2).
The USB connection will load code onto Arduino board. Program with
Arduino can be found in Installing and Programming Arduino tutorial. The
recommended voltage for most Arduino models is between 6 and 12 Volts.

3.1.1.2. Pins
The pins on Arduino are the places that connect wires to construct a circuit with a
breadboard and some wires. They usually have black plastic ‘headers’ that plug a wire
right into the board. The Arduino has several different kinds of pins, each of which is
labeled on the board and used for different functions.
 GND (3): Short for ‘Ground’. There are several GND pins on the Arduino,
any of which can be used to ground on circuit.
23

 5V (4) & 3.3V (5): The 5V pin supplies 5 volts of power, and the 3.3V pin
supplies 3.3 volts of power. Most of the simple components used with the
Arduino run 5 or 3.3 volts.
 Analog (6): The area of ‘Analog’ label is from A0 through A5 on the Arduino.
These pins can read the signal from an analog sensor and convert it into a
digital value.
 Digital (7): The digital pins are from pin 0 through 13 on the Arduino UNO.
These pins can be used for both digital input and digital output.
 PWM (8): some of the digital pins are noticed from 3, 5, 6, 9, 10, and 11 on
the Arduino UNO. These pins act as normal digital pins, but can also be used
for something called Pulse-Width Modulation (PWM). These pins act to
simulate analog output like fading an LED in and out.
 AREF (9): Stands for Analog Reference. Most of the time can leave this pin
alone. It is sometimes used to set an external reference voltage (between 0 and
5 Volts) as the upper limit for the analog input pins.

Table 3.1 Arduino I/O ports


Microcontroller ATmega328
Operating Voltage 5V

Input Voltage(recommended) 7-12V

Input Voltage (limits) 6-20V


Digital I/O Pins 14(of which6 provide PWM output)

Analog Input Pins 6

DC Current per I/O Pin 40mA


DC Current for 3.3V Pin 50mA
Flash Memory 32KB(ATmega328) of which 0.5 KB used by
bootloader

SRAM 2KB(ATmega328)
EEPROM 1KB(ATmega328)

Clock Speed 16MHz


24

3.1.1.3. Reset Button


The Arduino has a reset button (10). Pushing it will temporarily connect the
reset pin to ground and restart any code that is loaded on the Arduino. This can be
very useful if code doesn’t repeat, to test it multiple times.

3.1.1.4. Power LED Indicator


There is a tiny LED next to the word ‘ON’ (11). This LED should light up

when Arduino is plugged into a power source. If this light doesn’t turn on, there’s a
good chance something is wrong to re-check circuit.

3.1.1.5. TX RX LEDs
TX is short for transmit, RX is short for receive. These markings appear quite
a bit in electronics to indicate the pins responsible for serial communication. There are
two places on the Arduino UNO where TX and RX appear – once by digital pins 0
and 1, and a second time next to the TX and RX indicator LEDs (12). These LEDs
will give nice visual indications whenever Arduino is receiving or transmitting data.

3.1.1.6. Main IC

The black thing with all the metal legs is an IC, or Integrated Circuit (13). It is
the brains of Arduino. The main IC on the Arduino is slightly different from board
type to board type, but it is usually from the ATmega line of IC’s from the ATMEL
Company. This can be important to know the IC type before loading up a new
program from the Arduino software. This information can usually be found in writing
on the top side of the IC.

3.1.1.7. Voltage Regulator


The voltage regulator (14) is not actually something that interacts with on the
Arduino. But it is potentially useful to know. The voltage regulator does exactly what
it says – it controls the amount of voltage that is let into the Arduino board. It is a kind
of gatekeeper; it will turn away an extra voltage that might harm the circuit. Of
course, it has its limits, so don’t hook up Arduino to anything greater than 20 volts.
25

3.1.2 ULTRASONIC SENSOR


A special sonic transducer is used for the ultrasonic proximity sensors, which
allows for alternate transmission and reception of sound waves. The sonic waves
emitted by the transducer are reflected by an object and received back in the
transducer. After having emitted the sound waves, the ultrasonic sensor will switch to
receive mode. The time elapsed between emitting and receiving is proportional to the
distance of the object from the sensor.

Figure 3.3. Working Sensor

Ultrasonic sensors generate high-frequency sound waves and evaluate the echo which
is received back by the sensor, measuring the time interval between sending the signal
and receiving the echo to determine the distance to an object.

Fig 3.4. Principle of Ultrasonic Sensor

3.1.3 Servo Motor


26

There are some special types of application of electrical motor where rotation
of the motor is required for just a certain angle not continuously for long period of
time. For these applications, some special types of motor are required with some
special arrangement which makes the motor to rotate a certain angle for a given
electrical input (signal).
This is normally a simple motor which is controlled for specific angular rotation with
the help of additional servomechanism (a typical closed loop feedback control
system).
Servo motor is a special type of motor which is automatically operated up to certain
limit for a given command with help of error-sensing feedback to correct the
performance.

Fig 3.5 Servo Motor

3.1.3.1 Servomechanism
A servo system mainly consists of three basic components,
(a) A controlled device
(b) an output sensor
(c) a feedback system.
This is an automatic closed loop control system. Here instead of controlling a device
by applying the variable input signal, the device is controlled by a feedback signal
generated by comparing output signal and reference input signal. When reference
input signal or command signal is applied to the system, it is compared with output
reference signal of the system produced by output sensor, and a third signal produced
by a feedback system. This third signal acts as an input signal of controlled device.
This input signal to the device presents if there is a logical difference between
reference input signal and the output signal of the system. After the device achieves
27

its desired output, there will be no longer the logical difference between reference
input signal and reference output signal of the system. Then, the third signal produced
by comparing theses above said signals will not remain enough to operate the device
further and to produce a further output of the system until the next reference input
signal or command signal is applied to the system. Hence, the primary task of a
servomechanism is to maintain the output of a system at the desired value in the
presence of disturbances.

3.1.3.2 Working Principle of Servo Motor


A servo motor is basically a DC motor (in some special cases it is AC motor)
along with some other special purpose components that make a DC motor a servo. In
a servo unit, you will find a small DC motor, a potentiometer, gear arrangement and
an intelligent circuitry. The intelligent circuitry along with the potentiometer makes
the servo to rotate according to our wishes. As we know, a small DC motor will rotate
with high speed but the torque
Submitted by- Rahman Arifur 17DH052
generated by its rotation will not be enough to move even a light load. This is where
the gear system inside a servomechanism comes into the picture. The gear mechanism
will take high input speed of the motor (fast) and at the output, we will get an output
speed which is slower than original input speed but more practical and widely
applicable.

3.1.3.3 Categories of Servo Motor


Servo motors are classified into different types based on their application,
1. AC servo motor
2. DC servo motor
3. brushless DC servo motor
4. positional rotation
5. continuous rotation
6. linear servo motor
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 [2].
28

3.1.3.4 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
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 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.

3.1.3.5 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. motor mainly
involve in automation, robotics, CNC machinery, and other applications a high level
of precision and needful versatility.

3.1.3.6 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.

3.1.3.7 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.
29

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.

3.1.3.8. Linear Servo Motor


Linear servo motor is also similar the positional rotation servo motor is
discussed above, but with an extra gear 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.

3.1.3.9 Merits
1. If a heavy load is placed on the motor, the driver will increase the current to
the motor coil as it attempts to rotate the motor. Basically, there is no out-of-
step condition.
2. High-speed operation is possible.

3.1.3.10 Demerits
1. Since the servomotor tries to rotate according to the command pulses, but
lags behind, it is not suitable for precision control of rotation.
2. Higher cost.
3. When stopped, the motor’s rotor continues to move back and forth one
pulse, so that it is not suitable if you need to prevent vibration\

3.1.4 BREAD BOARD


A breadboard is a construction base for prototyping of electronics. Originally
it was literally a bread board, a polished piece of wood used for slicing bread. In the
1970s the solderless breadboard (AKA plug board, a terminal array board) became
available and nowadays the term "breadboard" is commonly used to refer to these.
"Breadboard" is also a synonym for "prototype". Because the solderless breadboard
does not require soldering, it is reusable. This makes it easy to use for creating
temporary prototypes and experimenting with circuit design. For this reason,
solderless breadboards are also extremely popular with students and in technological
education. Older breadboard types did not have this property. A stripboard
(veroboard) and similar prototyping printed circuit boards, which are used to build
semi-permanent soldered prototypes or one-offs, cannot easily be reused. A variety of
30

electronic systems may be prototyped by using breadboards, from small analog and
digital circuits to complete central processing units (CPUs).

FIG 3.5. BREAD BOARD

A modern solderless breadboard consists of a perforated block of plastic with


numerous tin plated phosphor bronze or nickel silver alloy spring clips under the
perforations. The clips are often called tie points or contact points. The number of tie
points is often given in the specification of the breadboard.
The spacing between the clips (lead pitch) is typically 0.1 in (2.54 mm). Integrated
circuits (ICs) in dual in-line packages (DIPs) can be inserted to straddle the centerline
of the block. Interconnecting wires and the leads of discrete components (such as
capacitors, resistors, and inductors) can be inserted into the remaining free holes to
complete the circuit. Where ICs are not used, discrete components and connecting
wires may use any of the holes.

3.1.5 Jumper Wire

Jump wires (also called jumper wires) for solderless bread boarding can be
obtained in ready-to-use jump wire sets or can be manually manufactured. The latter
can become tedious work for larger circuits. Ready to-use jump wires come in
different qualities, some even with tiny plugs attached to the wire ends. Jump wire
material for ready-made or homemade wires should usually be 22 AWG (0.33 mm2)
31

solid copper, tin-plated wire - assuming no tiny plugs are to be attached to the wire
ends. The wire ends should be stripped 3⁄16 to 5⁄16 in (4.8 to 7.9 mm). Shorter
stripped wires might result in bad contact with the board's spring clips (insulation
being caught in the springs). Longer stripped wires increase the likelihood of short-
circuits on the board. Needle-nose pliers and tweezers are helpful when inserting or
removing wires, particularly on crowded boards.

FIG 3.6 JUMP WIRES

Differently colored wires and color-coding discipline are often adhered to for
consistency. However, the number of available colors is typically far fewer than the
number of signal types or paths. Typically, a few wire colors are reserved for the
supply voltages and ground (e.g., red, blue, black), some are reserved for main
signals, and the rest are simply used where convenient.

3.1.5 9V Battery
The nine-volt battery, or 9-volt battery, is a common size of battery that was
introduced for the early transistor radios. It has a rectangular prism shape with
rounded edges and a polarized snap connector at the top. The nine-volt battery format
is commonly available in primary carbon-zinc and alkaline chemistry, in primary
lithium iron disulfide, and in rechargeable form in nickel-cadmium, nickel-metal
hydride and lithium-ion. Mercury-oxide batteries of this format, once common, have
not been manufactured in many years due to their mercury content. Most nine-volt
alkaline batteries are constructed of six individual 1.5 V LR61 cells enclosed in a
wrapper. These cells are slightly smaller than LR8D425 AAAA cells and can be used
in their place for some devices, even though they are 3.5 mm shorter. Carbon-zinc
32

types are made with six flat cells in a stack, enclosed in a moisture-resistant wrapper
to prevent drying. Primary lithium types are made with three cells.

Fig 3.7 9V Battery

3.1.6 LED Light-emitting diode


A light-emitting diode (LED) is a semiconductor light source that emits light
when current flows through it. Electrons in the semiconductor recombine with
electron holes, releasing energy in the form of photons. This effect is called
electroluminescence. The color of the light (corresponding to the energy of the
photons) is determined by the energy required for electrons to cross the band gap of
the semiconductor. White light is obtained by using multiple semiconductors or a
layer of light-emitting phosphor on the semiconductor device.
Appearing as practical electronic components in 1962, the earliest LEDs emitted low
intensity infrared light. Infrared LEDs are used in remote-control circuits, such as
those used with a wide variety of consumer electronics. The first visible-light LEDs
were of low intensity and limited to red. Modern LEDs are available across the
visible, ultraviolet, and infrared wavelengths, with high light output.
Early LEDs were often used as indicator lamps, replacing small incandescent bulbs,
and in seven-segment displays. Recent developments have produced high-output
white light LEDs suitable for room and outdoor area lighting. LEDs have led to new
displays and sensors, while their high switching rates are useful in advanced
communications technology.
33

LEDs have many advantages over incandescent light sources, including lower energy
consumption, longer lifetime, improved physical robustness, smaller size, and faster
switching. Light-emitting diodes are used in applications as diverse as aviation
lighting, automotive headlamps, advertising, general lighting, traffic signals, camera
flashes, lighted wallpaper and medical devices.
Unlike a laser, the color of light emitted from an LED is neither coherent nor
monochromatic, but the spectrum is narrow with respect to human vision, and
functionally monochromatic.

Fig 3.8 LED


3.1.6.1 Advantages
 Efficiency: LEDs emit more lumens per watt than incandescent light
bulbs.The efficiency of LED lighting fixtures is not affected by shape and size,
unlike fluorescent light bulbs or tubes.
 Color: LEDs can emit light of an intended color without using any color
filters as traditional lighting methods need. This is more efficient and can
lower initial costs.
 Size: LEDs can be very small (smaller than 2 mm2[118]) and are easily
attached to printed circuit boards.
 Lifetime: LEDs can have a relatively long useful life. One report estimates
35,000 to 50,000 hours of useful life, though time to complete failure may be
shorter or longer. Fluorescent tubes typically are rated at about 10,000 to
25,000 hours, depending partly on the conditions of use, and incandescent
34

light bulbs at 1,000 to 2,000 hours. Several DOE demonstrations have shown
that reduced maintenance costs from this extended lifetime, rather than energy
savings, is the primary factor in determining the payback period for an LED
product.
 Shock resistance: LEDs, being solid-state components, are difficult to damage
with external shock, unlike fluorescent and incandescent bulbs, which are
fragile.

3.1.6.2 Disadvantages
 Impact on insects: LEDs are much more attractive to insects than sodium-
vapor lights, so much so that there has been speculative concern about the
possibility of disruption to food webs.
 Use in winter conditions: Since they do not give off much heat in comparison
to incandescent lights, LED lights used for traffic control can have snow
obscuring them, leading to accidents.
 Thermal runaway: Parallel strings of LEDs will not share current evenly due
to the manufacturing tolerance in their forward voltage. Running two or more
strings from a single current source will likely result in LED failure as the
devices warm up. A circuit is required to ensure even distribution of current
between parallel strands.

3.2. Implementation Program


The flow chart and circuit diagram of Smart Garbage bin are as follow;
35

3.2.1 Flow Chart stage 1 of Smart Garbage Bin

Start

Repeat

NO
Sensing the object
by sensor 1

YES

If the object have at front of


garbage bin

Open the Bin

Repeat

Fig.3.9 Flow chart stage 1


36

3.2.2 Flow Chart stage 2 of Garbage Bin

Start

Repeat

NO
Check whether
Garbage bin is full
or not by sensor 2

YES

LED is ON

Fig 3.10 Flow Chart Stage 2


37

3.2.3 Circuit Diagram of Smart Garbage Bin3.1.2. L298N Motor Driver

The L298N is a dual H-bridge motor driver which allows speed and direction
control of two DC motors at the same time as shown in figure 3.3. The module can
drive DC motors that have voltages between 5 and 35V, with a peak current up to 2A.

Figure 3.3. L298N Motor Driver

Let’s take a closer look at the pin out of L298N module and explain how it
works as show in figure 3.3. The L298N is a high voltage, high current dual H bridge
driver designed to accept standard TIL logic levels and drive inductive loads such
relays, solenoid, DC and stepping motors. The module has two screw terminal blocks
for the motor A and B and another screw terminal block for the ground pin, the VCC
for motor and a 5V pin which can either be an input or output. This depends on the
voltage used at the motors VCC. The module has an on board 5V regulator which is
either enabled or disabled using a jumper because those voltages will cause damage to
the onboard 5V regulator. In this case, the 5V pin will be used as input as need
connect it to a 5V power supply in order the IC to work properly. The user can note
that this IC makes a voltage drop of about 2V. So for example if that use a 12V power
supply, the voltage at motors terminals will be about 10V which means that won’t be
able to get the maximum speed out of 12V DC motor as shown in figure 3.4.

Figure 3.4. Specification of L298N Motor Driver

The output 1 and 2 pins are used for controlling the rotation direction of the
motor A and the output 3 and 4 pins for the motor B. Using these pins that actually
control the switches of the H-bridge inside the L298N IC. If output 1 is LOW and
output 2 is HIGH the motor will move forward, and vice versa, if output 1 is HIGH
and output 2 is LOW the motor will move backward. In case both inputs are same
either LOW or HIGH the motor will stop. The same applies for the outputs 3 and 4
and the motor B.

3.1.2.1. Pins number

Output 1 : Motor A

Output 2 : Motor A

Output 3 : Motor B

Output 4 : Motor B
38

GND : Ground

5V : 5V Input

EnA : Enables PWM


signal for Motor A

ln1 : Enable Motor A

ln2 : Enable Motor A

ln3 : Enable Motor B

ln4 : Enable Motor B

EnB : Enables PWM signal for


Motor B

3.1.2.2. Specification of L298N motor driver

Double H bridge Drive Chip : L298N

Logical Voltage : 5V – 35V

Logical Current : 0.36mA- 2A

Max power : 25V

Min power : 5V

Dimensions : 43x43x26 mm

Weight : 26g

3.1.2.3. Advantages and disadvantages of motor drive system

As differential drive type is


used and control by using an Arduino Uno microcontroller, it has the following
advantages and disadvantages.

Advantages of motor drive system

The followings are the


advantages of motor drive system.
39

Simple to control

High technology of Path determination using Arduino Uno

Low cost and safety

Reduce complexity of hardware

Promote various control algorithms of software implementation

Suitable with all other desire application of wheel mobile robot

Disadvantages of motor drive system

The main disadvantages of


this system that designed in this research are the fact that it doesn’t drive should be
used as optimum designed because of the following facts;

Minimum safety of driving state to control three wheels

All steering and rotating angle can be control by only a motor

Optimum Synchronization state

But this Synchronous


Mechanism can’t make effects to Electronically Control

system in the optimum state, therefore simple mechanism but high implementation of
electronic software technique is chosen. These facts make to choose differential drive
mechanism design.

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