Professional Documents
Culture Documents
The chopper required with the dummy load can be fabricated with either Thyristor or
MOSFET the latter is a better option if rated current requirements are not very high. A grid
power failure will be reflected as reverse power flow towards the grid which anyway will be
sensed and preventive measure; increasing dummy load current will be adopted by the controller.
This control action can also be modified to isolate the WEG in case of islanding.
3.5 Selection of the Micro-Controller
The controller has three main functions:
Sense the speed of the WEG thereby determining the mode of operation of the machine.
The speed is sensed from the width of the pulse train given by the speed sensor
(MOC7811). Hence a speed sensor code is realized and tested in the laboratory.
Calculate the frequency of the grid, based on this frequency it has to operate the chopper
to prevent the excess power flow to the grid. This frequency is calculated from the input
given from the step down transformer and can be calculated by using the ADC module in
of the PWM signals depends upon the frequency increases from the base frequency.
To suite the above specifications of the controller we go in for PIC16F877A
microcontroller[7].
This is capable of performing the above all the above tasks. The following components in the
PIC enable us to perform the above tasks:
The Compare, Capture, PWM module (CCP module) is used to measure the pulse width
of the incoming pulses from the speed sensor. It uses the capture module to capture the
rising edge of each pulse. The time difference between two rising edges gives the time
Step1: Start
Step2: Initialization function, Configure the port C as input (RC2 pin).
The interrupt register CCP1 is initialized for capture mode. The ports of TMR1 are cleared and
enabled. TMR1 is initialized with a prescaler value of 1:8
Step3: Interrupt function, clear the interrupt, switch on the timer and switch off the timer. Clear
the CCPR1H, CCPR1L register.
Step4: Calculation function, check the captured timer value with base values and generate the
PWM pulses according to the input frequency. Base values should be in hexa decimal so that
easily compared with the captured value.
Step5: output of pic will be PWM pulses from the pin CCP2(RC1) pin is given to the gate driver
circuit.
3.7 Algorithm for Speed Sensor
As mentioned earlier, the speed sensor used is optoelectric sensor (MOC7811). The
sensor senses the speed and the output is sent to the PIC16F877A where the calculation of speed
is performed. The algorithm and the coding for the calculation is given below.