














































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
digital electronics engineering
Typology: Study Guides, Projects, Research
1 / 54
This page cannot be seen from the preview
Don't miss anything!















































Submitted in Partial Fulfillment of Requirements for Award of the Degree of Bachelor of Physics in Department of Physics Bahauddin Zakariya University, Multan By
Session (2015-2019) Under the Esteemed Guidance of
CERTIFICATE This is to certify that the thesis entitled “Automatic Bottle Filling System Using Microcontroller” is being submitted by Muhammad Bilal Habib BS-M-P-15- Ghulam Meeladi BS-M-P-15- Muhammad Mohsin BS-M-P-15- Muhammad Shahid Iqbal BS-M-P-15- Muhammad Bilal Mughal BS-M-P-15- In partial fulfillment of requirements for award of the degree of Bachelor of Physics in Department of Physics Bahauddin Zakariya University Multan is a record of bonafide work carried out by them at department of physics. The result embodied in this project report have not been submitted in any other university or institute for award of any degree or diploma. Project Guide Head of department Dr. Nauman Usmani Prof. Dr. Javed Ahmad
Table of Contents ABSTRACT UNDERTAKING ACKNOWLEDGEMENTS CHAPTER 1: INTRODUCTION 1.1 Introduction 1.2 Objectives 1.3 Discription Chapter 2: LITERATURE REVIEW 2.1 History 2.4 Bottle filling Chapter 3: MECHANICAL COMPONENTS UET Taxila, Chakwal Campus Page 6 Chapter 5: ELECTRONIC COMPONENTS 5.1 Microcontroller pic 16F 5.2 LCD (20x4) 5.5 Relay 5.6 IR sensor 5.7 Resistor Automatic Sorting, Counting and Bottle Filling System UET Taxila, Chakwal Campus Page 7 5.8 Capacitor Chapter 6: Structure of Project Chapter 7: IMPLEMENTATION AND CONTROL 7.1 Circuit diagram
7.1.1 Simulated circuit diagram 7.1.2 working of circuit Chapter:8 Applications and advantages 8.1.1 Advantages 8.2 Applications of liquid filling Automatic Sorting, Counting and Bottle Filling System UET Taxila, Chakwal Campus Page 8 Chapter 9: Conclusion and future work Conclusion References Appendix A Glossary Chapter 1: INTRODUCTION 1.1 Introduction Industrial Automation plays an increasingly important part in the global economy and also in daily experience. At present, for companies, the purpose of automation has shifted from growing productivity and reducing costs to broader issues. This work takes the idea of automatic sorting and bottle filling. The control system uses microcontroller. Sorting of bottles is done on the conveyer belt via IR sensors and then these bottles are filled by actuating the solenoid valves. The conveyors are used in many automated industries for moving parts from one place to another. The second concern is the bottle filling. Once the bottle is sorted, conveyer belt transfers it under the water tank for filling.
Advantages of relays Relays can switch AC and DC, transistors can only switch DC. Relays can switch higher voltages than standard transistors. Relays are often a better choice for switching large currents (> 5A). Relays can switch many contacts at once. Disadvantages of relays Relays are bulkier than transistors for switching small currents. Relays cannot switch rapidly (except reed relays), transistors can switch many times per second. Relays use more power due to the current flowing through their coil. Relays require more current than many ICs can provide, so a low power transistor may be needed to switch the current for the relay's coil. IR Sensor
When IR rays gets emitted from LED, it moves in the direction it is angled. When any obstacle interferes in the path, the IR rays get cut and it produces secondary wavelets which propagates mostly in return direction or in a direction opposite to that of the primary waves, which produces the net result like reflection of IR rays. Infrared photo receiver is a two terminal PN junction device, which operates in a reverse bias. It has a small transparent window, which allows light to strike the PN junction. A photodiode is a type of photo detector capable of converting light into either current or voltage, depending upon the mode of operation. Most photodiodes will look similar to a light emitting diode. They will have two leads, or wires, coming from the bottom. The shorter end of the two is the cathode, while the longer end is the anode.
In practice, the dielectric between the plates passes a small amount of leakage current and also has an electric field strength limit, resulting in a breakdown voltage, while the conductors and leads introduce an undesired inductance and resistance. Capacitors are widely used in electronic circuits for blocking direct current while allowing alternating current to pass, in filter networks, for smoothing the output of power supplies in the resonant circuits that tune radios to particular frequencies, in electric power transmission systems for stabilizing voltage and power flow, and for many other purposes. LED A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in many devices and are increasingly used for other lighting. Introduced as a practical electronic component in 1962, early LEDs emitted low-intensity red light, but modern versions are available across the visible, ultraviolet, and infrared wavelengths, with very high brightness. When a light-emitting diode is forward-biased (switched on), electrons are able to recombine with electron holes within the device, releasing energy in the form of photons. This effect is called electroluminescence and the color of the light (corresponding to the energy of the photon) is determined by the energy gap of the semiconductor. LEDs are often small in area (less than 1 mm2), and integrated optical components may be used to shape its radiation pattern. LEDs present many advantages over incandescent light sources including lower energy consumption, longer lifetime, improved robustness, smaller size, and faster switching. LEDs powerful enough for room lighting are relatively expensive and require more precise current and heat management than compact fluorescent lamp sources of comparable output. 1) Sensor A sensor (also called detector) is a converter that measures a physical quantity and converts it into a signal which can be read by an observer or by an (today mostly electronic) instrument. For example, a mercury-in-glass thermometer converts the measured temperature into expansion and contraction of a liquid which can be read on a calibrated glass tube. A
thermocouple converts temperature to an output voltage which can be read by a voltmeter. For accuracy, most sensors are calibrated against known standards. Sensors are used in everyday objects such as touch-sensitive elevator buttons (tactile sensor) and lamps which dim or brighten by touching the base. There are also innumerable applications for sensors of which most people are never aware. Applications include cars, machines, aerospace, medicine, manufacturing and robotics. A sensor is a device which receives and responds to a signal. A sensor's sensitivity indicates how much the sensor's output changes when the measured quantity changes. 2) Signal Conditioning In electronics, signal conditioning means manipulating an analog signal in such a way that it meets the requirements of the next stage for further processing. Most common use is in analog -to-digital converters. In control engineering applications, it is common to have a sensing stage (which consists of a sensor), a signal conditioning stage (where usually amplification of the signal is done) and a processing stage (normally carried out by an ADC and a micro controller). Operational amplifiers (op-amps) are commonly employed to carry out the amplification of the signal in the signal conditioning stage. Signal inputs accepted by signal conditioners include DC voltage and current, AC voltage and current, frequency and electric charge. Sensor inputs can be accelerometer, thermocouple, thermistor, resistance thermometer, strain gauge or bridge, and LVDT or RVDT. Specialized inputs include encoder, counter or tachometer, timer or clock, relay or switch, and other specialized inputs. Outputs for signal conditioning equipment can be voltage, current, frequency, timer or counter, relay, resistance or potentiometer, and other specialized output. Signal conditioning can include amplification, filtering, converting, range matching, isolation and any other processes required to make sensor output suitable for processing after conditioning.
Components used: Microcontroller AT89C Resistor Capacitor DC power supply LED Switch Transistor Buzzer Relay Voltage Regulator LCD Display Socket Diode • Internal short circuit current limiting • Output transistor safe-area compensation • Output voltage offered in 2% and 4% tolerance • Available I n surface mount D2PAK and standard 3-lead transistor packages • Previous commercial temperature range has been extended to a junction temperature range of -40 degree C to +125 degree C. Main Controlling Bored:
PIC 16F877 is one of the most advanced microcontroller from Microchip. This controller is widely used for experimental and modern applications because of its low price, wide range of applications, high quality, and ease of availability. It is ideal for applications such as machine control applications, measurement devices, study purpose, and so on. The PIC 16F877 features all the components which modern microcontrollers normally have. The figure of a PIC16F877 chip is shown below.
o Timer 2: 8 bit timer/counter with 8 bit period registers with pre-scalar and post-scalar. o Two Capture (16bit/12.5nS), Compare (16 bit/200nS), Pulse Width Modules (10bit). o 10bit multi-channel A/D converter o Synchronous Serial Port (SSP) with SPI (master code) and I2C (master/slave). o Universal Synchronous Asynchronous Receiver Transmitter (USART) with 9 bit address detection. o Parallel Slave Port (PSP) 8 bit wide with external RD, WR and CS controls (40/46pin). o Brown Out circuitry for Brown-Out Reset (BOR). Key Features o Maximum operating frequency is 20MHz. o Flash program memory (14 bit words), 8KB. o Data memory (bytes) is 368. o EEPROM data memory (bytes) is 256. o 5 input/output ports. o 3 timers. o 2 CCP modules. o 2 serial communication ports (MSSP, USART). o PSP parallel communication port o 10bit A/D module (8 channels) Analog Features o 10bit, up to 8 channel A/D converter. o Brown Out Reset function. o Analog comparator module. Special Features o 100000 times erase/write cycle enhanced memory. o 1000000 times erase/write cycle data EEPROM memory. o Self programmable under software control. o In-circuit serial programming and in-circuit debugging capability. o Single 5V,DC supply for circuit serial programming o WDT with its own RC oscillator for reliable operation.
o Programmable code protection. o Power saving sleep modes. o Selectable oscillator options. Pin Diagrams PIC16F877 chip is available in different types of packages. According to the type of applications and usage, these packages are differentiated. The pin diagrams of a PIC16F877 chip in different packages are shown in the figure below.
RA-7), ”PORT B” , “PORT C”,”PORT D” are only 8 bits wide (RB-0 to RB-7,RC-0 to RC-7,RD-0 to RD-7), ”PORT E” has only 3 bit wide (RE-0 to RE-7). All these ports are bi-directional. The direction of the port is controlled by using TRIS(X) registers (TRIS A used to set the direction of PORT-A, TRIS B used to set the direction for PORT-B, etc.). Setting a TRIS(X) bit ‘1’ will set the corresponding PORT(X) bit as input. Clearing a TRIS(X) bit ‘0’ will set the corresponding PORT(X) bit as output. (If we want to set PORT A as an input, just set TRIS(A) bit to logical ‘1’ and want to set PORT B as an output, just set the PORT B bits to logical ‘0’.) o Analog input port (AN0 TO AN7) : these ports are used for interfacing analog inputs. o TX and RX: These are the USART transmission and reception ports. o SCK: these pins are used for giving synchronous serial clock input. o SCL: these pins act as an output for both SPI and I2C modes. o DT: these are synchronous data terminals. o CK: synchronous clock input. o SD0: SPI data output (SPI Mode). o SD1: SPI Data input (SPI mode). o SDA: data input/output in I2C Mode.
o CCP1 and CCP2: these are capture/compare/PWM modules. o OSC1: oscillator input/external clock. o OSC2: oscillator output/clock out. o MCLR: master clear pin (Active low reset). o Vpp: programming voltage input. o THV: High voltage test mode controlling. o Vref (+/-): reference voltage. o SS: Slave select for the synchronous serial port. o T0CK1: clock input to TIMER 0. o T1OSO: Timer 1 oscillator output. o T1OS1: Timer 1 oscillator input. o T1CK1: clock input to Timer 1. o PGD: Serial programming data. o PGC: serial programming clock. o PGM: Low Voltage Programming input. o INT: external interrupt. o RD: Read control for parallel slave port. o CS: Select control for parallel slave. o PSP0 to PSP7: Parallel slave port.