Sie sind auf Seite 1von 119

Automatic PCB Soldeing

CHAPTER 1

INTRODUCTION

The aim of this project is the design and development of an automated PCB

soldering machine. Soldering is a method of applying an alloy of lower

melting point to join metal parts together. The process of soldering requires

skilled labors and lot of time for the proper working of PCB . Our project

will demonstrate a PCB being soldered using an XYZ plotter through the use

of soldering iron setup.

Soldering is a process in which two or more items (usually metal) are joined together

by melting and putting a filler metal (solder) into the joint, the filler metal having a

lower melting point than the adjoining metal.. The process of soldering requires some

skillest to correctly implement. Not everyone has the time and/or patience to learn the

art of precise soldering. We propose the creation of a PCB soldering machine that

will fully automate the process. The machine will include an XY plotter which is

actuated by stepper motors, for correct positioning of the PCB to be soldered. Then,

the soldering arm extension fixed over the XY table will actuate and solder the

junction. All stepper motors used in the X-Y plotter and soldering arm extension are

driven through an arduino via the motor driver for increased precision and stability.

The soldering arm extension consists of two sections, a temperature monitored

soldering iron and a solder feeder. Thus, the basic principle is to correctly gauge the

1
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

position to be soldered, move the XY table over to those coordinates through stepper

actuation, and then wait for the soldering arm extension to solder the junction.

1.2 SCOPE OF THE WORK

Soldering is a labour intensive process which requires lot of time and hardwork
for the appropriate working of the PCB circuit. It requires lot of manual power.
There are chances of lot of errors when doing it manually which leads to lot of
dilemmas in the working of the device or circuit. The proposed system helps in
reducing these issues

CHAPTER 3

BLOCK DIAGRAM DESCRIPTION

3.1 OVERVIEW

This chapter deals with the block diagram of this project. The section 3.2
gives the block diagram and explanation of block diagram is given in section
3.3.The various blocks in the diagram are the microcontroller, fire sensor, motor
driver, dc motors, ultrasonic sensor, dc pumps, Bluetooth module, and power
supply. The PIC16F877A microcontroller is used in the project since it has large
memory and it acts as the heart of the project. On land, the fire sensors detect the
position of the fire and sends interrupt signal to the microcontroller and controls
the dc pump to pump out water automatically thus extinguishing the fire. On
2
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

water, the robot is moved in the direction of wastes manually and a shaft is used to
collect floating wastes and is deposited into a bin. Bluetooth module is used for
controlling the movement of the robot.

3.2 BLOCK DIAGRAM

PERIPHERALS
SOLAR PANEL LIPO VOLTAGE
AND WIND BATTERY REGULATOR
TURBINE

Fig 3.1: Block diagram of power suppply section

MOTOR

FIRE SENSOR MOTOR


DRIVE

FIRE SENSOR
PIC MOTOR
MICROCONTROLLER

PUMP PUMP

Fig 3.2: Block diagram of land section

MOTOR

3
Dept. of ECE Prime College of Engin eering
ULTRASONIC
Automatic
MODULEPCB Soldeing MOTOR
TRANSMITTER DRIVE

RECEVIER
MOTOR

PIC
MICROCONTROLLER

MOTOR
DRIVER MOTOR
MOBILE BLUETOOTH

COLLECTOR

Fig 3.3: Block diagram of water section

3.3 BLOCK DIAGRAM EXPLANATION

3.3.1 MICROCONTROLLER

Microcontrollers are destined to play an increasingly important role in


revolutionizing various industries and influencing the day to day life more
strongly than one can imagine. Since its emergence in the early 1980's the
microcontroller has been recognized as a general purpose building block for
intelligent digital systems. It is found using diverse area, starting from simple
children's toys to highly complex spacecraft. Because of its versatility and many
advantages, the application domain has spread in all conceivable directions,
making it ubiquitous. As a consequence, it has generate a great deal of interest
and enthusiasm among students, teachers and practicing engineers, creating an
acute education need for imparting the knowledge of microcontroller based
system design and development. It identifies the vital features responsible for
their tremendous impact, the acute educational need created by them and
provides a glimpse of the major application area. The microcontroller contains
4
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

full implementation of a standard microprocessor, ROM, RAM, I/0, clock,


timers, and also serial ports. Microcontroller also called "system on a chip" or
"single chip microprocessor system" or "computer on a chip". A microcontroller
is a Computer-On-A-Chip, or, if you prefer, a single-chip computer. Micro
suggests that the device is small, and controller tells you that the device' might be
used to control objects, processes, or events. Another term to describe a
microcontroller is embedded controller, because the microcontroller and its
support circuits are often built into, or embedded in, the devices they control.
The microcontroller that has been used for the project is from ATMEL series.
With ease-of-use, low power consumption, and high level of integration in mind,
Atmel AVR 8 & 32-bit microcontrollers complement Atmel's ARM
microcontrollers and microprocessors to deliver a unique combination of
performance, power efficiency and design flexibility. Optimized to speed time-
to-market, they are based on the industry's most code-efficient architecture for C
and assembly programming. No other microcontrollers deliver more computing
performance with better power efficiency. The ArduinoUNO is a microcontroller
based on the ATmega328. It has 14 bit digital input output pins of which 6 can
be used as PWM outputs, 6 analog pins 16MHz ceramic resonator.

5
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

3.3.1.1PIN DIAGRAM OF MICROCONTROLLER


The pin diagram for ATmega 328 is shown in fig 2.4

FEATURES

High Performance

Low Power Atmel®AVR® 8-Bit Microcontroller Family

• Advanced RISC Architecture

– 131 Powerful Instructions

– Most Single Clock Cycle Execution

– 32 x 8 General Purpose Working Registers


6
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

– Fully Static Operation

– Up to 20 MIPS Throughput at 20MHz

– On-chip 2-cycle Multiplier

• High Endurance Non-volatile Memory Segments

– 32KBytes of In-System Self-Programmable Flash program Memory

– 1KBytes EEPROM

– 2KBytes Internal SRAM

– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM

– Data Retention: 20 years at 85°C/100 years at 25°C(1)

– Optional Boot Code Section with Independent Lock Bits

• In-System Programming by On-chip Boot Program

• True Read-While-Write Operation

– Programming Lock for Software Security

• Atmel® QTouch® Library Support

– Capacitive Touch Buttons, Sliders and Wheels

– QTouch and QMatrix® Acquisition – Up to 64 sense channels

• EEPROM (ATmega48PA/88PA/168PA/328P)

– 512/1K/1K/2K Bytes Internal SRAM (ATmega48PA/88PA/168PA/328P)

– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM

 Data retention: 20 years at 85°C/100 years at 25°C(1)


–Optional Boot Code Section with Independent Lock Bits In-System
Programming by On-chip Boot Program True Read-While-Write Operation

7
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

– Programming Lock for Software Security


• PERIPHERAL FEATURES
– Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode
– Real Time Counter with Separate Oscillator
– Six PWM Channels
– 8-channel 10-bit ADC in TQFP and QFN/MLF package Temperature
Measurement
– 6-channel 10-bit ADC in PDIP Package Temperature Measurement
– Programmable Serial USART
– Master/Slave SPI Serial Interface
– Byte-oriented 2-wire Serial Interface (Philips I2C compatible)
– Programmable Watchdog Timer with Separate On-chip Oscillator
– On-chip Analog Comparator
– Interrupt and Wake-up on Pin Change
• SPECIAL MICROCONTROLLER FEATURES
– Power-on Reset and Programmable Brown-out Detection
– Internal Calibrated Oscillator
– External and Internal Interrupt Sources
– Six Sleep Modes: Idle, ADC Noise Reduction, Power-save,
Power-down, Standby, and Extended Standby
• I/O AND PACKAGES
– 23 Programmable I/O Lines
– 28-pin PDIP, 32-lead TQFP, 28-pad QFN/MLF and 32-pad QFN/MLF
• OPERATING VOLTAGE:
– 1.8 - 5.5V for ATmega48PA/88PA/168PA/328P
• TEMPERATURE RANGE:
– -40ºC to 85ºC • SPEED GRADE:
– 0 - 20 MHz @ 1.8 - 5.5V
• LOW POWER CONSUMPTION AT 1 MHZ, 1.8V, 25ºC FOR ATMEGA48PA/88PA/
168PA/328P:
– Active Mode: 0.2mA
– Power-down Mode: 0.1 µA

