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.

[SOLVED] SPWM by using dsPIC30F2010 Compiler is MikroC Pro for dsPIC

Status
Not open for further replies.

imranahmed

Advanced Member level 3
Joined
Dec 4, 2011
Messages
817
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
Karachi,Pakistan
Activity points
6,492
Hi,

I am learning about SPWM sine wave inverter by using dsPIC30F2010, I read its datasheet it has 6 PWM channels and there are various configurations for output waveform alignment.
I want to what will we use configuration for SPWM sine wave inverter and what frequency will be used, I have 4x IGBT`s with 4x drivers 3120. I saw a circuit made by someone I do not know, on internet. I am not confusing in circuit but to generate SPWM signals from dsPIC30F2010. Will I use PLL?. It has XT w/PLL 16x, 8x, 4x.
I am not interested to attain a code from someone but I want to make code by myself and by learning.

And please note that I want also soft starting feature.


DSPIC30f2010_SolarInverter.jpg
 
Last edited:
The questions you are are about how to set the clock speed which is fundamental to the operation of the whole MCU but is possibly the wrong place to start.
Assuming you know the basics about how the MCU works, start with the PWM signals that you want to create.
You could use the PWM signals to drive the IGBTs (etc.) in which case all you need is to set the PWM frequency to the frequency you want to general (50Hz or 60Hz) and set the duty cycle to 50%. However there are probably many easier ways of generating this signal that using a (rather old it must be said) MCU and its PWM module.
If you want to use the PWM to generate a pseudo sine wave, then you need to know the number of steps you want per cycle as well as the overall frequency (as above). Then you can set the duty cycle in increments from 50% at the start of the cycle, to 100% at the top of the first crest, back to 50% and then down to 0% for the bottom of the cycle before returning to 50% at the end. The output will then need to be filtered to remove the higher frequencies but that will give you a sine wave that you can amplify. (The schematic you have shown doesn't seem to follow this approach but you can create you own circuit.)
Once you have the PWM requirements, you can use the MCU data sheet to determine the system clock frequency you need to feed into the PWM module. The data sheet has equations 14-1 to 14-3 that will help here.
Susan
 
Hi

I guess there rather are too much than too few SPWM tutorials.
Many are very good, with detailed explanation, calculation examples, code, scope screenshots ...

Klaus
 

    cicos

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top