Go Down

Topic: Arduino library for PAM8803 audio amplifier module (Read 7 times) previous topic - next topic


Updated the library. Now, I will work in improve the volumeUp and Down speed without modify class protocol.

Link to the latest version?
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


Latest lib could be downloaded from the very first post once you are logged in. About the PAM8803 retrolefty found, the price is great but the size is huge. In my laser gun project size and room are quite important. The one I bought, even If the a few bucks expensive, only measures 2cm x 2xm and could be powered from 3.3 up to 6 v.


In the library code:

Code: [Select]

void Pam8803::setDigitalVolumeControl(int volumePin){
  digitalWrite(volumePin, LOW);
  digitalWrite(volumePin, HIGH);

What is the purpose of the 3.5 value in the delay statement? Would that cause the floating point math library to be pulled into the compiled code? Why not just a delay(105) statement?



That's why each volume transition requires VUP or VDOWN pin remais active low for 3.5 clock cycles. I did not floating point lib would be included. I will put 105 instead. Thanks for the suggestion.


This library and module work nicely.

However, I'm using it for a clock like application for late night use, and even at the lowest setting


it's still far too loud...

It's definitely adjusting by setVolume.  setVolume(100) is very loud, and setVolume(10) is modest, but even setVolume(0) is far louder than what a simple PWM out would be (which is what I was using before).  I had assumed that setVolume(0) would effectively be no volume.

I'm wondering if I'm using it correctly?

I'm using this one:


Go Up