8
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

– Power-save Mode: 0.75 µA (Including 32 kHz RTC)

3.3.1.2 OLED

An organic light-emitting diode (OLED) is an LED in which the emissive electro


luminescent layer is a film of organic compound that emits light in response to an
electric current. This layer of organic semiconductor is situated between two
electrodes; typically, at least one of these electrodes is transparent. OLEDs are used
to create digital displays in devices such as television screens, computer monitors ,
portable systems such as mobile phones handheld game consoles and PDAs. A
major area of research is the development of white OLED devices for use in solid-
state lighting applications.

There are two main families of OLED: those based on small molecules and those
employing polymers. Adding mobile ions to an OLED creates a light-emitting
electrochemical cell (LEC) which has a slightly different mode of operation. An OLED
display can be driven with a passive-matrix (PMOLED) or active-matrix (AMOLED)
control scheme. In the PMOLED scheme, each row (and line) in the display is
controlled sequentially, one by one,[4] whereas AMOLED control uses a thin-film
transistor backplane to directly access and switch each individual pixel on or off,
allowing for higher resolution and larger display sizes.

An OLED display works without a backlight; thus, it can display deep black levels and
can be thinner and lighter than a liquid crystal display (LCD). In low ambient light
conditions (such as a dark room), an OLED screen can achieve a higher contrast
ratio than an LCD, regardless of whether the LCD uses cold cathode fluorescent
lamps or an LED backlight.

FEATURES

• Type: graphic •

Display format: 128 x 64 dots

• Built-in controller: SSD1306BZ

• Duty cycle: 1/64

• +3 V power supply

9
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

• Interface: 6800, 8080, serial, and I2C

3.3.2 LIQUID CRYSTAL DISPLAY

Liquid crystal displays (LCDs) have materials which combine the properties
of both liquids and crystals. Rather than having a melting point, they have a
temperature range within which the molecules are almost as mobile as they would be
in a liquid, but are grouped together in an ordered form similar to a crystal.

An LCD consists of two glass panels, with the liquid crystal material sand
witched in between them. The inner surface of the glass plates are coated with
transparent electrodes which define the character, symbols or patterns to be
displayed,polymeric layers are present in between the electrodes and the liquid
crystal, which makes the liquid crystal molecules to maintain a defined orientation
angle.One each polarizer are pasted outside the two glass panels. This polarizer would
rotate the light rays passing through them to a definite angle, in a particular direction

When the LCD is in the off state, light rays are rotated by the two polarizer
and the liquid crystal, such that the light rays come out of the LCD without any
orientation, and hence the LCD appears transparent.When sufficient voltage is applied
to the electrodes, the liquid crystal molecules would be aligned in a specific direction.
The light rays passing through the LCD would be rotated by the polarizer, which
would result in activating / highlighting the desired characters.

The LCD’s are lightweight with only a few millimeters thickness. Since the
LCD’s consume less power, they are compatible with low power electronic circuits,

10
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

and can be powered for long durations. The LCDs used exclusively in watches,
calculators and measuring instruments are the simple seven-segment displays, having
a limited amount of numeric data.

Fig 3.5: Liquid Crystal Display

3.3.3 DC MOTOR
DC motor used in this project provides the rotating mechanism to the robot
according to the need of project. There are five motors employed in this project
with a DC voltage of 5V for operation. Four motors are connected to the upper
wheels thus working as a rack and pinion mechanism for lower wheels. One
motor for controlling the movement of shaft by which floating trashes are
collected. The motor driver IC L293D provides the required power for the motors.
.

11
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

Fig 3.6: DC motor

3.3.4 DC PUMP

A pump is a device that moves fluids (liquids or gases), or sometimes slurries, by


mechanical action. Pumps operate by some mechanism
(typically reciprocating or rotary), and consume energy to perform mechanical
work by moving the fluid. The DC pump used here sucks in water and stores it in
the tank to be used during fire extinguishing.

Fig: 3.7 Dc Pump

3.3.5 SUBIMMERSIBLE PUMP

A subimmersible pump is a pump that is able to be placed underwater


and still carry out its intended purpose. It pushes water to the surface instead of
sucking water inside. Once fire is detected as per program the pump pushes the
water out through the tube to extinguish fire.

12
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

Fig 3.8 Subimmersible dc pump

FIRE SENSOR

Flame sensor is most sensitive to ordinary light that is why its reaction is
generally used as flame alarm purposes. This module can detect flame or
wavelength in 760 nm to 1100 nm range of light source. Small plate output
interface and single-chip can be directly connected to the microcomputer IO port.
The sensor and flame should keep a certain distance to avoid high temperature
damage to the sensor. The shortest test distance is 80 cm, if the flame is bigger,
test it with farther distance. The detection angle is 60 degrees so the flame
spectrum is especially sensitive

Fig 3.9: Fire sensor

13
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

3.3.5 ULTRASONIC SENSOR

The ultrasonic sensor is used for distance measurements from obstacles.


The sensor displays the actual distance from the obstacles in LCD. It is used to
detect the presence of obstacles while the robot is moving on water.

Fig 3.10: Ultrasonic sensor

3.3.6 BLUETOOTH MODULE

This is a great little board containing an EGBT-046S Bluetooth module,


voltage regulation, logic level conversion and an LED activity indicator. These
modems work as a serial (RX/TX) connection and a great wireless replacement
for serial cables. Any serial stream from 1200 to 115200bos can pass seamlessly
from computer to the target.

Figure3.11: Bluetooth module

14
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

3.3.7 POWER SUPPLY

The circuit to work has to be provided with the power and this power is
supplied to the other blocks through the power supply section. The power is

generated through solar and wind energy from the same devices using solar panel
and wind turbine. The generated power is stored in the LIPO battery and the
power is regulated by the voltage regulator and supplied to all peripherals.

Fig 3.12 solar panel and wind turbine

15
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

CHAPTER 4

CIRCUIT DIAGRAM DESCRIPTION

4.1 OVERVIEW

This chapter includes the circuit design, circuit diagram and circuit diagram
description of this project. The heart of the circuit is PIC16F877A
microcontroller. It is an 8 bit CMOS microcontroller with flash program memory.
It is a RISC processor with high performance, fully static design. The controller
has 4Kx14 words of FLASH program memory and 192x8 bytes of data memory
(RAM). The 5V supply is given to the VDD and the VSS pin of the
microcontroller is grounded. 4MHz crystal oscillator is used in the controller.

The section 4.2 shows the circuit design, the section 4.3 shows the circuit
diagram and the subsections in the section 4.4 explain the different parts of the
circuit.

4.2 CIRCUIT DESIGN

4.2.1 POWER SUPPLY

Here we require a 5V Dc voltage for all components. LIPO battery


employed for storage of power from solar panel and wind turbine.

4.2.2 VOLTAGE REGULATOR (LM7805)

Constant power of 5V are provided using voltage regulators. Here we use 78xx
series regulators. The regulated voltage is supplied to all other peripherals .

