# Sine PWM calculated with pic, instead of using table

1. ## Re: Sine PWM calculated with pic, instead of using table

Regarding PWM scheme in post #19, it produces intended sine waveform only for resistive and under circumstances inductive load.

•

2. ## Re: Sine PWM calculated with pic, instead of using table

That seems a far better solution. There is an error in your table at 199 but that may be because of text formatting on Edaboard, I see a gap between 19 and 9.

Personally, I would also set the PWM rate using a timer so the samples are at an exact time interval but it may be OK as it is.

Brian.

•

3. ## Re: Sine PWM calculated with pic, instead of using table

Yes, it generates a sinuidal pulse train, but this needs an LC filter yet, not specifyed here, who convert that pulse train in a smooth pure sine wave signal simmilar to the commercial signal. It is a matter that I have to solve yet, but if somebody wants to make this aproach for an inverter, surely is going for a good road. Power will depend on the capacity of IGBTs.

- - - Updated - - -

The code is for PicBasic Pro compiler. This converts the code to assembler, so the user can program in a simple high level language, with some restrictions (not decimals, not knowing exactly duration time of instructions, etc) This makes a bigger resultant code than assembler, but if the program can be hold on the PICS and you don't need too much optimization, it will work better than studying the assambler. This one has a little set of instructions, but it is much more complicated than basic. Indeed, if someone wants to make a long way on PICS, I think should go through Pic C, being a more efficient way than basic.

- - - Updated - - -

The graph (sinus & pulse) is wrong because the high level of pulses is ever the same (it is a switch that connects the full voltage) but the pulse width varies. The sinus function determines this width. At the end, the available power will be proportional to the area under this pulses, which most be just a sinus function.

- - - Updated - - -

The code is for PicBasic Pro compiler. This converts the code to assembler, so the user can program in a simple high level language, with some restrictions (not decimals, not knowing exactly duration time of instructions, etc) This makes a bigger resultant code than assembler, but if the program can be hold on the PICS and you don't need too much optimization, it will work better than studying the assambler. This one has a little set of instructions, but it is much more complicated than basic. Indeed, if someone wants to make a long way on PICS, I think should go through Pic C, being a more efficient way than basic.

- - - Updated - - -

The graph (sinus & pulse) is wrong because the high level of pulses is ever the same (it is a switch that connects the full voltage) but the pulse width varies. The sinus function determines this width. At the end, the available power will be proportional to the area under this pulses, which most be just a sinus function.[/QUOTE]

I will advance through the implementation, which implies to compile, to load the simulator of proteus por this pic in a circuit with the hex program, then if everything is well I'll make the physical circuit (I have already a PCB but I have to solder components), then load de PIC's program in a PIC loader as Pickit 3, and then see how it works. I'll go telling you notices about this process.

--[[ ]]--