Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Sine PWM calculated with pic, instead of using table

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

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.
 

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.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top