16
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

LM7805

Fig 4.1 voltage regulator 7805

Current rating 1A

Output voltage range= 4.8V to 5.2V

4.2.3 CRYSTAL OSCILLATOR


When using resonators with the ATMEL AVR, it is necessary to apply
(external) capacitors according to the requirements of the facilitated resonator.
When using the clock option “ext. crystal oscillator”, crystals with a nominal
frequency from 400 KHz and up can be used. For these standard “high” frequency
crystals the recommended capacitor value is in the range 12pF - 22pF.
C1 and C2 should always be equal .The crystal oscillator circuit is shown in
fig 4.2.

Figure 4.2: Crystal oscillator circuit

17
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

4.2.4 BC547 TRANSISTOR

Fig 4.3 BC547 transistor package

For switching action of pumps BC547 transistor is employed. From datasheet


Ic= 2mA, hfe= 400
VCE= Ic/hfe= 2mA/400= 5V
For proper biasing we provide Rg=2KΩ
Collector power dissipation
Pc= VCE * Ic^2= 500 mW
Junction temperature Tj= 150ᴼC.
Current gain bandwidth for VCE = 5V and Ic-= 10mA( in sat)
Ft=100MHz.
4.2.5 MOTOR DRIVER L293D

Fig 4.4 Motor driver and its connection

18
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

Maximum voltage= 4.5 to 36V

For V=5V and R=10k we have I= 500ua (max= 600mA)

Maximum temperature =150ᴼC, operating range 0 to 70ᴼC.

4.2.6 CAPACITOR

Fig 4.5 capacitor

Ripple factor Y=1/(4˩3fRC)

f=50Hz.

Resistance R=V/I=10K.

Y=Vac /V.

Vac =Vr/2˩3, Vr=Vmax-Vmin=0.4V.

V=5V,Y=(0.4/2˩3)/5=0.072.

Thus C=1856µF,1000µF is chosen.

4.2.7LED

Vf=2.5V, If=2mA

Total current=60+20=80mA

Ic=80mA

19
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

4.3 CIRCUIT DIAGRAM

Figure 4.6 shows the complete circuit diagram of the project.

FIRE SENSOR

FIRE SENSOR U3:A

8
1.0 RV4

27%
10k 2
1
3
U2:B
8

1.0 RV3
27%

LM358

4
10k 6
7
5 LCD1
LCD2 R4
LM016L
10K
LM358
4

R3
10K

R9 U5
VDD
VSS

VEE

16 8
RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
E

10k
2 3
5v IN1 VSS VS OUT1
1
2
3

4
5
6

7
8
9
10
11
12
13
14

7 6
IN2 OUT2
1
ultrasonic sensor 1 EN1

Tx Rx R5 9 DC MOTOR 1 , 2, 3 & 4
EN2
10k 10 11
IN3 OUT3
15 14
IN4 GND GND OUT4
RT1 R2
-tc 10k 10k L293D
C1
RT1 U1
-tc 10k 22pF
4 MHz
13 33
R1
X1 OSC1/CLKIN RB0/INT U5
14 34 10k 16 8
OSC2/CLKOUT RB1
C2 35
CRYSTAL RB2
2 36 2 3
R11 RA0/AN0 RB3/PGM IN1 VSS VS OUT1
3 37 7 6
10k RA1/AN1 RB4 IN2 OUT2
4 38 1
22pF
5
RA2/AN2/VREF-/CVREF RB5
39
R6 EN1
RA3/AN3/VREF+ RB6/PGC
R11 6
RA4/T0CKI/C1OUT RB7/PGD
40
R810k
10k 7 9
RA5/AN4/SS/C2OUT EN2
15 10k 10 11
RC0/T1OSO/T1CKI IN3 OUT3
8 16 15 14
RE0/AN5/RD RC1/T1OSI/CCP2 IN4 GND GND OUT4
9 17
RE1/AN6/WR RC2/CCP1
10 18
RE2/AN7/CS RC3/SCK/SCL
23
R7 L293D
U5 RC4/SDI/SDA
16 8 1 24 10k
MCLR/Vpp/THV RC5/SDO
25
RC6/TX/CK
2 3 26
IN1 VSS VS OUT1 RC7/RX/DT
7 6
IN2 OUT2
1 19
EN1 RD0/PSP0 BLUE TOOTH MODULE
20
RD1/PSP1
21
RD2/PSP2
9 22
EN2 RD3/PSP3
10 11 27
IN3 OUT3 RD4/PSP4
15 14 28
IN4 GND GND OUT4 RD5/PSP5
29
RD6/PSP6
30
RD7/PSP7
L293D
PIC16F877A
8V
8V
RXD

TXD

RTS

CTS

DC PUMP 1 DC PUMP 2
R12
R14 10K R12
10K 10K
WIND TURBINE
RESET
SOLAR PANEL Q1
BC547 Q1
BC547

R10
10K R10
10K
12v DC

Power supply
1

U2
VI

7805
2
GND
5v DC
VO
3

C4
1000u

Fig 4.6 Circuit diagram of solar and wind powered multipurpose Amphibot

20
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

4.4 CIRCUIT DIAGRAM EXPLANATION

4.4.1 PIC16F877A

The microcontroller board is connected with reset pin, crystal oscillator circuit,
Bluetooth module, sensors, motors, pumps etc. The reset pin MLCB is the one
which is an external interrupt is designed to reset the program. And the crystal
oscillator circuit is the one used to generate the pulses to here 4MHz crystal is
used which generates pulses up to 4000000 Hz frequencies. The PIC16F877A is a
low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC
architecture. The PIC16F877A contains 16/32K bytes On-chip In-System
Reprogrammable Flash memory for program storage. The DIP of PIC16F877A is
shown in figure 4.8.

Figure 4.7: PIC16F877A


The PIC16F877A microcontroller is available in 40/44/28 pin packages. It
has 5 I/O ports namely PORTA, PORTB, PORTC, PORTD and PORTE. Each
port can be selected as an input and output ports by using TRIS commands. Out of
40 pins 7 pins are used for its own functions such as VDD, VSS, GND, RESET
and CLK. Besides these functions the PIC16F877A can perform many special
functions such as RX, TX, ADC etc.
The PIC has a maximum voltage rating of 5V DC, that can withstand. So
5V is given at its Vcc pins(32&11). The operation frequency is 20MHz. So a
crystal oscillator is connected to its oscillator terminals (OSC1-13thpin & OSC-

21
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

14th pin) and grounded through a capacitor of 22pF.MLCB pin is connected to


RESET button for resetting the program if any error occurred.

4.4.1.1 I/O PORTS


Some pins for these I/O ports are multiplexed with an alternate function
for the peripheral features on the device. In general, when a peripheral is enabled,
that pin may not be used as a general purpose I/O pin.

4.4.1.1.1 PORTA AND TRISA REGISTER

PORTA is a 6-bit wide bi-directional port. The corresponding data


direction register is TRISA. Setting a TRISA bit (=1) will make the corresponding
PORTA pin an input, i.e., put the corresponding output driver in a High-
impedance mode. Clearing a TRISA bit (=0) will make the corresponding PORTA
pin an output, i.e., put the contents of the output latch on the selected pin. Reading
the PORTA register reads the status of the pins whereas writing to it will write to
the port latch. All write operations are read-modify-write operations.. Other
PORTA pins are multiplexed with analog inputs and analog VREF input. The
operation of each pin is selected by clearing/setting the control bits in the
ADCON1 register (A/D Control Register1). The TRISA register controls the
direction of the RA pins, even when they are being used as analog inputs. The
user must ensure the bits in the TRISA register are maintained set when using
them as analog inputs. One motor driver is connected to pin RA2 and RA5 for
controlling the movements of shaft for collection of waste. The trigger pin of
ultrasonic sensor is connected to pin RA4

