Generating a variable frequency modulated signal

Hi everyone,

The signal S represented in the attached file is used to drive the mosfets of an inverter that will output a sinusoidal current with variable frequency to drive an AC motor (the signal I will really use will be longer but let's assume it is this one for simplicity).

What I want to do is use an Arduino Uno to generate this signal and be able to change its frequency from 15 to 50 Hz, in other words from T=66.67 ms to 20 ms using an external potentiometer and display the frequency in a 2x16 LCD.

How can this be done ?

Thanks in advance for your answers :slight_smile:

I recommend that you read Don Lancaster's Magic Sine Waves:

Your application sounds like a perfect match to that algorithm, but if thus is a commercial product, be aware that this is a licensed technology.

Ray

What do you plan to use for a low pass filter ?

mrburnette:
I recommend that you read Don Lancaster's Magic Sine Waves:
Guru's Lair Magic Sinewaves Library

Your application sounds like a perfect match to that algorithm, but if thus is a commercial product, be aware that this is a licensed technology.

Ray

Thank you Ray, but I have given the PWM signal I intend to use in the attachment of the first post. I've attached it to this one too.
My problem is that I don't know where to start to generate this signal and make its frequency variable (changing T using a potentiometer for example) using an Arduino.

raschemmel:
What do you plan to use for a low pass filter ?

A simple lowpass LC filter.

Do you KNOW what a LOW PASS FILTER is ?
YES or NO?
If yes then list at least two methods to do this.

raschemmel:
Do you KNOW what a LOW PASS FILTER is ?
YES or NO?
If yes then list at least two methods to do this.

Theoretically, the order of the highest harmonic after the fundamental one that will be present in the generated output AC current of the inverter is 4 in this case but as I said the PWM signal I will use will be longer the order of that harmonic will be higher.
The load will be an AC motor, it will filter it by itself. If it is not enough an LC lowpass filter can be used but it is not necessary.

You can't use an LC filter for a variable frequency. On top of that the power rating of the components would be high and they would be expensive. Read the datasheet for the cpu chip.

If someone has tips to generate this signal and make its frequency variable that would be helpful.

http://datasheets.maximintegrated.com/en/ds/MAX038.pdf

SEE PAGE 6 ,7 & 8