PDA

View Full Version : Sine wave power inverter



sougata
- 7th June 2005, 07:40
Hi PICers,

I want to design a 24V DC to 50Hz/240AC power inverter. My choice of PIC is the 18F452 (HWPWM). But I am not sure whether the ADC conversion time would be short enough for dynamic correction.

Any thoughts

Regards

Sougata
The Andig Technologies

NavMicroSystems
- 7th June 2005, 11:57
Sougata,

I don't think a PIC is the right choice.

I would use one of the SMPS-Controllers that are designed for this this kind of application.

sougata
- 7th June 2005, 12:58
Dear Ralph,

Thanks for the reply. I don't know which SMPS controller your are talking about. But if you are talking about PWM controllers like SG3524/25 or even TC140 from the microchip family then I am afraid the only possibility of generating a sine wave is a resonant tank at the secondary side. I am talking about weighted sine through PWM lookup table. The Hardware PWM coupled with high speed would be choice. The trend is using DSP (from TI or AD) which have onboard peripherals specially useful for this type of applications. There are a family of PICs which has EPWM (enhanced) circuitry onboard but recent ones are not supported by pbp and I am not so conversant with either asm or C. In fact microchip had an appnote using the 17C familiy for an online UPS. You can go through AC induction motor appnotes to understand what I mean

Regards

mat janssen
- 7th June 2005, 13:07
I made once a ac generator which was capable for automatic syncronising with an external signal for 45 till 65 Hz (zero crossing) and it had an output from 0 to 230V sinewave (input 0-10V). I used a pic16F873 on 20Mhz. So it is possible. I cannot give you the source because I made some promissis about the it for not given the design away. I say it is possible, just try !

sougata
- 7th June 2005, 14:23
Hi there,

What I have planned is having a sinelook up table calling periodically through timer overflow interrupt and a closed loop voltage monitoring to adjust the value of the lookup table on the fly to minimize voltage drifts and sinewave distortion. Now the problem is that the PIC takes altleast 21us for the ad conversion then comes the calculation part. Also I am unsure which PWM freq. to use (over audible range) and how to design the parallel mosfet power output stage. For overload protection I am going to use a different comparator and do a pulse by pulse limitimg through high priority interrupts. What is the best way to protect the mosfets. I don't know how to design a RCD snubber but my scope shows ringing and peaks during switch off in a normal square wave design. I beleive they are the reason for MOSFET heat up. I have searched and read quite a lot appnotes from SOA limiting to optimizing gate drive but still experience counts. So if anybody out there please help. By the way mat I don' t want a word from your source can you at least guide on the flow.

Regards

Sougata

mat janssen
- 7th June 2005, 14:41
I will draw a block diagram and I will post it here.

sougata
- 7th June 2005, 15:29
Hi mat,

That would be of great help to all the pic-ers here.

Regards

Sougata

mat janssen
- 7th June 2005, 19:23
Here is the block diagram for the output stage.
When you use the SG3524 at the inputstage to make the 320V dc out of the 24Volts.
I will also make a block diagram for the sw but that will take a while.

mat janssen
- 8th June 2005, 08:28
It is very hard for me to make a flowchart of the program without telling how the programm works. So here is a small tekst.
There is a table of 200 numbers what is the pulse width of the pwm.
Timer 1 is loaded with a 16 bit number eg $FE5F.
every interrupt the PWM gets int new number out of the table.
The table number is set to the new number (old number + 1)
if number => 200 then number = 0..

I will look if it is a problem to post the table. If not then I will post the data of the table.

sougata
- 10th June 2005, 09:47
Hi Matt,

I will work the other way round. Rather I would try to post a flow chart (I am not so good at it) so that you and other members can go through it to detect any possible flaws or betterment suggestions. BTW thanks for the block. I was out-of town hence the delay in reply

Regards

Sougata

mat janssen
- 10th June 2005, 17:22
Normaly I also make the flowdiagram first and then write the program and when it is a simple aplication i don't make a flowdiagram.This program was made a few years ago so I have to look to the comment and in that time I did not make a flowchart.
Here is the data of the pwm of a sine wave in 200 steps.

128,132,136,139,143,147,150,154,158,161,165,169,17 2,176,179,182,186,189,192,195,
199,202,204,207,210,213,215,218,220,223,225,227,22 9,231,233,235,237,238,240,241,
242,243,244,245,246,247,247,247,248,248,248,248,24 8,247,247,247,246,245,244,243,
242,241,240,238,237,235,233,231,229,227,225,223,22 0,218,215,213,210,207,204,202,
199,195,192,189,186,182,179,176,172,169,165,161,15 8,154,150,147,143,139,136,132,
128,124,120,117,113,109,106,102, 98, 95, 91, 87, 84, 80, 77, 74, 70, 67, 64, 61,
57, 54, 52, 49, 46, 43, 41, 38, 36, 33, 31, 29, 27, 25, 23, 21, 19, 18, 16, 15,
14, 13, 12, 11, 10, 9, 9, 9, 8, 8, 8, 8, 8, 9, 9, 9, 10, 11, 12, 13,
14, 15, 16, 18, 19, 21, 23, 25, 27, 29, 31, 33, 36, 38, 41, 43, 46, 49, 52, 54,
57, 61, 64, 67, 70, 74, 77, 80, 84, 87, 91, 95, 98,102,106,109,113,117,120,124

The data is the on period of the pwm.

batee
- 10th June 2005, 21:15
I disassembled a DOA APC ES500 UPS the other day, and found that it contained a 28bit PIC (can't remember which). There were other ICs between the PIC and the output FETs (SG????'s).

sougata
- 11th June 2005, 02:38
Hi everybody,

Thanks for the table. The schematic block that you have posted indicates that you are using an already boosted battery voltage to drive an IGBT bridge. I am trying to drive it straight into a transformer for boost up. I wonder if this is going to work.

By the way batee any PIC with an onboard HWPWM and ADC will do. You are damn right about the APC UPS.

Regards

Sougata

mat janssen
- 11th June 2005, 12:51
When I understand it good, you are going to switsch the 24 V over the bridge into an output transformer, and the voltage what is cumming out of the transformer, will pass the low pass filter for making a sinewave.
I hope you will find a good output transformer for it !!!???

sougata
- 11th June 2005, 16:17
Hi Matt,

I understand your concern but I am hopeful here since I have got my own transformer manufacturing unit. So from paper to product and fine tuning issues I have got a plus point over here.However I am not sure of the actual losses and bulk of the design for practical use so I might need to design a battery boost circuit.

Regards

Sougata

mat janssen
- 11th June 2005, 18:08
Please let me know if it works and how you did it. And if you have some questions about the hardware, just let me know, maybe I can help.

sougata
- 12th June 2005, 07:19
Okay Matt,

That would be great. I need to design a RCD snubber and I don't know the maths may be you can help. I am concerned about the switch off peaks.
I would send you the entire schematic as soon as I finish it up. It will take some time but I will keep in touch.
Regards
Sougata

Melanie
- 13th June 2005, 10:01
As an aside... talking about Transformers... the 50 year Copyright (1953) has expired on the Radiotron Designers Handbook. I use this as my bible for Transformer Design and it's abosolutely brilliant - the principles in design are as valid today as they were back then. You can download it from the internet from various places (including the link below) - but be warned it's about 70Mb total pdf...

http://elysiansound.com/goo.php

Most Transformer manufacturers have forgotten most of this stuff (and it reflects in the abysmal products they produce). So, if you're into rolling your own (or commercially designing), then you'll love this, if you're not, then it's a sure cure for insomnia.

mat janssen
- 13th June 2005, 10:43
Give me please some data about the switching frequency of the system and inductances of the transformer then I will sent you snubber data

sougata
- 13th June 2005, 14:08
Hi there,

Melanie thanks for the link. I live in a place where dial up is the only available internet. But I can manage to download it. Matt I would send you the details as soon as my prototype is ready.

Thanks guys for keeping this thread active.

Regards

Sougata

Melanie
- 13th June 2005, 16:31
You're lucky, they've broken it down into chapters so you don't have to be on-line for a week straight, just grab a section at a time each time you go on-line to do something else.

psdayama
- 20th June 2005, 09:05
Im trying to download the CHAPTERS from the site.But it is extremely difficult to open.Going to home page most links are not correct and site is under renewal.Can anybody be please send link to mirror site(s)?
Thanks in advance.

Also please let me know if anybody has used transformer after the H-Bridge and whether the operating frquency of transformer supposed to be output sinewave or the switching frequency? In case the fequency is that of output,
then we loose advantage of switching and having small transformers like in smps.









As an aside... talking about Transformers... the 50 year Copyright (1953) has expired on the Radiotron Designers Handbook. I use this as my bible for Transformer Design and it's abosolutely brilliant - the principles in design are as valid today as they were back then. You can download it from the internet from various places (including the link below) - but be warned it's about 70Mb total pdf...

http://elysiansound.com/goo.php

Most Transformer manufacturers have forgotten most of this stuff (and it reflects in the abysmal products they produce). So, if you're into rolling your own (or commercially designing), then you'll love this, if you're not, then it's a sure cure for insomnia.

psdayama
- 21st June 2005, 12:17
I have found other site which is better than one I was telling about:
http://www.oldradioz.com/manuals/rdh4/

After going thru the Table of contents only Chapter 5 & 6 are
concerned with Transformers. Other are for Valve radios & components.
It is excellent material for those who may not have seen valves intheir
lifetime.
I suppose that there are few more sites which have design guides
for transformers and inductors using ferrite cores which will be found
in most recents equipments.

suded
- 21st June 2005, 22:23
Dear Sougota,
You are possibly trying to use the Micro (PIC XXXXX) as part of the control loop to regulate the amplitude of your sine wave.
The alternbative approach is to build the control loop around SG 3524 PWM control IC & use you PIC XXXX micro to supply the set point to SG 3524.
SG 3524 will provide you with a very fast control action with minimum No. of components.
The point of using PIC micro in your application is to generate variable amplitude variable frequency sine wave using the PWM command in PIC Basic Pro.
You can also use a normal iron core transformer to check the results then convert to ferrite the ferrite core will icrease the effiiciency of your design.
A center tapped transformer is a good choice!!!
Reagrds.
Suded.

Doctor
- 25th June 2005, 09:40
For Simulation of power circuit and also recognized
in most universities is the PSPICE software;you
could find the software and the environmental package
in the following two sites:

http://www.ousetech.co.uk/winspice2/index.html
http://www.5spice.com/

all you need in power designing in addition to snubbers
simulations, etc... .

sougata
- 26th June 2005, 06:45
Hi Suded,

If I have understood right then you are suggesting that I build a hf oscillator around the SG3524 then use the PIC18F452 to supply the closed loop control voltage to the SG3524 (the PIC HWPWM acts as a DAC).

Now the issues are,

1. I already have two HWPWMs built into the PIC

2. The SG3524 allows dead-time programming through a simple resistor but while switching phases I again need a few logic chips to get it done.