22
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

Table 4.1: Port A functions

4.4.1.1.2 PORTB AND TRISB REGISTER

PORTB is an 8-bit wide bi-directional port. The corresponding data


direction register is TRISB. Setting a TRISB bit (=1) will make the corresponding
PORTB pin an input, i.e., put the corresponding output driver in a hi-impedance
mode. Clearing a TRISB bit (=0) will make the corresponding PORTB pin an
output, i.e., put the contents of the output latch on the selected pin. Each of the
PORTB pins has a weak internal pull-up. A single control bit can turn on all the
pull-ups. This is performed by clearing bit RBPU (OPTION_REG<7>). The weak
pull-up is automatically turned off when the port pin is configured as an output.
The pull-ups are disabled on a Power-on Reset. Four of PORT B’s pins,
RB7;RB4, have an interrupt on change feature. Only pins configured as inputs can
cause this interrupt to occur (i.e. any RB7:RB4 pin configured as an output is
excluded from the interrupt on change comparison

The interrupt on change feature is recommended for wake-up on key


depression operation and operations where PORTB is only used for the interrupt
on change feature. Two motor driver for controlling the wheel movements are
connected to the pins RB0-RB3. The echo pin of ultrasonic sensor is connected to
RB4 so that other pins cannot be used for any connections since it is an on
interrupt change pin.

23
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

Table 4.2: Port B functions

4.4.1.1.3 PORTC AND TRISC REGISTER

PORTC is an 8-bit wide bi-directional port. The corresponding data


direction register is TRISC. Setting a TRISC bit (=1) will make the corresponding
PORTC pin an input, i.e., put the corresponding output driver in a high-impedance
mode. Clearing a TRISC bit (=0) will make the corresponding PORTC pin an
output, i.e., put the contents of the output latch on the selected pin. Two flame
sensors for detecting fire( UV and IR radiations) are connected to pins RC0 and
RC1 of PORT C. On detection of fire the microcontroller activates the pump for
extinguishing turning on the transistor. The transistor is connected to pin RC2.

Table 4.3: Port C functions

24
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

4.4.1.1.4 PORTD AND TRISD REGISTER

PORT D is an 8-bit port with Schmitt Trigger input buffers. Each pin is
individually configurable as an input or output. The 7 pins of PORTD are used as
data pin and are connected to LCD data pins. It can be used as both input/output
data pins.

Table 4.4: Port D functions

4.4.1.1.5 PORTE AND TRISE REGISTER


PORTE has three pins RE0/RD/AN5, RE1/WR/AN6 and RE2/CS/AN7,
which are individually configurable as inputs or outputs. These pins have Schmitt
Trigger input buffers. PORTE pins are multiplexed with analog inputs. When
selected as an analog input, these pins will read as '0's. TRISE controls the
direction of the RE pins, even when they are being used as analog inputs. The user
must make sure to keep the pins configured as inputs when using them as analog
inputs.

25
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

Table 4.5: Port E functions

4.4.3 POWER SUPPLY


The microcontroller is powered using solar and wind energy. Solar cells convert
the solar energy into electricity. Wind energy is the use of air flow through wind
turbines to mechanically power generators for electricity.
Silicon is a type of semiconductor, meaning that it shares some of the
properties of metals and some of those of an electrical insulator, making it a key
ingredient in solar cells. Sunlight is composed if miniscule particles called photon,
which radiate from the sun as these hit the silicon atoms of the solar cell, which
transfer their energy to loose electrons,knocking them clean off the atoms. Freeing
up electrons is however only half of the work of a solar cell. It then needs to herd
these stray electrons into an electric current. For creating an imbalance silicon
atoms are arranged together in a tightly bound structure thus creating p-type and
n-type structures. As the photons smash the electrons of silicon the field drives
them along in an orderly manner thus providing the electric current.
A wind electric system is made up of a wind turbine mounted on the
robot to provide better access to stronger winds. Wind turbines convert the kinetic
energy of the wind and converts it into a rotary motion. Most small wind turbines
manufactured today are horizontal-axis, upwind machines that have two or three
blades.

26
Dept. of ECE Prime College of Engin eering
Automatic PCB Soldeing

4.4.3.1 VOLTAGE REGULATOR

A voltage regulator is a device/IC which takes in a higher voltage and


steps it down to a lower voltage (DC-DC). For the purposes of the robotics and
other open source projects on this site, we will look into simple voltage regulators
like the 78xx series.

7805 is a 5V regulator. It can take as an input of almost up to 35V (refer


datasheet) and give a constant output of 5V. This does not mean that we give a
35V to input and expect it to power all 5V devices! As pointed out in previous
post, current is the important factor that determines the performance. Usually the
78xx series can source a maximum of 1A. Again, this does not mean that we can
give a 35V 1A as input and expect a constant 5V 1A output. 5V 1A generate
around 5W of power. This can heat the device to such an extent that it damages
the device! Therefore, the maximum range of voltage input can be around 7V to
12V to the 7805. The capacitors are to filter out any spikes in the current or
voltage that might occur by using devices like high power motors.

27
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

CHAPTER 5

PCB DESIGN
5.1 OVERVIEW

The first step of assembling is to procure a printed circuit board. The fabrication of
the program counter plays a crucial role in the electronic field. The success of a circuit
also depends on the PCB. As far as cost is concerned the 25% of total cost is gone for
PCB design and fabrication.
We are using a microcontroller based system that handles high frequencies.
In the high frequency circuit the data may be easily violated in the PCB due to
physical parameters. This is the track capacitance and inductance can cause the cross
talk in the buses. Also unwanted noise can be induced into supply rails and from there
it can affect the total response.
Design of PCB is concerned as the last step of electronic circuit design as
well as first step in the production of PCBs. The design of PCB consists of designing
of the layout followed by the generation of the art work. EXPRESS PCB is a powerful
tool for designing electronic circuit’s diagrams.

5.1.1 PROCESSING THE FILM

The layout is printed in a butter paper using a laser printer. The layout is
transferred to copper clad sheet using the screen print procedure. First a negative
screen of the layout is prepared with the help of a professional screen printer. The
copper clad sheet is kept under the screen. The screen printing ink is poured on the
screen and brushed through the top of the screen. The printed board is kept under
shade for few hours till the ink become dry. Etching medium is prepared with the un-
hydrous ferric chloride and water. The printed board is kept in this medium till the

28
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

exposed copper dissolves in the solution completely. After that the board is taken out
and rinsed in flowing water under a tap. The ink is removed with the help of NC
thinner. The board is coated with soldering in order to prevent oxidation.
Another screen, which contains component side layout, is prepared and the same is
printed on the component side of the board. A paper epoxy laminate is used in the
board.

5.1.2 STANDARD REQUIREMENTS

The minimum conductor width of finished PCB shall not be less than
0.05mm for signal and 0.4mm for power line. The standard ratio is taken as 1:1, 5:2
for signal power and ground respectively.

5.1.3 CLEANING

Surface of copper clad may contain oxides greases, oils or solid. They should
be removed by the following procedure.
 Wipe with cotton wool soaked with tricolor ethylene.
 Dip in 10% HCL solution at room temperature.
 Scrap with powder.
 Rinse with chlorine free water.

5.1.4 ARTWORK TRANSFER

Art work transfer can be done in many ways and the procedure used in work is
named fabrication process, usually used methods are:
 Silk screen printing.
 Photographic method.
 Direct method.

29
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

First methods are used for industrial and professional applications. In direct method
artwork is transferred to clad sheet in 1:1 ratio using paint or permanent ink. This
method is used where a single PCB is needed.

5.1.5 ETCHING

Etching is the process of removing unwanted copper from the processed


board using etching solution. For this the PCB is dipped into the etching solution.
Usually ferric chloride solution is used. It is stirred for the speedy action. After
etching the board is cleaned using is propylene alcohol.

5.1.6 DRILLING

The holes for mounting components are drilled using a high speed of drilling
machine. The size of the holes to drill will be specified during the layout designing
depending upon the component lead diameter. For drilling we use the mm drill bit.

5.1.7 VARNISH COATING

If the board is unprotected copper oxides are formed over the conductor and
it affects arability and neatness of the board. For this insulation coating such as
varnish can be used.

5.3 PCB DESIGNING

A printed circuit board has pre-designed copper tracks on a conducting sheet. The
pre-defined tracks reduce the wiring thereby reducing the faults arising due to lose
connections. One needs to simply place the components on the PCB and solder them.

Materials required:

 Over Head Projector sheet (known as OHP sheets) or a wax paper.

 Laser Printer.
30
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

 Electric iron.

 Steel wool.

 Two plastic trays.

 Copper board/ PCB (eg: paper phenolic, glass epoxy, FR4, FR10, etc.)

 Black permanent marker.

 Etching solution (Ferric chloride).

 Drill machine.

Step 1: Prepare a layout of the circuit on any commonly used PCB designing
software. A layout is a design which interconnects the components according to the
schematic diagram (circuit diagram). Take a mirror image print of the layout on the
OHP sheet using a laser printer. Make sure that the design is correct with proper
placement of the components.

Fig5.1: Step1

Step 2: Cut the copper board according to the size of layout. A copper board is the
base of a PCB, it can be single layer, double layer or multi-layer board.
Single layer copper board has copper on one side of the PCB, they are used to make
single layer PCBs, it is widely used by hobbyist or in the small circuits. A double
layer copper board consists of copper on both the sides of the PCB. These boards are
generally used by the industries. A multilayer board has multiple layers of copper they
are quite costly and mainly used for complex circuitries like mother board of PC.

31
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

Fig 5.2: Step 2

Step 3: Rub the copper side of PCB using steel wool. This removes the top oxide
layer of copper as well as the photo resists layer if any.

Fig 5.3: Step 3

Step 4: Place the OHP sheet (wax paper) which has the printed layout on the PCB
sheet. Make sure that the printed/mirror side should be placed on the copper side of
PCB.

Fig 5.4: Step 4

32
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

Step 5: Put a white paper on the OHP sheet and start ironing. The heat applied by the
electric iron causes the ink of the traces on the OHP sheet to stick on the copper plate
exactly in the same way it is printed on the OHP sheet. This means that the copper
sheet will now have the layout of the PCB printed on it. Allow the PCB plate to cool
down and slowly remove the OHP sheet. Since it is manual process it may happen
that the layout doesn’t comes properly on PCB or some of the tracks are broken in
between. Use the permanent marker and complete the tracks properly.

Fig 5.5: Step 5

Step 6: Now the layout is printed on PCB. The area covered by ink is known as the
masked area and the unwanted copper, not covered by the ink is known as unmasked
area. Now make a solution of ferric chloride. Take a plastic box and fill it up with
some water. Dissolve 2-3 tea spoon of ferric chloride power in the water. Dip the PCB
into the Etching solution or approximately 30 mins. The Fecl3 reacts with the
unmasked copper and removes the unwanted copper from the PCB. This process is
called as Etching.

33
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

Fig 5.6: Step 6

Step 7:Take out the PCB wash it in cold water and remove the ink by rubbing it with
steel wool. The remaining area which has not been etched is the conductive copper
tracks which connect the components as per the circuit diagram.

Fig 5.7: Step 7

Step 8:Now carefully drill the PCB using a drilling machine on the pads.

Fig 5.8: Step 8

Step 9: Put the components in the correct holes and solder them.

34
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

CHAPTER 6

RESULTS AND DISCUSSIONS

The project describes the specification, hardware and implementation of solar


and wind powered multipurpose amphibot. This chapter first introduces the
problem, identifies a general solution to that problem which forms the basis of the
design outlined in the document, and concludes with a description of the structure
of the remainder of the report.
A danger event normally occurs by the negligence of humans. Hazardous
situations like extinguishing of fire and collection of trashes on unhygienic water
surfaces cannot be easily handles by humans. Also the demand for energy and its
consumption is increasing day by day as technology increases.
Since robots are used for special applications like handling hazardous
situations and tasks that need high accuracy and speed. The aim of this project is
“A semiautonomous device that performs functions normally ascribed to humans
or a machine in the form human.” Generally, it is a machine that functions in spite
of a living person. To implement real time fire detection, extinguishing and
collection of wastes floating on water a prototype is developed in this project.
And to reduce the energy demand a robot powered using solar and wind energy is
developed.
The robot system is equipped with sensors those can detect fire and obstacles
and sends information to the user. The main feature of this robot differentiating it
from others is execution of versatile tasks on land, water and rough areas. This
whole robot system works in two modes. Mode one is automatic mode and the
other is user controllable mode. By default, robot works in automatic mode in
which fire sensor are functional for automatic action. In user controllable mode,
user sends the signal to robot using Bluetooth module and controls it manually.

35
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

The main part of the project was choosing a microcontroller, since different
microcontrollers are available in the market from different vendors. First, the
functional microcontroller is considered, as it can be programmed directly, so
there is no need to purchase or make special programmer for burning the firmware
onto chip. Second one is that the selected chip (PIC16F877A) is supported with
the most famous open source embedded prototyping platform. Thus the project
uses the PIC16F877A prototyping platform microcontroller, as it is easy to learn
and experiment, because of its open source community over the world.
In the phase1 fire is detected using fire sensor. After the detection of fire
autonomous pumping is executed through control signals from microcontroller.
The DC pumps pump out water to extinguish fire.
In the phase2 robot is moved in different directions of floating bodies and
collects the wastes to a bin attached with the device.

6.1 ADVANTAGES

 Can move both on land and water.

 Can be used as multipurpose robot.

 It is energy efficient.

 Low cost.

 Used for other purposes by providing minor changes.

6.2 DISADVANTAGES

 Cannot move under water.

6.3 APPLICATIONS

 As firefighting robot on land.

 For collection of floating wastes on water.

36
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

 To clean water surfaces.

6.4 FUTURE SCOPE

 Can be made to travel underwater.

 Can be used to diffuse bombs in military.

 Can be used for underwater applications such as missing airplanes


wreckages location.

 Area covered can be improved.

 Can increase the performance by fitting additional wings or passive


wheels.

37
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

CHAPTER 7

CONCLUSION

The proposed system is a semiautonomous system that can be used as


multipurpose amphibot. The main feature of this robot differentiating it from
others is execution of versatile tasks in land, water and rough areas. Also the
whole system is powered using solar and wind power thus reducing demand of
energy. The robot works in automatic mode in which all sensors like fire sensors
ultrasonic sensors are functional for automatic action. The movement of robot in
automatic mode is controlled through the sensors and microcontroller. In user
controllable mode, user sends the signal to robot using Bluetooth module and
controls it manually. The use of microcontroller (PIC16F877A) makes the project
more interesting and scopeful. It allows the users to work out on this platform
easily and effectively. The system uses machine intelligence to provide immediate
response from sensors. It can be implemented at low cost. It reduces the
inconvenience of the soldiers working in border areas.

In this project solar and wind powered multipurpose amphibot we have


done the fire detection using fire/flame sensor and on detection it pumps out
water. On water the robot is moved in the direction of floating wastes and is
collected to the bin.

38
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

APPENDIX I

PIC16F877A MICROCONTROLLER

High-Performance RISC CPU:


• Only 35 single-word instructions to learn
• All single-cycle instructions except for program branches, which are two-cycle
• Operating speed: DC – 20 MHz clock input DC – 200 ns instruction cycle
• Up to 8K x 14 words of Flash Program Memory, Up to 368 x 8 bytes of Data
Memory (RAM),Up to 256 x 8 bytes of EEPROM Data Memory
• Pinout compatible to other 28-pin or 40/44-pinPIC16CXXX and PIC16FXXX
microcontrollers
Peripheral Features:
• Timer0: 8-bit timer/counter with 8-bit prescaler
• Timer1: 16-bit timer/counter with prescaler,can be incremented during Sleep via
external clock
• Timer2: 8-bit timer/counter with 8-bit periodregister, prescaler and postscaler
• Two Capture, Compare, PWM modules
- Capture is 16-bit, max. resolution is 12.5 ns
- Compare is 16-bit, max. resolution is 200 ns
- PWM max. resolution is 10-bit
• Synchronous Serial Port (SSP) with SPI™(Master mode) and I2C™
(Master/Slave)
• Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI) with
9-bit addressdetection
• Parallel Slave Port (PSP) – 8 bits wide withexternal RD, WR and CS controls
(40/44-pin only)
• Brown-out detection circuitry forBrown-out Reset (BOR)
Analog Features:
• 10-bit, up to 8-channel Analog-to-DigitalConverter (A/D)
• Brown-out Reset (BOR)

