Thursday, September 5, 2019

Application Of Microcontroller In Instrumentation Information Technology Essay

Application Of Microcontroller In Instrumentation Information Technology Essay A  microcontroller  is a small computer on a single  integrated circuit  consisting internally of a relatively simple CPU,  clock, timers, I/O ports, and memory. Program memory in form of   NOR flash  or   ROM  is also often included on chip, as well as a typically small amount of RAM. Microcontrollers are designed for small or dedicated applications. Thus, in contrast to the  microprocessors  used in   personal computers  and other high-performance or general purpose applications, simplicity is emphasized. Some microcontrollers may use four-bit words and operate at  clock rate  frequencies as low as 4  kHz as this is adequate for many typical applications, enabling low power consumption. They will generally have the ability to retain functionality while waiting for an event such as a button press or other interrupt; power consumption while sleeping (CPU clock and most peripherals off) may be just nano watts, making many of them well suited for long la sting battery applications. Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, and toys. By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes. Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic systems. INTRODUCTION Embedded design A microcontroller can be considered a self-contained system with a processor, memory and peripherals and can be used with an  embedded system.  The majority of microcontrollers in use today are embedded in other machinery, such as automobiles, telephones, appliances, and peripherals for computer systems. These are called  embedded systems. While some embedded systems are very sophisticated, many have minimal requirements for memory and program length, with no operating system, and low software complexity. Programs Microcontroller programs must fit in the available on-chip program memory, since it would be costly to provide a system with external, expandable, memory. Compilers and assembler are used to turn high-level language and assembler language codes into a compact  machine code  for storage in the microcontrollers memory. Depending on the device, the program memory may be permanent, read-only memory that can only be programmed at the factory, or program memory may be field-alterable flash or erasable read-only memory. Other microcontroller features Many embedded systems need to read sensors that produce analog signals. This is the purpose of the  analog-to-digital converter  (ADC). Since processors are built to interpret and process digital data, i.e. 1s and 0s, they wont be able to do anything with the analog signals that may be sent to it by a device. So the analog to digital converter is used to convert the incoming data into a form that the processor can recognize. A less common feature on some microcontrollers is a  digital-to-analog converter  (DAC) that allows the processor to output analog signals or voltage levels. Time Processing Unit  (TPU) is a sophisticated timer. In addition to counting down, the TPU can detect input events, generate output events, and perform other useful operations. A dedicated  Pulse Width Modulation  (PWM) block makes it possible for the CPU to control power converters,  resistive  loads,  motors, etc., without using lots of CPU resources in tight timer  loops. Higher integration In contrast to general-purpose CPUs, micro-controllers may not implement an external address or data bus as they integrate RAM and non-volatile memory on the same chip as the CPU. Using fewer pins, the chip can be placed in a much smaller, cheaper package. A micro-controller is a single  integrated circuit, commonly with the following features central processing unit   ranging from small and simple 4-bit  processors to complex 32- or 64-bit processors discrete input and output bits, allowing control or detection of the logic state of an individual package pin. APPLICATION OF MICROCONTROLLER IN INSTRUMENTATION LIST OF MICROCONTROLLER BASED PROJECTS 1. MICROCONTROLLER AT-89C51 BASED METRO TRAIN PROTOTYPE USING LCD: The project shows resemblance as you are travelling in metro train. It will display three stations at LCD and a stepper motor to rotate clock or anti-clock wise. 2. MICROCONTROLLER AT-89C51 BASED VOTING MACHINE: The voting system for four candidates with memory backup to restore the results to be viewed with password. Now-a-days Electronic voting machines are being used effectively. The confidence of the voter in its flawless working is gradually building up and these machines are thus becoming quite popular throughout the country. Features of the electronic voting machine include avoidance of invalid votes and reduction of counting time and the consequent expenditure incurred on manpower deployment. By using the Microcontroller the voting machine can be built up easily and it will make simple to operate. 3. MICROCONTROLLER AT-89C51 BASED TEXT EDITOR CUM MOVING MESSAGE DISPLAY: The project comprises 30 keys to edit any message in English. One can restore the message in memory IC. The 16 characters at a time can be view in running mode. 4. MICROCONTROLLER AT-89C51 BASED FULL FUNCTION STEPPER MOTOR CONTROLLER: The project will operate the stepper motor in almost all modes viz. clock, anti -clock, speed and frequency control with time duration for both directions. 5. MICROCONTROLLER AT-89C51 BASED WATER LEVEL CONTROLLER CUM MOTOR PROTECTOR: It can indicate the level and control the water pump at top level filling. The present concept implements controlling of pump which pumps water from the sump (underground tank) to the overhead tank, using 8951 microcontroller. The control panel, i.e. the main control unit of the system which consists of the primary control switches, pump indicator, siren and level indicators. The visual example of how switches And the indicators can be placed as shown the figure below. 6. MICROCONTROLLER AT-89C51 BASED SIMPLE STEPPER MOTOR CONTROLLER: A simple stepper motor controller circuit with direction change only. A stepper motor (or step motor) is a brushless, synchronous electric motor that can divide a full rotation into a large number of steps. The motors position can be controlled precisely without any feedback mechanism (see Open-loop controller), as long as the motor is carefully sized to the application. Stepper motors are similar to switched reluctance motors (which are very large stepping motors with a reduced pole count, and generally are closed-loop commutated.) 7. MICROCONTROLLER AT-89C51 BASED AUTO GEAR SHIFTING SYSTEM: The circuit shows the demo of auto shifting of gears using stepper motor with the change in speed of vehicle. One can change the speed of DC motor as actual vehicle running wheel. Motorcycle is widely used around the world and particularly in Pakistan. The gear shifting system of the motorcycle is conventionally manual. This paper covers development of an indigenous automatic gear shifting/changing system for the standard motorcycle. By this system the manual mechanical gear-shifting system will remain unchanged because an additional electro-mechanical system is placed on the vehicle to shift the gear and for automatic controlling the clutch. So the system has both the options manual as well as automatic. This system uses low-cost microcontrollers to make the accurate decision for shifting the gear up and down by observing the speed, and it controls the clutch transmission where necessary. The complete hardware and software has been tested and the functioning of the automatic gear sh ifting system is verified. This system is flexible and can be used with any motorcycle manufactured in Pakistan ranging from 50cc to 200cc. 8. MICROCONTROLLER AT-89C51 BASED AUTO SPEED LIMITER WITH AUTO BREAKING: The project is to read the rpm of an automobile and according to that it limits the speed as Speed Governor. One can change the speed with variable control. This Project can be used with the three phase Induction motors. The circuit will take the full control of the motor and it will protect the motor from several faults such us over voltage and under voltage and the circuit will switch on the motor under safety conditions. The circuit was fully controlled by the microcontroller and the microcontroller wills continuously monitors the voltages of the three phases and if the voltage goes abnormal then it will switch off the motor until they are normal. All the conditions are displayed it over the LCD display. In our project we are using the popular 8 bit microcontroller AT89S52. It is a 40 pin microcontroller. 9. MICROCONTROLLER AT-89C51 BASED FASTEST FINGER FIRST: Useful for Quiz games, dumb charades. It displays the player no. along with the beep for seven players. 10. MICROCONTROLLER AT-89C51 BASED TEMPERATURE METER: It will display the room temperature on LCD and one can set the desired value to indicate the alarm or control at a desired temperature. It uses an ADC to interface with LM-35 sensor. 11. MICROCONTROLLER AT-89C51 BASED INFRARED REMOTE CONTROLLED SWITCH BOARD: One can operate (on/off) four electrical devices with TV remote synchronized with circuit independently. 12. MICROCONTROLLER AT-89C51 BASED RANK DISPLAY SYSTEM FOR RACE QUIZ COMPETITION WITH LCD: It can resolve the time difference (may be few milliseconds) and indicate the correct ranking between the individuals denoted A to H 13. MICROCONTROLLER AT-89C51 BASED AUTO SPEED LIMITER/GOVERNER WITH AUTO BREAKING: The project is to read the rpm of a automobile and according to that it limits the speed as Speed Governor. One can change the speed with variable control. 14. MICROCONTROLLER AT-89C51 BASED LINE FOLLOWER ROBOT: A Robotic car that follows the black line at the floor area based on IR sensors with transmitters and receivers. 15. MICROCONTROLLER AT-89C51 BASED YES MASTER FOLLOWER: A robotic car that follows his master who is sending an IR transmission always. 16. MICROCONTROLLER AT-89C51 BASED VOLTAGE/ POWER FACTOR / FREQUENCY METER: The project checks the electrical input factors as multifunction meter. 17. MICROCONTROLLER AT-89C51 BASED RFID ATTENDENCE MONITOR: The project will show the names of person who had pressed the RFID key on LCD. One can use DATA encoder/decoder circuit. 18. MICROCONTROLLER AT-89C2051 BASED FREQUENCY COUNTER USING LCD: The project will check the unknown frequency input up to 200 KHz. And display at LCD. 19. TRAFFIC SIGNAL CONTROL TRAFFIC MAN: It can actually control traffic with lights and humanoid robot police man rotating in all directions with hand movements for stop and go actions. This is a project comprises two stepper motors to perform the action. 20. MICROCONTROLLER AT-89C2051 BASED IR WIRELESS FREQUENCY COUNTER: The project will check the unknown frequency input up to 200KHz. Coming from an IR source and display at LCD. 21. MICROCONTROLLER AT-89C2051 BASED COUNTDOWN TIMER: The project performs the countdown operation for up to -99 minutes with two seven segments display showing actual time left to activate or de-activate the connected relay. 22. MICROCONTROLLER AT-89C2051 BASED TEMPERATURE INDICATOR: The temperature of room can be displayed at LCD using a sensitive device DS 1621. 23. MICROCONTROLLER AT-89C2051 BASED ALARM CLOCK: The unit display the time in Hr. Min. and one can set the alarm also for a desired time at Seven segment display. 24. MICROCONTROLLER AT-89C2051 BASED VEHICLE SPEEDOMETER CUM ODOMETER: The project comprises a dc motor speed controller circuit with reed sensor. It is being detected by this and displays the same at LCD in form of speed KmHr. and also display the distance covered by the vehicle. DETAIL OF SOME APPLICATION Microcontroller based Electronic Governor and Control System of a Mini-hydro Power Plant:- This project is absolute requirement to develop small-scale power plants. The idea is described in the introduction. Then there are some details about the functionality of the system. That is described in both user aspect and technical aspect. The idea will lead to fully automated power plants with remote access, while it is lower cost. Some attractive future development proposals will be at the end of the technical details. INTRODUCTION In brief our project is an Microcontroller based Electronic Governor Control System for Mini Hydro Power Plant. The courses of selecting this project were the expanding the features of the presently available mechanical governor systems and improve the remote controllability of the system in user-friendly manner. In this invention we selected specific mini hydro plant to consideration because of several limitations. The governor of a mini-hydro power plant considers as a heart of the system. It controls the output power and makes the generator frequency up to the grid frequency by utilizing the available water supply to the turbine. Those operations are achieved by controlling the gate valves of the turbine. Almost all the turbine units use this method of control and it comprises of a mechanical actuator and electrical control device to give the desired command signals to the actuator to open or close valves appropriately. Commercially available electronic governors are very expensive. It is very difficult to find a suitable commercial product for a particular power plant and not easy to tune them to reach the best operating condition. Therefore our main focus was to implement an electronic governor system for a user specific circumstance. So the initial stage, we studied the entire control system of a mini-hydro power plant that is situated at Niriella. Then we decided to develop this electronic governor system using newly promoted micro-controller technology. Other than the basic governor operations we impl emented several new features. To interact with the micro-controller some of the electronic devices were re-implemented. BASIC OPERATION Although its called an Electronic governor control system, it consists of some plant automating functions as well. All those functions can be categorized as follows. à ¢Ã¢â€š ¬Ã‚ ¢ Starting and shutting down sequences of the plant. à ¢Ã¢â€š ¬Ã‚ ¢ Frequency controlling until the generator is synchronized with the national grid. à ¢Ã¢â€š ¬Ã‚ ¢ Manual and automatic control of the power output. à ¢Ã¢â€š ¬Ã‚ ¢ Quick safety actions in fatal faulty conditions. FUNCTIONAL UNITS The entire system is an integration of several functional units. The system software controls those units. 1. Generator Frequency Counter 2. Grid Frequency Counter 3. Water Level Sensor 4. Valve Position Sensor 5. Stepper Motor Driver 6. Emergency Circuit Breaker unit 7. Main Board LCD interfacing with Microcontrollers Introduction The most commonly used Character based LCDs are based on Hitachis HD44780 controller. In this we will discuss about character based LCDs, their interfacing with various microcontrollers, various interfaces (8-bit/4-bit), programming, special stuff and tricks you can do with these simple looking LCDs which can give a new look to your application. Pin Description 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 charachers, whereas LCDs supporting more than 80 characters .Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (two pins are extra in both for back-light LED connections). Keypad circuit diagram Usually these days you will find single controller LCD modules are used more in the market. So in the tutorial we will discuss more about the single controller LCD, the operation and everything else is same for the double controller too. Lets take a look at the basic information which is there in every LCD. LCD Initialization Before using the LCD for display purpose, LCD has to be initialized either by the internal reset circuit or sending set of commands to initialize the LCD. It is the user who has to decide whether an LCD has to be initialized by instructions or by internal reset circuit. We will discuss both ways of initialization one by one. Initialization by instructions Initializing LCD with instructions is really simple. Given below is a flowchart that describes the step to follow, to initialize the LCD. LCD initialization flow chart Figure 8: Flow chart for LCD initialization As you can see from the flow chart, the LCD is initialized in the following sequence 1) Send command 0x30 Using 8-bit interface 2) Delay 20ms 3) Send command 0x30 8-bit interface 4) Delay 20ms 5) Send command 0x30 8-bit interface 6)Delay 20ms 7) Send Function set see Table 4 for more information 8)Display Clear command 9) Set entry mode command explained below The first 3 commands are usually not required but are recommended when you are using 4-bit interface. So you can program the LCD starting from step 7 when working with 8-bit interface. Programming example for LCD Initialization CODE: LCD_data equ P2      LCD Data port LCD_D7    equ P2.7   LCD D7/Busy Flag LCD_rs    equ P1.0   LCD Register Select LCD_rw    equ P1.1   LCD Read/Write LCD_en    equ P1.2   LCD Enable LCD_init:               mov    LCD_data,#38H   Function set: 2 Line, 8-bit, 57 dots               clr    LCD_rs                           clr    LCD_rw            We are writing in instruction register               setb   LCD_en                        clr    LCD_en               acall LCD_busy      Wait for LCD to process the command               mov    LCD_data,#0FH   Display on, Curson blinking command               clr    LCD_rs                           clr    LCD_rw            We are writing in instruction register               setb   LCD_en                        clr    LCD_en               acall LCD_busy          Wait for LCD to process the command               mov    LCD_data,#01H   Clear LCD               clr    LCD_rs                           clr    LCD_rw            We are writing in instruction register               setb   LCD_en                        clr    LCD_en               acall LCD_busy         Wait for LCD to process the command               mov    LCD_data,#06H   Entry mode, auto increment with no shift               clr    LCD_rs             Selected command register               clr    LCD_rw            We are writing in instruction register               setb   LCD_en                        clr    LCD_en               acall LCD_busy    Wait for LCD to process the command               ret                            Digital Countdown Timer (AT89C2051) A simple count-down LED timer that counts in minutes and seconds. Three buttons below the LED provide control of the unit, allowing you set the desired countdown time in minutes and seconds and a start/stop button. Completion of the countdown is indicated by an alarm that starts when the countdown has finished and the display reads zero. The alarm is stopped by pressing the start/stop button. Circuit diagram:- count AUTOMATIC SOLAR TRACKER AUTOMATIC SOLAR TRACKER starts following the SUN right from dawn, throughout the day, till evening, and starts all over again from dawn next day. On cloudy weathers, it remains still and catches the SUN again as it slips out of clouds. It does all this automatically, employs cheap and inexpensive components, and is very accurate. Let us see how it does all this. There are three Electronic Modules to be explained. First one is the HORIZONTAL SENSOR MODULE. It employs the timer 555 in the MONOSTABLE MODE. PIN 2(Trigger Pin of 555) is hooked up with a VOLTAGE DIVIDER NETWORK (PLEASE see FIGURE 2). PIN 4(Reset) is hooked up with ANOTHER VOLTAGE DIVIDER NETWORK.   Fig 1: Block diagram of the tracker following the sun all through  Fig 1: Block diagram of the tracker following the sun all through fig 4: Stepper motor control board  Fig: Stepper motor control board I have only shown the Horizontal Motor Control Circuit. The Vertical One uses a similar Decade Counter, NPN Transistors, and Diodes (to encounter BACK EMF of Power Transistors due to Fast Switching). I chose for a Steep Angle of 2 Degrees for the Unipolar Steppers. They are driven in a Normal 4 Step Sequence, first coil A is energised simultaneously with coil B, then coil C with coil D. Thus the Motors rotate by 2 degrees each time. The Charging Interval is almost in synchronism with the steps/second speed of the motors, to avoid false triggering. STEPPER MOTOR Introduction This section will explain you everything that you need to know about stepper motors. Stepper motors can be used in various areas of your microcontroller projects such as making robots, robotic arm, automatic door lock system etc. This tutorial will explain you construction of stepper motors, basic principal, different controlling types (Half step and Full step), Interfacing Techniques (using L293D or ULN2003) and programming your microcontroller in C and assembly to control stepper motor. Unipolar stepper motor The unipolar stepper motor has five or six wires and four coils (actually two coils divided by centre connections on each coil). The centre connections of the coils are tied together and used as the power connection. They are called unipolar steppers because power always comes in on this one pole. Bipolar stepper motor The bipolar stepper motor usually has four wires coming out of it. Unlike unipolar steppers, bipolar steppers have no common centre connection. They have two independent sets of coils instead. You can distinguish them from unipolar steppers by measuring the resistance between the wires. You should find two pairs of wires with equal resistance. If youve got the leads of your meter connected to two wires that are not connected (i.e. not attached to the same coil), you should see infinite resistance (or no continuity). As already said, we will talk mostly on Unipolar stepper motors which is most common type of stepper motor available in the market. A simple example of 6 lead step motor is given below and in 5 lead step motor wire 5 and 6 are joined together to make 1 wire as common. Unipolar stepper motor coils Working of Stepper Motor Now lets discuss the operation principal of a stepper motor. When we energize a coil of Stepper motor, the shaft of stepper motor (which is actually a permanent magnet) align itself according to poles of energized coil. So when motor coils are energized in a particular sequence, motor shaft tend to align itself according to pole of coils and hence rotates. A small example of energizing operation is given below. working principal of stepper motor You can see in the example, when coil A is energized, A north-south polarity is generated at A+A as shown in the figure above and magnetic shaft automatically align itself according to the poles generated. When the next coil is energized the shaft again aligns itself and takes a step. Hence , the working principal. working principal of stepper motor We have seen that to make the stepper motor work, we need to energize coil in a sequence. The explanation and generation of the sequence is explained in the next section of the tutorial. Stepper Motor interfacing with Microcontrollers: Programming Stepper motor Programming Full step Sequence I am assuming that stepper motor is connected at Port 1.0 to Port 1.3. Adjusting the delay will increase or decrease the speed of the motor. Here just for demonstration i have taken some delay, you can change it as you want.    org 0H stepper equ P1 main:             mov stepper, #0CH             acall delay             mov stepper, #06H             acall delay             mov stepper, #03H             acall delay             mov stepper, #09H             acall delay             sjmp main delay:             mov r7,#4 wait2:             mov r6,#0FFH wait1:             mov r5,#0FFH wait:             djnz r5,wait             djnz r6,wait1             djnz r7,wait2             ret             end The working of the above code can be seen in the demo animation below. unipolar stepper motor in full step sequence Programming Half step Sequence Assembly Programming: Here also the main routine changes rest everything remains same. CODE: main:             mov stepper, #08H             acall delay             mov stepper, #0CH             acall delay             mov stepper, #04H             acall delay             mov stepper, #06H             acall delay             mov stepper, #02H             acall delay             mov stepper, #03H             acall delay             mov stepper, #01H             acall delay             mov stepper, #09H             acall delay             sjmp main The working of the above code can be seen in the demo animation below. unipolar stepper motor in half step sequence Water level indicator cum controller Water level indicator is which pumps water from the sump (unrepresented concept implements controlling of pump reground tank) to the overhead tank, using 8951 microcontroller. The control panel i.e. the main control unit of the system which consists of the primary control switches, pump indicator, siren and level indicators. The visual example of how switches. And the indicators can be placed as shown the figure below. Front view of the model Front view of the model In the figure shown above there are total of nine LEDs, four of which indicates the water level in the tank, another four indicates the water level in the sump and one LED indicates whether the pump is ON/OFF. It also consists of three switches. 1. Switch 1 is the main power switch which is used to activate the system. 2. Switch 2 is used to select whether to operate the pump in AUTO or MANUAL mode. 3. Switch 3 comes to picture only when the system is operated in MANUAL mode. It controls the direct activation of the pump. Description: This system is built around an 8951 microcontroller and the circuit diagram is as given below. Circuit diagram of Water level indicator cum controller As you can see in the above diagram, port 0 is exclusively used as an input port which takes the information regarding the water level in the sump as well as in the overhead tank. Port 1 is used as output port which is connected to the indicator that indicates the water level in both the tanks. Port 2 is used as in/out port, it takes the input from switch 2 and switches 3 and gives the output which is connected to pump indicator, siren and the relay which controls the switching of the pump. Working of the system: There are two modes of working for the system 1. Manual mode 2. Auto mode Manual mode: When the system is active and in manual mode, it only indicates the water levels in the tanks and it doesnt control any working of the pump. To activate the pump in manual mode switch 3 is used. In this mode the operator should manually control the working of the pump. As in case if the tank is full, operator should switch of the pump which is not the case when compared to auto mode. Auto mode: When the system is active and in auto mode, it only indicates the water levels in the tanks and it controls the working of the pump. Conclusion   Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚   This is the easiest way to make the Host Computer to pin connection. The next step is actually using this connection to download programs to the internal memory and to receive debug information through the IC. Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, and toys. By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes. Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic systems.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.