Sei sulla pagina 1di 20

Medi DSP Sinewave document 1.

0-B 2009 model

Medi DSP based Compact Domestic Sinewave


UPS-cum-Inverter with Charger

Martin's Electronic Devices & Instruments

Isolated sensing of Mains


Cycle-Cycle current Limiting
Low cost driver
LED/7-segment/LCD display

Medi DSP Sinewave document 1.0-B 2009 model

Medi DSP Sinewave document 1.0-B 2009 model

Medi DSP Sinewave document 1.0-B 2009 model

Medi Microcontroller based sinewave UPS/Inverter with charger


Introduction
MEDI has developed a new micro-controller based digital sine wave inverter using DSP (Digital Signal
Processor) with full bridge configuration topology MOSFET switches. This is a modified version of our
2008 Model with added features like:
Isolated sensing of Mains: This will ensure that even if Phase-Neutral connection is reversed at the
input side there will not be any electric shock on the PCB or battery.
Cycle-Cycle current Limiting: This is a enhanced protection method for the short circuit / heavy
load condition.
Low cost driver: The costly driver with TLP250 is replaced with discrete components on the PCB
LED/7-segment/LCD display: The PCB is designed with provision for LED, 7-segment display or
LCD display.
This inverter is best suited for manufacturing for domestic applications as it is simple and easy. It consists
only few components which are easily available, have only 3 smd components and with a single sided pcb.
There are no windings which can possibly cause any error such as DC-CT or EE-16 transformers.
Mounting of heatsink along with mosfets and soldering few components will complete this board. It
consists of a LCD which will display all the parameters of the system and indicates any error during the
functioning of the inverter. A low cost 16 character single line LCD will be of scrolling type, showing the
status of the inverter such as batt voltage, mains voltage, inverter output voltage, inverter standby on/off,
charger on/off, mains/ solar charging and many more. It is very simple to handle and very easy to set the
values in the menu driven set-up mode.
This inverter is a very robust design which will not fail in any extreme conditions.
1.
If 440V is applied to the AC input, it will not fail. It will indicate high voltage cut-off and restart
when voltage is normal.
2.
If AC mains is given to the inverter output, it will not fail. It will indicate phase input output
reverse and continue to work after it is rectified.
3.
It has fold-back current limiting for short circuit and heavy loads. At short circuit or heavy loads,
current limiting action will take place instead of tripping which will lead to more reliability.
Features
LCD display for indicating various status of the system like inverter voltage, mains voltage, battery
voltage, % of load, overload/short circuit status, battery low status, charger status etc.
LCD based Menu driven setup of various parameters like battery full charge voltage, battery low
voltage, load condition, Inverter output voltage, charging current etc.
Protections against: Overload, short circuit, battery deep discharge, battery over charge, mains over
voltage, reverse connection of phase in phase out, reverse connection of phase and neutral of mains
input. In all these error conditions will be shown in the LCD display.
Priority solar charging facility: When solar charger is connected mains charger will be in stand-by
and priority will be for solar charger.
Delayed inverter cutoff for conditions like battery low, overload, short circuit etc. The system will
automatically restart from cutoff after a few second buzzer beeps. The system will go to permenant cutoff
if the error condition exists even after 4 restart.
Bill of materials: Main PCB 850VA Rs. 750/- or less, Transformer 850VA Rs. 2000/-

Medi DSP Sinewave document 1.0-B 2009 model


1. LCD will display
Battery voltage
Inverter output voltage
Percentage of load
Mains voltage
Changer on/off
Solar charging /mains charging
Inverter standby on/off
UPS mode / inverter mode
Phase input output reverse : whether mains is connected to inverter output
Neutral and phase reverse : whether neutral and phase is connected reverse
Overload : if load is above 100% and below 300%
Heavy : if load is above 300%
Short circuit
Overload trip
Heavy load trip
Short circuit trip
2. Menu driven set-up. There is no preset, the parameters such as battery low, charging current, inverter
output voltage, load etc can be set by scrolling up and down keys and press enter.
3. Priority solar charging
4. Inverter/UPS selection switch, micro switch or ordinary switch selectable.
5. Inbuilt SMPS type constant current charging with full charge cut-off.
6. 20KHz operating frequency while inverter and charging, absolutely no sound.
7. Pure sine wave output
8. DSP based very low component cost design
9. Single sided pcb, easy to assemble without any smd components
10. Ideal for Mixed load application