39
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

• Analog Comparator module with:


- Two analog comparators
- Programmable on-chip voltage reference(VREF) module
- Programmable input multiplexing from deviceinputs and internal voltage
reference
- Comparator outputs are externally accessible
Special Microcontroller Features:
• 100,000 erase/write cycle Enhanced Flashprogram memory typical
• 1,000,000 erase/write cycle Data EEPROMmemory typical
• Data EEPROM Retention > 40 years
• Self-reprogrammable under software control
• In-Circuit Serial Programming™ (ICSP™)via two pins
• Single-supply 5V In-Circuit Serial Programming
• Watchdog Timer (WDT) with its own on-chip RCoscillator for reliable operation
• Programmable code protection
• Power saving Sleep mode
• Selectable oscillator options
• In-Circuit Debug (ICD) via two pins
CMOS Technology:
• Low-power, high-speed Flash/EEPROMtechnology
• Fully static design
• Wide operating voltage range (2.0V to 5.5V)
• Commercial and Industrial temperature ranges
• Low-power consumption

40
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

Fig: pin diagram

DEVICE OVERVIEW

All devices in thePIC16F87XA family share common architectureThe


PIC16F873A and PIC16F874A have one-half of the total on-chip memory of the
PIC16F876A and PIC16F877A
• The 28-pin devices have three I/O ports, while the 40/44-pin devices have five

