Air Quality Monitoring System

Not rated 21,022

Circuit Image

The PIC16F778A is widely used and is popular among both beginners and professionals due to its FLASH Memory technology, which allows for write/erase operations within thousands of programming cycles. This RISC microcontroller boasts advantages in speed and code compression compared to other 8-bit microcontrollers. The PIC16F877A features 40 pins with 33 dedicated to I/O. The inclusion of EEPROM memory facilitates the application of microcontrollers in devices requiring permanent storage of various parameters, such as transmitter codes, motor speeds, and receiver frequencies. Its low cost, low power consumption, ease of handling, and flexibility make the PIC16F877A suitable for applications previously overlooked for microcontrollers, including timer functions, interface replacements in larger systems, and coprocessor applications. The chip's in-system programmability, utilizing only two pins for data transfer, enhances product flexibility after assembly and testing. This feature can be leveraged for assembly-line production, storing calibration data that becomes available only after final testing, or for updating programs on finished products. The Analog Comparator module includes two analog comparators, a programmable on-chip voltage reference (VREF) module, and programmable input multiplexing from device inputs and internal voltage reference, with externally accessible comparator outputs. Commonly used LCDs in the market today include 1-line, 2-line, or 4-line configurations, typically managed by a single controller and supporting up to 80 characters. Most single-controller LCDs have 14 pins. The Display Data RAM (DDRAM) stores display data represented in 8-bit character codes, with an extended capacity of 80 x 8 bits, equating to 80 characters. The portion of the DDRAM not utilized for display can serve as general data RAM. The data sent to the DDRAM is displayed on the LCD. For example, in a 1x16 LCD, only 16 characters are visible; any additional characters written to the DDRAM remain invisible. The connection diagram for the LCD in 4-bit mode requires only 7 pins for interfacing. Data pins D4 to D7 are used for data transmission, while the Enable and Register Select pins control the LCD. The Read/Write (RW) pin is not utilized, as the data is only written to the LCD, necessitating a permanent ground connection. If the RW functionality is desired, it can be connected to the controller, but this will only increase pin usage without significant benefit. Unused data pins, such as Vss, VEE, and D0-D3, are connected to ground. In the described circuit, when the base of the transistor receives a supply from the microcontroller, it allows 5V to ground without activating the relay. Conversely, if the relay is activated, it creates a back electromotive force (e.m.f.) that switches from normally open to normally closed, turning on the Backup RCCB. After research and advice from Tn Hj. Dr. Zainuddin, the Taguchi gas sensor (TGS2600) was selected for this project due to its compact size, high sensitivity, and lower cost compared to other gas sensors. The TGS2600 is utilized in various applications, including robotic machinery, smart extinguishers, and aromatherapy sensing. Its characteristics have been benchmarked against newer sensors, confirming its reliability in detecting air contaminant levels. The TGS2600 exhibits high sensitivity to low concentrations of gaseous air contaminants, such as hydrogen and carbon monoxide, which are present in cigarette smoke, with the ability to detect hydrogen at levels of several parts per million (ppm). Figaro also provides a microprocessor (FIC02667) equipped with specialized software for managing the sensor's signals in appliance control applications.

The PIC16F877A microcontroller is characterized by its robust architecture, which enables efficient handling of multiple I/O operations, making it suitable for diverse applications ranging from simple control systems to complex automation tasks. The integration of EEPROM provides a significant advantage for applications requiring persistent data retention, allowing for the storage of critical parameters that can be modified without the need for external memory components.

In terms of interfacing with LCDs, the 4-bit mode connection method is particularly advantageous for minimizing pin usage while maintaining functionality. The design ensures that only the essential pins are utilized, thereby simplifying the circuit layout and reducing the overall complexity of the system. The decision to ground the RW pin further streamlines the operation, as it eliminates the need for additional control logic when only write operations are necessary.

The TGS2600 gas sensor's selection reflects a strategic choice for applications needing real-time environmental monitoring. Its high sensitivity to specific gases positions it as an effective tool for safety and detection systems. The integration of the FIC02667 microprocessor enhances the sensor's capabilities by providing advanced signal processing and control features, making it suitable for sophisticated applications that demand precise monitoring and control of gas concentrations in various environments.PIC16F778A is widely uses now and it is also famous among the beginner until all theprofessionals because of the FLASH Memory technology which can be write/erase within a tousand times of programming. Speed and code compression are the superiority of this risc microcontroller compared to other 8-bit microcontroller.

PIC16F877A have 40 pin by 33 path of I/O. EEPROM memory makes it easier to apply microcontrollers to devices where permanent storage of various parameters is needed (codes for transmitters, motor speed, receiver frequencies, etc. ). Low cost, low consumption, easy handling and flexibility make PIC16F877A applicable even in areas where microcontrollers had not previously been considered (example: timer functions, interface replacement in larger systems, coprocessor applications, etc.

). In System Programmability of this chip (along with using only two pins in data transfer) makes possible the flexibility of a product, after assembling and testing have been completed. This capability can be used to create assembly-line production, to store calibration data available only after final testing, or it can be used to improve programs on finished products.

Analog Comparator module (Two analog comparators, Programmable on-chip voltage reference (VREF) module, Programmable input multiplexing from device inputs and internal voltage reference, Comparator outputs are externally accessible) The most commonly used LCDs found in the market today are 1 Line, 2 Line or 4 Line LCDs which have only 1 controller and support at most of 80 characters. Most LCDs with 1 controller has 14 pins. Pin description is shown in the table below: Display data RAM (DDRAM) stores display data represented in 8-bit character codes.

Its extended capacity is 80 X 8 bits, or 80 characters. The area in display data RAM (DDRAM) that is not used for display can be used as general data RAM. So whatever user sends on the DDRAM is actually displayed on the LCD. For LCDs like 1x16, only 16 characters are visible, so whatever user write after 16 chars is written in DDRAM but is not visible to the user. Above is the connection diagram of LCD in 4-bit mode, only 7 pins needed to interface with an LCD. D4 - D7 are the data pins connection and Enable and Register select are for LCD control pins. The Read/Write (RW) pin of the LCD will not be using, as the data only writing on the LCD. So, it has to be grounded permanently. If user wants to use it, then they may connect it on controller but that will only increase another pin and does not make anybig difference.

The unwanted data pins of LCD i. e. Vss, VEEand D0-D3 are connected to ground. For the above circuit, when thebase of the transistor receive any supply from the microcontroller, it will allow the 5V to the ground without active the relay. Otherwise, the relay will active and create a back e. m. f that will turn the switching from the normally open to normally close (which is turn on the Backup RCCB).

After doing some research and some advise fromTn Hj. Dr. Zainuddini finally choose theTaguchi gas sensor(TGS2600) to apply in this project, , TGS2600 will bechose as a gas detector due to the small size, highsensitivity and lower price compared to other gas sensor. This sensor is widely used in many sensor anddetectorapplications. This sensor is widely used in many applications such as inrobotic machinery, smart extinguisher, aromatherapy sensingand many more.

Thecharacteristic of this sensor has been compared with thenewly developed sensor for benchmarking purposes. This shows that the TGS2600 is a very reliable sensor fordetecting air contaminant level in the environment.

The TGS 2600 has high sensitivity to low concentrations of gaseous air contaminants such as hydrogen and carbon monoxide which exist in cigarette smoke. The sensor can detect hydrogen at a level of several ppm. Figaro also offers a microprocessor (FIC02667) which contains special software for handling the sensor`s signal for appliance control applications

🔗 External reference