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.

Help needed to generating multiple PWM

Status
Not open for further replies.

Antorbd04

Junior Member level 3
Joined
Sep 11, 2012
Messages
25
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Location
Dhaka, Bangladesh, Bangladesh
Activity points
1,408
Hi there,
Recently I buy an oscilloscope. :-D Then I measure an inverter circuit PWM [PIC16F73 MCU, 3 PWM output including CCP1]. I took some read from PWM outputs of MCU..

Here is some of them:
**broken link removed**
**broken link removed**
**broken link removed**
**broken link removed**

I exactly don't know how Inverter PWM works, I am a student of 1st semester of BSc in CSE. But I am trying to build exactly that PWM. But I am unsuccessful all the time.

After much tried, I done using AND gate, NOT gate circuit, but I assumed that there isn't any logic gate IC that I followed.

So here is my circuit and output:
**broken link removed**
**broken link removed**
**broken link removed**
**broken link removed**

--->> Okay. Now I want to build exactly the same thing but WITHOUT any logic gate.
--->> I don't tell you to do that for me. Just give me some hint how can I go..


Here is my work files(MikroC source code + proteus 8 simulation):

**broken link removed**

Thanks in advanced. :wink:
 

You can use the timer Capture / compare register to generate PWM signals, external gates are not required. If you want sine PWM then load the timer register with the samples of sine wave. Sample a 50/60 Hz sine wave with let's say 500 samples, store them in a array and every time the timer interrupt comes load it with these values successively. Timer frequency will be your PWM rate typically let's say it will be 10KHz. So every 0.1ms u shall get an timer overflow of compare interrupt and then load it with sine wave's next sampled value from the array so that u will get sine PWM use this and generate it for 1 output and similarly generate the phase shifted other outputs for the half/full bridge inverter .
 

Hi,

my comments:
If you want sine PWM then ..
.. search the forum or the internet for "SPWM"

Sample a 50/60 Hz sine wave with let's say 500 samples...
...Timer frequency will be your PWM rate typically let's say it will be 10KHz.
This makes no sense.
If fundamental output frequency is 50Hz and you have 500 samples per full wave, then:
PWM frequency = interrupt_frequency = 50Hz x 500 = 25.000 Hz.
because you need to update the PWM register in synchronous to the PWM_frequency.

Maybe you could update the PWM register with a lower rate, but this gives nasty waveforms.
If lower, then an integer division... to stay in sync.

Klaus
 

Thanks for response.. ?

I already show my generated PWM in pictures that already sine wave, that means I haven't any problem to do sine output on CCP pin.

I physically tested my output and its ok.
I setup timer2 for 250us that give me 4000khz then i setup ccp for pwm, on every timer2 overflow i update duty cycle value and its works fine. After use of external logic gates i got my expected output.

But i don't want to use any gates IC, and I believed that this is possible.

chaitanyab said "the phase shifted other outputs" but didn't get it.. Can you plz explain or tell me how may i do it??

To, KlausST sir.
I never expect you wanna comment on my thread. ?
I really happy to see you here.

Sir, I know you know better about sine wave inverter.
Can you plz tell me how does tje sine wave inverter works?? Plz explain me as I could build one. ?
 

Hi,

I've read so many discussions here about building an inverter.
If you want me to give detailled informations I need to do a search in this forum, read the threads, and post the results in your thread.
This makes no sense. You have the same search options than me.

I recommend you to go through Tahmid's blog. I remember many threads discuss about it. To me it seems it is very helpful.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top