Medi DSP Sinewave document 1.0-B 2009 model

Specification
Battery Input voltage :

12V DC 48V DC

Mains Input voltage :

230V AC, 50Hz.

Mains input range

0V 440V, 45Hz-65Hz

AC Output

230V +/- 3%, 50Hz

Inverter topology

Bridge type center aligned switching. MOSFET based.

Inverter output power :

300VA - 3000VA

Battery charging

Constant current SMPS charging with full charge cutoff

Charging current

Settable upto 15A

Charger working range

120V 270V AC Mains input

(Inverter)

Highlights
1.

Full bridge configuration based on power MOSFETs

2.

DSP based intelligent control

3.

LCD based display for user-friendly display of parameters and status

4.

Protection against 440V mains input

5.

Protection against reverse polarity

6.

Dynamic short circuit protection with fold-back current limiting.

7.

Protections against all possible errors like battery low, over load, heavy load, short circuit etc.

8.
Early warning for battery low and overload conditions. System continue normally if the error is
corrected.
9.

Cutoff and auto restart with permanent cut after 5 consecutive cutoff.

10.

SMPS type constant current charger with full charge cutoff.

11.

Pure sinewave output resulting in silent operation of motor and fans. Safe to all kind of loads.

12.

Ideal for Mixed load application

13.

Indigenous design with proven technology.

14.

Auto detect of LCD and LED. Can change between LED / LCD while the system is powered.

15.

Protection against accidental output feedback disconnection.

Medi DSP Sinewave document 1.0-B 2009 model


Circuit Description
The circuit is given section by section as it is more convenient to explain.

Schematic of dsPIC signal section


The schematic above describes the ADC and other signaling section. The IC U7 is the DSP. Its pins 2
through 7 are the ADC pins. Pin 9 and 10 are the oscillator pins. The details are given in next page:

Medi DSP Sinewave document 1.0-B 2009 model

Pin Number

Functional Description

Reset pin of microcontroller

ADC pin for AC input

ADC pin for AC output

ADC pin for load sensing

ADC pin for switch sensing

ADC pin for Temperature sensing

ADC pin for battery sensing

GND pin

Oscillator pin, Crystal connection goes to this pin

10

Oscillator pin, Crystal connection goes to this pin

11

Buzzer pin

12

Fan control. When this pin become +5V fan switch ON

13

Supply pin +5V

14

Solar Switch

15

Relay Drive

16

Fault Pin for short circuit protection.

17

Pin for LCD / LED control.

18

Pin for LCD / LED control.

19

GND pin

20

Supply pin +5V

21
22

Pin for LCD / LED control.

23
24
25

Drives the MOSFETs. Pin 23, 25 drive the GND side


mosfet and pins 24, 26 drives the upper side MOSFETs

26
27

GND pin

28

Supply pin +5V

These pins are very sensitive. Do not touch these pins or extend wires from them, which can cause
unwanted reset of DSPIC.

Medi DSP Sinewave document 1.0-B 2009 model

ADC section
AC input and output sensing
The AC input and AC output sensing is with the sense module. The resistors R44-R49 and R51-R56
determine the scale-down of the mains voltage. It is recommended to use metal film resistors for these
parts. The module scale down the voltage and give to the dsPIC. It was found that it is better to put a
filtering capacitor of 0.1uF disc from the mains sensing pin to GND. (From pin 2 to Pin 27). This give
better stability for mains sensing. Whenever this capacitor is connected or removed the mains input is to be
re-calibrated.

Load Sensing
The load sensing is through the current transformer (CT) T1. You can use CT1200 or the equivalent. The
shunt resistor R61 determine how much voltage is sensed for the load. A recommended value for this
resistor is 100 Ohm divided by KVA. That is, for 1KVA R40 = 100 / 1 = 100 Ohms. For 500VA R40 = 100
/ 0.5 = 200 = 220 Ohms or 180 Ohm.
Note: When mains is absent and inverter is switched off the voltage at pin 2, 3 and 4 will be very near to
completed.