41
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

• The 28-pin devices have fourteen interrupts, while the 40/44-pin devices have
fifteen
• The 28-pin devices have five A/D input channels, while the 40/44-pin devices
have eight
• The Parallel Slave Port is implemented only on the 40/44-pin devices
The available features are summarized in the following TableBlock diagram of the
PIC16F/877A devices are provided in Figure 1-1 and Figure 1-2, respectively.
The pinouts for thesedevice families are listed in Table 1-2 and Table 1-3.

Table: PIC device features

42
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

Fig : PIC block diagram

43
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

Table : Pin out of PIC

44
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

Table Pin out OF PIC

45
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

APPENDIX II

SENSORS

ULTRASONIC SENSOR

Interfacing HC-SR04 Ultrasonic Sensor with PIC Microcontroller

HC-SR04 Ultrasonic Distance Sensor is a popular and low cost solution for non-
contact distance measurement function. It is able to measure distances from 2cm
to 400cm with an accuracy of about 3mm. This module includes ultrasonic
transmitter, ultrasonic receiver and its control circuit.

HC-SR04 module has 4 pins :

 VCC – 5V, +ive of the power supply


 TRIG – Trigger Pin
 ECHO – Echo Pin
 GND – -ive of the power supply

TRIG and ECHO pins can be used to interface this module with a microcontroller
unit. These are TTL (0 – 5V) input output pins.

46
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

HC-SR04 Ultrasonic Module Working

Ultrasonic Module Operation

1. Provide TRIGGER signal, atleast 10μS High Level (5V) pulse.


2. The module will automatically transmit eight 40KHz ultrasonic burst.
3. If there is an obstacle in-front of the module, it will reflect the ultrasonic
burst.
4. If the signal is back, ECHO output of the sensor will be in HIGH state
(5V) for duration of time taken for sending and receiving ultrasonic burst.
Pulse width ranges from about 150μS to 25mS and if no obstacle is
detected, the echo pulse width will be about 38ms.

Working of HC-SR04 Ultrasonic Sensor


47
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

Interfacing with PIC Microcontroller

Circuit Diagram

Interfacing HC-SR04 Ultrasonic Distance Sensor with PIC Microcontroller

PIC 16F877A is the heart of this circuit. VDD and VSS of PIC Microcontroller is
connected to +5V and GND respectively which will provide necessary power for
its operation. A 8MHz crystal is connected to OSC1 and OSC2 pins of PIC, to
provide clock for its operation. 22pF capacitors connected along with the crystal
will stabilize the oscillations generated by the crystal. 16×2 LCD is connected to
PORTD which is interfaced using 4 bit mode communication. 10KΩ preset is
used to adjust the contrast of the LCD. A 100Ω resistor is used to limit current
through the LCD back-light LED.
48
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

TRIGGER pin of HC-SR04 sensor is connected to RB0 (pin 33) of PIC which is
to be configured as an Output PIN (TRIS bit is 0) and ECHO pin is connected to
RB4 (pin 37) which is to be configured as an Input PIN (TRIS bit is 1)

Timer1 Module

Timer1 Module can be used as a 16 bit counter or timer. It consists of two


8 bit registers TMR1H and TMR1L which are readable and writable. The register
pair, TMR1H:TMR1L increments from 0000H to FFFFH and rolls over to 0000H.
If enabled Timer1 Overflow Interrupt is generated during rolls over to 0000H.
Here we will use this module as a 16 bit Timer.

Timer1 Control Register

Timer1 Module Block Diagram

49
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

Since we are using Timer1 module as a Timer, we should use internal clock
(Fosc/4), ieTMR1CS = 0. Prescaler is used to divide the internal clock (Fosc/4).
Here we can set Prescaler as 2, ieT1CKPS1 = 0&T1CKPS0 = 1. T1SYNC bit is
ignored when TMR1CS = 0. As we are using internal clock (Fosc/4) we can
disable oscillator, ieT1OSEN = 0. TMR1ON bit can be used to ON or OFF timer
as per our requirements.

 Thus we can initialize timer as : T1CON = 0x10


 To TURN ON the Timer : T1CON.F0 = 1 or TMR1ON = 1
 To TURN OFF the Timer : T1CON.F0 = 0 or TMR1ON = 0

Fosc is the oscillator frequency, here we are using 8MHz crystal henceFosc =
8MHz.

Time = (TMR1H:TMR1L)*(1/Internal Clock)*Prescaler

Internal Clock = Fosc/4 = 8MHz/4 = 2MHz

Therefore, Time = (TMR1H:TMR1L)*2/(2000000) =


(TMR1H:TMR1L)/1000000

