PWM music

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
18,431
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Sep 9, 2009

ATmega32 plays music using piezo buzzer and PWM.
Full source code: http://aquaticus.info/pwm-music

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (aquaticusrov)

  • Pulse width modulation uses a constant frequency with varying "widths" of the pulse from 0-100% of one cycle at that frequency. Buzzers are usually driven at 50% duty cycle with varying frequency. So you could call it frequency modulation if you'd like but it's not PWM. I just wanted to clear that up. I even hooked up a buzzer to a uC and PWMed it to make sure.

  • @GTechno13 Sure, what you wrote is absolutely true and indeed frequency modulation is more accurate term. But it in this case pulse width can be used to control volume of the sound - so PWM term is adequate as well ;-)

see all

All Comments (10)

Sign In or Sign Up now to post a comment!
  • any one know how to write tetris music?

  • thanks for the "notes.h"

    That was what i was looking for :)

  • @aquaticusrov you are correct sir

  • Hah, thats nice! I was wondering are arduino boards easy to build. Cos the kits are so expencive that maby it would be cheaper to build one reather then buy.

  • @aquaticusrov Alright. I was just being a bit anal the day I commented. Sorry if I came off as an a-hole. I just wanted to clear things up so someone new to electronics doesn't put a buzzer on their Arduino (or any uC) and their PWM code isn't making notes. :) Yay electronics!

  • This is not PWM.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more