Battery Sensing
The battery sensing is through a simple resistor divider with R43, R69. The capacitor C31 is used for a
filtering. The values of the resistors is not critical because the system has battery voltage calibration. But
much drift in the values of the sensing resistors will result in improper sensing of the battery voltage. A
usual mistake that found is that for 2 battery system the manufacturer put R43 = 47K which is the value of
single battery. In this case when the battery reach near full charge the ADC input will reach its peak
voltage and further increase in the battery voltage will not be sensed. The formula for R43 is:
R43 = 47 + 51 X (N-1) where N = number of batteries.
With this formula you get the resistor value in Kilo Ohms.
It is expected that the voltage appear at pin 7
example when battery voltage = 12V voltage at pin 5 = 12/4.92 = 2.44V. If number of battery = 2, the
value K = 4.92 X 2 = 9.84. So when battery voltage = 24V the voltage at pin 5 is same 2.44V. If the battery
voltage divider resistor values are changed the battery voltage sensing will be improper.
The usual error happen is the capacitor C31 across R69 has a leakage and hence the sensing
voltage at pin 5 is much below the expected voltage. In this condition the battery voltage
calibration can not be completed as expected. Other error that manufacturers make is the
value of R43 is not increased when number of battery = 2 or more. This will make the
voltage at pin 5 above 5V. In this condition the system will not sense the battery voltage if it
rise above 25V (approximate) and hence the full charge will not be sensed.

Temperature sensing
Temperature is sensed with an NTC or dedicated temperature sensing IC MPC9701. We recommend to use
MCP9701 because non standard NTC cause improper working. The MCP9701 is placed near the heatsink
with it flat surface facing the heatsink so that it can be tightned to the big heatsink. See the figure below

Medi DSP Sinewave document 1.0-B 2009 model

Sensing of Switches
The switches are sensed through one ADC pin itself. This is for saving the controller pins. Resistances
R57, R58, R59 and R70 form a divider network. The values of these resistances are selected in such a way
that the voltage at pin 7 of the controller will be significantly different in different possible combination of
the switches.
The 3 switches that can be connected to the connector CN4 are:
1.

ON/OFF switch

2.

Automotive battery / Tubular Battery selection switch

3.

UPS / Inverter selection switch.

10

Medi DSP Sinewave document 1.0-B 2009 model


Also note that if needed we have provided seperate switch for Solar charger / Mains Charger selection .
This switch is connected to the last pin of CN4. If the solar selection is not needed 4 pin connector can be
used for CN4. If 4 pin connector is used the connection is exactly same as the old model dsPIC inverter.

Relay driving
Pin 15 is for relay driving. This is done through Q26 transistor BC639. Also note that a torroid core T12.5
page 19 (or around). In order to speed up the changeover the relay switch on is
done with a separate circuit. This is shown in the next page.

Buzzer
Pin 11 through a transistor is for buzzer control. You can use a good quality B20 buzzer. It was practically
found that low quality buzzers available in market which will fail without any reason after few weeks.

Fan control
Pin 12 is for fan controlling. It is driven through a transistor. A regulator IC 7812 is used to assure that the
voltage for fan does not go above 12V. This is recommended for reliable operation.
The fan should be screwed to the heatsinks, in such a way that air from the fan blow
directly towards the heatsinks. The small heatsinks are aligned in such a way that a
commonly available 3 inch fan can be screwed to the heatsink.
The fan is controlled as per the temperature sensed with the sensor connected to pin 6 of the controller.

Medi DSP Sinewave document 1.0-B 2009 model

11

LCD control
The six pins 17, 18, 21 and 22 are used for LCD driving. These pins along with +5V, GND coming to the
connector CN5 which is used to connect the LCD driving PCB. The wiring of LCD is given somewhere in
the following pages of this document.

MOSFET driving signals and display handling


Pins 23, 24, 25 and 26 are used to drive the MOSFETs. The schematic of mosfet driving section is given
below

Schematic of MOSFET driving section. Relay fastening section also shown


The schematic of mosfet driving section is direct and self explaining. There is nothing more to explain
with the MOSFET driving circuit. The relay fastening is done through the connector CN3, resistor R40,
diode D17 and capacitor C26. A 45V winding from the transformer is to be connected to CN4. This
winding can be done with very thing guage wire.

