Arduino Uno Sinusoidal PWM

Can this be done with the Uno?
I am trying to generate a 60HZ sinusoidal PWM signal to control an H bridge to convert a DC power source to an AC source by turning on/off and the output would resemble a sine wave after some filtering.

Yes.
In many cases a table is used, with direct programming of the timer registers.
The 60Hz is slow, so it should not be very hard. There must examples for that.

This is an example of using a table and a timer:
http://interface.khm.de/index.php/lab/experiments/arduino-dds-sinewave-generator/

lets say i did a PWM at 20kHZ. Do you think that would be a bit much for the board to handle?

A h-bridge is an on/off device (look up the circuit!) so applying a sine wave makes no sense at all. PWM work a the duty cycle the ration of on/high to low/off.

Under no circumstances will turning on off a the transistors of a h-bridge get you AC as the voltage will never go -ve and on/off is a square wave not a sine wave.

Mark

If I direct you to research "magic sinewaves", I vouch that will keep you busy for a while.

A h-bridge is an on/off device (look up the circuit!) so applying a sine wave makes no sense at all. PWM work a the duty cycle the ration of on/high to low/off.

Under no circumstances will turning on off a the transistors of a h-bridge get you AC as the voltage will never go -ve and on/off is a square wave not a sine wave.

Mark

HI, if you modulate the PWM of the output of the arduino in a sinusoidal way, either by table or timer as suggested, feed that to the H-Bridge and filter AFTER the H-Bridge you should get a good sinewave representation.

This is how Variable Speed AC drives work.

Tom… :slight_smile:

TomGeorge:

A h-bridge is an on/off device (look up the circuit!) so applying a sine wave makes no sense at all. PWM work a the duty cycle the ration of on/high to low/off.

Under no circumstances will turning on off a the transistors of a h-bridge get you AC as the voltage will never go -ve and on/off is a square wave not a sine wave.

Mark

HI, if you modulate the PWM of the output of the arduino in a sinusoidal way, either by table or timer as suggested, feed that to the H-Bridge and filter AFTER the H-Bridge you should get a good sinewave representation.

This is how Variable Speed AC drives work.

Tom.... :slight_smile:

Exactly. I am not feeding the H bridge with a constant sinusoidal wave. I'm using a PWM modified sine wave that it basically a sinusoidal signal through PWM by going ON/OFF for varying duty cycles. This will let my constant DC source convert to an AC output once with the PWM sinusoid controlling the mosfets to open/close. That alone wont give me a "perfect" sine wave but after putting it through a filter it'll be pretty close

I needed a sine wave as a speed control input to a GM Power Control Module. In considering various ways such as resistor networks, etc., I found using an analog AD9833 to be the simplest for me, although overkill. The biggest problem with the project was that the AD9833 is only available with VERY close pins on a surface mount configuration. I have code and schematics that work for me if you need them.

druber:
I needed a sine wave as a speed control input to a GM Power Control Module. In considering various ways such as resistor networks, etc., I found using an analog AD9833 to be the simplest for me, although overkill. The biggest problem with the project was that the AD9833 is only available with VERY close pins on a surface mount configuration. I have code and schematics that work for me if you need them.

i work with the same projet can you send me the code and schematics and thanks