3. I have designed the software around interrupts. I am doing an AD-Oversampling which bruce, tim and melanie suggested in the MELAB forum.For a pulse by pulse current limiting (so that the MOSFETs don't blow up) I am using a comparator to sense the current and generating an INT to turn off the MOSFET drives.(Heh! Heh! a digital copy of the SG3524 current limit scheme).
So why use the SG3524 as the ad-sample and dac conversion will add up to the loop error.

The only thing that concerns me is the THD introduced while driving inductive loads as my routines are not so fast to correct that in realtime. I tried but the results are erratic (thats because of lack of knowledge from my side). The PIC is running at 40MHz (10MIPS,10MHz@HSPLL). Now I am concentrating on reducing noise on the AD line, using interrupt based AD (PBP tends to waste time while doing AD).

BTW can anybody shed some light on the time consumed by LCDroutines. Because while processing interrupts with PBP I found glitches while the LCD was being updated.

Thanks to psdayama and doctor for the links. As far as PSPICE goes I am not sure whether my knowledge is sufficient to handle them (I don't have an engineering background)

Regards
Sougata

mat janssen
- 26th June 2005, 09:44
That's why I used a serperate pic for the display.

sougata
- 26th June 2005, 09:54
Hi there,

Yes matt. I did it earlier with two PIC18F452 communicating by the USART. What I did was adapt an asm INT UART routine to handle the remote display found from the MELABS page.

Regards

pramodsinha
- 4th September 2005, 08:23
hi saugata
i need three phase sine wave generation circuit i have the full knowledge of how to drive msosfet and igbt in three phase configuration.
pramod



Hi Suded,

If I have understood right then you are suggesting that I build a hf oscillator around the SG3524 then use the PIC18F452 to supply the closed loop control voltage to the SG3524 (the PIC HWPWM acts as a DAC).

Now the issues are,

1. I already have two HWPWMs built into the PIC

2. The SG3524 allows dead-time programming through a simple resistor but while switching phases I again need a few logic chips to get it done.

3. I have designed the software around interrupts. I am doing an AD-Oversampling which bruce, tim and melanie suggested in the MELAB forum.For a pulse by pulse current limiting (so that the MOSFETs don't blow up) I am using a comparator to sense the current and generating an INT to turn off the MOSFET drives.(Heh! Heh! a digital copy of the SG3524 current limit scheme).
So why use the SG3524 as the ad-sample and dac conversion will add up to the loop error.

The only thing that concerns me is the THD introduced while driving inductive loads as my routines are not so fast to correct that in realtime. I tried but the results are erratic (thats because of lack of knowledge from my side). The PIC is running at 40MHz (10MIPS,10MHz@HSPLL). Now I am concentrating on reducing noise on the AD line, using interrupt based AD (PBP tends to waste time while doing AD).

BTW can anybody shed some light on the time consumed by LCDroutines. Because while processing interrupts with PBP I found glitches while the LCD was being updated.

Thanks to psdayama and doctor for the links. As far as PSPICE goes I am not sure whether my knowledge is sufficient to handle them (I don't have an engineering background)

Regards
Sougata

pramodsinha
- 4th September 2005, 08:25
i went through all options to make a sine wave inverter but it was defficult to make it in basic language.

peterdeco1
- 4th September 2005, 11:08
Attached is a sinewave generator from PIC outputs going high 1 at a time. Hope this helps.

sougata
- 4th September 2005, 15:26
Hi Pramod,

Microchip has a very comprehensive appnote AN843 that demonstrates how to use a PIC18Fxxx to generate three phase PWM signals. Since the basic 18F series has onto two hardware PWMs inbuilt you have to rely on software PWM for the third. Definitely not through the Pbasic PWM function. As you are aware that designing a sine wave inverter entirely in PIC Basic is difficult (due to limited interrupt capabilities and latency issues) you have to structure your software around assembly. I am attaching a pbp source code alongwith the sinetable and firing concept. It may help. I have heavily commented the code to facilitate understanding.Let me know if it helps you out.I am sorry due professional restriction I cannot give you the entire code. But we can communicate through this forum so that other users of this forum may also benefit.

Microchip makes some special PICs in the PIC18F2331/4331 series which have an enhanced PWM hardware that supports programmable dead time. It also includes 3 or more PWMs. Coupled to that are ADCs which have a much lower conversion time. This would give you the lowest THD (tighter and faster correction loop) and still have enough room left for some housekeeping such as pulse by pulse overload limiting, overtemperature protection, line monitor, battery monitor, serial com, etc.



By the way you mentioned that you are well familier with MOSFET drive techniques.Could you enlighten me on that. May be this forum is not the right place (off topic). You can drop me a private message so that I can give you my email id.

I have desingned the MOSFET driver on a totem-pole circuitry. However I am not satisfied with the slope.I believe a steeper slope would effectively reduce switching losses. I tried MOSFET drivers from Microchip too but they blew up. Possibly due to latch up or improper grounding of the PCB traces. They are costly too here in Kolkata. Photovoltaic drivers with active discharge is not available here in Kolkata. Also I need to understand why my MOSFETs blew up during initial testing phase while the inverter was unloaded.

regards

Sougata

psdayama
- 9th September 2005, 14:32
Hi Saugata,
I think that for controlling the amplitude a hardware approach is better
as so many delays and errors can creep in. There is a Buck Boost circuit with
two mosfets and an inductor and few diodes. The DC input to H bridge can be
controlled with B/B circuit with reqd. time delays generated by Micro output(which doesn't have to be so fast as changing per cycle of sinewave)
The shape and frequency then can be generated by normal 2 PWM outputs(Actually one is enough just route the output to another branch with a gate and this also have dead time built in).
I still wonder why anybody is not responding about my querry of transformers. The output of Inverter is serries of pulses at high frequencies with polarity reversal at 50-60 Hz. So is the transformer used designed for
50 Hz operation or high frequency like say 20KHz? There is huge difference
in size of transformers.
regards,
purushottam dayama




Hi Suded,

If I have understood right then you are suggesting that I build a hf oscillator around the SG3524 then use the PIC18F452 to supply the closed loop control voltage to the SG3524 (the PIC HWPWM acts as a DAC).

Now the issues are,

1. I already have two HWPWMs built into the PIC

2. The SG3524 allows dead-time programming through a simple resistor but while switching phases I again need a few logic chips to get it done.

3. I have designed the software around interrupts. I am doing an AD-Oversampling which bruce, tim and melanie suggested in the MELAB forum.For a pulse by pulse current limiting (so that the MOSFETs don't blow up) I am using a comparator to sense the current and generating an INT to turn off the MOSFET drives.(Heh! Heh! a digital copy of the SG3524 current limit scheme).
So why use the SG3524 as the ad-sample and dac conversion will add up to the loop error.

The only thing that concerns me is the THD introduced while driving inductive loads as my routines are not so fast to correct that in realtime. I tried but the results are erratic (thats because of lack of knowledge from my side). The PIC is running at 40MHz (10MIPS,10MHz@HSPLL). Now I am concentrating on reducing noise on the AD line, using interrupt based AD (PBP tends to waste time while doing AD).

BTW can anybody shed some light on the time consumed by LCDroutines. Because while processing interrupts with PBP I found glitches while the LCD was being updated.

Thanks to psdayama and doctor for the links. As far as PSPICE goes I am not sure whether my knowledge is sufficient to handle them (I don't have an engineering background)

Regards
Sougata

sougata
- 9th September 2005, 15:51
Hi Dayama,

You are right that only a single PWM can be used and done exactly the same. It is modulated with a sine table (32 samples). The transformer needed is a 50Hz type. The transformer, output choke and capacitors form a low pass filter (actually the sinewave is integrated) and the output waveform is a sinewave.

Your approach of using a B/B converter would rather complicate things up and also be costly. That is basically a dual conversion design if I understood right. With a MCU you can tune , upgrade your design without actually increasing the production cost. If you are in India then you may be aware of the latest buzz of "DSP" sinewave inverter. Here the approach is same.However a DSP gives you much better ADs and fast computation with dedicated hardwares (for e.g a 32 x 32 Multiply) so you can keep your sinewave undistorted with inductive or mixed load.

I could not post the whole code due to professional restriction but here is what it does :

1. On Interrupt it fetches the sinetable vaue (indexed) for PWM

2. Offset it with ERROR from previous and current sample (a PID style error loop)

3. Turn on the MOSFETs with the calculated value.

What I don't do is dynamically correct a voltage error in the same index pointer. My ADC conversion time does not allow me to do that. To mess up things more I actually take 4 samples and do and average to deal with noise. Then I have a nifty LCD routine, a battery monitor, RS232 interface (to shutdown my computer and inverter when not needed)

BTW where is Pramod who kicked this thread into existence again.

Regards

Sougata

psdayama
- 13th September 2005, 11:33
Dear Sougata,
I haven't seen the entire code at all but just one table of delays for
sinewave. Also I have faint recollection of the block diagram.
Truly speaking Im not much PIC er. Im doing everything with ATMEL
micros. I have found this forum while searching for sinewave inverter.
I think it doesn't matter which company U use but design is more importatnt.
So I can understand code very well.
I also have Transformer Unit but it is for HT Instrumentation type.
I think that varying amplitude with delays and error adding will work only
maximum upto 70% of basic amplitude. After that U will have gross THD due
to most of delays at zero crossing very small.(It appears in class D amplifiers
of analog kind). I haven't seen whether such approach works with truly
variable amplitude or from 0 to 120% of the amplitude.
What I m saying is not double conversion but switchng of Buck Boost
mosfets with 2 ports from same PIC outputs and CORRECT amplitude there.(See attached bmp file.) In this s1 and s2 are mosfets whose timings is controlled to vary the voltage.
Im in India but near Mumbai so here not much Inverter brouhaha is there.
Melanie has agreed that this DSP method is not so good although everybody
is claiming otherwise.
I am also looking for design in which there should be no such bulky
transformer of 50Hz. If I have read right then proper driving of mosfets
would result in 20-40Khz output which is double modulated. this can use
high frequency transformer with centre tapped secondary and demodulator cum filter circuit which will give 50Hz output!!
As presently the transformer is costing about 50% of the total invertor
cost and one can imagine savings. Also as many circuits are having SMPS type charger for battery the advantage is obivious.(Compare APLAB 30V 1A
regulated supply with 250W computer smps,)
Hope to have more discussion on this.
regards,
dayama

sougata
- 14th September 2005, 15:47
Hi Dayama,

It is possible to reduce the size of the transformer. Looks like a class-d amp solution to me. A simple filter would reconstruct the sinewave and remove the HF component.Did you find anything or anyone having done it on the net. I will also search and probably would like to develop one. But some practical start point is needed.

Regards

Sougata

psdayama
- 20th September 2005, 11:18
Here is the link:They make readymade PWM amplifiers but don't ask cost!!!!!
http://eportal.apexmicrotech.com/mainsite/products/pwm_overview.asp

I asked their reps in Mumbai and they said each IC costs Rs.25,000/-
But one can make PWM output like that and then have just High freq. txr or
direct output with filter.
regards,
Dayama






Hi Dayama,

It is possible to reduce the size of the transformer. Looks like a class-d amp solution to me. A simple filter would reconstruct the sinewave and remove the HF component.Did you find anything or anyone having done it on the net. I will also search and probably would like to develop one. But some practical start point is needed.

Regards

Sougata

psdayama
- 30th October 2005, 04:06
Hello everybody (Saugata,Mel xxxx)
I wonder why there is no activity here since last month!
I have just now made a inverter of Delhi type with sinewave output.
The transformer for 500VA output is whopping 10kg in weight.
You all may be discussing sine wave with PIC but practically
there is no use if such big transformers have to be used and adding
to cost about 60% of the project.
I have hit an idea to circumvate this and will discuss if anybody
is interested.
HAPPY DIWALI!!
dayama

sougata
- 30th October 2005, 04:32
Hi Dayama,

I actually wrote the code for a customer's specific requirement and know any further development is entirely personal and my current schedule does not permit actually working on it. Currently I have a running code with fair sinewave output. However THD measurements and transient response characteristics were not done. Also to use it like a UPS I need to design a fast transfer circuit. The sugar cube relays are fast enough but fails with increasing and mixed type load. I have incorporated an interrupt based AC Fail detection circuit that checks the following:

1. Improper Line Frequency
2. Unhealthy AC-Line Voltage
3. Sudden brown/black out

When I compl



As far as the transformer issue goes I beleive it will take much time and effort which is beyond my scope right now. Also in Kolkata it is very difficult to source good quality ferrite cores.

As I told you previously we need to have a high frequency carrier and modulate it with a 50Hz sine table. (Which I am doing anyway). Use of the high frequency should theoritically be used to drive a ferrite cored transformer (read low cost light weight) so a low pass filter in the secondary should reconstruct the modulating 50Hz.

BTW I am attending the Microchip Masters Seminar at Lonavala on 29th nov. are you?

Thanks for keeping this thread alive and giving me a kick to ponder further.

Regards

Sougata

psdayama
- 31st October 2005, 14:07
Hi Saugata,
Its OK to be late than never. I think U should stop the work on high frequency
as there are more complcations. Instead I suggest that whats Ur code for
current work is alright.
I am planning to make inverter with Half Bridge
output which is direct to Load and not thru transformer. Problem is everybody is inverting at low frequency of 50Hz from battery. And use same
transformer for charging battery when on mains.
If we make high frequency >40 Khz inverter with
square wave and output is rectified and made high voltage DC then with dual supplies (+/-) we can use IGBT/MOSFET half bridge to drive sinwave output
directly without transformer. This will save the output transformer cost and ferrite transformer would cost hardly 100/-. Also for charging battery same type SMPS circuit can be used and its wattage can be max 120W which would cost hardly 200/-.(Old PC SMPS 250W are available for 150/- in market)
I am still designing the circuit. I will post the block diagram here as soon as
it is ready.
When you are working with this type circuit U can have slightly expensive
circuit which doesn't require a relay -sugar cube or any type as U are just switching DC sources with help of diodes and they are very fast!
Basic plan is
MAINS POWER---|----->SMPS WITH CHARGE CONTROL--> BATTERY->-|
|_____>RECTIFIER --->|<RECTIFIER--<SQR.INVERTOR<|
|
50HZ PWM INVERTOR WITH HALF BRIDGE OUTPUT
|
LOAD WITH SMALL FILTER

This ckt will work like true online UPS still expensive just as much as ordinary
invertors.But U can have Ur DSP alright and also PICs other a/d lines can be used for battery charge management as well!
For cheaper type the Mains rectifier for dual supply can be ommited and
instead sugar cube relay used for switching outputs. Half wave +/- rectifier
requires costly HV elcos.
For good ferrites ask for dealer of Cosmo Ferrites. U check their list on web page. There is another manufacture Hinodaya.
I won't be attending M'Chip Masters course as I am just beginer in this field but not to programming. May be I will attend next time when I hope to get some nuances and I am working on Transformer Ratio test set(comparator
type) and want to use PIC for advanced features.So I think that I will also be
familiar with PICBASIC then.
Wish all the best for conference.My place is abt 2hrs from Lonavala
regards,
psdayama

sougata
- 31st October 2005, 17:57
Hi Dayama,

What you are proposing is a dual conversion design. When you have a battery bank of greater voltage it makes sense other wise for a 12/24 volt system consider this.

1. The Primary current will in the order of 50 AMPs so it is necessary to use copper bands for the primary windings.

2. Frequency has to be kept high (ferrites) consider the switching losses of the primary MOSFETs

3. You have two different switching stage so a single PIC may complicate your programming issues.Of course you can use a ready made SMPS controller like the SG3525 but then this forum may not be the right place to discuss.

4. Microchip has a very good appnote on such type of design.

If you are using PBP then this forum will help you out in solving problems.

One of my laboratory power supplies runs on a PIC for a Buck regulator.

We get only a limited supply (not all models) of cosmo ferrites so it is beyond my scope of experiment. However I would definately like to meet you while I am in Mumbai.Send me a private email if you are interested.

Regards

Sougata

psdayama
- 11th November 2005, 06:56
Dear Saugata,
please read my comments pointwise:



Hi Dayama,

What you are proposing is a dual conversion design. When you have a battery bank of greater voltage it makes sense other wise for a 12/24 volt system consider this.
1. The Primary current will in the order of 50 AMPs so it is necessary to use copper bands for the primary windings.

When one is making Inverter/UPS then the transformer and MOSFETS
have to handle this currents and I have seen atleast 3in parallel to do this.
I think It is OK for 500VA and for 1KVA one has to use 24V battery for same
purpose. Higher rated systems are using batteries 48V or even 110V!!!



2. Frequency has to be kept high (ferrites) consider the switching losses of the primary MOSFETs.
Frequency has been optimised to 40-60KHz for considering this aspect.
I would like to use more than 100Khz if possible but then MOSFETs would be
beyond reach.



3. You have two different switching stage so a single PIC may complicate your programming issues.Of course you can use a ready made SMPS controller like the SG3525 but then this forum may not be the right place to discuss.
My design has 3 switching stages. a)First for conversion to 12V from 230V(SMPS), second a simple Inverter to convert 12Vdc to 300V dc dual supply and lastly the Sinewave converter with half bridge for direct output.
SMPS is based on SG3525 and dc to dc also same but they can have analog
control inputs with additional PWM from Microchip instead of DAC.The last converter is entirely based on Microchip and same chip can used for other indication or control functions. One has to consider the entire system development and how to make optimum use of available resources. It is just
not possible to use one PIC for all functions reqd.



4. Microchip has a very good appnote on such type of design.

Please do send link for that design.



5.If you are using PBP then this forum will help you out in solving problems.

Im not aware of PBP. I am doing programming in Assembly and use a
program to convert it in code.



6.One of my laboratory power supplies runs on a PIC for a Buck regulator.
Im very interested know about it.



7.We get only a limited supply (not all models) of cosmo ferrites so it is beyond my scope of experiment. However I would definately like to meet you while I am in Mumbai.Send me a private email if you are interested.

Regards

Sougata
Please visit cosmo ferrite website. They have dealers all over India and
Kolkata must be having some. If U want some hard to get size then I can
help. But for regular supplies the company will gleadly contact U.
I think I have missed Ur reply due to incorrect setting of intimation. Im
sending U private email for details.
Thanks,
psdayama

barkerben
- 12th November 2005, 22:25
I made a 24v, 250W Quasi sine wave inverter using a basic PIC (can't remember the exact details) a couple of years back.

It used quasi sine rather than full sine - in other words, a square wave with dead time. Having said that, regulation was less than 10% at full load, and efficiency was over 95%. Quite good fun really...

psdayama
- 13th November 2005, 03:01
I made a 24v, 250W Quasi sine wave inverter using a basic PIC (can't remember the exact details) a couple of years back.

It used quasi sine rather than full sine - in other words, a square wave with dead time. Having said that, regulation was less than 10% at full load, and efficiency was over 95%. Quite good fun really...

Quasi SineWave shouldn't require PIC !
Also regulation seems to poor as even 1% easily achievable. May be U have
some special functions so U are welcome to elaborate.
psdayama

barkerben
- 13th November 2005, 10:54
I think we used a PIC for two rasons. Firstly, we wanted the option of going to full sine wave. Secondly, we could eliminate regulation by dynamically changing the deadtime in the quasis sine wave. The 10% (I think it was 10% - lng time ago now) was without any feedback, when running at full load (250W). The PIC was also useful at startup.

Ben

psdayama
- 13th November 2005, 14:45
Hi barkerben !
thanks. It was just curiosity as just few months ago Electronics For You (EFY)
India magazine has published simple inverter with just few ICs and Mosfets.
Of course there are some commercially available inverter cards (Digital Inverter)
with PICs costing no more than Rs.500/- with Quasi sinewave output and frills
of DSP. These are good for PCs and lighting but give lots of problem with fans & motors. They also give regulation of better than 1% in inverter mode and +/-10% in mains mode.
psdayama

barkerben
- 13th November 2005, 15:17
Yep - our circuit may not have been all that good after all, but it was good fun to make! We were building from scratch as much as possible - winding our own transformers, etc. There were a few of us doing it at once. One group had a novel way of stopping their mosfets from frying - a constant stream of freeze spray! Not exactly very practical, but certainly impressive :-)

One group tried a resonant inverter, but got bogged down with the problem of sensing the load parameters to match the resonance...

barkerben
- 13th November 2005, 15:20
Oh yes, that was it... I remember now.

We had 24v in, chopped using a full bridge to 20Khz AC, fed into a transformer, then rectified to high voltage DC using a diode ring. The ide of high frewuency was to reduce transofrmer size and losses. The high voltage DC was then chopped usign a second H bridge to a quasi sine output.

The trigger signals for both bridges were generated by the PIC. We wanted to replace the quasi sine bridge trigge with full sine, but never got around to it :-(

psdayama
- 13th November 2005, 15:54
Oh yes, that was it... I remember now.

We had 24v in, chopped using a full bridge to 20Khz AC, fed into a transformer, then rectified to high voltage DC using a diode ring. The ide of high frewuency was to reduce transofrmer size and losses. The high voltage DC was then chopped usign a second H bridge to a quasi sine output.

The trigger signals for both bridges were generated by the PIC. We wanted to replace the quasi sine bridge trigge with full sine, but never got around to it :-(
That was good!!! U should have made the output of hi freq. transformer centre tapped and used bridge to get dual supply i.e. +/- side. This requires
only half bridge ckt and only 2nos of Hi voltage Mosfets and get good sine wave
from it.(U require small inductor/capacitor filter for non inductive loads.) Again U can prevent the Mosfets from frying with including some current limiter in HT side rectified high voltage rather than spraying freezant.

robinjacob
- 6th December 2005, 10:38
Hi Sougata,
Have you finally designed the sine wave inverter? I am really interested to see the design. If you can please send me a schematic.

Thanks and Regards
Robin Jacob.

psdayama
- 6th December 2005, 15:08
Hello!
just scroll down and U will find the schematic in jpg format.
I don't know if Saugata will give the code.
Some part he has already explained.

sougata
- 6th December 2005, 18:16
Hi there,

I did finish the project and managed low harmonic content and descent crest factor but need to improve on the distortion issues on mixed inductive loads.Please note that it is a commercial project and I just cannot share it on this forum. However I would certainly like to answer specific queries.

Off the track I would like to express my gratitude to PSDayama whome I met personally on my trip for the Microchip Master's Conference. A warm welcome and great hospitality moved me. I thank this forum too.

Regards

Sougata

psdayama
- 7th December 2005, 04:19
Hi Everybody,
I met this nice chap SAUGATA thru this forum and very happy to
interact on subject which Im trying to learn from scratch.Of course
I am little old (>55years) but one is student all his life!
I want to thank the forum for getting to know many young people
and their expertise and exploits ;-)
Lets hope everybody gets on ahead with the subject matter.
Regards,
psdayama

psdayama
- 7th December 2005, 05:57
Following link gives description various design slides available:
http://ece-www.colorado.edu/~pwrelect/book/slides/slidedir.html
Check them for transformer & Inductor.
psdayama

robinjacob
- 13th December 2005, 12:29
Hi,
Atleast somebody give me a schematic of the inverter with uC. I would like to know about the snubber circuit and the ouput filter circuit. Could somebody help me out.

dknagare
- 16th April 2006, 14:04
Dear Saugata,
please read my comments pointwise:




When one is making Inverter/UPS then the transformer and MOSFETS
have to handle this currents and I have seen atleast 3in parallel to do this.
I think It is OK for 500VA and for 1KVA one has to use 24V battery for same
purpose. Higher rated systems are using batteries 48V or even 110V!!!


Frequency has been optimised to 40-60KHz for considering this aspect.
I would like to use more than 100Khz if possible but then MOSFETs would be
beyond reach.


My design has 3 switching stages. a)First for conversion to 12V from 230V(SMPS), second a simple Inverter to convert 12Vdc to 300V dc dual supply and lastly the Sinewave converter with half bridge for direct output.
SMPS is based on SG3525 and dc to dc also same but they can have analog
control inputs with additional PWM from Microchip instead of DAC.The last converter is entirely based on Microchip and same chip can used for other indication or control functions. One has to consider the entire system development and how to make optimum use of available resources. It is just
not possible to use one PIC for all functions reqd.



Please do send link for that design.



Im not aware of PBP. I am doing programming in Assembly and use a
program to convert it in code.


Im very interested know about it.


Please visit cosmo ferrite website. They have dealers all over India and
Kolkata must be having some. If U want some hard to get size then I can
help. But for regular supplies the company will gleadly contact U.
I think I have missed Ur reply due to incorrect setting of intimation. Im
sending U private email for details.
Thanks,
psdayama

I have tried 3 to 4 designs of this type of technology. About 5 years ago i used SG3525 @ 50KHz for battery boost 12VDC to 320VDC and then chopped with squarewave 50 Hz using again SG3525. I have used full bridge for DC to AC conversion. The result is very satisfactorily over 5 Years of cont. use now I am trying to make it sinewave within a month or so it will be ready.

sougata
- 16th April 2006, 14:39
Hi,

I originally posted this thread and I would like to know the details what you are actually trying to do.

dknagare
- 16th April 2006, 15:06
Hi,

I have already tried transformerless( only small ferrite core of EE65X13) design upto 1000W but output was squarewave. Now I will use SPWM signal to convert DC to AC. In this type it easily possible to make 3Phase output without much circuit.

My main aim is to make sinewave inverter without using bulky iron core. I will upload some details very soon.

psdayama
- 16th April 2006, 18:03
Hi,

I have already tried transformerless( only small ferrite core of EE65X13) design upto 1000W but output was squarewave. Now I will use SPWM signal to convert DC to AC. In this type it easily possible to make 3Phase output without much circuit.

My main aim is to make sinewave inverter without using bulky iron core. I will upload some details very soon.
Thanks a lot for information. For long time nobody posted and Saugata is
busy with his own projects. I also came across one commercial model which
didn't have any bulky transformer but only small ferrite ones like in smps.
I think I sent my block diagram to Saugata. I have changed OS in my PC and
it is difficult to locate it but I will get and put it here.
My idea was to have inverter with output switched by fast relay for crossover. Also if we don't use relay and instead use directly take out output
from inverter and meanwhile have heavyduty charger, we get cheapest
online UPS. For this there can't be output transformer and so output has to be HalfBridge type with centre tapped power supply. To get this advantage
we have to put premium on the Mosfet/IGBT voltage.(Require withstand voltage atleast 800 to 1000V) but that is better than some 10Kg transformer
for 1000W type and also price about 1000-1200/-.
I am also having one inverter with high frequency chopping but its output is
50Hz and so transfomer is very bulky.
Now I pray that sooner or later Saugata will tell us about new design !!!

dknagare
- 17th April 2006, 01:55
Hi,

Can anybody provide me schematic diagram of output stage of HalfBridge as could not found application for dual voltage tapping +/- since the gate voltage should not exceed to say 20 V w.r.t. source of lower side Mosfet/IGBT. This can be achieved by using Bridge driver IC, but I could not find any practical application for it, however a separate bridge driver like TLP250 can be used but practically I have not yet used. Is anybody enlight/share on this with their experience.

psdayama
- 17th April 2006, 07:59
Hello!
I already informed U in pvt mail that U have to use either Pulse txrs or
opto isolators for driving. Bridge driver ICs don't work more than 100volts.
All U have to do is put the txrs/optos in output of Ur circuit or use simple
bridgedriving ICs and txrs. In case of Opto's U have to steal driving current
with high resistors and zeners and use 1more transistor/gate to make fail-safe. Means when signal the FET remains off. I think that in this respect
the pulse transformers are ideal solution and cost no more than Rs.12-15 each. U can also borrow some technic and keep the gate reverse biased
during off period.
Many circuits are available on Fairchild's website as they have most the
driving ICs and POWER mosfets.

sougata
- 17th April 2006, 17:35
Hi Dayama,

I am sorry I couldn't be in touch as I am under terrible pressure handling some railway projects. I am a one-man army as you know.

Back to the topic:

1. Any improvement or innovative idea is welcome.

2. My sinewave inverter is running successfully (24VDC-240AC~50Hz) but cannot share the schematic and code as I am commercially bound.

3. Should there be any PIC related problem I will surely try to help within my knowledge boundaries.

4. I have already done a PIC16F676 based squarewave UPS design (inspired by a forum member) and currently testing it.

5. I am working with PIC16F73 to port my design of sinewave inverter into a small offline UPS.

6. Double conversion is okay but generally more complicated and may be expensive in terms of ROI. What I have found is that boosting the voltage from 24VDC to 384VDC (to create a 240V AC) is less efficient. May be due to my limited knowledge on designing sm transformer. A 48V DC based boost converter gives better result.

7. I would be working on a different technology from June onwards that promises to deliver sinewave output using a single stage and ferrite transformer. I don't know whether I would be successful there as it is my own project and have limited funding. If I can spent time and get some fruitful results I will post them here.

8. Regarding MOSFET drive what I have realised is that a soft turn-on reduces harmonics and a fast turn-off is necessary to cope for switching losses. Also ringing should be well controlled otherwise bursts for no apparent reason. And never use the Microchip drivers. They are real crap. I followed every guideline and got terrible results. IR, Toshiba great. In fact I asked in the Master's conference that why Microchip is using IR gate drivers on their dSPIC motor control board when they have there own product line.

psdayama
- 17th April 2006, 18:37
Dear Saugata,
thanks for writing. It has been long time to see U or some posts.
We all understand that U are helping the forum but U have Ur own army
to care and feed :-)

Now about Ur points:
1.& 2. We would never ask U to divulge Ur commercial secrets for FREE!
3. I have yet to commence the exploration of PIC. As I told U I am
doing all prokects in other world but ultimately it is a 8bit and uC thing.
So just nomeclature changes but basic things are same. I find that ATMEL
has also put up ARM type which are just as good as PIC and I don't have to change the assembly language. But sure will ask about PIC in few days after
finishing old projects.
4. I am also thinking about same PIC16F73 but I think other 676 has more PWM outputs which can of great help.
6.Ferrite transformer design is no big deal if U have designed iron core one.
There are many websites which have actual examples.Also if U can convert
48V to 300+ volts then 12-24 V to same is also not differrent. Just have some
more conductors and that helps for high frequency. For example I had make
primaries of 11SWG but instead I used 2 conductors in parallel of 14SWG.Nice thing about ferrites is that U need only few turns as turns/volt are as much as
40times less.
7. am hoping to know what 'new technology" U are talking about. Surely it will be very interesting for the thread of "sine wave inverter"
8. U have correctly stated the position of fast and slow turn on. Everybody
has to make decision about switching losses and surge supression and cost off higher voltage device. As far as Bridge drivers i hate those and I rely solely
on pulse transformers or opto couplers.
regards,
psdayama

batee
- 1st May 2006, 20:01
Hi,

Can anybody provide me schematic diagram of output stage of HalfBridge as could not found application for dual voltage tapping +/- since the gate voltage should not exceed to say 20 V w.r.t. source of lower side Mosfet/IGBT. This can be achieved by using Bridge driver IC, but I could not find any practical application for it, however a separate bridge driver like TLP250 can be used but practically I have not yet used. Is anybody enlight/share on this with their experience.


IR2184 is a high side AND low side driver. It generates the extra 10-15V needed above the bridge supply voltage to turn on the top FET, and gets you dead time protection and logic-level inputs, too. It's good for up to 600V, unlike every other FET bridge driver I saw. Two are needed for full bridge operation. If you need programmable deadtime, use the 21844.

Half-bridge schematic is included in the datasheet.

http://www.irf.com/product-info/datasheets/data/ir2184.pdf

Good luck,

Bryan A. Thompson
[email protected]

psdayama
- 2nd May 2006, 07:32
IR2184 is a high side AND low side driver. It generates the extra 10-15V needed above the bridge supply voltage to turn on the top FET, and gets you dead time protection and logic-level inputs, too. It's good for up to 600V, unlike every other FET bridge driver I saw. Two are needed for full bridge operation. If you need programmable deadtime, use the 21844.

Half-bridge schematic is included in the datasheet.

http://www.irf.com/product-info/datasheets/data/ir2184.pdf

Good luck,

Bryan A. Thompson
[email protected]

Hi,
thanks but this driver may not be useful as the half bridge ckt we are discussing. I went thru the datasheet and driver ICs Vcc is referenced to
lower mosfet. However in our case the lower mosfet source is - 350 volts so there may be problem. D.K. Nagare has used pulse transformers which are
proper and no headache for driver configuration. He had problem due to voltage rating of Mosfet (600V type used in 700volt ckt). I hope he has found
the circuit working with say atleast 800V rated mosfets. I have suggested a
high value resistor network so that at output of bridge each mosfet has nominally 350V to withstand.
Hope to hear from U again,
psdayama

batee
- 2nd May 2006, 07:44
A capacitor pump of +12V referenced to the center of the bridge allows the top FET to turn on. I tried it at +170V top, 0V bottom and it works great, but agree the 700V would exceed its ratings.

Why generate a split source to power the inverter? I've not seen that done before. It seems like the cost of the copper and the extra DC link capacitor outweighs the cost of a couple of extra transistors.

If you're custom-winding a transformer to achieve this, can't you just add a tap at +/- 350V and another at +/- 360V to allow a simple level shifter transistor to turn on top FET?

batee
- 2nd May 2006, 07:56
Has anyone looked into using a DDS IC like the AD9833 for an inverter application? What were the results? How did you achieve PWM from the analog output?

Bryan A. Thompson
[email protected]

psdayama
- 2nd May 2006, 18:04
A capacitor pump of +12V referenced to the center of the bridge allows the top FET to turn on. I tried it at +170V top, 0V bottom and it works great, but agree the 700V would exceed its ratings.

Why generate a split source to power the inverter? I've not seen that done before. It seems like the cost of the copper and the extra DC link capacitor outweighs the cost of a couple of extra transistors.

If you're custom-winding a transformer to achieve this, can't you just add a tap at +/- 350V and another at +/- 360V to allow a simple level shifter transistor to turn on top FET?

Problem is U haven't caught the thread! We are discussing eliminating
bulky 50Hz transformer for Inverter/UPS. Now there are upteen circuits with psudo sinewave output which are not upto mark in many situations like
running fans. What I have been proposing that instead of using PWM for
sinewave generation from battery there should be high frequency DC to DC
converter and the PWM drive the Half Bridge ckt. Now the load can be connected to output of inverter or normal mains supply just by switching
with relay and referenced to Neutral. Also if U don't want to switch then
U just arrange for proper battery charger and keep inverter always on making
online UPS.
I have found that the transformer costs whopping Rs.1200/- and weighs
more than 7kgs for 500VA output. On the other hand whole inverter costs as
much that amount as we use Ferrite txr of small size operating at 40KHz.
Instead of costly driver ICs one should use Pulse transformer as they cost
just Rs.12 and have 2 windings also. I just checked cost of 800V mosfet which is 6-7 times costly than 600V type 6N60. So what I think that in this
case 2 Mosfets in serries in one leg of HalfBridge would work well with pulse
transformer having 2 secondary windings.

psdayama
- 2nd May 2006, 18:22
Has anyone looked into using a DDS IC like the AD9833 for an inverter application? What were the results? How did you achieve PWM from the analog output?

Bryan A. Thompson
[email protected]


I haven't seen the AD9833 datasheet. In analog it is very simple to make
PWM. What U need is to make a reference sinewave oscillator. This U can find
from Opamps Application note of National Semiconductors. Oscillator uses
weign bridge and JFET to stabilise amplitude. Then U need a trinagular wave
of " carrier " frequency i.e. at which frequency U want PWM. U feed the
triangualar wave and sinewave to good comparator and Uget the PWM in output. If U want -ve side PWM also then U use one inverter for sinewave
and feed that to another comparator. And U get the -ve half signal for pwm.
There is interesting article about this on
url:http://www.drbrushless.com/

batee
- 2nd May 2006, 23:23
Yes, I understand the ironless / transformerless concept. I also plan to use no transformers (step-up or step-down) or inductors in my design.

An advantage of DDS is that it is programmed via SPI, so a jumper change or RS232 command could make changes to waveform shape and frequency.

Pulse transformers and driver ICs appear to cost about the same here in Midwest US. I chose the driver ICs because they could be driven with logic level inputs regardless of the FET design.

It looks like more research money is going into 250V and 600V FETs and IGBTs than into any other voltage ratings, so that's where I have chosen to focus my designs.

Do you anticipate problems with running a system like this continuously (for months or years at a time)? Even if the FETs were well heatsinked and stay cool, I would anticipate continuous operation would degrade their lifetime.

Good luck guys.

Bryan

psdayama
- 11th July 2006, 08:20
Hi Everybody!
it seems that nobody is interested in this topic now.
I have found one interesting paper and hope everyone will have a look:

http://eprints.iisc.ernet.in/archive/00006921/01/Analysis_Of_A_Class_Of_PWM.pdf

In the 4th example circuit is what exactly I have been searching.
Also don't know where is D.K.nagare now. He said he has already made
prototypes and was doing field trials. Now he is vanished from Forum and
also from Yahoo.
Hope to hear from U soon.

Navneet Vinaik
- 14th November 2006, 10:28
Hi Everyone,

I have just started work on sinewave inverter using Metal transformer, using PIC microcontroller.
Can anyone provide me some tips.

sayzer
- 14th November 2006, 12:47
Navneet,

That is something that a lot of people are asking for.

If you find code examples pls remember to come back here and post.

--------------------------------

mat janssen
- 14th November 2006, 13:21
I made for an old friend a chip where he could select one of 16 sinewave frequencies to open a relay in a repeater (for transmitting)
Here is a part of the programm only one frequency (50Hz) is there now.
the rest is not important.
It gives the 50 Hz in 200 parts of pwm.
When putting a lowpass filter after the output. The sinewave is back.
Regards,
Mat

psdayama
- 14th November 2006, 15:33
Hi Everyone,

I have just started work on sinewave inverter using Metal transformer, using PIC microcontroller.
Can anyone provide me some tips.

Hi Navneet,
it seems that U are trying to reinvent wheel!
Please go thru the whole thread. In last post I mentioned one article
which is evaluation of PWM sinewave inverter. Also there has been discussion
on disadvantages of metal txr. If U can design proper program for sinewave
PWM then U can utilise ferrite txrs with switching frequency 25KHz and above.
The cost & weight of metal txr is major problem.
Rest wish U best of luck!

Navneet Vinaik
- 15th November 2006, 03:51
Thanks Psdayama, Mat and Sayzer.

I have downloaded the code and paper.
Can anyone guide me hw to calculate the pulse width's effectively?

pramodsinha
- 17th November 2006, 11:09
hi, everybody!
In the market lots of sine wave inverter available in pic 16f72 they are using software pwm not hardware pwm in the entire forum no body has discuss about software pwm , as 16f72 is very cheap and easily available.
I think we should explore about generating software pwm to create sine wave in a bridge configuration, I am trying to develope it and hope it will be successful in this month after finishing i will be able to put some light on it.
thanks

sougata
- 17th November 2006, 16:08
Hi,

My original design was based on a 18F452. Using both of the hardware PWMs and a sine weighted lookup table to modulate the PWMs at regular intervals. The interrupt routine also triggers an ADC to correct distortion on the output. So the ADC was sampled after every PWM steps. I found that the internal ADC was not giving me good results so used an external one. Now I realize that I actually complicated my design.



After the Master's Conference in Gurgaon India me and Pramod would be jointly working on a software based PWM sine wave UPS/Inverter this month. It is again a commercial project but we can sure shed some light and guide people by at least suggesting a way. A normal home UPS/Inverter does not need (at least here) a distortion free clean Sinewave. So we are restricting ourselves to the following criteria.

1. Low Cost
2. Low component count
3. Decent sinewave generation with only average variation for voltage regulation and no THD management.

Hope we successfully complete the same. We will get back here, since this is the place where we met.

psdayama
- 17th November 2006, 18:37
Dear Sougata,
Im very glad to see Ur post after long time. I wish U all the best for
seminar and subsequent planned development.
I too agree with Ur aims on this project. Please add few more:
a. The THD required is just around 10% and not 2-3% as claimed by
commercial units.
b. Voltage regulation of +/- 10% is also good which is same better than
what we get from regular utility cos.
c. It will be useless to get separate 2 HWPWM outputs as only one required.
All U have to do is get 4 steering outputs. 2 are used for alternate pulses
for PWM and 2 for half-cycles. If U use little hardware then (U have to use
it for deadtime) then 2pins can be freed and U need only 2 pins for halfcycles.
This way lot of real time saved and U can have more processing time for
interrupts.

Few posts ago somebody has posted the table for sinewave. I am surprised
that most people make table for 200 steps. I think that table should be of
1024 steps.One only has to generate 256 values for 0 to 90 degrees and mirror them for 90 to 180 degrees
to complete first half cycle and mirror entire thing for other half cycle.
This will give freq of 50*1024= 51200 Hz and carrier freq. half of that is
near to 25Khz for optimum use of Ferrite Txr instead of metal txr.
If internal ADC of 16f72 cant handle this then external one should be used
which can be as fast as 200Ksamples MCP3202 but this may increase cost by abt Rs.100/-
Dear PRAMOD, very glad to hear from U after long time.
I am still trying to find out if Hardware type card can be made within Rs.500/-
and hope to post same if successful.
regards,
psdayama

MKA341
- 4th April 2007, 10:30
hi

can you tell me about pic basic?

Manish

T.Jackson
- 4th April 2007, 11:11
hi

can you tell me about pic basic?

Manish

In a nut shell - PIC Basic is a true compiled, mature, robust, quick & easy no fuss solution for all your PIC-based embedded system needs.

In fact, so easy-to-use, if you can't write a program in it, programming
just isn't for you. It just couldn't get any simpler.

Trent Jackson

MKA341
- 4th April 2007, 13:00
where can i get pic basic software?

keithdoxey
- 4th April 2007, 13:05
where can i get pic basic software?


http://www.melabs.com/purchase.htm

MKA341
- 4th April 2007, 13:05
your design is very good, can you give me some idea about making a inverter by using pic basic?

Hi PICers,

I want to design a 24V DC to 50Hz/240AC power inverter. My choice of PIC is the 18F452 (HWPWM). But I am not sure whether the ADC conversion time would be short enough for dynamic correction.

Any thoughts

Regards

Sougata
The Andig Technologies

sougata
- 7th April 2007, 08:40
Hi,

Manish originally the inverter was built ono the PIC18F452 and had loads of features like true synchronized changeover using MOSFET based static switches to perform like a pseudo online UPS. Actually it was an adaptation of my motor control system using 18F4331. However the BOM cost was high so it was scaled dowm to mimic other designs already based on 16F72. Uses a pseudo software PWM. (Utilizes the inbuilt unit in compare mode to generate int and fire mosfets). Half-Bridge driving and a half cycle boost PFC for charging control. Vertical-Horizontal current based lookup table to get precalculated points (16F series do not support harware multiply). Most of the credit goes to Mr. Pramod Sinha of Jetmark Systems Delhi cause my 16F skill sucks. We could not share the code as it is a commercial project and we are legally binded. For clarifications and solving issues this forum is a great place and people (far far better than myself, Perhaps:D) would surely help you out. Best of luck. Where are you located in Delhi, I drop in there almost every month and stay in A6 Paschim Vihar.

pramodsinha
- 8th April 2007, 10:38
I have written a sine wave generating routine in pbp. It is tested.but i am too busy because summer is my business season give me few days to edit and post it to forum.
thanks everybody.

mincing
- 29th May 2007, 09:20
dear Sougata,

i am working on similar pic based inverter too.Could you please tell me which topology are you using for inveter bridge.

I am working on H-bridge.Have difficulty in Identifiying the brdge drivers.

It would be great if you could help me on transformer desin.

mincing
- 2nd June 2007, 16:15
Dear Souhgata,

Thank you for giving so much of info.What was the ratings of UPS you have made.and what were the efficiencies.
Could you please help with Transforner design information.

Also I have seen a round core trnsformer some ............

also if you are using full bridge topology how do you drive the bridge..........

If you could help with LLC filter inductor design and transformer ,that would be really great.

Thanks in advance

sougata
- 3rd June 2007, 05:54
Hi Mincing,

I was too busy in a project and really coudn't get the time to reply to the thread.

1. For the driver part I use TLP250 from Toshiba. Get the datasheet and everything should be easy.

2. For the bridge you would be using all N-Channel Mosfet perhaps cause they are readily available and have much lower Rds On compared to P-Channel. However switching the high side MOSFETs are a little tricky. You need to have a charge-pump circuit to switch them on. Try the IR2101 it makes your design much easy.

3. To maintain low distortion in the output use a flux reset method when changing cycle. You do this by turning of the high-side mosfet, then turning on the other low side mosfet (both low side mosfets on) and then turning off the one which is not required for the current cycle and finally starting the high side driver of the corresponding cycle.

4. Please note that keep your high-side MOSFETs turned on during the entire cycle and apply PWM to the low side MOSFET. Initially I tried steering the PWMs to all of the four MOSFETs to make up for the conduction switching loss. But it did not produce satisfactory results.

5. Now for the transformer design. Say you are operating on a 12 volts battery. Now when the battery is full charged it is upto 13.8 volts nominal and before the deep-discharge of at around 10.8 volts. You can reduce the voltage with PWM but cannot increase it with the current scheme (boosting can be done, theoritically using a boost PFC like technique but I failed to do so). So keep your transformer primary at around 7.5 to 8 volts. This accomodates conduction loss, battery low, and so on.

6. Now the problem is that the same transformer is being used for charging and you need to boost the voltage during charging. Well a PFC boost method can be applied. See the attached PDF. Note the high side rectifiers are your high side mosfet's body diode.

I am attaching a few more documents links which can be handy during the design process. Sorry for Rapidshare. The documents are more than the allowed 200kb and a multipart zip/rar would have been around 10 parts.

Here are the document links:

http://rapidshare.com/files/34936881/Battery_Charger_with_PFC.pdf

http://rapidshare.com/files/34936883/SineWave_Inverter_Design.pdf

http://rapidshare.com/files/34936882/dc-sine-ac-inverter.pdf



I am sorry I may not be able to provide active support on this thread due to time limitation but will always try too within my knowledge and scope. (I am a completely self-taught with little or no academic background, So I might not be accurate all the times and ready to learn from others.)

I may start up a project on high frequency double-conversion sine wave inverter that utilizes Ferrite Core Transformers as PsDayama suggested. However it would be based on the dsPIC 30F2020. I still don't know whether I would be able to take up that project. Cause I have very little time left for myself catering to clients.

Anyways its good to see that the thread is alive again and would refresh my knowledge base.

mincing
- 4th June 2007, 12:10
Thanks Sougatha!

However I am building SI with Full bridge and isolation transformer.

My Dc input to bridge is 48V DC.

I am using optically isolated gate drivers.I need a 4 output power supply with isolation.

I am looking for suggestions.

sougata
- 5th June 2007, 05:52
Hi,

I mentioned TLP250 for the gate drivers. They have an optically isolated input and a totem pole output. It works great with IGBTs too. While your DC input is 48 volts be carefull about choosing the MOSFETs . Generally MOSFETs with greater breakover voltage have higher RdsOn. While it may seem logical to use a 100volts MOSFETs for the design. Please note that hard turn off of the MOSFETs connected to inductive load causes ringing in the drain as well as gate. So surges may kill them. Snubbers are recommended and fully avalanche rated MOSFETs should be used. If you keep your PWM frequency lower that will result in lower switching losses however may produce audible noise.

Best of luck in your design.

mincing
- 6th June 2007, 10:30
I have selected Mosfets with very low Rds on about 5mOhmm and 100V, 100A devices.


I also have optically isolated drivers from Avago ,but how about the power supply to these devices on output side i.e.Totempole and ground.I understand that a four out put supply with 18V and current? is required.
Is there any other means or method to escape this!

If you could suggest that Power supply cky that will be great.

mincing
- 6th June 2007, 12:33
Hi I browsed through the forum.
Which JPG were you talking about!



Hello!
just scroll down and U will find the schematic in jpg format.
I don't know if Saugata will give the code.
Some part he has already explained.

sougata
- 6th June 2007, 17:24
Hi Mincing,

I would like to know which Avago(Agillent ?? ) drivers you are using and which MOSFETs. What is the intended configuration and if it is being directly connected to load or by a transformer.

Please give the required spec of your design in details.

mincing
- 7th June 2007, 07:53
i am using ACNW3130.seems to be of right choise.Welcome any comments.

I am using a full bridge configuration.with isolation transformer at the out put.Bridge would feed transformer.

sougata
- 12th June 2007, 15:45
Hi,

Please post at least a block diagram if you are not through with your schematic. Also it would be helpful to know exactly what are the specifications of your system or what you are trying to achieve. Otherwise it is hard to suggest a scheme.

Charles Linquis
- 12th June 2007, 16:48
Many years ago I made a 400W . 120V *PURE* sine wave inverter using a PIC. The input voltage was 48. I used a normal inverter (with a ferrite transformer) to give me a regulated 185VDC to feed the PIC-based H-bridge sine wave section.

I used high-side drivers and FETS on the "top" two legs of the bridge and ordinary (low side) drivers and FETs on the lower two.

The high-side drivers can't be "PWM-ed". So I alternately turned them on (one for each half-cycle) while using 78Khz PWM on the lower two. Simple CMOS gates prevented "punch-through" by not allowing the upper and lower FETs on the same side to conduct simultaneously. A small (47uH) inductor was in series with the load and a .1uF was across the load. A scope showed the output to be a perfect sine wave with no glitches whatsoever.

The PWM value was from a lookup table (the program was written in assembly).

The switching FETs needed only a small heat sink.

sougata
- 13th June 2007, 06:41
4. Please note that keep your high-side MOSFETs turned on during the entire cycle and apply PWM to the low side MOSFET. Initially I tried steering the PWMs to all of the four MOSFETs to make up for the conduction switching loss. But it did not produce satisfactory results.


Hi Charles,

Your system was essentially a double conversion system. Although it has two power stages but the sinewave regulation becomes real easy when you have your DC bus regulated. I had my original design of the DC boost using a SG3525 followed by a PIC driving MOSFETs to produce the sinewave. Now I am trying to utilize a dsPIC (I am in the process of learning it and still a Newbie :D) to handle both the conversions as well as battery charging on mains availability. My knowledge in SMPS is very limited till date and I am working hard for those "gotchas". So wish me luck. (I need it for keeping the number of toasted MOSFET/Chopper low, obtained during trial phase)

mincing
- 13th June 2007, 08:28
Many years ago I made a 400W . 120V *PURE* sine wave inverter using a PIC. The input voltage was 48. I used a normal inverter (with a ferrite transformer) to give me a regulated 185VDC to feed the PIC-based H-bridge sine wave section.

I used high-side drivers and FETS on the "top" two legs of the bridge and ordinary (low side) drivers and FETs on the lower two.

The high-side drivers can't be "PWM-ed". So I alternately turned them on (one for each half-cycle) while using 78Khz PWM on the lower two. Simple CMOS gates prevented "punch-through" by not allowing the upper and lower FETs on the same side to conduct simultaneously. A small (47uH) inductor was in series with the load and a .1uF was across the load. A scope showed the output to be a perfect sine wave with no glitches whatsoever.

The PWM value was from a lookup table (the program was written in assembly).

The switching FETs needed only a small heat sink.

Can I get to see the schematic.Idea is quite interesting.In your case how big would be the heat sinks on High side FETs.

Also I would like to know how to post block diagram/schematic in to the forum,so that I can put my design to give a clear understanding.

Navneet Vinaik
- 14th June 2007, 06:25
Hi Charles,

Now I am trying to utilize a dsPIC (I am in the process of learning it and still a Newbie :D) to handle both the conversions as well as battery charging on mains availability. My knowledge in SMPS is very limited till date and I am working hard for those "gotchas". So wish me luck. (I need it for keeping the number of toasted MOSFET/Chopper low, obtained during trial phase)

Dear Sougata,

I have a short experience in this domain but have learnt quite a few things. I have developed a UPS on 16F676, square wave inverters on 16F72 and sinewave inverter again on 16F72 based on H bridge..... all in the past one year. Now, I am keen to work on ferrite core...so if you can guide me some thing..please help....I want to grow in this field, presently am working on SMPS designing(low power, upto 200W only)....the fire is there in me, everyone please guide....

mincing
- 14th June 2007, 10:11
Navneet Vinaik,

Dont worry!This field is more of a stabilized now.You will get every kind of information you need.

let me know what exactly you need.If not able to answer directly,I can give you links and sourcs.

Rishi
- 19th June 2007, 10:12
Hello friends I am power electronics enggineer having experience of 7 years plus.
presently i am working on double conversion inverters.

mat janssen
- 19th June 2007, 17:18
Hallo Rishi. Can you post the schema and the code for this? All of us will learn about this subject!

Navneet Vinaik
- 21st June 2007, 12:50
Dear Mincing,

Thanks for your reply, and sorry for the delay.

I want to understand the technicalities involved in designing systems on ferrites. To be precise, what would be the kind of drive systems, snubbers, clamps and most important transformer design in case of ferrite based systems.
I would be grateful if you could provide me some details etc.

Regards

Navneet Vinaik

Rishi
- 23rd June 2007, 08:08
Hallo Rishi. Can you post the schema and the code for this? All of us will learn about this subject!

hello mat

Yes i will send u details but it will take some time.

i have design 12v/24v dc to 350v dc converter with analog ic sg3525 and already
achieve effeciency more then 90%.

sougata
- 23rd June 2007, 15:46
Hi everybody,

I have been greatly helped by this site http://schmidt-walter.fbe.fh-darmstadt.de/smps_e/smps_e.html . It is the english version of the original german site by the author. Great work, great javascript based smps calculator.

I hope things become easier right now.

Regular bread and butter (hard to earn in my city :D ) jobs leave me almost no time to work on this project. But seeing this thread still kicking does give me some inspiration.

Thanks to everybody who contributed to this thread.

BrianT
- 24th June 2007, 06:50
Take a look at Don Lancaster's site at www.tinaja.com. Search for MAGIC SINEWAVES and you will find information on how to build very low harmonic sinewaves.

HTH

Brian

mincing
- 3rd July 2007, 11:36
Hi friends,

I have difficulty in seeing the bridge driven through with sinePWM.

I have built everything but the bridge is getting shorted when I try to run the inverter.

Any Ideas how to achieve dead time control in Software.

Sougata are you active?

sougata
- 3rd July 2007, 15:12
Hi,

I am hardly getting time to get into the forum and I know I am missing something or the other.

Mincing,

Try to use a resistive load at the output of the bridge and inspect the i/o signals with a scope. Sometimes improver gate drive and/or switch off spike can kill MOSFETs. Please post the schematic and code snippets I will try to help if it is within my scope/knowledge. I am not as active now but you can count on every other member on this forum. Far far better than me.

If you find that you cannot reveal the code/schematic due to commercial problems you can pm me. Again I would try, no commitments.

mincing
- 4th July 2007, 08:55
Thanks for the reply!

I understood that the current drawn(peak current ) is actually higher than what is seen on front panel meter of the Power supply I used.

Do you have any calc. for peak currents that flow in to the bridge?

Actual current or Dc current is only about 1.5 to 2Amps but peak is over 5Amps. at about 15 to 20 V on no load with a transformer connected.



Also what happened to your Double conversion Inverter. I have some documents ,I like to forward to you on the subject.
I am not sure if I can post them here, give me your mail ID I 'll forward the same.

Any one who wants to build HF inverter.

Thanks again!

mincing
- 4th July 2007, 09:05
Dear Mincing,

Thanks for your reply, and sorry for the delay.

I want to understand the technicalities involved in designing systems on ferrites. To be precise, what would be the kind of drive systems, snubbers, clamps and most important transformer design in case of ferrite based systems.
I would be grateful if you could provide me some details etc.

Regards

Navneet Vinaik

could you Pl. give me your mail ID ,I will forward some documents!

Navneet Vinaik
- 6th July 2007, 11:39
Dear Mincing,

Thanks a lot for your helping hand...
My email ID is [email protected]; [email protected]

I am pretty confident that I can build a good quality HF inverter, presently busy in getting all the tools ready...I have an old oscilloscope which has served us for the past 45 years but for this technology I am arranging resources to get a DSO among others tools.
Please send me whatever help that you can, I would be grateful to you as it will help be do my homework before I get into the battlefield!!!

mincing
- 12th July 2007, 08:43
Hi sougata,

Hope everything is fine !

I have difficulty in reading the feed back and adjusting the PWM.
Presently I am reading a DC proportional to the output voltage.PWM is continuously adjusted and checked with the feed back.
However the moment ckt enter the closed loop out put becomes unstable.It keeps changing continuously.

Could you please throw some light on this./

Thanks,

sougata
- 12th July 2007, 09:58
Hi,

I think I have not come across any schematics, code snippets. I don't even know which PIC at what Fosc you are using. May be I missed something as I am not regularly visiting this forum. Details...Please.

mincing
- 13th July 2007, 06:12
Dera Sougata,

I have attached a simple block diagram of Inverter I am working on.

Hope this would give an Idea of my circuit.

Kindly suggest what should be feed back routine.
We are using C with MPLab.

Thanks and waiting for your reply

sougata
- 13th July 2007, 06:56
Hi,

I am not an expert on C (uNsUrE of my expertise of PBP aswell :rolleyes:) so may be cannot help much with the code (which has not been posted :D) but here are some tips.

According to your schematic:

1. Feedback is from one cycle only (not recommended)
2. Driving through inverters means both MOSFETs doing PWM (wasting energy)
3. Use Flux reset when changing phase
4. Be sure that the computed PWM is not eating up cycles and resulting in uneven spread of the modulating PWM

Please report what happens when no feedback is used. Use a lower duty cycle lookup table to ensure that your MOSFETs are not fried due to full drive. Or use a lower input supply to the Bridge.

Navneet Vinaik
- 16th July 2007, 05:26
Hi,

I am not an expert on C (uNsUrE of my expertise of PBP aswell :rolleyes:) so may be cannot help much with the code (which has not been posted :D) but here are some tips.

According to your schematic:

3. Use Flux reset when changing phase
.

Dear Sougata,

What is flux reset when changing phase, can you please give me some more information about it.

Regards,

Navneet

mincing
- 17th July 2007, 05:31
I was just trying to understand this concept of flux imbalance control.

However I could not make out how we do it practically.Do we have to implement it in software or hardware.

I observed lot of noise while the current wave drops tozero and below.NO load voltage waveform is a correct sinewave.

Kindly tell me how to implement the flux balance control.

regards,






Hi,

I am not an expert on C (uNsUrE of my expertise of PBP aswell :rolleyes:) so may be cannot help much with the code (which has not been posted :D) but here are some tips.

According to your schematic:

1. Feedback is from one cycle only (not recommended)
2. Driving through inverters means both MOSFETs doing PWM (wasting energy)
3. Use Flux reset when changing phase
4. Be sure that the computed PWM is not eating up cycles and resulting in uneven spread of the modulating PWM

Please report what happens when no feedback is used. Use a lower duty cycle lookup table to ensure that your MOSFETs are not fried due to full drive. Or use a lower input supply to the Bridge.

mincing
- 17th July 2007, 05:39
When feed back is not used the out put is pure sinewave.
."

However I could not make out how we do it practically.Do we have to implement it in software or hardware.

I observed lot of noise while the current wave drops tozero and below.NO load voltage waveform is a correct sinewave.

I would also like to understand " I was just trying to understand this concept of flux imbalance control

Kindly tell me how to implement the flux balance control.

regards,





Hi,

I am not an expert on C (uNsUrE of my expertise of PBP aswell :rolleyes:) so may be cannot help much with the code (which has not been posted :D) but here are some tips.

According to your schematic:

1. Feedback is from one cycle only (not recommended)
2. Driving through inverters means both MOSFETs doing PWM (wasting energy)
3. Use Flux reset when changing phase
4. Be sure that the computed PWM is not eating up cycles and resulting in uneven spread of the modulating PWM

Please report what happens when no feedback is used. Use a lower duty cycle lookup table to ensure that your MOSFETs are not fried due to full drive. Or use a lower input supply to the Bridge.

sougata
- 17th July 2007, 06:48
Hi,

I am not qualified enough to explain. So I would suggest you to go through these links.

http://techtrain.microchip.com/webseminars/documents/IntroToSMPS_090106.pdf

http://www.intersil.com/data/an/AN1246.pdf

In my software I do this while changing phase.

1. Switch off the High Side MOSFET
2. Wait for the dead time.
3. Switch on both low side (flux reset)
4. Switch off both low side
5. Switch on the other High Side
6. Start PWM on the corresponding low side.

If you are not getting sinewave in your output while you apply feedback then its your correction algo that is not working. I cannot release our code here without permission from pramod but there is certainly an example of a Sinewave Inverter using C which uses a delta lookup scheme to make computations easier. Here is the link

http://rapidshare.com/files/43362188/C_Sinewave.rar

Hope this helps.

mincing
- 23rd July 2007, 06:38
Dear Sougata,

It was a great help indeed.


C-sinewave has lots of info.

However I would like to know little back ground.Thewre are three tables used ,one for sine wave,one reference sine wave and one error/delta correction.I was not able to understand how he arrive at those tables and the values in the tables.Little more deep in to back ground would probably a great help.

thanks very much,

mincing
- 23rd July 2007, 06:41
Also I would like to know what is the nominal DC volatge used.in that scheme.

sougata
- 26th July 2007, 03:48
Hi Mincing,

I am sorry I need to put some time and scratch my head to explain the C code. Currently I am a bit involved in some projects (pulling my hair almost always :D) But here is a crude explanation.

For a simple proportional control system the PWM for the sinewave for the current pointer is looked up and the previous PWM is used with the feedback to determine the error. Thus before the current PWM is made through it is corrected for errors by proportionally modifying it.

Since for your system the max PWM is 255 (8bits) you cannot scale it up any more so your maximum gain is 1.0. Means your hardware should be able to step up the voltage and provide the current at maximum load, minimum permitted input supply. Now what we found in using the 16F is that the multiplication routines were not fast enough (18F has got a hardware multiply) to be calculated on the fly and still leave room for other tasks such as AC Restore Sense (F/V permit), Batt-low sense (+ Indication), PC communication, Overload (Thermal/Power) and Fault sense. So what we did was implement a pseudo hardware PWM. We used the compare in 16 bits and used the High Byte from the sinetable and lowbyte from the error computation. Now we find that PWM results are unsatisfactory. So we decided for lookups table that contains some precomputed results for current and voltage. This speeded up the whole thing but we lost resolution. However for a domestic inverter it was acceptable as the regulation were within specs. I am sorry I cannot reveal any more details.

So far you have not posted any codes and thus I cannot help you on your code.
We (Me and Pramod) are planning for a dsPIC based inverter for the next season and if that happens as a reality then we may release the old code to public. No promises however at this moment.

Best of Luck

mincing
- 27th July 2007, 09:36
Hope you are fine.

Thios time I have come up with a weird question.What is the meaning of Sine PWM being 25KHz.

Say we consder 32 samples it gives ,20ms/32=625uS.
===>frequency of each sample is only 1.6KHz .

Then ecverybody talks of 25 KHz .Could you please explain that a little.

Thanks,

sougata
- 27th July 2007, 10:37
Hi,

You are using a lookup table to modulate a carrier frequency (The PWM). In analogue world this is AM. But the pronciple here is of a class D amplifier. That is your switches are either off/on and not working in the linear region. You can use any frequency thats twice (nyquist) the output frequency mulitplied by the resolution (steps) of the lookup table. Your output transformer and parallel resonant capacitor forms a filter to integrate the modulated PWM into a sinewave. Normally the PWM is kept higher than 20KHz to reduce audible noise in the transformer. While keeping it lower has a certain advantage of lower switching loss.

sanjay_9991
- 24th August 2007, 20:23
if any one willing to share pic based sinewave upscum inverter design can plz contact me

walkura
- 17th October 2007, 20:59
I was reading the posts in this topic and maybe i'm a bit late with my reply ,but i just found this forum .
The flux imbalance problem i saw mentioned before is something i know from smps designing .
Especialy in transistor push pull it can be a nasty subtle failure (with mosfets you have this problem already a lot less but i get back to that) .
The essence of flux imbalance is this you start at the 0 Gauss point ,gate 1 opens mosfet1 for x time transporting an amount of charge of x (m)Joule inducing a magnetic fieldstrength of x Gauss in you're core (depending on the frequency usualy between 1200 to 2000 +-) .
When for some reason there is a difference in
A : timing (Volt-second imbalance) better said (pulse 1 is shorter/longer then pulse 2 (technicaly impossible with 3525 etc. but homebrew program's might have different idea's)
B : while making you're ferrite you wound more on 1 of the windings .
In either of these cases pulse 1 will create a certain amount of Gauss and pulse 2 is not making exactly the same amount magnetic fieldstrength (youre core doenst get as much Gauss down as it went up).
The result is that you're core slowly accumulates that little remainder of fieldstrength after a x amount of pulses it runs into the flat part of the curve the core is so called saturated and according to Faradays law it can't support the magnetic field you're induction (ac resistance) drops to almost 0 Ohm destroying you're transistors .
From what i saw everyone here used mosfets ,in this aspect it suprises me a little you mention fluximbalance .
A normal transistor has a negative temperature coeeficient (this will increase the destruction speed in imbalanced transformers)
Mosfets however are the opposit when you have a imbalance one mosfet gets warmer its resistance increases and amount of joules delivered to the coil(core) go's down .
I hope this explained in normal human words the concept of flux imbalance .
For the people that want the more in depth story i would advice read the book from pressman called switch mode powersupply design .
This book offers in relative understandable language the concept and theory on +-15 topology's (not to mention good chapters on magnetics ,feedback & gatedriving etc. etc.)


Last summer i tryed a pwm sine inverter but lack of time froze the project for now .
Although i did have it working low power it never came out of experimental fase.
You may call me nuts but i did it with a st7lite25 + pushpull stage ,second order chebchev filter.
Next round will be sg3525 (for generation of 500 watt +- 310 volt) sync. rectification ,half bridge pwm stage + lc filter like you would expect in a class D amplifier .
(my last setup worked very well in low powers but what with 500 or 1000 watt ,how to filter?)

Good luck with youre inverters everyone :)

sougata
- 18th October 2007, 06:38
Hi,

That was a great explanation walkura and thanks for the "human" explanation. Now I would try to dig into the software aspects a little. I am a complete self taught and know my lackings, so please correct me if I am conceptually wrong.


While changing cycles within the software the loop latency may be variable if you are not using your own asm interrupts to deal with that. Since this is all about PBP my recommendations are for time critical routines use asm. As already proved asm+PBP=muscle. Considering a round-robin multitasking with no blocking codes would ensure specific time slots alloted to different routine on priority basis.
Your load is imbalanced. I have seen a few cheap soldering irons which has a single diode inside them. Causing to draw current in only cylce.
For ease of manufacturing I have seen MOSFETs on a common heatsink. This reduces a per channel MOSFET Rds-On difference and thus should be avoided for a stable design and utilize the MOSFETs property of negative temperature co-efficient for balancing.
Per cycle flux reset may be applied during the dead-time with its own pros-cons (may not be applicable for ZVT implementation)
Since the current drawn per cycle is also a function of the impedance it may be accomodated in software as well as almost all hardware designs support current sensing.
Sometimes ADC based current sensing can take longer to come into action and kill your MOSFETs. So my advice is use a comparator based sensing to quickly turn-off your MOSFETs under fault conditions and use the current sense for your other tasks or PID.
If you are into serious intelligent smps design then consider the dsPIC (No PBP support however). Your tasks become real easy for only smps implementation.

mincing
- 12th November 2007, 09:15
Hi all,
NOw I have completed quite a bit.yet there are two issues that are still dogging me.
1.Output stabitity,
2.Heat at no load( the power dissipation)

The output sine wave is quite stable as long as the system does not enter the closed loop.
Once it enters there is a continuous up/down swing of out put voltage and sine wave.

We could control it to quite a bit by putting a PI controller before the feed back.
still there is a fluctuation of about5 to 6 volts.


2.heat is toomuch.the no load currnent of the unit is 2A at 24V and when added with more during loading,i am afraid I can run unit like this.
any suggestions are welcome!

sougata
- 19th November 2007, 14:01
Hi Mincing,

Sorry for the late reply. I really do not get time (or get into weired problems) to log into this forum. Without specific details about your circuit like schematic, code it is impossible to suggest anything.

mincing
- 20th November 2007, 09:30
I had posted shchematics in the past and we had even discussed it in the forum.

sougata
- 20th November 2007, 14:23
Dear Mincing,

You reported heating. Without actual values of components and detailed circuit diagram it is very difficult to guess whats going on inside. Also if you are using de-saturation protection schemes as used in IGBTs your MOSFETs may heat up if not designed carefully. And without code it would be not possible to find out if it has got something to do with. Anyway I would be out of station for somedays and would check back later.

mincing
- 27th December 2007, 14:04
can you help me how to calculate snubbers for H-bridge inverter mosfet switches.

suggestions from any are welcome!

walkura
- 28th December 2007, 17:14
Good evening Mincing .

I seen your question about snubbers and can copy-paste you a relative simple answer .
But i have to add that this is a dissapative snubber (i'm not always happy with that ,but it solves the ringing)
The information that follows is from the website of ridley engineering (they give a clear calculation method)

If you have any ringing waveforms in your power circuit, these waveforms must be damped or they can lead to device failure, excessive EMI, or instability. In many cases, you can damp a ringing waveform with a series RC network across the offending device.

Note: if the ringing frequency is not almost two orders of magnitude higher than the switching frequency, you may be in trouble. It will be hard to damp the ringing without excessive dissipation, and alternate circuit solutions must be found.

First, you need to measure the natural frequency of the ringing waveform.
To design the snubber for the power FET of a flyback circuit, for example, first run the circuit at low power with an oscilloscope probe on the drain waveform with no snubber.

Make sure you are using a low capacitance scope probe, otherwise the waveforms will be modified by the connection of the probe. If you suspect that the probe capacitance is too high, just set the scope to a higher sensitivity, and without making electrical contact to the FET drain, just bring probe close to the device. You will see the high-frequency ringing waveform due to the radiated noise.

Observe the ringing waveform at turn-off on the drain. Use a reasonably high input voltage (without destroying the FET, or course) since the resonant frequency of the ringing will be voltage dependent. Record the resonant frequency.

The ringing is caused by an equivalent RLC network. For a low-loss circuit, it will be quite undamped, and the oscillations will continue for many cycles. Step 1 is to add a damping R across the device. First , you must know one of the resonant elements, L or C. On the primary switch, the leakage inductance is the dominant L, and should be well known. For a secondary ringing, the diode capacitance will be a known quantity.

Calculate the characteristic impedance, of the resonant circuit.

If you know L, Z = 2 x 3.14 x f x L

If you know C, Z = 1/(2 x 3.14 x f x C)

Try an initial value of snubber resistor of R = Z. This usually suffices to control the ringing.

Using just a resistor across the power device will control the ringing, but the dissipation would be very large. A series capacitor is used to reduce the power dissipation in the damping resistor.

Calculate the C needed in series with R according to: C = 1/(3.14 x f x R)

Increasing C beyond this value will increase dissipation, but will not improve the damping. In some cases you will be able to decrease it by 30% or so, but any less than this and the snubber will be less effective.

Size the resistor according to the dissipation it will see: P = C(VxV)Fs

where V is the voltage on the device when it is off. Depending on the circuit operation, the actual dissipation may be closer to half this value in some cases, and the design will be conservative. Use thermal data from your circuit to determine if the resistor size can be reduced.

Build the snubber (keep leads short) and test the circuit. You should be close to the final solution on this first attempt.

If the problem remains ,i would advice you the book switchmode powersupply's by Pressman .
They have a chapter on all sort of snubbers (active passive etc. etc.)

Good luck Walkura

mincing
- 31st December 2007, 07:17
Thanks a lot for the reply,Walcura.

However I can manage snubber calci for Flyback and other SMPS.My problem is with inverter H-bridge snubbers.
Please give any info. if you have or find somewhere.

regards

Pranav Verma
- 16th March 2008, 11:44
[QUOTE=sougata;35864]Hi,

I am devloping a proogramm for inverter,but i need some helps, More over i have devloped the programm on theory.but in practical i have some problem

i have genrate 50 Hz frequency by a loop and delay.Out Put is Ok but when put load about 100 wats on it
the output voltage go down more tahn 40 volts.

Please help me to do it in write way, I am the lerner and new in the are of pic programming.

Please helps me

sougata
- 16th March 2008, 12:49
Hi,

You need to modulate your sinewave according to a modulation index (that increases decreases the output voltage) derived from the error. Inititally a proportional error scheme is okay to experiment with later can add up to PID. In addition you can do a point by point correction to lower distortion. In 16Fs multiply is not supported in Hardware thus a different approach may be taken. Use a sliding lookup table. Here you have more number of points in the lookup table than regular 32/64 points. However it should be a single quadrant lookup table. Now if the resolution of the lookup table is increased you can have a sliding index (according to error) to have voltage correction without much software overhead.

babalola
- 12th May 2008, 13:23
since no one would review my c-code on this subject, ih have decided to modified suogata bacis code on sine wave inverter thread. i am using PIC16F72 for the evaluation because that is the processor that is readily available with me now.

The picbasic iam using is the pro demo version and so i appriciate that i can't run a code more than 31 command line.however upon trying to compile the code ,the following erros are reported:

1: Error line 116 :redefinition of label T0CON

2: Error line 119: bad expression

3: Demo limit of 31 command line exceeded (this is understood)

pls, can any one fix these problem for me?.

(a): With the way the modified code stands,can it generate two complimentary sine pwm signals DRIVE1& DRIVE2?.if yes how do i include a delay routine of about 470ns for dead-time control between the two signals?

(b): If the code cannot generate the two complimentary sinepwm signals what do i do to fix the stuff?.

regards,
babalola.

sougata
- 12th May 2008, 14:25
Hi Babalola,

The routine I posted uses the FSR0 indirect addressing method which is not available in the 16F72. 16F72 has a single FSR register so it would be a different implementation. With Anded outputs steering the PWM should not be difficult. You can use the same phase drive signal to drive the upper MOS so only the lower MOS would be switching with your PWM.
With 20MHz clock each of your instruction takes 200nS. So servicing the interrupt, (All MOS turned off within it) and then fetching the lookup table from PBP and switching as per system flag is quite some DEAD TIME . Another way of steering the PWM is using Four Buffers each connected to individual PIC ports and 4 nos of 4.7K resistors from the PWM pin to the four ports. So you get the following output;

1. PORT pin floating (Z, as input) = PWM
2. PORT pin LOW = LOW
3. PORT pin high = High

Since you are using a demo version of PBP, I would try to find some time to get some portions compiled for you. However I am a bit stuck and behind schedule in one of my projects. So please hang on...

Anybody else out there to help... Please do.

babalola
- 13th May 2008, 15:53
I have found that 16f72 has only FSR(at addr. 04,84,104&184h).from the datasheet,could that be the reason for the errors?.implementing this seems a tedious task for me as a beginner in basic and i need further help. can't the anded schematics attached to my last post do the steering?. from what i understand by using four ports with buffers to steer the PWM would mean configuring the four ports as input permanently, is it? i will appriciate the compile portion so that i can use scope to verify the PWM outputs.

babalola.

sougata
- 13th May 2008, 18:11
I have found that 16f72 has only FSR(at addr. 04,84,104&184h).from the datasheet,could that be the reason for the errors?..

Seems so


implementing this seems a tedious task for me as a beginner in basic and i need further help.

This forum is the best place for PBP+PIC


Can't the anded schematics attached to my last post do the steering?

Yes, I only suggested another option.


From what i understand by using four ports with buffers to steer the PWM would mean configuring the four ports as input permanently, is it?

Not really. Having the ability to use the Hardware PWM and general I/O (for experimenting with softpwm, perhaps) without changing your circuit can be beneficial during development


I will appriciate the compile portion so that i can use scope to verify the PWM outputs.

Hope I find some time for it.

babalola
- 14th May 2008, 12:05
Sougata,

Thanks for your explicit response, i will continue to work on way out of the code problem while also hoping that someone else could offer a clue.

Regards,
Babalola.

Pranav Verma
- 11th June 2008, 03:20
Hi PICers,

I want to design a 24V DC to 50Hz/240AC power inverter. My choice of PIC is the 18F452 (HWPWM). But I am not sure whether the ADC conversion time would be short enough for dynamic correction.

Any thoughts

Regards

Sougata
The Andig Technologies

Hi sougata,

i wants to devolope a programm for inverter which will suitable for microtek square wave inverter, i have done the invertring section,overload section and battery low section,but there was problem with the charging section.

in the circuit mains Freuency sample is avilavle at portc.
in our programm having the vivration at the time of charging.

Hence it is request to u that pl help me and give the write logic for charging section.


Thanking u.
Pranav.

Mateus
- 25th June 2008, 12:08
Thanks a lot for the reply,Walcura.

However I can manage snubber calci for Flyback and other SMPS.My problem is with inverter H-bridge snubbers.
Please give any info. if you have or find somewhere.

regards


Hello Mincing !

It is probably too late for an answer, but i am new here. Anyway if you still have the problem with Snubber, you could try the following paper, which in my concept is very good. In fact it is for IGBT´s protection but it can give you some help. It is supposed that MOSFETs do not require Snubber networks meanwhile they have peak diode recovery dv/dt > 3 V/ns, but i am not completely sure about this statement.

Good Luck.

Snubber considerations for IGBT applications.pdf

http://www.irf.com/technical-info/designtp/tpap-5.pdf

Mateus
- 27th June 2008, 13:05
Hello everybody !

I have been working with an inverter prototype 500 VA 24Vdc / 120 Vac 60 Hz, H-Bridge single-phase, Mosfet Switches IRF8010 VDSS 100V - dV/dt 16 V/ns, 2 Mosfets in parallel per Switch. The system runs controlled by means of a PWM 3.72 kHz generated by a Microchip PIC 16C74. The DC voltage source (A standard rectifier, Diode bridge + Capacitor), is connected to the H-bridge inverter by means of a duplex 12 AWG 0.9 meters length cable. Probably due to this cable inductance, the DC voltage at the inverter bridge has some spikes with short duration and high amplitude. I have tried to reduce these spikes with 2 electrolytic capacitors 330 µF 160V in parallel (C4), located at the H-bridge DC voltage entry, and it seems to reduce the Spikes quantity, but not the spikes amplitude.

Questions:
1) I have not used Snubber Networks for these switches because it is supposed Mosfets do not required them. Am i wrong , are the Mosfets subject to High risk in this case with these spikes ?
2) The noise caused by these spikes also can affect the control system performance. Could you please give me any suggestion to eliminate or at least reduce these spikes ?

Attached you can find the H-Bridge circuit diagram, and the obtained signals for a resistive 100W load connected to the HV side of a Step Up transformer 13.6/120 V.

Thanks for your comments.

tahmid
- 5th August 2008, 20:04
Hi everybody,

I am a new comer in this forum. I have followed all the postings regarding sine wave inverter as I am interested in it. I am trying to make sine wave inverter of 600va. I made boosting section with sg3525 to convert 12v battery voltage to 350v dc with feedback. I used 100 kHz freq. with etd39 core. I also made battery charging section with separate ferrite core etd34 with 132 kHz freq. I want to make 350v dc rail to 230v AC with full bridge configuration and with pic 18f 1320/4550. While making this section, I am facing problem and invite suggestions regarding these.

In full bridge circuit, upper 2 N channel Mosfets require virtual ground and so keeping those 2 on for 10msec is difficult and hence if I keep the lower mosfet on and upper one pwm-ed with 50kHz, is there any problem?

Which driver is useful for driving mosfets in full bridge configuration?

I have made the sine table and will test soon and hence suggestions are invited urgently.
Hope to get suggestions from you all.

With thanks.

mincing
- 12th August 2008, 07:11
Hello Tahmid,
I have been off the forum for quite some time.
Now back in place!

Can you help me with your design of stepping up dc-dc design with SG3525 and the charger design please!

I have done some work but could not actually get through ,as I had problems in the biginningit self.

Thanks ,
Mincing

mincing
- 12th August 2008, 07:28
Hi everybody,

I am a new comer in this forum. I have followed all the postings regarding sine wave inverter as I am interested in it. I am trying to make sine wave inverter of 600va. I made boosting section with sg3525 to convert 12v battery voltage to 350v dc with feedback. I used 100 kHz freq. with etd39 core. I also made battery charging section with separate ferrite core etd34 with 132 kHz freq. I want to make 350v dc rail to 230v AC with full bridge configuration and with pic 18f 1320/4550. While making this section, I am facing problem and invite suggestions regarding these.

In full bridge circuit, upper 2 N channel Mosfets require virtual ground and so keeping those 2 on for 10msec is difficult and hence if I keep the lower mosfet on and upper one pwm-ed with 50kHz, is there any problem?

Which driver is useful for driving mosfets in full bridge configuration?


I have made the sine table and will test soon and hence suggestions are invited urgently.
Hope to get suggestions from you all.

With thanks.

Yes,

You can use IR H-bridge drivers IR2113 or IR2111 .Preferably the 2113.
There are some H-bridge drivers in Freescale,try getting some and use,b'coz one driver serves all four devices.

rgds,

tahmid
- 13th August 2008, 17:55
Hi all,
I am facing another problem, that is sending the pulses from micro controller to the mosfet driver as the sinusoidal pulses from pic micro controller to the driver is very low and hence it is difficult to drive the ir2120. I could use Tc 427 but it is not available here. Hope to get your suggestions to overcome the problem.
Hope to post the schematics soon. Thanks mincing for your kind suggestion.
Thanks.

tahmid
- 14th August 2008, 12:40
Hi mincing,
What is your progress? Can you apprise me regarding the sine/square wave smps inverters made in India? Do they use microcontroller?
I have solved my problems and tested my circuit and got clean/pure sine wave output at 50khz freq. I have tested 2 types of inverter- single stage smps modified sine wave inverter and dual stage pure sine wave inverter(software pwm-ed). For sine wave generation, I have used 8 pin pic 12F675. Hope to help you and others in this respect.
Thanks.

mincing
- 19th August 2008, 12:24
Hi all,
I am facing another problem, that is sending the pulses from micro controller to the mosfet driver as the sinusoidal pulses from pic micro controller to the driver is very low and hence it is difficult to drive the ir2120. I could use Tc 427 but it is not available here. Hope to get your suggestions to overcome the problem.
Hope to post the schematics soon. Thanks mincing for your kind suggestion.
Thanks.

Hai Tahmid,

You can use simple transistor ampli. ckts for boosting up the signals from pic to suit the levels(say 10V) of IR 2110 and feed.

This will solve the problem of low level signals.
Thanks!

mincing
- 19th August 2008, 12:26
Hi mincing,
What is your progress? Can you apprise me regarding the sine/square wave smps inverters made in India? Do they use microcontroller?
I have solved my problems and tested my circuit and got clean/pure sine wave output at 50khz freq. I have tested 2 types of inverter- single stage smps modified sine wave inverter and dual stage pure sine wave inverter(software pwm-ed). For sine wave generation, I have used 8 pin pic 12F675. Hope to help you and others in this respect.
Thanks.

They use microc controllers .And most companies that supply sine wave inverters use dsp chips.

However looking forward to your support and cooperation all through.
Thanks!

Bhatu
- 26th September 2008, 12:46
Hello!
just scroll down and U will find the schematic in jpg format.
I don't know if Saugata will give the code.
Some part he has already explained.

Hi All,

Colud you please suggest me about Sinewave Inverter schematic.

Bhatu
- 26th September 2008, 14:11
Hello!
just scroll down and U will find the schematic in jpg format.
I don't know if Saugata will give the code.
Some part he has already explained.

Hi All,

I am going to desgin a 400VA-600VA Invertor using PIC16F676 microcontroller & IRF317, Colud you please suggest me your comments over it.



Thanks
Bhatu Shinde

Bhatu
- 26th September 2008, 14:11
Hello!
just scroll down and U will find the schematic in jpg format.
I don't know if Saugata will give the code.
Some part he has already explained.

Hi All,

I am going to desgin a 400VA-600VA Invertor using PIC16F676 microcontroller & IRF317, Colud you please help me.


Thanks
Bhatu Shinde

Archangel
- 26th September 2008, 17:46
Other than the sheer joy of being able to say" I did it", Why?
see link below:
http://www.harborfreight.com/cpi/ctaf/displayitem.taf?Itemnumber=92708
money wise you will be upside down to roll your own.

skimask
- 26th September 2008, 18:05
Other than the sheer joy of being able to say" I did it", Why?
see link below:
http://www.harborfreight.com/cpi/ctaf/displayitem.taf?Itemnumber=92708
money wise you will be upside down to roll your own.

I've got this unit (from Walmart a few years ago), physically it's the same thing, same case, same cutouts, same switch/led/positioning, same outlets, same everything, except mine has a fancy label on it and a cigarette lighter adapter instead of alligator clamps.

It's got a modified sine wave alright... I hooked it up to the 'scope awhile back. Yep, it's a MSW... 1/4 @ +V, 1/4 @ 0V, 1/4 @ -V, 1/4 @ 0V.... 90 degrees spent in each 'phase'. And the peak V was around 150V if I remember right, instead of the +/- 170V I would've thought it should've been.

P.S. What's an IRF317 anyways?

babalola
- 3rd October 2008, 16:29
hi guys,

sine lookup table is a vey important issue as far as digital control of inverter is concerned,can any of you expert treat us (we the beginer )in details the basics of creating this important table?.there is a formular used in microchip reference design,

vref= vp* sin(2II*K/N).
my concerns are:

1. What inform the choice of N( no of samples) other than the niquist sampling theorem?
2. how far can we go in the choice of this value?
3. what is the relationship between this no of samples and the total harmonic distortion of the sine wave?
4. is the above formular valid in all cases?

i dont know if this topic has been mentioned in the past, but i believe detail understanding of this important topic will assist greatly who will become a power inverter designer with microcontroller.

regards,
babalola

sougata
- 3rd October 2008, 19:02
Hi All,

While I am not being able to keep up with this thread still the following links might help :


http://www.dattalo.com/technical/theory/sinewave.html
http://www.mathworks.com/products/simulink/demos.html?file=/products/demos/shipping/simulink/sldemo_wavethd_script.html
http://www.doulos.com/knowhow/vhdl_designers_guide/models/sine_wave_generator/
Motorola AppNote (Check the attachment)

babalola
- 6th October 2008, 15:44
Hi sougata,

thanks a lot for the links ,you must be too busy to remember the 16f72 code you promise me!.

babalola.

sougata
- 6th October 2008, 20:29
Hi Babalola,

I am just recovering from a terrible financial set back. I work in a part of the country where embedded is not done much and low in returns. A joint venture and lack of paper works almost made be broke.

I am learning that coding itself does not help, terms and conditions in black and white ensure that you get paid for the job. (The entire production aside)

I have mentioned in another post by kvrajashekhar (if I remember the name correct) that I could not keep up to my promise so no more commitments. Also being a design house I cannot make the code public due to commercial restriction.

Lacking an engineering background I do not clearly understand the equations and maths involved in a theoretically backed design. However I try to figure out by studying more and more.

In my design I sample the output voltage (a dc average) pass it through a PI routine to derive error. The error is basically and inverse of my sinewave modulating quotient. Which gets multiplied with the look up table. To save instruction cycles during table interrupts the entire lookup table is recalculated during zero cross for a cycle and kept in an array. This does not result in a highly pure sine but THD measured was between 2.5% and 4%. Thus waves are corrected only every 10mS. In fact 20mS was the original design to avoid flux imbalance. Now the routine uses flux reset by just switching on the Lower MOSFETs every zero cross. This gives me enough time for housekeeping etc. Like battery capacity measurement, display, communication, discharge profile log and possible econo-mode change during long power outage hours based on previous history.
All done on a 18F4520 @ 40MHz.

This forum was the starting place and I require less assistance now but I am grateful to people especially....everyone.

samrulezzz
- 29th April 2009, 06:12
Hi Sougata

samrulezzz
- 29th April 2009, 06:12
Hi Sougata

needed a bit of help on inverters using pic16f72
read ur posts on thE thread
this thread is a year or more old so i believe u have advanced ur inverter quite a lot

can u help on pic 16f72 code as i'm very bad on coding weras i ve pretty gud hardware knowledge.......

sam
[email protected]

sougata
- 29th April 2009, 07:18
Hi,

I do not produce inverters commercially. I only developed the firmware. With the newer PICs having better peripherals design is even easier.

babalola
- 30th April 2009, 09:51
Hi Sougata,

Its a long time to hear from you.
To do voltage feedback on the output of inverter with PI routine, is it better done within the main interrupt scheme where the duty cycle is updated or within the background loop and why?.
Iwanted to try the followings for my digital PI control of the inverter output: If my error is negative
U(k+1) = -U(k)+ A*e(k) - B* e(k+1)
If error is positive,
U(k+1) = U(k)- A*e(k) + B*e(k+1), Does the above make meaning?

Can any one advice,

Babalola.

sougata
- 1st May 2009, 07:14
Hi,

With a quick look, I couldn't make anything out of the formula. Explain in details about U seems to be the desired voltage, K constant, e error, what about A and B. Are they the P and I .

How are you tuning k ?

Post Code.

samrulezzz
- 5th May 2009, 07:43
hi Sougata

Actly its like i'm a final engineering student.....n inverter is ma project for final sem.....i ve a hardware design fot inverter....n also interfacing circuits....which actly i got frm my guide...

but now problem is no1 around knows PIC properly to write a accurate program.....


so I was hoping if u could help me on some coding of PIC16f72 to be done.....Particularly PIC16f72 cuz the i ve the design ready for it.....


can u help me to write a code....or if u cuold give some old code (i.e of PIC16f72 inverter code) u have so that it wud help.....

sam
[email protected]

sougata
- 5th May 2009, 11:52
Hi,

To help you with the software flow the schematic is needed. Wondering how you rigged up a schematic without having fully understood the programming philosophy and the 16F72 !!!!!!!!!!!

babalola
- 5th May 2009, 13:28
Hi Das,

The e(k+1) is the present error
e(k) > past error
u(k+1)> present output of the pi controller
u(k) > past output of the controller
the above are digital parameters of the pi controller and in the course of getting these parameter there is alway need for sampling time (T), the propotional gain of the controller Kp and the zero placement of the controller which is WI
INTERGRAL GAIN KI=Kp*WI
therefore A=Kp(WI*T -1)
while B=Kp

Example if kp=0.04 and WI =3140rad/sec SAMPLING TIME OF 10us

KI=188.4
A=0.04(3140*10US-1)
B=0.04

Remember in PI controller proportional looks at present error while intergral looks at past errors

Regards,
babalola.

babalola
- 5th May 2009, 13:35
Hi Das,

The e(k+1) is the present error
e(k) > past error
u(k+1)> present output of the pi controller
u(k) > past output of the controller
the above are digital parameters of the pi controller and in the course of getting these parameter there is alway need for sampling time (T), the propotional gain of the controller Kp and the zero placement of the controller which is WI
INTERGRAL GAIN KI=Kp*WI
therefore A=Kp(WI*T -1)
while B=Kp

Example if kp=0.04 and WI =3140rad/sec SAMPLING TIME OF 10us

KI=188.4
A=0.04(3140*10US-1)
B=0.04

Remember in PI controller proportional looks at present error while intergral looks at past errors

Regards,
babalola.

samrulezzz
- 7th May 2009, 07:25
hi Sougata


Actly my guide provided me with the circuits....

Ive attached few interfacing circuits....
hope this is wot u requested....

sougata
- 7th May 2009, 10:14
Dear Sam,

These are the interfacing circuit to do the following in order of your doc.

1. Mains Sense Circuit: Comes from a small step down transformer. The rectified DC voltage is an average representation of the Mains Input Voltage. AN0 is used to sample this pin and decide the status of the mains input. That is within range or outside range. If out of range switches to inverter mode. While in inverter mode used to sense mains restore condition. So this is part of a periodic ADC routine.

2. Battery Sensing Circuit: Used to sense the battery voltage for deep discharge cut-off and charging state change (Boost/Trickle/Equalize). So this is also used in both the inverter/mains-standby mode. Used AN1

3. Charger Circuit: An inverting amplifier. Note that the same shunt (generally in the low side negative battery terminal) is used to measure battery charge and discharge current. The ADC onbaord 16F72 is 8 bit. If a signed AD was performed by offsetting the signal then you loose one more bit and have 7 bit AD for the current sense. So to channels are used with two amplifiers. This is negative battery dischargei.e., current is being put into the battery, thus the inverting amplifier. Phew......

This goes to AN4 and is used only when charging the battery.

4. Load Sensing Circuit : Same as above but for discharge. So a non-inverting amplifier. connected to AN2. Used for overload protection.

5. Output Voltage Sensing: This either comes from a sense winding on the inverter transformer or a small step down transformer (better) connected to the filtered output of the inverter output. This is the voltage feedback for correcting voltage under different load/battery condition. Average DC represents the average output voltage. No in cycle distortion correction possible. (Not within the scope of 16F @ 20MHz, Needs a 18F @ 40MHz)

6. Power Supply Circuit : Your PIC runs on 5 Volts.

7. Sync Pulse Circuit: PORTB.0 INT based zero cross over sensing. Can measure line frequency. Can detect abrupt mains failure (UPS mode). Can do phase angle control on charge circuit. Can detect mains restore. Important for grid connected inverter, where you need to sync your timebase to the mains.


Assuming the above circuits have been ripped from common inverter design prevalent in India. I don't know why people are still stuck with the 16F72 when there are newer introduction like PIC18F1330. I could upgrade my design. Who would buy it ?? :(

This design is far from complete. You need to design the driver stages. Then decide on the software. In India most designs run on software PWM using the compare module. I don't know why ? But they are commercially successful. .... Well I am not. :o


P.S. - Sorry Sam, I cannot make the code public. (People will come to know about my bad programming skill). I only dream of making an open source sinewave inverter, in PBP. Can't find time. Cause I need to come up with a fresh new design to avoid any legal obligations on my old design.

samrulezzz
- 8th May 2009, 08:59
HI Sougata

Thanking u for takin time of your busy shchedule to explain each of the circuits........

i ve also got the mosfet drive circuits designs......but could not attach as i dont have a soft copy of the designs.....

the design is all but complete for the software code....which i was wanting help on....:)
actly was hopin u wud help me out on the code.....;)


but I fully understand ur situation regarding leagal issues......so if u cud help me in some other way like

if u knw any1 among ur frenz who can help me write the code.....

or u have any bits n pieces of codes u found on net or something dat mite help me


plz let me knw if u can direct me to some other person who can help me with the code.....i don mind paying him his fees for the help in the code....

hopin u can help me out in some way

sam
[email protected]

sougata
- 8th May 2009, 15:47
plz let me knw if u can direct me to some other person who can help me with the code.....i don mind paying him his fees for the help in the code....

hopin u can help me out in some way

sam
[email protected]

If you surf on the net or follow EFY magazine you will find that there are people who are distributing .HEX files for as less as Rs.20,000.00 (USD$ 400) but you will get zero support as far as an academic project report is concerned. I have no idea whether anybody will give you source code. Most of them don't have it. So asking for paid support may be well exceed the scope of your project.

I personally feel that you should start writing your own code and the forum would help. A student project need not be perfect, but should be a proof of concept. So better start with the sine generation. Open loop-no feedback and then achieve other milestones as per time frame of the project.

Where are you located by the way.

samrulezzz
- 12th May 2009, 08:14
hi sougata

ya wot u tell is true....no1 gives the source code normally....

i ve got bits n pieces of codes wen i surfed....
now trying to write a code on my own....
hoping it turns out gud



me located in mangalore karnataka state

sougata
- 12th May 2009, 08:35
Hi,

One suggestion. Do not rely on PBP while doing multiplication inside your sine lookup code. It takes many MCU cycles. Google for fixed latency multiply on PIC16. It takes more code space but timing is within control.

Good Luck

EpcActive
- 11th June 2009, 08:46
Dear Sougata,
I am beginning to work on Sine wave inverter generation, I am still a beginner in PIC I would like your guidance whether hardware pwm is better or software pwm, in terms of good working and reliablity also i am considering of using a 50hz type of transformer.
Thanks and Regards.

sougata
- 11th June 2009, 10:24
Hi,

Software PWM may result in a less BOM cost as all the steering is done in software. Also charging PWM controls become easier as you can steer your outputs. Software PWMs used in Sine generation still use the CCP unit in compare mode. @ 20MHz , you may be able to generate 4-6 KHz.

However I prefer hardware PWM as it relieves the MCU. Also much higher PWM frequency results in noiseless designs.

Where are you located anyway ? (Didn't get any info from your public profile)

Since you would be using single conversion, 50Hz transformer, I suggest you use a split bobbin design. I found they work better. However cannot say why as my magnetics knowledge is lower than nil. Somebody else may be able to shed some light on that.

EpcActive
- 11th June 2009, 15:05
Sougata, Thanks for such a clear guidance.
I am in located in a village called "Sanjan" in GUJARAT, the registration didn't ask questions so may be the profile is not updated i will update it anyway.
Also how can we use the same transformer for charging, since the transformer is in full bridge the MOSFET's body diodes will pass the uncontrolled charging once mains supply is given to transformer.Mains voltage is not same every where then how is charging control achieved unless transformer voltage is quite samll ?
One of my friend told me that SMPS based design is not suitable for all types of load that's why i am doing with 50Hz type transformer
Also my magnetics knowledge is quite poor, I do some designing based on formulas but you can not get good results without practical knowledge, i agree. That's why i am requesting from forum If any body can help me in transformer I would be really thankful.

sougata
- 11th June 2009, 15:22
Hi,

The 2 lower side MOSFETs can boost up the voltage. And yes the body diodes are used for charging.

iw2fvo
- 14th July 2009, 21:18
HI,
I am reading for the first time this argument.
I am asking if there is a sample PICBASIC program and schematics to take as a reference for me to experiment a switch mode power supply using pic PWM.
Could you please give me some help on the matter ?
I do not need more than two amps of current and it will be a buck converter .
I hope to read from you.
Thanks in advance
Ambrogio
IW2FVO
North Italy

sougata
- 14th July 2009, 21:43
Hi,

It would be better if you start a different thread cause a PIC based buck converter is different than a sine wave inverter.

provide the following though

What is the input voltage range (Min - - Max)
What is the output voltage required
Intended Frequency of the switcher (PWM)

MCU being used

BTW it is 2:15 AM in local time and I should get some sleep now. :D

iw2fvo
- 14th July 2009, 22:05
Thanks,
vin=10 to 22 vdc
Vout=7 Vdc max
I out =3 A max

Ambrogio

tAhm1D
- 29th July 2009, 21:01
Hi mincing,
What is your progress regarding inverter? Do you go through the postings here or you left out? I can help you regarding sinewave inverter. Hope to hear from you again. Thanks.

mincing
- 30th July 2009, 12:17
Dear Tahmid,
Thanks for the msg.

I have developed the sine wave inverter but open loop.I am controlling the amplitude based on the rectified DC from output sample.I gotstuck here as I could not find the right formula for closed loop control with sine as iput to ADC.

It would be great if you could throw some light on this,

If you have any guide lines or app notes pls.share.


Thanks again,
mincing

babalola
- 5th August 2009, 09:47
i think you need to provide the plant(inverter) specification most importantly the output filter to be able to develop a model for which ever compensation model to be addopted could be designed.you equally need to specify your power level.

babalola

iw2fvo
- 5th August 2009, 11:05
HI,
I am asking if there is a sample PICBASIC program and schematics to take as a reference for me to experiment a switch mode power supply using pic PWM.
Could you please give me some help on the matter ?
I do not need more than two amps of current and it will be a buck converter .
The PIC I will like to use is the 18f252.
I hope to read from you.
Thanks in advance
Ambrogio
IW2FVO
North Italy

adedeji
- 18th September 2009, 19:01
i have being into for a while but is square wave but want tsw

sougata
- 18th September 2009, 19:11
Hi,

I didn't get you quite.....

adedeji
- 20th September 2009, 07:43
im reallyin the act of making an inverter for a while but is square-wave using pwm ic but i want to start pure sine wave inverter,if i an get help from the forum how to proceed with it but not with double conversion cos i live in this part of the world where we import nearly everything and cost of importing is high so iwill use the bulky xfomers that is available or if u cant give me hint on how to mke a ferrite xfomers on my own thanks

sougata
- 20th September 2009, 17:54
Hi,

While we have been discussing sine wave inverter in this thread about the internals but not much as code example. Which PIC would you be using ? I wish I could provide some.

iw2fvo
- 21st September 2009, 07:29
Hi,
I want to build up a sine wave inverter too using the PIC18F452. Any help ?
Is there a schematic diagram and some code to take as a referene ?
Thanks
Ambrogio

karthickefy
- 2nd October 2009, 16:06
HI sougata

can you please send me the sourcecode for pic 16f72 based inverter. please find the attachment for 16f72 based inverter circuit.
i'm waiting for your valuable reply.

Thanks and regards,
Karthick
[email protected]

karthickefy
- 2nd October 2009, 16:13
HI sougata

can you please send me the sourcecode for pic 16f72 based inverter. please find the attachment for 16f72 based inverter circuit.
i'm waiting for your valuable reply.

Thanks and regards,
Karthick
[email protected]

Pawanbahl
- 3rd January 2010, 15:34
Dear Sougata
I have been looking up your posts. I am presently working on a similar product for which i am only searching right now. its a small 110Va inverter that converts 110v Dc+/-25% to 110v AC sine wave. Thermal mnagement and low harmonics are key requirements for me to. i was wondering if you could share with me your learnings from you 2005 inerter poject! Any guidance will be helpful. I am presently struggling with the boost circuitry- WHY DO I NEED TO USE a seperate IC? as well as the output section1 9Very much basically - the entire desgn).
Can you guide?
regards
pawan.

babalola
- 15th March 2010, 12:23
I realy need help for inverter output regulation, i have C- code for open loop control that is working but i realise this thread is confine solely for pibasic compiler, and because the demo version is just for 50 line code. i found out that with this line of code ,no meaningful inverter code can be written.i believe this is one of the reason why issue of software is not common on this thread .is anyone ready to help from this forum?. If there is commitment from someone ,then i will post the schematics and the code.

babalola

mincing
- 18th March 2010, 11:50
I did some work on 18f pics with h/w pwm and closed loop control.I build pid in hardware but thas little slower.

I built a quasi sqare wave inverter with out put regulation using 16fs.

Hope I can throw some light.

Is your a natural freqency or HF.

regards,

babalola
- 23rd March 2010, 12:48
thanks mincing for your response, my technology is a direct conversion from 24v to 220vac via a step-up transformer.
i will post the schematics/code later since i have gotten a responce from someone.

babalola
- 24th March 2010, 11:55
hi friends,

attached is my schematic/code .please i need help to achieve:

1: total hamonic distortion THD<3%
2:OUTPUT REGULATION OF 220VAC<+/-3%

if any one is willing to help on pibasic compiler platform, then such person can convert the code to picbasic compiler and give me the source plus hex file for onward download to the pc18f452.

regards,
babalola

iw2fvo
- 25th March 2010, 07:13
Hi to all in the forum,

I will like to build up a sine wave inverter using a PIC microcontroller.
The schematic attached by Babalolo is not readable for me : can it be posted in a different format and with better resolution ?
I see a very long set of messages in the forum, Is some one capable of illustrating me briefly the status of the various projects ?
Is there a valid working project at the moment ?
Thanks a lot for the assistance.
Ambro
Iw2fvo

babalola
- 25th March 2010, 16:08
hi guys,
iam reposting the schematic onpdf format

babalola.

iw2fvo
- 25th March 2010, 22:13
Hi,

I saw the schematics diagram for the inverter.
Is there any operational description of the system?
Is this a fully working inverter ?

Thanks
Ambro
IW2FVO





hi guys,
iam reposting the schematic onpdf format

babalola.

babalola
- 26th March 2010, 09:37
hi,
i have only posted the aspect of my schematics i think is related to the problem i have need to solve and that is, code to regulate the output of the inverter. i have the functional complete schematic.if the need arise i will post the full schematic.however for operational explanation,a single PWM signal is geenerated via the CCPR1L(RC1) of the 18f452,this signal is separed to PWM1 and PWM2 through the operational amplifier LM393 before passing to the steering logic of 74hc257 from where we get the four driving signals through the two unit (A/B) of the 74257.the additional signal on RC2(SWITCHING SIGNAL) is to change the input A/B of 74257.
i hope i make some meanings.can someone give a help to the regulation proble please?
babalola

mincing
- 3rd April 2010, 06:18
YOu have done quite a bit of job.And how are you reading the adc i.e. the output feedback.
I mean what is the shape on pin4 /an2.Is it half recified sine?

Earlier there was a suggestion in the same forum to have anther array of error corrction and add a term to
CCPR1L = sine_wave[index];
like CCPR1L = sine_wave[index]+sinewave_corr[err];

with no load check at each oint what is the reading on adc and then with load check the same .the differen ce will give an idea of how to frame error array.
then keep updating the error array based on feedback.

also it is not clear what is the update time(timer0 interrupt).
may be you can contact me at [email protected],since i happen to check forum rarely.

babalola
- 19th May 2010, 08:29
hi sougata,

can someone please give a precise support on this issue of output regulation of the inverter.
i know there are a lot of you expert outside there who can help.

regards.







YOu have done quite a bit of job.And how are you reading the adc i.e. the output feedback.
I mean what is the shape on pin4 /an2.Is it half recified sine?

Earlier there was a suggestion in the same forum to have anther array of error corrction and add a term to
CCPR1L = sine_wave[index];
like CCPR1L = sine_wave[index]+sinewave_corr[err];

with no load check at each oint what is the reading on adc and then with load check the same .the differen ce will give an idea of how to frame error array.
then keep updating the error array based on feedback.

also it is not clear what is the update time(timer0 interrupt).
may be you can contact me at [email protected],since i happen to check forum rarely.

viknik8
- 31st May 2010, 18:42
I can not find HEX a file for PIC18F452, PUBLISH

picgak
- 13th October 2011, 17:03
hi
I want to make a sine wave inverter with 310 vdc H bridge as the final stage driven by signal from sine tabled PWM from PIC microcontroler. can anybody suggest me a cheap and best controller from the pic family.

sougata
- 13th October 2011, 17:51
Hi,
A PIC16F616 (http://www.picbasic.co.uk/forum/www.microchip.com/wwwproducts/Devices.aspx?dDocName=en026028) could be a good choice or even better a PIC16F1824 (http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en546901) The later runs at 32MHz has ECCP and supports linear addressing and shadow registers for fast interrupt return.
Since you would be having a High Voltage DC Bus it is easy to keep it regulated / overcurrent protected and simply drive the output bridge using a micro though a sine table. The only complication could be isolation between the battery boost and the output stage if the same micro is used for housekeeping too.

P.S. - Personally I would have selected a PIC18F1330.

picgak
- 14th October 2011, 16:36
Hi sougatha and Thank you,
I have been a regular visitor to the Thread sine wave power inverter for a long
time. I am happy to get a reply for my first query from one of the experienced hands. My
knowledge of PIC programming is minimal. I got the inspiration to do this project for my
home from here. Can you kindly suggest me a link to learn PICBASIC commands in some detail.

sougata
- 15th October 2011, 15:24
Hi,
With the above diagram. The Bridge Rectifier part from the AC mains turns it into an online UPS and needs to be controlled type for steady DC Bus Voltage. As already mentioned if the DC bus voltage is kept steady the output would also be steady.
Regarding PICbasic Pro, I learnt everything from this forum and owe all the contributors a lot. Best is take up one programming challenge at a time and get a grip on the concepts involved. This forum is a life-saver. I do not do basic much still while searching information this is the first place I take a peek.
Good Luck.

iw2fvo
- 15th October 2011, 15:47
Hi Sougata,
It is long time i am looking in this forum for a complete project relevant to a 200 > 500 Watt sine wave inverter.
Is there any possibility for me to have schematics diagram and software for such a project ?
I will appreciate very much your reply on the matter .
Thanks
Ambrogio

sougata
- 16th October 2011, 17:00
Hi,

I do not have a complete design in PBP. My initial design based on 18F452 was a commercial flop so I had to develop one on 16F72/73. Since my initial design there has been a number of improvements in the hardware side too. Like for a 12 volts system I implemented a MOSFET driver with internal charge pump that reduces the switching and conduction loss. Because while the battery is discharging the deep discharge cutoff threshold is generally 10.8 volts so the gates are pumped with merely 10 volts which should drive them into enhancement modes but with a PWM at 20KHz the switching losses are high.

But iw2fvo you are right that there should be complete relevant project to get started. I couldn't do it for babalola though... I definitely have in mind to rig up something for the wiki

Normnet
- 16th October 2011, 18:00
While browsing this microcontroller controlled device caught my eye:
I believe this has the potential to be a game changer!

The AD9833 (http://www.analog.com/static/imported-files/Data_Sheets/AD9833.pdf) is a low power, programmable waveform generator capable of producing sine, triangular, and square wave outputs.
The output frequency and phase are software programmable, allowing easy tuning. No external components are needed.
The AD9833 is written to via a 3-wire serial interface.
This serial interface operates at clock rates up to 40 MHz and is compatible with DSP and microcontroller standards.
The device operates with a power supply from 2.3 V to 5.5 V.

Norm

sougata
- 16th October 2011, 18:33
Hi,

The application domain for the AD9833 is much wider than the scope of a sinewave inverter. It is majorly used as a function generator. Since we would be producing either 50Hz or 60 Hz it would be an overkill for the application. Making most of the controller and crushing the BOM is also part of the job.

Normnet
- 16th October 2011, 19:44
Hi,

The application domain for the AD9833 is much wider than the scope of a sinewave inverter. It is majorly used as a function generator. Since we would be producing either 50Hz or 60 Hz it would be an overkill for the application. Making most of the controller and crushing the BOM is also part of the job.

Would it not produce a 50Hz or 60Hz sine wave with little code?
Low volume production may benefit.

Norm

sougata
- 16th October 2011, 22:14
Hi Norm,

Producing the sinewave is not the issue. It is just a counter >> Lookup table >> HPWM not much code indeed. However for a Power Bridge to be driven a lot more needs to be done. So if an AD9833 is used it attracts additional glue logic and circuitry making the design more complex in terms of Hardware. Being the author of FL (did I ever thanked you for it...my bad...I wonder how you could do such an elaborate software FREE....) you already know it is a lot more easy to copy/paste software than hardware!! Moreover the AD9833 is available only in MSOP if I am not wrong which makes it difficult for hobbyist to work upon. Consider the price against a PIC16F1824 on digikey. The AD sells for about $10 and the PIC is $1.5. The AD9833 works on the principal of DDS which is again mimic able by a PIC limited to much lower frequency within the Audio Range.

Since I do not have a complete (in all respect) PBP project on the sine wave inverter, I am making arrangements to do one. I suppose I would start making two PCBs. One with the MOSFET Power Stage (which you can blow up and still hope the micro is not fried !!) the other the controller itself, so that an experimentation platform is available for different options. All in single side, for Homebrew PCB. What do you say ??

iw2fvo
- 17th October 2011, 07:16
Hi Sougata ,
thanks a lot for having reply to me.

I do understand that there is no PCB for the project at the moment , but I am still interested in understanding the system operation and I would like to experiment it on my little laboratrory. I am an Italian Radio Ham and the inverter will be used as a backup power source for my radios only.
Is it possible to have a system description, a block diagram and a schematics diagram for me to implement and test the project ?
Is the program written in assembler ?
I will appreciate very much to read back from you.
Thanks in advance.
Regards,
Ambrogio
Iw2fvo[


QUOTE=sougata;108771]Hi,

I do not have a complete design in PBP. My initial design based on 18F452 was a commercial flop so I had to develop one on 16F72/73. Since my initial design there has been a number of improvements in the hardware side too. Like for a 12 volts system I implemented a MOSFET driver with internal charge pump that reduces the switching and conduction loss. Because while the battery is discharging the deep discharge cutoff threshold is generally 10.8 volts so the gates are pumped with merely 10 volts which should drive them into enhancement modes but with a PWM at 20KHz the switching losses are high.

But iw2fvo you are right that there should be complete relevant project to get started. I couldn't do it for babalola though... I definitely have in mind to rig up something for the wiki[/QUOTE]

sougata
- 17th October 2011, 09:15
Hi iw2fvo,

Since I do commercial designs they are generally a client's property which I cannot publicly distribute. So to produce a Sinewave Inverter the hardware itself could be a great obstacle. PCB being one important component. So I am planning a make a fresh simple hardware design that can be easily produced by an average hobbyist.

BTW to run the radios you would need 13.5 Volts DC (my ham license never got renewed) if I am not wrongs so what are the loads you plan to use with your inverter.

iw2fvo
- 18th October 2011, 07:15
Thanks for the clarification
I did not realized that you are a commercial designer.
Anyway, I am very interested in homebrew power inverter : I will appreciate if you could help in the next future !
I do have very old radio that is operated at 230 Vac 50 Hz.
I am also considering to buy new radio at 13 Vdc ... but they are very expensive to me at this moment; I would like to implement an MPPT solar panel battery charger in case I will buy new radio for Christmas !!! Could you help me in this case ?

Thanks
Ambrogio

sougata
- 18th October 2011, 09:23
Hi,

I am gearing up for the sinewave wiki however at this moment I cannot release any MPPT code.

sougata
- 23rd October 2011, 20:25
Update:

Some progress has been made on the modular MOS-BRIDGE PCB. Uses 2x4= 8 MOSFETs mounted on general heatsink driven by 2xIR2110. Employs RdsON based over current detection to switch off MOSFETs even without software intervention. Targeted to be a protected generalized high current Bridge(3.3V ->5V logic level input). Tinkering goes on in the next weekend. May employ cross conduction logic, dead time on the same->Yet to be decided based on available time makes the hardware more rugged and suitable for experimenter's without much experience in PowerElectronics.

iw2fvo
- 24th October 2011, 11:00
Hi Suogata ,
I really hope to see something on this forum just for me to start my homebrewing !
Thanks
Ambrogio

sougata
- 24th October 2011, 13:34
Homebrewing !! That is the whole idea so I made the MOS-PCB single sided. Hope I can manage the processor module to be same.

maviblue47
- 8th January 2013, 17:49
thanks all. but i need sine wave schema for pic16f84 and inverter

iw2fvo
- 9th January 2013, 06:24
Hi to all in the forum and to Sougata,

I am still waiting for a complete project for a sine wave inverter ... it will be a replicable one.
I will like to implement it.
Any new since this long time ?
Thanks for any help.
Regards,
Ambrogio

bunjong
- 11th January 2013, 12:05
I Request Code examples for PBP .For PIC interface Project Powerinverter

iw2fvo
- 12th January 2013, 13:11
Thanks ,

Will you please post the part list, and the software for the PIC ?
What are the performance of this equipment ?
Any brief explanation of its operation ?

Thanks in advance for having posted complete data for fully repllicable project.
Regards,
Ambrogio
IW2FVO



hi guys,
iam reposting the schematic onpdf format

babalola.

pksinha
- 15th January 2013, 04:29
Source code is property of jetmark technology,delhi, of above schematic available on commercial terms.
Best regards
pksinha

babalola
- 9th February 2013, 10:58
Hi Das,
What a long time! thanks that the forum is back again, we cannot wait too long to see your inverter design for all.
I think this time around it will afford all of us opportunity to explore every aspect of digital sine wave inverter design.
Thanks for your effort so far,
Regards,
Babalola

wire042
- 1st March 2013, 19:56
Please am having problem with my inverter that is posted on this forum on page 5.

wire042
- 2nd March 2013, 11:21
Please some one help me out am having some bad days burning my fets trying to put up this sine wave inverter posted on this forum, can some one please give me a solution why my FETs keep burning when I power it on to Mains input supply.

:confused:

iw2fvo
- 2nd March 2013, 12:15
No chance to have something working on this forum expecially for the inverters or MPPT .
It should be an homebrewers or do it youself forum... but it is not.
Ambrogio

wire042
- 3rd March 2013, 20:25
I have built this inverter but am having some issues with the charging, when I put on the mains my FETs get burnt especially the 2 Low side.
Can some one give me solution to this problem

TahmidMahbub
- 4th March 2013, 08:11
Regarding sine wave generation and sinusoidal pulse width modulation, I have written quite a few articles and have posted them on my blog. You can find them here:


Generation and Implementation of Sine Wave Table
http://tahmidmc.blogspot.com/2011/01/generation-and-implementation-of-sine.html

Smart Sine - Software to generate sine table
http://tahmidmc.blogspot.com/2012/10/smart-sine-software-to-generate-sine.html

Generation of sine wave using SPWM in PIC16F684
http://tahmidmc.blogspot.com/2012/10/generation-of-sine-wave-using-spwm-in_10.html

600W 50Hz sine wave inverter test circuit
http://tahmidmc.blogspot.com/2012/10/600w-50hz-sine-wave-inverter-test.html

Feedback in sine wave inverter (PIC16F series based)
http://tahmidmc.blogspot.com/2012/11/feedback-in-sine-wave-inverter-pic16f.html

Demystifying The Use of Table Pointer in SPWM - Application in Sine Wave Inverter
http://tahmidmc.blogspot.com/2013/02/demystifying-use-of-table-pointer-in.html

Sine Wave Generation without ECCP - Using single CCP Module of PIC16F877A
http://tahmidmc.blogspot.com/2013/02/generation-of-sine-wave-without-eccp_16.html

Sine Wave Generation with "Fast PWM Mode" of AVR - using ATmega16
http://tahmidmc.blogspot.com/2013/02/sine-wave-generation-with-fast-pwm-mode_2525.html

I hope everyone finds these articles/tutorials helpful.

Regards,
Tahmid.

iw2fvo
- 5th March 2013, 07:21
Thanks a lot for this post:
this is the most interesting article I have found in this forum.
There are a lot of things to learn.
congratulation to Tahmid.
Regards,
Ambrogio
IW2FVO

wire042
- 5th March 2013, 19:06
Tahmid, I've tried to access those files but it seems the file path is unavailable. can you please refresh the link

TahmidMahbub
- 6th March 2013, 09:04
Thanks a lot for this post:
this is the most interesting article I have found in this forum.
There are a lot of things to learn.
congratulation to Tahmid.
Regards,
Ambrogio
IW2FVO

Thanks.


Tahmid, I've tried to access those files but it seems the file path is unavailable. can you please refresh the link

The links should be fine. They're working fine for me. Please try again.

babalola
- 6th March 2013, 18:20
can you post the aspect of your code that deal with the charging?. here you are talking about syncronouse boost charging when you are using the 2 lower fet to efect the charging. in this case the 6v at the secondary of the same power tansformer is boosted to about 14v to cgarge the battery.note however that at this time of cgarging the upper 2 fets must be switched off then pass you PWModulated signal of a particular duty cycle to drive the lower mosfet. remember equally you are using the leakage inductance of the power transformer for the inductor part of a typical boost converter.
i hope this help,
regards,
babalola.

sougata
- 7th March 2013, 08:20
Hi,
I feel sorry that I am not being able to support this thread as I should and could not complete the conversion of my SMD design to Hobbyist version. (I wish though) Here are some quick tips that may help you babalola:

Synchronous Rectification Deals with Switching on the upper FETs on a per cycle,phase basis so that the rectifier efficiency is best while charging, where the Body Diode is superseded by the RDSon of the MOSFET. For the upper one this may sound simple if you are sensing the input AC and know the Transformer connected as ( Primary Start/Finish vs Secondary Start/Finish, My Pro Design detects it) but for the lower one it gets tricky.

So lets forget Synchronous for now and let the upper MOSFETs behave just like diodes.

Apply PWM to both the Lower MOSFETs simultaneously but only in the middle of a single cycle, with upper limited duty cycle.
To experiment what is the limit with your transformer and profile entire system.
Have a load () connected to the Bridge +DC- and ensure Caps in order of 10000uF
Run a slow loop to increase the PWM (till you fry your MOS :))
Idea is to figure out if you are actually achieving any boost

And Tahmid thanks for the great post. I wish I could actually spend sometime giving back to the community for which I am whatever I am today. But I personally would not buy the idea of, a set of different lookup tables for voltage regulation. You can have a 8x8 unsigned multiply within 54uS as stated by Darrel somewhere else and an unrolled Bit tested, rolling multiply takes about 42-44uS to call from PBP. For a proportional control and tricky retention of portion's of older error (I call it pseudo I, cause a software automatically introduces the integration Time) at least a PI system can be designed.

What I have learned from experience is that sometimes it is the Hardware that is crap than my own code (Loads of Crap :)) which is to be blamed. Post a schema if possible.

Something to read : http://www.researchgate.net/publication/3281480_Performance_Evaluation_of_Bridgeless_PFC_B oost_Rectifiers/file/9fcfd510fe3d4e9275.pdf

Thanks to all
Regards
Sougata

EMTRON
- 30th June 2013, 08:24
Dear sougata, am very grateful and i appreciate you for your help to every one on this forum. am also happy to join this reportable organization to improve my knowledge in electronics and PIC programing field.thanks for acceptance.

comtrek
- 17th June 2014, 15:24
I have benefited from this thread, although it is not alive now, however, I was able to get charging current from 220 to 8 v primary, info from Sougata re. the use of bridgeless PFC booster, really helped. Thanks to Sougata and other members.

kolleyjay
- 21st July 2016, 19:50
thanks for sharing this great design, can some send me the complete file for this pic16f452 inverter

kolleyjay
- 21st July 2016, 19:51
thanks for sharing this great design, can some send me the complete file for this pic16f452 inverter , my email is [email protected]

Pppppp
- 21st November 2016, 09:11
In this circuit... There is no way to connect DC cooling fan. Because, heat sink and transformer getting hot at the time of inverterting and battery charging. So, please discuss about the cooling fan terminal connection with pic16f72 microcontroller. Please start a thread in the appropriate forum for detailed technical help. This is just a chat box, your post will disappear quickly.

Panzer
- 23rd February 2017, 05:16
Hi Saugata,
....
I still wonder why anybody is not responding about my querry of transformers. The output of Inverter is serries of pulses at high frequencies with polarity reversal at 50-60 Hz. So is the transformer used designed for
50 Hz operation or high frequency like say 20KHz? There is huge difference
in size of transformers.
regards,
purushottam dayama

Hi psdayama,
As the inverter is working as D class Amp - the end of the MOSFER matrix must be smooth with low-pass filter. Then you will have a nice sine wave only 50 Hz - and the transformer will work nice.
If you are trying to combine the transformer to be puss one over the 20KHz then will become some more complex and for sure the PIC as a 8-bit machine will be not enought.
The usual case is using a schematic of push-pull converter (as 3525) for rising the voltage level to 30% over the output one and then to converted to AC with MOST matrix only.
This way will save you a lot of pain in the ass.
WBR
Panzer