12

Medi DSP Sinewave document 1.0-B 2009 model

MOSFET driving and short circuit sensing

The circuit shows one side drives of the MOSFETs. The upper and lower drives are shown. The upper and
lower drives of the other side is exactly similar to this. The circuit also shows the current sensing and short
circuit signaling section based on LM393 (U3)

Medi DSP Sinewave document 1.0-B 2009 model

13

MOSFET drive to the ground side MOSFETs is done with 4 transistors Q24, Q14, Q12 and Q22. Similar
circuit is used to drive the other lower side MOSFETs. Higher side drive is with opto-coupler and its
associated circuit.

Current sensing
High speed sensing of MOSFET current is done with diodes D7, D8, D9, D10 and resistors R22, R23.
Common point of D7 and D8 will have the voltage corresponding to the MOSFET current. This is
compared by the opamp U3 (LM339) and the signal is given to pin 16 of the dsPIC. Note that this is only
for the hazard current sensing of MOSFETs. The load measurement is done with current transformer
CT1200.

14

Medi DSP Sinewave document 1.0-B 2009 model

View of the system from the user side


As per the wiring given in the following pages the system has two terminals for battery connection, 3
terminals for AC input, AC output and Neutral. The LCD and switch wiring is to be connected as shown.
The 3 switches that can be connected to the connector CN4 are:
1.

ON/OFF switch

2.

Automotive / Tubular battery selection switch

3.

UPS / Inverter selection switch.

One more connection terminal is present in the CN4 which is used for solar charger selection. Note that
solar charger / mains charger selection is not done manually, but automatically by the solar charger circuit.
Normally the ON/OFF switch is provided in the front panel. The UPS/Inverter selection switch is placed at
the rear panel. Solar charger / Mains charger selection is not connected to a switch but is driven from the
solar charger circuit. When the solar charger is active and charging the battery (there is sufficient sunlight
to charger the battery) the solar charger will make the solar charger selection pin low. At this time the
inverter will disable mains charger.
The Automotive battery / Tubular battery selection switch can be placed at the rear panel of the system.
The +ve connection of the battery taken from the big heatsink and the -ve wire taken from the PCB should
have sufficient thickness to carry the battery current. When the battery is connected, the system will start
with a special beep, like: beep-beep-beep-beep. This indicates the power on of the controller. This beep
will be heard only when the battery is connected. After that this kind of beep will not be heard until the
battery is disconnected and connected again.
If the above said power-on beep is heard during normal working of the system it means that
the system got an unwanted reset. This can happen if the high current / high voltage wiring
is taken near the low current signal wiring (LCD / switch wiring). This also result when the
capacitors from pin 9 and 10 are not soldered. There is a chance to miss this capacitors
since they are SMD parts fixed under the PCB. Also take care to fix the LCD without any
electrical contact with the cabinet. It is wise to use not metal front panel and fix the LCD on
it.
When the mains is in acceptable range the system will bypass mains and will charge the battery. The
battery charging current will depend on the set value. When the battery voltage reach the full charge level
restarts. The magnitude of T depends on the type of battery selected (Automotive battery / Tubular battery
selection). If tubular battery is selected T = 2.4V per battery. If automotive battery is selected T = 1.44V
per battery. Also note that this depends on the correctness of the resistors R43, R69 connected to pin 7 of
the microcontroller.

Fan controlling
The fan is controlled as per the temperature sensed with the MCP9701. Temperature is sensed and fan
controlling is done in mains as well as inverter mode. In case of excess temperature also the system will
be inactive. The display will show the status. See the section temperature sensing at page 8 (or around).

Medi DSP Sinewave document 1.0-B 2009 model

15

