Close

10-bit Component-less Volume Control for Arduino!

Back to overview

Using PWM at an ultrasonic frequency, I've given Arduino 10-bit volume control for Tone() generation using nothing but the speaker.

Discussions

755zwz09 wrote 03/06/2019 at 01:28 point

How do you stop the sound from playing.

I tried to stop the sound with noTone but it kept playing. I figured out you can stop it by setting the volume to 0 but that doesn't work for the project i'm doing.

  Are you sure? yes | no

napo7 wrote 06/13/2016 at 13:21 point

Awesome !

I need such a thing to drive a speaker (to be a metronome) on a DIY eDrum. 

I'd like to drive it via a transistor , to allow more current than the 20mA allowed by the Atmega ? Is that possible ?

  Are you sure? yes | no

Lixie Labs wrote 06/13/2016 at 18:47 point

Should be fine! The high-speed PWM frequency used is 62,500Hz, which is higher than your hearing range, and lower than the upper limits of most transistors. :) 

  Are you sure? yes | no