This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
7.1: OUTCOME OF THE PROJECT......................................................65
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 4
SERICULTURE MARKETING AND 2011
CHAPTER 1: INTRODUCTION AND BACKGROUND
1.1 INTRODUCTION
Traditionally, in sericulture the weighing process is mechanical and selection
of cocoon is manually done. This takes a lot of time an inaccurate reading is
obtained due to human and mechanical errors. The farmer collects the
cocoons and sell them in the market where government bodies and private
bodies buy and sell the cocoon at various rates.
In the conventional methods of silk process, segregation of cocoons is done
with the help of a bulb along with natural light. After segregation, the cocoons
are put inside the steam bath, which requires 10-12kgs of bamboo for 6-8
mins of steam bath(for 200-300 kgs of cocoons).Further cocoons are boiled at
controlled temperature with manual stirrer. The manual stirrer does not spread
the temperature equally inside the bucket, which spoils the silk. and also for
the boiling purpose it needs a fuel of 750 kgs.
Here we propose to automate the market place and change most of the
mechanical process into electrical which would be more accurate and reliable.
The temperature is maintained at a constant celsius with the help of LM35
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 5
SERICULTURE MARKETING AND 2011
temperature sensor due to which the silk quality and the killing of the larvae is
not tampered.
1.2 OBJECTIVE OF OUR PROJECT
The objective of our project is to provide an aid for sericulture marketing.
Mass cocoon segregation mechanism by using electronic weighing machine.
To learn the concept of use of microcontroller.
Continuous monitoring of the temperature.
To get the weight difference before and after removing black spotted cocoons from the sample.
To maintain a log ,of the type and quality of the cocoons being supplied by a particular vendor and also the amount and quantity being settled for what price using pc with centralized database.
Optimize the entire system to make it accurate, efficient, cost effective.
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 6
SERICULTURE MARKETING AND 2011
1.3 ADVANTAGES
Semi automated cocoons selection
Less energy consumption and fast cocoon selection procedure
We propose to automate the procedure by connecting electronic
weighting machine to the microcontroller.
With modern GSM technique we will directly communicate with
farmer through SMS.
Less time consuming as we are using GSM technology.
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 7
Relay Driver Circuit (U
LN2003)
Motor for Stirrer
Tube lights control
Motor for ConveyorAnalog to Digital Converter
Load cell for weighing machine
OP-Amp (For Amplification)
(For amplification)
TemperatureSensor
Micro-controllerMain
Max 232
Centralize Database PCGSM
MODEM
SERICULTURE MARKETING AND 2011
CHAPTER 2: BLOCK DIAGRAM
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 8
SERICULTURE MARKETING AND 2011
2.1 HARDWARE TOOLS
Load cell CZL-601
Amplifier AD620
Temperature sensor LM35
ADC0809 , 8-bit ADC , 8-channel multiplexer with 3 select
lines
Schmitt trigger 74HCT14
5 pin sugar cube relay
ULN2003 relay driver
DC motor , Rated output12V, 84RPM,current 1.0A at no load
DC motor , Rated output 12V , 74RPM , current 4A at load
Atmel mega 89C51
Transparent conveyor belt
Stirrer and tube light
Light Emitting Diode(LED) as heater
MAX232
DB9 male and female connectors.
DB25 male and female connectors.
SIM300_v7.03 model (GSM modem).
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 9
SERICULTURE MARKETING AND 2011
2.2 SOFTWARE TOOLS
Visual Studio 6.0
Keil UV3 software
NXP-Flash magic
2.3 WORKING DESCRIPTION
Following components are included in our Project
1. LOAD CELL :
We use CZL601 model load cell, which is a bonded metallic
type strain gauge , which uses full wheatstone bridge. The
output will be in terms of milli volts.
Therefore ,we use AD620 amplifier for amplification, the
gain of the amplifier will be 500.Design part is explained in
the next chapter.
2. TEMPERATURE SENSOR :
We use LM35 temperature sensor, which does the direct
measurement of temperature.
It gives 10mV/degree rise in temperature.
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 10
SERICULTURE MARKETING AND 2011
We give temperature sensor output directly to ADC, for
100ºC it gives 1V.
3. ADC :
The ADC0809, data acquisition component is a monolithic
CMOS device with an 8-bit analog-to-digital converter, 8-
channel multiplexer and microprocessor compatible control
logic.
The outputs from temperature sensor and load cell are
selected through IN0 and IN1 channel of ADC respectively.
Each input of ADC are selected once at a time by grounding
other input.
Based on the selected line of the ADC the output will be sent to the microcontroller.
4. RELAY MECHANISM :
We use relays along with ULN2003 driver circuit which is a
current booster for controlling the following:
Motor of the conveyor
Motor of the stirrer
ON-OFF control of tube light
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 11
SERICULTURE MARKETING AND 2011
5. MICROCONTROLLER :
Microcontroller interfaces with relay driver circuit and the
analog to digital converter. The output data obtained is then
sent to the centralized database through Max232.
6. CENTRALIZED DATA BASE :
In the PC using the centralized database we maintain a log of
the type and the quality of the cocoons being supplied by a
particular vendor and also the amount and quantity being
settled and for what price. These details can be used for
deciding and planning later. Visual Basic Language is used to
create the centralized database system.
7. GSM MODEM :
We use SIM300_V7.03 model of GSM modem
Through which the communication between Centralized data
base and the modem is made. Vice versa is also possible.
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 12
SERICULTURE MARKETING AND 2011
CHAPTER 3: HARDWARE COMPONENTS
HARDWARECOMPONENTSUSED FOR COCOON SELECTION
MECHANISM:
3.1 LOAD CELL
Load cell is a transducer, which converts pressure/weight into electrical signal. Inside the load cell the strain gauges are connected in a full bridge fashion. The load cell is used to measure the weight of the unknown cocoons in kgs. Normally the load cell can weigh upto 50 kgs or more than that.
RATE LOAD (kg) : 3~120kg
FIGURE 3.1.1: DIAGRAM OF LOAD CELL
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 13
26 7
48
1
3
5
-
+
U21AD620
LOAD CELL
5V
V-
V+
R38
100 Ohm
5V
To ADC Channel IN1
SERICULTURE MARKETING AND 2011
FIGURE 3.1.2: INTERFACING OF LOADCELL WITH AD620
DESIGN OF LOAD CELL:
Excitation voltage of load cell =5 v
Rated output of load cell = 2mV/V
For 120kg = [2mV*5] = 10mV
So, fullscale load of 120 kg →10mV output
Gain = [5/10mV] =500.
DESIGN OF AD620 AMPLIFIER:
The gain equation is
Rg = [49.4KΩ]/[499]=100Ω
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 14
SERICULTURE MARKETING AND 2011
Gain = [49.4kΩ/100]+1=495
3.2 ALGORITHM TO INTERFACE LOADCELL WITH ADC
STEP 1: Select the channel_0 of ADC to which output of load cell is connected.
STEP 3: Digital output of load cell is sent to the centralised database (PC) using serial communication.
STEP 4: Initial weight of the load cell is send to centralised data base by the controller, by sending equivalent character (!) value of data base
STEP 5: Second weight of the load cell is send to centralised data base by the controller, by sending equivalent character (@) value of data base
STEP 6: Original weight is calculated in centralised data base through VB software which is given by the following formula:
txtactualwt = txtoriginalwt - txtnewwt
3.3 TEMPERATURE SENSOR
DESIGN:
Temperature sensor range is from 1ºC to +150ºC
1ºC gives 10mV output
100ºC - 1V
150ºC gives 1.5V
In our application we need 100ºC to kill larvae.
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 15
SERICULTURE MARKETING AND 2011
DESIGN DESCRIPTION
LM 35 senses the temperature and converts it into voltage (Linear 10mV raise per
degree raise in temperature). The output of the lm35 is directly given to the
channel IN1 of ADC so that the analog output is converted into digital form for the
microcontroller.
FIGURE 3.3.1 LM 35
3.4 ALGORITHMTO INTERFACELM35 WITH ADC
STEP 1: Select channel_1 of ADC for initial temperature.
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 16
ADC
SERICULTURE MARKETING AND 2011
STEP 2: The temperature sensor input is given to ADC in terms of volts and digital output of ADC is given to microcontroller and then the controller communicates with PC through serial port.
STEP 3: In centralised database the temperature value ‘#’ describes the room temperature obtained from microcontroller.
3.5 ANALOG TO DIGITAL CONVERTER
The ADC0808, data acquisition component is a monolithic CMOS
device with an 8-bit analog-to-digital converter, 8-channel multiplexer
and microprocessor compatible control logic. The 8-bit A/D converter
uses successive approximation as the conversion technique. The
converter features a high impedance chopper stabilized comparator, a
256R voltage divider with analog switch tree and a successive
approximation register. The 8-channel multiplexer can directly access
any of 8-single-ended analog signals. The device eliminates the need for
external zero and full-scale adjustments. Easy interfacing to
microprocessors is provided by the latched and decoded multiplexer
address input.
INPUT:
Temperature sensor (1V) O/P is connected to pin IN1 and amplified load cell (3V) O/P is connected to pin IN0.
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 17
SERICULTURE MARKETING AND 2011
FIGURE 3.5.1: PIN DIAGRAM OF ADC 0808
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 18
SERICULTURE MARKETING AND 2011
FIG: 3.5.2 INTERFACING DIAGRAM OF ADC WITH µC
3.6 MICROCONTROLLER
Microcontroller communicates and coordinates with relay driver circuit and the analog to digital convertor. The output data obtained is then sent to the centralized database through Max232.The Port0 i.e. P0.1-P0.7 are connected to the ADC. P2.1,P2.2,P2.3,P3.7 are connected to conveyor ,stirrer, tube light and buzzer respectively.P3.0 and P3.1 is connected to max 232.We use AT89C51 which is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash memory programmable and erasable read only memory (EPROM).
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 19
SERICULTURE MARKETING AND 2011
FIGURE 3.6.1 PIN DETAILS OF µC 8051
3.7 MICROCONTROLLER ALGORITHM
STEP 1: Select channel_0 to which load cell is connected.
STEP 2: Controller controls ADC0809 to get equivalent digital value.
STEP 3: This digital value (original weight) send to centralised data base
using serial communication.
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 20
SERICULTURE MARKETING AND 2011
STEP 4: Select channel_1 to which temperature sensor output is
connected.
STEP 5: Controller controls ADC0809 to get equivalent digital value of
sensed temperature.
STEP 6: This digital value (sensed temperature) send to the centralised
data base using serial communication.
STEP 7: Controller controls the bulb,motorstirrer,motorconveyor and
heater through driver circuit ULN2003.
STEP 8: MAX232 is interfaced with controller for communication with
centralised data base.
3.8 RELAY DRIVER CIRCUIT
Relay is an electro mechanical switch. Usually relays use an electro
magnet to operate a switching mechanism when several circuits need to
be controlled by one signal Current flowing through the coil ,the relay
creates a magnetic field, which attracts a lever and changes the switch
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 21
SERICULTURE MARKETING AND 2011
contacts. The coil current can be ON or OFF so relays have two switch
positions and they are double throw switches (NC and NO).
FIG 3.8.1: SUGAR CUBE RELAY
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 22
NOO
POLE
NC
Vcc
Gnd
SERICULTURE MARKETING AND 2011
FIG: 3.8.2 INTERFACING DIAGRAM OF RELAY WITH µC
PIN DETAILS
In the above figure3.8.2 the first and second relay pin no3 are
connected to the motor of conveyor(for clock wise and anti clock
wise rotation).
Third relay pin no3 is connected to the motor of stirrer, fourth
relay pin no3 is connected to the bulb and fifth relay pin no3 is
connected to the heater.
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 23
Heater
SERICULTURE MARKETING AND 2011
NO (pin 4) of each relay are grounded.
NC(pin5) of each relay are connected to the supply voltage of 5V
and 12V
And pin no2 of each relay is given to Pin no16,15,14,13,12 of
ULN2003 IC respectively.
Pin no1 of each relay are given to supply voltage of 12V and
output pins of ULN 1,2,3,4,5 are given to the microcontroller.
From controller pin port P2.0,P2.1,P2.2,P2.3,P3.2 are connected to ULN as
input ports.
CODE FOR RELAY AND RUNNING DC MOTOR:
//Relay motor Control Code//
Motor_1_clk: setb p2.2 // dir ctrl; front// clr p2.3 // Enable movement// ret
Motor_1_anticlk: clr p2.2 // dir ctrl; back// setb p2.3 // Enable movement// ret
stop_all_motors: setb p2.2 // dir ctrl// setb p2.3 //Enable movement// ret
acall stop_all_motorsclr p2.4clr p2.5
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 24
SERICULTURE MARKETING AND 2011
move_back: acall Motor_1_anticlk jb intial_position, move_back acall stop_all_motors ret
We use ULN2003 as current booster for relays in order to drive the motor of conveyer, motor stirrer, tube light and heater are connected to input pins 1C& 2C,3C,4C and 5C and the outputs are obtained at pin 1B&2B,3B,4B and 5B and are connected to microcontroller as shown in fig:3.10.2
FIG 3.10.1: ULN 2003IC PIN DETAILS
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 26
SERICULTURE MARKETING AND 2011
1 2 V
12
A-
+
12
A-
+
35 4
1 2 35 4
1 235 4
1 2
Heater
1 2 V
BULB5 V
-+
35 4
1 2
1 B1
2 B2
3 B3
4 B4
5 B5
6 B6
7 B7
1 C1 6
2 C1 5
3 C1 4
4 C1 3
5 C1 2
6 C1 1
7 C1 0
C O M9
G N D8
CONVEYER
STIRRER
ULN 2003
1 2 V
35 4
1 2
5 V
1 2 V
F ro m M C P in P o rt P 2 . 0
F ro m M C P in P o rt P 2 . 1
F ro m M C P in P o rt P 2 . 2
F ro m M C P in P o rt P 2 . 3
F ro m M C P in P o rt P 3 . 2
FIG: 3.10.2: INTERFACING DIAGRAM OF ULN WITH RELAY
SPECIFICATIONS
It a driver circuit which is used to separate external devices which are controlled through microcontroller. It requires collector Current(Vce) of 500 mA and Base Current(Vbe) 25 mA.
3.11 SERIAL PORT CONNECTOR
DB9 is a serial port connector used to connect MAX232 to microcontroller. It is a physical connector which connect through the ports P3.0-P3.1 of the microcontroller.
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 27
SERICULTURE MARKETING AND 2011
FIG 3.11.1:DB9 CONNECTOR
CODE
Serial port connectivity codes
//Initializes the port for the COM Commection//
init_serial: mov TH1,#0FDh // pour 28,800 HZ// mov TMOD,#0x20 mov SCON,#0x50 mov a, pcon setb acc.7 // to make it work at 57,600 Hz// mov pcon, a setb TR1 clr TI clr RI ret
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 28
SERICULTURE MARKETING AND 2011
//Send the accumulator contents to the COM port//
send_serial: clr TI mov sbuf,ahere: jnb TI,here clr TI ret//Gets the contents from COM port and stores in accumulator//
getchar: clr ri clr ahere1: jnb ri,here1 clr ri mov a, sbuf ret
//Routine to continuously monitor and echo the value received//
get_str: nopnot_end: call getchar call send_serial // to echo back the recieved byte//
cjnea,#27,not_end //#27,not_end,P marks end of communication// ret
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 29
SERICULTURE MARKETING AND 2011
3.12 MAX 232
FIG:3.12.1: MAX232 CONNECTED TO SERIAL PORT AND µc
DESCRIPTION
Fig 3.12.1, MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply EIA-232 voltage levels from a single 5-V supply. Each receiver converts EIA-232 inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V and a typical hysteresis of 0.5 V, and can accept ±30V inputs. Each driver converts TTL/CMOS input levels into EIA-232 levels.
FEATURES
We connect a MAX 232 for the inter compatibility between the PC and µC signal levels.
It does signal level conversion automatically.
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 30
SERICULTURE MARKETING AND 2011
MAX232 parts are particularly useful in battery powered systems, since their low-power shut down mode reduces power dissipation to less than 5µW.
3.13 PARALLEL PORT CONNECTOR
DB25 is a parallel port connector from PC to microcontroller, which is connected to stirrer, motor, heater and bulb to the ports P2.2,P2.0(clockwise)P2.1(anti-clockwise),P3.2 and P2.3 respectively.
FIG 3.13.1: PIN DETAILS OF DB25
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 31
SERICULTURE MARKETING AND 2011
ALGORITHM TO INTERFACE PARALLEL PORT WITH CENTRALISED DATA BASE
STEP 1: Centralised data base will receive user input through parallel port.
STEP 2: Once the data is received through parallel port that data will be decoded by centralised data base.
STEP 3: After decoding the data it will receive particular message to controller.
STEP 4: So that the controller will process the acquired data.
HARDWARECOMPONENTSUSED FOR SERICULTURE MARKETING
3.14 CENTRALISED DATABASE
Through centralised database we get information/data at a certain place where the marketinghasbeen made.
Final weight of cocoons obtained from load cell will be sent to the centralized data base (PC), which we got from the microcontroller.
We make the rotation of stirrer, operate the heater and get the temperature sensor readings by using Visual Basic.
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 32
SERICULTURE MARKETING AND 2011
FIG:3.14.1: INTERFACING DIAGRAM OF DATABASE WITH µc
3.15 GSM MODEM
GSM modem is suitable for remote dial-up systems where we are
using SIM300_V7.03 model.
We connect GSM modem to the PC using MAX232 which gives
serial communication in between , where it collects all the data
such as todays rate , total weight , wastage , cost and balance.
These datas are send to the farmer through SMS.
And vice versa is also possible
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 33
SERICULTURE MARKETING AND 2011
FIG3.15.1: INTERFACING DIAGRAM OF GSM WITH DATABASE
Read temperature sensor value and send to Personal Computer
Database is read from Personal Computer. If the request is to switch on/switch off stirrer, alarm, heater then perform the corresponding action.
Is switch sw2 is pressed ?
Read weight from load cell and send to Personal Computer
Rotate conveyor belt clockwise for sometime and stop
Switch on bulb
BC
C
A
Switch off Bulb
A
Rotate conveyor belt anticlockwise for sometime
Read weight from load cell and send data to Personal Computer (Weight of cleaned cocoon)
Rotate conveyor belt motor in clockwise to drop cocoons
Rotate conveyor belt motor in anticlockwise for initial position
B
SERICULTURE MARKETING AND 2011
False
True
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 68
Is segregation done ? switch sw1 is pressed
D
D
SERICULTURE MARKETING AND 2011
6.1 FLOW CHART STEPS
STEP 1: Start the process.
STEP 2: Bring all motors to initial position.
STEP 3: Read temperature sensor value and send to PC.
STEP 4: DB25 parallel port is used to connect to the PC. It performs the ON/OFF operations of stirrer, motor, conveyor and heater on request.
STEP 5: Switch on sw2 of microcontroller.
STEP 6: Read weight from the load cell send to PC.
STEP 7: Rotate the conveyer belt motor clockwise for some time and stop.
STEP 8: Switch on bulb.
STEP 9: Check the segregation condition, if it is done, switch on sw1, if its not done complete the segregation process and again check for segregation condition.
STEP 10: If yes, switch OFF bulb or go to step 8 and repeat.
STEP 11: Rotate conveyer belt anti clockwise for some time.
STEP 12: Read the reduced weight of cocoons from load cell and send to PC.
STEP 13: Rotate conveyor belt motor in clockwise to drop cocoons.
STEP 14: Rotate conveyor belt motor in anti clockwise for initial position.
STEP 15: Repeat the process from step 3 for next set of weights of cocoons.
DEPT OF INSTUMENTATION TECHNOLOGY, MSRIT Page 69
SERICULTURE MARKETING AND 2011
CHAPTER 7 : RESULT
FIG 7.1: OUTCOME OF THE PROJECT FROM FIG 7.1 RESULTS ARE AS FOLLOWS
The semi automatic cocoons selection, automatic temperature and lights control circuits for the projects model is designed.
Tested & results are obtained, it is found that the energy utilized is minimum compared to the existing conventional system.
FUTURE WORK
If the mechanical design is of larger size so as to weigh 50 Kgs of cocoons at a time.
In this method, segregation process can be speeded up and the power can be much more saved.
Further the entire process to obtain the silk will be automated. Energy, Time & the man power can be reduced. It will improve the quality of the silk , saves lot of fuel (wood) &
maintain pollution free environment. It will give good accuracy of measurement of cocoons than that of