The system will consider the mains voltage as OK when the mains is within a specified range. In inverter
mode the acceptable range is from 100V to 285V and in UPS mode this is from 180V to 265V. When the
mains voltage cross this range the system will activate the inverter if the standby mode is ON (front panel
switch is ON). The software is giving a hysterisis gap for the changeover voltages. For example in UPS
mode if the mains voltage is dropped below 180V the system will changeover to inverter but the system
will return to mains if the mains voltage rises above 190V. That is, there is a gap of 10V. This is for the
stability of the changeover. For low voltage changeover the hysterisis gap is 10V and in high voltage
changeover the gap is 5V. This is because high voltage changeover will get a natural hysterisis.
In UPS mode the changeover to inverter will be fast and in synchronous with mains waveform. In inverter
mode the changeover will be comparatively slow, but will be in synchronous with mains waveform.
Slow starting of the system is done if the mains is already absent and the standby mode is switched on in
the absence of mains.

Fast changeover considerations


The mains-inverter and inverter-mains changeover will be in synchronous with the mains waveform. For
correct synchronous changeover the polarity of the transformer connection should be correct. This is
automatically done by the system whenever the inverter is turned on. If the polarity is OK the inverter
work normally. If the polarity is not correct the buzzer beeps continuously. If it happens, switch off the
inverter and reverse the primary connection of the transformer.
In UPS mode the relay fastening voltage is very important for the fast changeover from mains inverter.
This is connected through 2 pin connector CN3. Without this support there is a risk of computer ree-boot
and rare chance for mosfet failure.
Even when the front panel switch is off (standby off) the system will switch on the relay and will
forcefully switch off the charger if the mains voltage is very high. This is for protecting the transformer
and the MOSFETs from high voltages.

Inverter mode
When the system is in standby mode the inverter will start if the mains is not in acceptable range. As stated
above the smooth start will be done if the standby mode is switched on in the absence of mains. In inverter
mode the system will be continuously checking the mains and if the mains is acceptable the system will try
to synchronous the inverter waveform with mains. The inverter to mains changeover will happen only after
the mains-inverter synchronization is correct.
If the load is within the overload limit, the output voltage will be maintained at the set value. Even if the
output feedback is accidentally disconnected the system will not boost the output voltage, but instead will

In inverter mode the system will be continuously sensing overload and battery low voltage conditions.
These levels are user settable in setup mode. When the error conditions exist the system will display the
status and will give buzzer beep also. If the error condition continues for more time then the system will
activate cutoff. The system will automatically restart from cutoff mode after a delay. In case of battery low
cutoff there will be only one restart allowed. In case of overload cutoff system will give 5 restart chances.

16

Medi DSP Sinewave document 1.0-B 2009 model


After all restart chances system will activate permanent cutoff. System will come out of cutoff mode /
permanent cutoff mode if the front panel switch is turned off or if the mains is restored.

Battery Low Sensing


As described in ADC section above, battery voltage is sensed with a simple resistor divider. Proper values
of these resistors are very important for correctly sense the battery voltage. Calibration of battery voltage
display is essential for proper sensing.

Overload sensing
The system sense the load through the current transformer CT1200. The value of shunt resistor across the
CT determine the proper sensing of load as well as overload / short circuit condition. The load should be
properly calibrated using calibrate menu in setup mode.
In setup mode there are 2 parameters that determine the overload sensing level. (1) load calibration under
calibration menu and (2) Inv Load level in parameter menu. For example for a 500W system you can
calibrate the load by connecting a 300W and making the display = 300. Then you can make the load limit
parameter = 500.
When the system is set for 500W load limit the overload sensing will start from 12% above the level, that
is 500+12% = 560W. The software is designed to limit the current through the CT at the rated current only.
That is, if the load is set for 4A through the CT then the system will limit the output voltage so that the
current through the CT will not exceed 4A. This means that when overloaded the output voltage will be
dropped. But voltage dropping will not be done for the first 2 seconds of the overload.
When overloaded the output voltage is not limited for around 2 second. After that limiting starts. A heavy
load or short circuit is detected by the dedicated circuit explained in page 10. The short circuit signal from
the IC U3 will trigger a current limiting section in the dsPIC and will immediately limit the voltage.
Compared to our earlier design the present method for short circuit sensing is different. Earlier the short
circuit sensing was done with software. In case of heavy load or short circuit the output will be dropped to
very low level and will be smooth started from there. Now the short circuit protection is done with
hardware + software. In case of a heavy load the output is limited but it is immediately restored when the
load is removed.