Distance Calculation

 Distance = Speed * Time


 Let d be the distance between Ultrasonic Sensor and Target
 Total distance traveled by the ultrasonic burst : 2d (forward and backward)
 Speed of Sound in Air : 340 m/s = 34000 cm/s
 Thus, d = (34000*Time)/2, where Time = (TMR1H:TMR1L)/(1000000)
 Therefore, d = (TMR1H:TMR1L)/58.82 cm
 TMR1H:TMR1L = TMR1L | (TMR1H<<8)

50
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

FIRE SENSOR

General Description:
Flame sensor is the most sensitive to ordinary light that is why its reaction
is generally used as flame alarm purposes. This module can detect flame or
wavelength in 760 nm to 1100 nm range of light source. Small plate output
interface can and single-chip can be directly connected to the microcomputer IO
port. The sensor and flame should keep a certain distance to avoid high
temperature damage to the sensor. The shortest test distance is 80 cm, if the flame
is bigger, test it with farther distance. The detection angle is 60 degrees so the
flame spectrum is especially sensitive. The detection angle is 60 degrees so the
flame spectrum is especially sensitive.
Specifications
On-board LM393 voltage comparator chip and infrared sensing probe.

Support 5V/3.3V voltage input.

51
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

On-board signal output indication, output effective signal is high level, and the
same time the indicator light up, output signal can directly connect with
microcontroller IO.

Signal detection sensitivity can be adjusted.

Reserved a line voltage compare circuit (P3 is leaded out).

PCB size: 30(mm) x15(mm).

Pin Configuration:

1. VCC
2. OUTPUT
3. GROUND

SCHEMATIC DIAGRAM

52
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

APPENDIX III
L293D MOTOR DRIVER

1 Features 3 Description
The L293 and L293D devices are quadruple high- 1• Wide Supply-Voltage
Range: 4.5 V to 36 V
• Separate Input-Logic Supply current half-H drivers. The L293 is designed to
provide bidirectional drive currents of up to 1 A at
• Internal ESD Protection voltages from 4.5 V to 36 V. The L293D is designed
• High-Noise-Immunity Inputs to provide bidirectional drive currents of up to
600-mA
• Output Current 1 A Per Channel (600 mA for at voltages from 4.5 V to 36 V.
Both devices are L293D) designed to drive inductive loads such as relays,
solenoids, DC and bipolar stepping motors, as well as
• Peak Output Current 2 A Per Channel (1.2 A for other high-current/high-voltage
loads in positive-L293D) supply applications.
• Output Clamp Diodes for Inductive Transient Each output is a complete totem-
pole drive circuit, Suppression (L293D) with a Darlington transistor sink and a
pseudo-Darlington source. Drivers are enabled in pairs, with
2 Applications drivers 1 and 2 enabled by 1,2EN and drivers 3 and 4
• Stepper Motor Drivers enabled by 3,4EN.
• DC Motor Drivers The L293 and L293D are characterized for operation
• Latching Relay Drivers from 0°C to 70°C.

53
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

Fig logic diagram

Fig Pin configuration

Table PIN fumctions

54
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

55
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

APPENDIX IV

SOFTWARE DESCRIPTION
#include<pic.h>

#include"pic_lcd8.h"

#include"pic_serial.h"

#include"pic_adc.h"

#define m11 RB0

#define m12 RB1

#define m21 RB2

#define m22 RB3

#define trig RA4

#define echo RB4

#define fir_sn_lf RC0

#define fir_sn_rg RC1

#define relay_val RC2

#define alarm RC3

#define mot_waste11 RA2

#define mot_waste12 RA5

#define pump RE2

void forward();
56
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

void reverse();

void left();

void right();

void stop();

void Distance_Measure();

unsigned char u,yy,val[15],p,load,a,mod;

unsigned int dis,tmp_left,tmp_right;

bit u1,pm;

void interrupt ser()

if(RCIF)

RCIF=0;

val[yy]=RCREG;

yy++;

if(RBIF == 1) //flag checking of PORTB On-Change Interrupt

RBIE = 0; //Disable On-Change Interrupt

if(echo == 1) //If ECHO is HIGH

TMR1ON = 1; //Start Timer

if(echo == 0) //If ECHO is LOW

TMR1ON = 0; //Stop Timer

57
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

dis = (TMR1L | (TMR1H<<8))/58.82; //Calculate Distance

RBIF = 0; //Clear PORTB On-Change Interrupt flag

RBIE = 1; //Enable PORTB On-Change Interrupt

void main()

TRISA=0X03;

TRISB=0X10;

TRISC=0X83;

TRISD=0X00;

TRISE=0X00;

ADCON1=0X04;

stop();

Lcd8_Init();

m11=m12=m21=m22=0;relay_val=0;alarm=0;

mot_waste11=0;mot_waste12=0;

Serial_Init(9600);

GIE=1;

PEIE=1;

RBIF = 0; //Clear PORTB On-Change Interrupt Flag

RBIE = 1; //Enable PORTB On-Change Interrupt

58
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

T1CON = 0x00; //PRESCALAR 1 SELECT

Lcd8_Display(0X80," AMPHI BOAT ",16);

Lcd8_Display(0Xc0," ------ ---- ",16);

Delay(65000);Delay(65000);

Receive(1);

Lcd8_Display(0X80,"D:......Stop ",16);

Lcd8_Display(0Xc0,"Nm --- Nm ",16);

while(1)

tmp_left =Adc8_Cha(0);

tmp_left=tmp_left-107;

//tmp_left=tmp_left-119;

tmp_right=Adc8_Cha(1);

//tmp_right=tmp_right-119;

tmp_right=tmp_right-110 ;

Lcd8_Decimal3(0xc2,tmp_left);

Lcd8_Decimal3(0xcc,tmp_right);

if(yy>0)

Receive(0);

if(val[0]=='A') {forward(); }

else if(val[0]=='B'){reverse(); }

else if(val[0]=='C'){left(); }

else if(val[0]=='D'){right(); }

else if(val[0]=='1'){stop(); }

59
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

else
if(val[0]=='2'){mot_waste11=1;mot_waste12=0;Delay(5000);mot_waste11=0;mot
_waste12=0;}

else
if(val[0]=='4'){mot_waste11=0;mot_waste12=1;Delay(5000);mot_waste11=0;mot
_waste12=0;}

else if(val[0]=='3'&&pm==0){pm=1;pump=1;}

else if(val[0]=='3'&&pm==1){pm=0;pump=0;}

yy=0;val[0]=0;val[1]=0;

Receive(1);

if
(fir_sn_lf==0&&fir_sn_rg==0&&tmp_left>=45&&tmp_right>=45){stop();relay_

val=1; while(fir_sn_lf==0||fir_sn_rg==0); }

else if(fir_sn_lf==0&&tmp_left>45) {left();

Lcd8_Display(0Xc0,"Ab",2);alarm=1; }

else if(fir_sn_rg==0&&tmp_right>45)

{right();Lcd8_Display(0Xca,"Ab",2);alarm=1; }

else if(fir_sn_lf==1&&fir_sn_rg==1&&tmp_left<45&&tmp_right<45 )

{Lcd8_Display(0Xc0,"Nm",2);Lcd8_Display(0Xca,"Nm",2);alarm=0;relay_val=0
;}

Distance_Measure();

// if(dis<5){mot_waste11=1;mot_waste12=0;Delay(65000);

mot_waste11=0;mot_waste12=1;Delay(65000);mot_waste11=0;mot_waste12=0;}

60
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

