Monday, May 18, 2009

Project 1 : Speed Control of Induction Motor Using PIC Microcontroller

The hardware involved in this project is described in the following sections.




1. PIC Microcontroller
For controlling purpose, the PIC Microcontroller 16F877A has been chosen for this experiment because it is cheap, easily available, easy to load program and has less instruction for programming process. The PIC microcontroller 16F877A purchased comes with a Starter Kit set as shown in the figure below. Its specifications are as follow:

· 40-pins
· 35 single-word instructions to be learned
· Operating speed: DC – 20 MHz clock input and DC – 200ns instruction cycle
· Analog Features: 10 bit, 8 channel analog-to-digital converter
· 2 pin outs for PWM






2. Induction Motor

The induction motor used for the experiment is a three-phase induction motor from ABB UK with a frame size of 80B as shown in the figure below. The motor has the following specifications:
· Power: 0.75kW (1Hp)
· Rated Speed: 1410 rpm
· Rated Voltage: 230V
· Rated Torque: 5.08 Nm
· Maximum Torque: 19.812 Nm
· Rated Current: 3.306 A
· Pole: 4
· Moment of Inertia: 0.00156 kgm2Weight: 10.5 kg





3. Three-Phase Inverter

The function of the three-phase inverter is to vary the input voltage into the induction motor based on external signal (0-10V) from the PIC. The three-phase inverter used in this project is TOSHIBA Tosvert VF-S7 series industrial inverter as shown in the figure below.





4. Speed Sensor

In order to construct a close-loop system, speed sensor was used to sense the speed of the induction motor. Signal from the sensor is needed by the PIC as the input signal. The speed sensor for this project is an inductive proximity sensor that is connected to a Guntberg AT100 control unit as shown in the figure below. The Guntberg AT100 will decode the signal from the sensor and then display the speed of the induction motor in rpm.






5. Magnetic Brake

The induction motor is subjected to a loading from a 24V DC magnetic brake as shown in the figure below. The purpose of the magnetic brake is to reduce speed of the induction motor for close-loop system implementation. The magnetic brake has a maximum range of 10 Nm and is connected to a Guntberg AT200 control unit. The AT200 will control the magnitude of loading into the induction motor through the magnetic brake. Figure below shows the Guntberg AT200.








6. Potentiometer

The purpose of potentiometer is to vary the voltage by varying resistance value. For this project, a B5K potentiometer has been selected and it has maximum range of 4.14 kΩ. Figure below shows the potentiometer used for this project.




7. Operational Amplifier 741 (op-amp 741)

The function of the op-amp is to amplify signal (voltage) without changing the natural frequency of the signal. For the project, op-amp is used to amplify the voltage from PIC to the three-phase inverter. Using non-inverting amplifier, the voltage from PIC was amplified from 0-5V to 0-10V. The op-amp that used for this project is shown in the figure below.




Sunday, May 17, 2009

PIC Microcontroller

1. Introduction

In the 1980s an American IC manufacturer called Arizona Microchip Inc. produced simple microcontrollers which they called Peripheral Interface Controllers, or PICs. They had a small following, but their big break came in the early 1990s when they released the 16C5X series. Compared with other microcontrollers at the time, these new devices were astonishingly fast, efficient and easy for engineers to understand and program. Moreover, they were also inexpensive, readily available and obtainable in a wide range of different varieties. PICs are now among the most widely used microcontrollers in the world, with hundreds of millions being sold. Despite their popularity, they have never suffered the severe shortages which have plagued other manufacturers in recent times. In addition, PIC actually stands for several names as shown below:
· Peripheral Interface Controller
· Parallel Interface Controller
· Peripheral Interface Computer
· Parallel Interface Computer



2. PIC Microcontroller Basic Elements

As one type of microcontroller, PIC Microcontroller has built-in internal element as being discussed earlier. In addition, some PIC come with Pulse Width Modulation (PWM) module to generate modulate signal. The next chapter will discuss in detail about PWM. In this chapter, PIC Architecture, Instruction Set, clock/instruction cycle and PIC program memory will be explained.



3. PIC Architecture

The architecture of a microcontroller defines the way the internal components are connected. It sets the standard for all devices that connect to it and all the software that runs on it. It specifies how much memory is needed and how it is managed. It specifies register size, bus width and how data is processed. Most microcontrollers use one of two basic architectures, von Neumann or Harvard. Their major characteristics are described below.

· Von Neumann Architecture
Devices using von Neumann architecture have a single area of memory which is used to store instructions as well as data.

· Harvard ArchitectureHarvard architecture devices are divided into two distinct sections. One is used to store instructions (program memory) and the other is used to store data (data memory).


4. Instruction Set

Similar to spoken language which is divided into a number of recognizable words, the language used by the microcontroller is divided into a number of instructions. The list of instructions which the microcontroller understands is called the instruction set. The instruction set stipulates what functions the microcontroller can perform and how instructions need to be written to activate them. The architectures of microcontrollers may be further classified into the type of instruction sets they use.

· CISC (Complex Instruction Set Computer)
Microcontrollers using CISC systems have a large quantity of very detailed commands.

· RISC (Reduced Instruction Set Computer)
A reduced instruction set is made up of a number of key instructions.

To illustrate the difference between the two systems, the example of a 'divide' command can be used. A CISC system would have a dedicated 'divide' command. A RISC system may not contain the command 'divide', but will contain all the lower level instructions needed to perform a divide operation. The comparisons for the commands used to perform a divide operation between CISC and RISC are shown in the table below.

RISC computer architecture has reduced chip complexity by using simpler instructions which are also of more constant size. The RISC chip is faster than its CISC counterpart, and is designed and built more economically.



5. Clock / instruction cycle
Clock is microcontroller's main starter, and is obtained from an external component called an "oscillator". Clock from the oscillator enters a microcontroller via OSC1 pin where internal circuit of a microcontroller divides the clock into four even clocks Q1, Q2, Q3, and Q4 which do not overlap. These four clocks make up one instruction cycle (also called machine cycle) during which one instruction is executed.

Execution of instruction starts by calling an instruction that is next in string. Instruction is called from program memory on every Q1 and is written in instruction register on Q4. Decoding and execution of instruction are done between the next Q1 and Q4 cycles. The following diagram shows the relationship between instruction cycle and clock of the oscillator (OSC1) as well as that of internal clocks Q1-Q4. Program counter (PC) holds information about the address of the next instruction.




6. Program Memory

The hex file created by the assembler is programmed into the program memory of the PIC. The program memory will be one of several different types. These type RAM, ROM, EPROM, OTP EPROM, EEPROM and FLASH MEMORY.



7. Pulse Width Modulation (PWM)

The function for Pulse Width Modulation (PWM) is to control switching condition by producing sequence of quadrangle pulse as shown in the figure below.



PWM have three basic elements as shown in the figure below.

· Oscillator = to generate triangle wave.

· Gated Latch = to execute modulation to produce sequence of quadrangle pulse. Beside that, its has function as voltage comparator – comparing oscillator output voltage, Vosc with capacitor output voltage , Verror to produced sequence of quadrangle pulse, V1.

Capacitor = to stop any voltage changes for smoothing output voltage, Vo.


Project Using Microcontroller