Cutoff mode
The system enter cutoff mode in case of battery low, over load, short circuit or no feedback conditions.
System will stay in cutoff mode for few second and will restart automatically. If the error condition still
exist the system will enter cutoff mode again and will restart again. In case of cutoff due to battery low,
system allow only one restart. Other cutoff will have 5 restart chances. If the system fail to work even after
the last restart then permanent cutoff is done. When the system is in cutoff mode or permanent cutoff
mode, quick restart will happen if the front panel switch is turned off or if the mains is applied.

Inverter-Mains changeover
In inverter mode when the mains is restored the system will first try to synchronous the inverter waveform
with mains waveform. The ac input sensing network and the capacitor between pin 2 and 27 are very
important for the proper sensing and synchronization of the waveform. When the mains and inverter
waveform are in phase the system will activate the changeover. The relay will be switched off and the
display will show the changeover message. If battery low or overload condition was present at the time of
changeover these conditions will be stopped and buzzer beep will be paused.

Medi DSP Sinewave document 1.0-B 2009 model

17

Connection diagram
The connection diagram is given in the next page.
While connecting the LCD it is very important that the GND connection of the LCD SHOULD
NOT come in contact with the cabinet through the fixing screws. If this happens the
microcontroller will get unwanted resets and sometimes will hang, resulting in strange
behaviors. These sometimes cause damage to the LCD. It is recommended to use plastic front
panel instead of metal.
The connection to the LCD display can be done with thin wire. The connection of 0-250 winding of the
transformer to the PCB and connection of AC terminals to the PCB is to be done with 40/36 guage (0.75
sq mm) wires. The connection of battery ve, 7.5V winding of the transformer are to be done with 10mm 2
wire.
The 40A relay used in the PCB is having high current terminals on the top side of the relay itself. It is
recommended to take the Phase-In, Phase-Out connections from these high current terminals. For neutral
connection a similar connection tag is provided on the PCB. Phase-in can be taken from the NC contact of
the relay and Phase-Out can be taken from COM contact.
The connection diagram shown is the one used in the finished product. During setup mode exactly the
same connection can be followed but connector CN4 for on/off switch connection will be used for setup
switches. This will be explained later.
There are 3 switches that select various modes of the system. These are: ON/OFF switch, automotive /
tubular battery selection switch and UPS/Inverter selection switch. The switches are connected from CN4
connector. ON/OFF switch can be a microswitch or ordinary rocker type switch. The two other switches
will be always ordinary rocker type switches. Whether to use microswitch or ordinary rocker type switch
for ON/OFF switch can be programmed during setup mode.
The 3 switches used to browse through the menu during setup mode are connected to the same CN3
connector. During setup mode:
1.

UPS/INV selection switch will function as Up switch.

2.

ON/OFF switch will function as Down switch.

3.

Automotive / tubular battery selection switch will function as Enter switch.

Also note that during setup mode all the three switches are microswitches. (press to ON, release to OFF
type switch). There is no meaning to use rocker switch.

18

Medi DSP Sinewave document 1.0-B 2009 model

Complete Wiring Diagram

Medi DSP Sinewave document 1.0-B 2009 model

19

LCD PCB physical mounting


The LCD driver PCB is mounted at the back side of the 16X1 (or 16X2 or 16X4) LCD in such a way that
the components on the driver PCB is facing the rear side of the LCD PCB. See the photograph below.

LED connection
The software is designed to automatically sense when the LED or LCD PCB is plugged while the system
is powered. When the LED pcb is plugged it is sensed immediately and LEDs are driven accordingly.
When LED PCB is unplugged and LCD is plugged the system will sense it immediately but it may take
few seconds to display something. This is due to the LCD re-initialization delay.
The LED as well as LCD is connected from the same connector CN5. The diagram below shows the
connection for LEDs. The ground pin (near to the relay) is considered as Pin 1.
During Setup-Mode the system will be permanently in LCD mode only, because LCD is essential in setup
mode.

LCD display PCB component layout

20

Medi DSP Sinewave document 1.0-B 2009 model

Component Layout on the LED PCB

Wiring of LED PCB to the main PCB


If the layout of LEDs on the LED PCB is not suitable for the cabinet, a connector is provided to take out
the the LED connections from the LED PCB.

Potrebbero piacerti anche