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.

Sinusoidal pwm frequency adjustment

Status
Not open for further replies.

seyyah

Advanced Member level 2
Joined
Oct 7, 2001
Messages
644
Helped
8
Reputation
16
Reaction score
7
Trophy points
1,298
Activity points
6,216
atmel avr pwm sinusoidal look-up table program

I'm producing spwm at different frequencies. I have sin table. At low frequencies i make the duty cycle change slowly at constant period (carrier signal's period). At high frequencies make it change more rapidly. E.g

Sin Table (Assume that letters are sin values)
____
a
b
c
d
e
f
g
h
i
j

In low frequency duty cycle (DC) changes like this at every end of the period:

1- DC=a
2- DC=b
3- DC=c
etc

But as frequency goes up it changes like this

1- DC=a
2- DC=c
3- DC=e

etc. This method works. But i wonder is there a more general or easy way to do this? Especially to achieve more frequency steps. I make the changes for 1Hz. But i would like to achieve 0.1Hz or more without a significant load onto the program or dsp.
 

RegUser_2

Full Member level 2
Joined
Dec 24, 2001
Messages
125
Helped
11
Reputation
22
Reaction score
9
Trophy points
1,298
Activity points
1,507
sinusoidal pwm generator

Use this search string in Google:

"digitally controlled oscillator"
 

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
637
Reputation
1,272
Reaction score
88
Trophy points
1,328
Location
USA
Activity points
33,178
spwm lookup table

I don't quite understand your a b c description, but I think you may be looking for a Direct Digital Synthesizer (DDS). It's a simple way of generating precise frequencies by using a phase accumulator, a sine table, a DAC, and a low-pass filter. Search Google for more info. Here's one:
https://www.geocities.com/CapeCanaveral/5611/dds.html
 

seyyah

Advanced Member level 2
Joined
Oct 7, 2001
Messages
644
Helped
8
Reputation
16
Reaction score
7
Trophy points
1,298
Activity points
6,216
atmel pwm lookup table

I'll use a µcontroller which can produce pwm signals. For spwm, duty cycle will change along a one period of the putput sinus signal. a,b,c's are values which duty cycle will take, along the period of the output sinus signal. For low frequncy duty cycle must change slowly from the first value to the last value. But as frequncy goes up it must change rapidly from first value to the end value. Because of this some values are passed and not assigned to duty cycle register. This is my method. And i wonder what other methods are available for digital and µcontrollers?
 

artem

Advanced Member level 4
Joined
May 22, 2003
Messages
1,350
Helped
126
Reputation
252
Reaction score
32
Trophy points
1,328
Location
Turkey
Activity points
13,450

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top