PWM on arduino

Hi,
I'm realy new at arduino.I've sutied PWM signals like the ones on the images:


But now enterin arduino world, i've seen PWM that arduino generates are square signals.
Is it possible to create PWM like the ones on the image with arduino?
Thanks in advance.

Yes indeed, one practical application is to make a sine wave power inverter.

Take a look here

The two signals labeled PWM are square waves!.

Mark

My bad, had that link saved in my favourites and I thought it was for a sine wave inverter but instead it appears to be a modified square wave inverter.

I did however, find this old forum thread that you may find useful.

Jay

holmes4:
The two signals labeled PWM are square waves!.

Mark

They are rectangular waves.

AWOL:
They are rectangular waves.

In what way are they rectangular, that they are not square? Because the axes are in no way comparable.

aarg:
In what way are they rectangular, that they are not square? Because the axes are in no way comparable.

A 50% duty cycle would be square.

AWOL:
A 50% duty cycle would be square.

Wouldn't that be twice as long as it is tall?

Call me nuts but isn't a wave that looks rectangular simply a low frequency square wave?

ButtonThief:
Call me nuts but isn't a wave that looks rectangular simply a low frequency square wave?

OK, you're nuts.

Ok.
So its posible to make, but not elemetary.
I was plannig to control a brushless motor with this SPWM(seems it's called like that), but i'll try with normal PWM first XD.
Thanks all.

How do I turn PWM mode on? I'm trying to use PWM to control the speed of a motor connected to a L298N motor driver board, and none of the example code I've found works. It's wired correctly; if I set the enable pins to HIGH everything works fine.

Read the manual for analogWrite()

Note that it only works on certain I/O pins.

...R

How do you set the timer to PWM mode? I can't even get PWM working...

Yes, I've read that, and many other sites detailing PWM on the arduino. I've tried 4 different PWM pins.

Crow:
How do you set the timer to PWM mode? I can't even get PWM working...

analogWrite() ?

...R

@Crow - do you intend asking the ssame question in any more threads?

DO NOT CROSS-POST, CROS-POSTING WASTES TIME

Besides that, he hijacked this thread.

And he bumped his own thread within 12 hours or so.
Both not very nice to do.
He should have asked to move that thread to the right section and just be patient.

Now all credits are gone.

Crow:
Yes, I've read that, and many other sites detailing PWM on the arduino. I've tried 4 different PWM pins.

Hi crow,
I'm new at that, but i use the Timer1 library and then you can set a PWM changing dutty cycle and frequency.

Topic closed - go here
http://forum.arduino.cc/index.php?topic=332656