void forward(){m11=0;m12=1;m21=0;m22=1;Lcd8_Display(0X88,"Forward
",8);}

void
reverse(){m11=1;m12=0;m21=1;m22=0;Lcd8_Display(0X88,"Backward",8);}

void left() {m11=1;m12=0;m21=0;m22=1;Lcd8_Display(0X88,"Left ",8);}

void right() {m11=0;m12=1;m21=1;m22=0;Lcd8_Display(0X88,"Right ",8);}

void stop() {m11=1;m12=1;m21=1;m22=1;Lcd8_Display(0X88,"Stop ",8);}

void Distance_Measure()

TMR1H = 0X00; //Sets the Initial Value of Timer

TMR1L = 0X00; //Sets the Initial Value of Timer

trig=1; //TRIGGER HIGH

Delay(3); //10uS Delay

trig=0; //TRIGGER LOW

Delay(10); //100mS Waiting for ECHO

Lcd8_Decimal4(0X82,dis);
61
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

Delay(40); //400mS

LCD INTERFACING

#define First_Line 0x80

#define Second_Line 0xc0

#define Curser_On 0x0f

#define Curser_Off 0x0c

#define Clear_Display 0x01

#define Data_Port PORTD

static bit Lcd_rs @((unsigned) &PORTC*8+4);

static bit Lcd_en @((unsigned) &PORTC*8+5);

void Lcd8_Init();

void Lcd8_Command(unsigned char);

void Lcd8_Write(unsigned char,unsigned char);

void Lcd8_Display(unsigned char,const unsigned char*,unsigned int);

void Lcd8_Decimal2(unsigned char,unsigned char);

void Lcd8_Decimal3(unsigned char,unsigned char);

void Lcd8_Decimal4(unsigned char,unsignedint);

62
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

void Delay(unsigned int);

void Lcd8_Init()

Lcd8_Command(0x38); //to set 8 bit mode

Lcd8_Command(0x06); //entry mode set

Lcd8_Command(0x0c); //display on

Lcd8_Command(0x01); //clear display

void Lcd8_Command(unsigned char com)

Data_Port=com;

Lcd_en=1;

Lcd_rs=0;

Delay(125);

Lcd_en=0;

Delay(125);

void Lcd8_Write(unsigned char com,unsigned char lr)

63
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

Lcd8_Command(com);

Data_Port=lr; // Data

Lcd_en=1;

Lcd_rs=1;

Delay(125);

Lcd_en=0;

Delay(125);

void Lcd8_Display(unsigned char com,const unsigned char *word,unsignedint n)

unsigned char Lcd_i;

for(Lcd_i=0;Lcd_i<n;Lcd_i++)

Lcd8_Write(com+Lcd_i,word[Lcd_i]);

64
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

void Lcd8_Decimal2(unsigned char com,unsigned char val)

unsignedintLcd_hr,Lcd_t,Lcd_o;

Lcd_hr=val%100;

Lcd_t=Lcd_hr/10;

Lcd_o=Lcd_hr%10;

Lcd8_Write(com,Lcd_t+0x30);

Lcd8_Write(com+1,Lcd_o+0x30);

void Lcd8_Decimal3(unsigned char com,unsigned char val)

unsignedintLcd_h,Lcd_hr,Lcd_t,Lcd_o;

Lcd_h=val/100;

Lcd_hr=val%100;

Lcd_t=Lcd_hr/10;

Lcd_o=Lcd_hr%10;

65
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

Lcd8_Write(com,Lcd_h+0x30);

Lcd8_Write(com+1,Lcd_t+0x30);

Lcd8_Write(com+2,Lcd_o+0x30);

void Lcd8_Decimal4(unsigned char com,unsignedintval)

unsignedintLcd_th,Lcd_thr,Lcd_h,Lcd_hr,Lcd_t,Lcd_o;

val = val%10000;

Lcd_th=val/1000;

Lcd_thr=val%1000;

Lcd_h=Lcd_thr/100;

Lcd_hr=Lcd_thr%100;

Lcd_t=Lcd_hr/10;

Lcd_o=Lcd_hr%10;

Lcd8_Write(com,Lcd_th+0x30);

Lcd8_Write(com+1,Lcd_h+0x30);

Lcd8_Write(com+2,Lcd_t+0x30);

66
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

Lcd8_Write(com+3,Lcd_o+0x30);

void Delay(unsigned int del)

while(del--);

SERIAL INTERFCING

voidSerial_Init(unsigned long int);

voidSerial_Out(unsigned char);

voidSerial_Conout(const unsigned char *,unsigned char);

voidBaudrate(unsigned long int);

void Receive(unsigned char);

voidSerial_Init(unsigned long int baud)

Baudrate(baud);

SYNC = 0; // asynchronous mode

SPEN = 1; // serial port enable

TXEN = 1; // tx enable

GIE=1;

67
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

PEIE=1;

RCIE = 0; // interrupt set

CREN = 0; // rx enable

voidSerial_Out(unsigned char val)

TXREG =val;

while(!TXIF);

TXIF = 0;

voidSerial_Conout(const unsigned char *data,unsigned char n)

unsigned char ser_j;

for(ser_j=0;ser_j<n;ser_j++)

Serial_Out(data[ser_j]);

68
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

voidBaudrate(unsigned long int baud)

if(baud==110) //Crystal Freq 1 Mhz

SPBRG = 141; // for 110 baud rate

BRGH = 0; // baud rate low

else if(baud==1200) //Crystal Freq 4 Mhz

SPBRG = 51; // for 1200 baud rate

BRGH = 0; // baud rate high

else if(baud==2400)

SPBRG = 25; // for 2400 baud rate

BRGH = 0; // baud rate high

else if(baud==4800)

SPBRG = 12; // for 4800 baud rate

69
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

BRGH = 0; // baud rate high

else if(baud==9600)

SPBRG = 25; // for 9600 baud rate

BRGH = 1; // baud rate high

else if(baud==57600)

SPBRG = 20; // for 57600 baud rate

BRGH = 1; // baud rate high

else if(baud==115200)

SPBRG = 10; // for 115200 baud rate

BRGH = 1; // baud rate high

void Receive(unsigned char rece)

70
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

if(rece==1)

RCIE = 1; // interrupt set

CREN = 1; // rx enable

else

RCIE = 0; // interrupt set

CREN = 0; // rx enable

71
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

72
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

73
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

74
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

75
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

APPENDIX IV

76
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

REFERENCES

[1]Choi. Charles Q : “Solar and Wind Energy From the Same Device”, IEEE
Spectrum,May,2016.

77
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

[2]Hassenein.Ahmed,Ethawary.mohanad:“An autonomous firefighting


robot”,IEEE,February 2015,978-1-4673.

[3]Li.Maoxum,Guo.Shuxiang,Hirata.Hideyaki,Ishihara.Hidenori:“A roller –
skating/walking mode-based amphibious robot”, Elsevier ,Robotics and
computer-integrated manufacturing July 2016 ,Vol44

[4]V.Divya,S.Dharanya,S.Shaheen,A.Umamakeswari:“Amphibious Survelleince
Robot with Smart Sensor Nodes”, Indian Journal of Science and Technology ,May
2013,Vol 6.

[5]Yi.Yang,Geng.Zhou,Jianqing.Zhang,Siyuan.Ceng:“Design ,modeling and


control of a Novel Amphibious Robot with Dual-swing-legs Propulsion
Mechanism” ,IEEE ,September 2013,Vol21.

78
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

79
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

80
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

81
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

82
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

83
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

84
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

85
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

86
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

87
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

88
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

89
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

90
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

91
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

92
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

93
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

94
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

95
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

96
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

97
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

98
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

99
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

100
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

101
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

102
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

103
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

104
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

105
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

106
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

107
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

108
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

109
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

110
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

111
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

112
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

113
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

114
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

115
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

116
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

117
Dept. of ECE Prime College of Engin eering
Solar and wind powered multipurpose amphibot

118
Dept. of ECE Prime College of Engin eering

Das könnte Ihnen auch gefallen