Professional Documents
Culture Documents
A. Operation Scenarios
B. Although all input and output ports of the proposed MPCs are
capable of bidirectional power flow, our target application in this paper
is a standalone PV system where a PV panel, a unidirectional power
source, is tied to one of the ports. A rechargeable battery and non-
regenerative load are connected to the remaining ports.
C.
D. For the MPCs having three input and output ports, controlling
two of them automatically determines the remaining one, as expressed
by the simple equation;
where Pin, Pout, and Pbat are the input, output, and battery powers, respectively,
as designated in Fig. 1(b). Depending on the power balance among three
ports, the MPC operates in one of the following three scenarios: the CC–CV
battery charging mode, battery discharging mode, and MPPT mode, as
illustrated in Fig. 4.
CC–CV Battery Charging Mode (Pin > Pout) [Fig. 4(a)]: The PV panel is
capable of supplying not only Pout but also Pbat, and
P
in Pout Pbat ,
the surplus power (i.e., Pin−Pout) is greater than the acceptable charging power of
the battery. Hence, a charging current or voltage is regulated to be constant. In
other words, Pbat is regulated based on the CC–CV charging scheme in this
operation mode. The MPC regulates Pbat and Pout with PWM and PS controls,
respectively, whereas Pin is unregulated in this mode. The detailed operation
analysis for the battery charging mode will be performed.
CHAPTER – II
DESCRIPTION
MICROCONTROLLER
MICROCONTROLLER
PIC MICROCONTROLLER
The PICmicro has some advantages in many applications over the older
chips such as the Intel 8048/8051/8052 and its derivatives, the Motorola
MC6805/6hHC11, and many others. Its unusual architecture is ideally suited for
embedded control. Nearly all instructions execute in the same number of clock
cycles, which makes timing control much easier. The PICmicro is a RISC
(Reduced Instruction Set Computer) design, with only thirty-odd instructions
to remember; its code is extremely efficient, allowing the PIC to run with typically
less program memory than its larger competitors.
Very important, though, is the low cost, high available clock speeds,
small size, and incredible ease of use of the tiny PIC. For timing-insensitive
designs, the oscillator can consist of a cheap RC network. Clock speeds can range
from low speed to 20MHz. Versions of the various PICmicro families are
available that are equipped with various combinations ROM, EPROM, OTP (One-
Time Programmable) EPROM, EEPROM, and FLASH program and data
memory. An 18-pin PICmicro typically devotes 13 of those pins to I/O, giving the
designer two full 8-bit I/O ports and an interrupt. In many cases, designing with a
PICmicro is much simpler and more efficient than using an older, larger embedded
microprocessor.
ADVANTAGES OF MICROCONTROLLER
If a system is developed with a microprocessor the designer has to go for
external memory such as RAM ,ROM or EPROM and peripherals and hence
the size of the PCB will large enough to
hold all the required peripheral. But, the microcontroller has got all there
peripheral facilities on a single chip so developed of a similar system with a
microcontroller reduces PCB size and cost of the design.
One of the major difference between a microcontroller and a microprocessor
is that a controller. often deals with bits,not bytes as in the real world
application, for example switch contacts can only be open or close
,indicators should be lit or dark and motors can be either turned on or off and
so forth.
The microcontroller has two 16 bits timer/counters built within it, which
makes it more suitable to this application since, we need to produce some
accurate time delays.
I/O PORTS
Some pins for these I/O ports are multiplexed with an alternate function for
the peripheral features on the device. In general, when a peripheral is enabled, that
pin may not be used as a general purpose I/O pin. Additional information on I/O
ports may be found in the PICmicro™ Mid-Range Reference Manual, (DS33023).
The Data EEPROM and FLASH Program Memory are readable and writable
during normal operation over the entire VDD range. These operations take place
on a single byte for Data EEPROM memory and a single word for Program
memory. A write operation causes an erase-then-write operation to take place on
the specified byte or word. A bulk erase operation may not be issued from user
code (which includes removing code protection). Access to program memory
allows for checksum calculation. The values written to program memory do not
need to be valid instructions. Therefore, up to 14-bit numbers can be stored in
memory for use as calibration parameters, serial numbers, packed 7-bit ASCII, etc.
Executing a program memory location containing data that form an invalid
instruction, results in the execution of a NOP instruction. The EEPROM Data
memory is rated for high erase/ writes cycles (specification D120). The FLASH
program memory is rated much lower (specification D130), because EEPROM
data memory can be used to store frequently updated values. An on-chip timer
controls the write time and it will vary with voltage and temperature, as well as
from chip to chip. Please refer to the specifications for exact limits (specifications
D122 and D133). A byte or word write automatically erases the location and writes
the new value (erase before write). Writing to EEPROM data memory does not
impact the operation of the device. Writing to program memory will cease the
execution of instructions until the write is complete. The program memory cannot
be accessed during the write. During the write operation, the oscillator continues to
run, the peripherals continue to function and interrupt events will be detected and
essentially “queued” until the write is complete. When the write completes, the
next instruction in the pipeline is executed and the branch to the interrupt vector
will take place, if the interrupt is enabled and occurred during the write. Read and
write access to both memories take place indirectly through a set of Special
Function Registers (SFR). The six SFRs used are:
• EEDATA
• EEDATH
• EEADR
• EEADRH
• EECON1
• EECON2
TIMER0 MODULE
TIMER1 MODULE
• As a timer
• As a counter
The operating mode is determined by the clock select bit, TMR1CS (T1CON<1>).
In Timer mode, Timer1 increments every instruction cycle. In Counter mode, it
increments on every rising edge of the external clock input. Timer1 can be
enabled/disabled by setting/clearing control bit, TMR1ON (T1CON<0>). Timer1
also has an internal “Reset input”. This Reset can be generated by either of the two
CCP modules. Register 6-1 shows the Timer1 Control register. When the Timer1
oscillator is enabled (T1OSCEN is set), the RC1/T1OSI/CCP2 and
RC0/T1OSO/T1CKI pins become inputs. That is, the TRISC<1:0> value is ignored
and these pins read as ‘0’.
TIMER2 MODULE
Timer2 is an 8-bit timer with a prescaler and a postscaler. It can be used as the
PWM time-base for the PWM mode of the CCP module(s). The TMR2 register is
readable and writable, and is cleared on any device RESET. The input clock
(FOSC/4) has a prescale option of 1:1,1:4, or 1:16, selected by control bits
T2CKPS1:T2CKPS0 (T2CON<1:0>). The Timer2 module has an 8-bit period
register, PR2. Timer2 increments from 00h until it matches PR2 and then resets to
00h on the next increment cycle. PR2 is a readable and writable register. The PR2
register is initialized to FFh upon RESET. The match output of TMR2 goes
through a 4-bit postscaler (which gives a 1:1 to 1:16 scaling inclusive) to generate
a TMR2 interrupt (latched in flag bit TMR2IF, (PIR1<1>)). Timer2 can be shut-off
by clearing control bit TMR2ON (T2CON<2>), to minimize power consumption.
CRYSTAL OSCILLATOR
Every PIC needs a clock. The PIC uses four clock cycles to complete one
instruction cycle. Since the PIC is fully static, the clock rate can vary from DC
(nothing) to the maximum rated speed, which is currently around 20MHz for some
parts. What do we mean by "fully static"? Some microprocessors use some
dynamic circuitry internally, which operate similar to dynamic RAM. These
processors have a certain specified minimum clock frequency which must be
maintained, just like a minimum power supply voltage. The PIC has no such
limitation; the processor clock can be completely stopped. In fact, the SLEEP
instruction does just that - shuts down the clock oscillator! This leads to enormous
power savings. A PIC in sleep mode will draw just a few microamperes.
We are using crystal oscillator in our project. The first three methods use
either a parallel-cut crystal or a ceramic resonator. LP mode is generally used for
low-power applications using watch-type crystals or ceramic resonators in the 32
kHz to 200 kHz range. XT mode is used from typically 455 kHz to 4MHz, and HS
mode is usually used above 4MHz. The modes are very similar except for the
amount of drive supplied to the crystal. In these three modes, an external clock
source can also be used instead of a crystal or resonator. If you have an existing
clock signal of the desired frequency in your circuit, you can connect this signal to
the OSC1 pin and leave the OSC2 pin open.
The last mode is RC mode. If your application is not at all timing sensitive,
RC mode is simple and inexpensive. To use this mode, you simply connect and
external resistor ranging from 5K to 100K Ohms from Vdd to OCS1, and an
external capacitor from OSC1 to Vss. The external capacitor can be eliminated,
but Microchip warns that the frequency can vary widely and change often. They
recommend at least 20pF of external capacitance for anything resembling stable
operation. Of course, RC mode will be affected much more than any of the crystal
or resonator modes by temperature, part to part variations, etc.
The essential feature of this arrangement is that for both polarities of the voltage at
the bridge input, the polarity of the output is constant.
When the input connected at the left corner of the diamond is positive with
respect to the one connected at the right hand corner, current flows to the right
along the upper colored path to the output, and returns to the input supply via the
lower one.
FILTERS: In order to obtain a dc voltage of 0 Hz, we have to use a low pass filter. so
that a capacitive filter circuit is used where a capacitor is connected at the rectifier
output& a dc is obtained across it. The filtered waveform is essentially a dc voltage
with negligible ripples & it is ultimately fed to the load.
REGULATORS: The output voltage from the capacitor is more filtered & finally
regulated. The voltage regulator is a device, which maintains the output voltage
constant irrespective of the change in supply variations, load variations & temperature
changes. Here we use fixed voltage regulator namely LM7805.The IC LM7805 is a
+5v regulator which is used for microcontroller.
Circuit Diagram:
• Output Current up to 1A
PULSE-WIDTH MODULATION
Pulse-width modulation (PWM), or pulse-duration modulation (PDM),
is a modulation technique that controls the width of the pulse, formally the pulse
duration, based on modulator signal information. Although this modulation
technique can be used to encode information for transmission, its main use is to
allow the control of the power supplied to electricaldevices, especially to inertial
loads such as motors. In addition, PWM is one of the two principal algorithms used
in photovoltaic solar battery chargers, the other being MPPT. The average value of
voltage (and current) fed to the load is controlled by turning the switch between
supply and load on and off at a fast pace. The longer the switch is on compared to
the off periods, the higher the power supplied to the load.
The PWM switching frequency has to be much higher than what would
affect the load (the device that uses the power), which is to say that the resultant
waveform perceived by the load must be as smooth as possible. Typically
switching has to be done several times a minute in an electric stove, 120 Hz in a
lamp dimmer, from few kilohertz (kHz) to tens of kHz for a motor drive and well
into the tens or hundreds of kHz in audio amplifiers and computer power supplies.
The term duty cycle describes the proportion of 'on' time to the regular interval or
'period' of time; a low duty cycle corresponds to low power, because the power is
off for most of the time. Duty cycle is expressed in percent, 100% being fully on.
The main advantage of PWM is that power loss in the switching devices is
very low. When a switch is off there is practically no current, and when it is on and
power is being transferred to the load, there is almost no voltage drop across the
switch. Power loss, being the product of voltage and current, is thus in both cases
close to zero. PWM also works well with digital controls, which, because of their
on/off nature, can easily set the needed duty cycle.
PWM has also been used in certain communication systems where its duty cycle
has been used to convey information over a communications channel.
Principle:
Time proportioning
Many digital circuits can generate PWM signals (e.g., many
microcontrollers have PWM outputs). They normally use a counter that increments
periodically (it is connected directly or indirectly to the clock of the circuit) and is
reset at the end of every period of the PWM. When the counter value is more than
the reference value, the PWM output changes state from high to low (or low to
high). This technique is referred to as time proportioning, particularly as time-
proportioning control– which proportion of a fixed cycle time is spent in the high
state. The incremented and periodically reset counter is the discrete version of the
intersecting method's sawtooth. The analog comparator of the intersecting method
becomes a simple integer comparison between the current counter value and the
digital (possibly digitized) reference value. The duty cycle can only be varied in
discrete steps, as a function of the counter resolution. However, a high-resolution
counter can provide quite satisfactory performance.
Power delivery
PWM can be used to control the amount of power delivered to a load
without incurring the losses that would result from linear power delivery by
resistive means. Potential drawbacks to this technique are the pulsations defined by
the duty cycle, switching frequency and properties of the load. With a sufficiently
high switching frequency and, when necessary, using additional passive electronic
filters, the pulse train can be smoothed and average analog waveform recovered.
High frequency PWM power control systems are easily realisable with
semiconductor switches. As explained above, almost no power is dissipated by the
switch in either on or off state. However, during the transitions between on and off
states, both voltage and current are nonzero and thus power is dissipated in the
switches. By quickly changing the state between fully on and fully off (typically
less than 100 nanoseconds), the power dissipation in the switches can be quite low
compared to the power being delivered to the load. Modern semiconductor
switches such as MOSFETs or Insulated-gate bipolar transistors (IGBTs) are well
suited components for high efficiency controllers. Frequency converters used to
control AC motors may have efficiencies exceeding 98%. Switching power
supplies have lower efficiency due to low output voltage levels (often even less
than 2 V for microprocessors are needed) but still more than 70–80% efficiency
can be achieved.
Variable-speed fan controllers for computers usually use PWM, as it is far
more efficient when compared to a potentiometer or rheostat. (Neither of the latter
is practical to operate electronically; they would require a small drive motor.) Light
dimmers for home use employ a specific type of PWM control. Home-use light
dimmers typically include electronic circuitry which suppresses current flow
during defined portions of each cycle of the AC line voltage. Adjusting the
brightness of light emitted by a light source is then merely a matter of setting at
what voltage (or phase) in the AC halfcycle the dimmer begins to provide electrical
current to the light source (e.g. by using an electronic switch such as a triac). In
this case the PWM duty cycle is the ratio of the conduction time to the duration of
the half AC cycle defined by the frequency of the AC line voltage (50 Hz or 60 Hz
depending on the country).
These rather simple types of dimmers can be effectively used with inert (or
relatively slow reacting) light sources such as incandescent lamps, for example, for
which the additional modulation in supplied electrical energy which iscaused by
the dimmer causes only negligible additional fluctuations in the emitted light.
Some other types of light sources such as light-emitting diodes (LEDs), however,
turn on and off extremely rapidly and would perceivably flicker if supplied with
low frequency drive voltages. Perceivable flicker effects from such rapid response
light sources can be reduced by increasing the PWM frequency. If the light
fluctuations are sufficiently rapid, the human visual system can no longer resolve
them and the eye perceives the time average intensity without flicker (see flicker
fusion threshold).
In electric cookers, continuously variable power is applied to the heating
elements such as the hob or the grill using a device known as a Simmerstat. This
consists of a thermal oscillator running at approximately two cycles per minute and
the mechanism varies the duty cycle according to the knob setting. The thermal
time constant of the heating elements is several minutes, so that the temperature
fluctuations are too small to matter in practice.
MOSFET(METAL OXITE SEMICONDUCTOR FIELD EFFECT
TRANSISTOR)
The MOSFET is by far the most common transistor in both digital and
analog circuits, though the bipolar junction transistor was at one time much more
common. In enhancement mode MOSFETs, a voltage drop across the oxide
induces a conducting channel between the source and drain contacts via the field
effect. The term "enhancement mode" refers to the increase of conductivity with
increase in oxide field that adds carriers to the channel, also referred to as the
inversion layer. The channel can contain electrons (called an nMOSFET or
nMOS), or holes (called a pMOSFET or pMOS), opposite in type to the substrate,
so nMOS is made with a p-type substrate, and pMOS with an n-type substrate (see
article on semiconductor devices).
In the less common depletion mode MOSFET, detailed later on, the channel
consists of carriers in a surface impurity layer of opposite type to the substrate, and
conductivity is decreased by application of a field that depletes carriers from this
surface layer. The "metal" in the name MOSFET is now often a misnomer because
the previously metal gate material is now often a layer of polysilicon
(polycrystalline silicon). Aluminium had been the gate material until the mid-
1970s, when polysilicon became dominant, due to its capability to form self-
aligned gates. Metallic gates are regaining popularity, since it is difficult to
increase the speed of operation of transistors without metal gates. Likewise, the
"oxide" in the name can be a misnomer, as different dielectric materials are used
with the aim of obtaining strong channels with smaller applied voltages. An
insulated-gate field-effect transistor or IGFET is a related term almost
synonymous with MOSFET. The term may be more inclusive, since many
"MOSFETs" use a gate that is not metal, and a gate insulator that is not oxide.
Another synonym is MISFET for metal–insulator–semiconductor FET. The basic
principle of the field-effect transistor was first patented by Julius Edgar Lilienfeld
in 1925.
Usually the semiconductor of choice is silicon, but some chip manufacturers,
most notably IBM and Intel, recently started using a chemical compound of silicon
and germanium (SiGe) in MOSFET channels. Unfortunately, many
semiconductors with better electrical properties than silicon, such as gallium
arsenide, do not form good semiconductor-to-insulator interfaces, thus are not
suitable for MOSFETs. Research continues on creating insulators with acceptable
electrical characteristics on other semiconductor material. In order to overcome the
increase in power consumption due to gate current leakage, a high-κ dielectric is
used instead of silicon dioxide for the gate insulator, while polysilicon is replaced
by metal gates (see Intel announcement). The gate is separated from the channel by
a thin insulating layer, traditionally of silicon dioxide and later of silicon
oxynitride. Some companies have started to introduce a high-κ dielectric + metal
gate combination in the 45 nanometer node.
When a voltage is applied between the gate and body terminals, the electric
field generated penetrates through the oxide and creates an "inversion layer" or
"channel" at the semiconductor-insulator interface. The inversion channel is of the
same type, p-type or n-type, as the source and drain, thus it provides a channel
through which current can pass. Varying the voltage between the gate and body
modulates the conductivity of this layer and thereby controls the current flow
between drain and source.
Circuit symbols
A variety of symbols are used for the MOSFET. The basic design is
generally a line for the channel with the source and drain leaving it at right angles
and then bending back at right angles into the same direction as the channel.
Sometimes three line segments are used for enhancement mode and a solid line for
depletion mode. (see Depletion and enhancement modes) Another line is drawn
parallel to the channel for the gate. The "bulk" or "body" connection, if shown, is
shown connected to the back of the channel with an arrow indicating PMOS or
NMOS. Arrows always point from P to N, so an NMOS (N-channel in P-well or P-
substrate) has the arrow pointing in (from the bulk to the channel).
CONCLUSIONS