KS0374 keyestudio Power Amplifier Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
(Created page with "thumb|600px|right|keyestudio Power Amplifier Module ==Introduction== The keyestudio power amplifier module integrates an adjustable potentiometer, a s...")
 
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[image:ks0374图.jpg|thumb|600px|right|keyestudio Power Amplifier Module]]


[[image:图片1%.png|thumb|600px|right|keyestudio Power Amplifier Module]]
<br>
==Introduction==
==Introduction==
The keyestudio power amplifier module integrates an adjustable potentiometer, a speaker, an audio amplifier 8002B chip and a 3pin header interface.<br>
The keyestudio power amplifier module integrates an adjustable potentiometer, a speaker, an audio amplifier 8002B chip and a 3pin header interface.<br>
Line 18: Line 21:
* Speaker sound volume: 80db
* Speaker sound volume: 80db
* Property: ROHS
* Property: ROHS
<br>
<br>
==Technical Details==
==Technical Details==
Line 26: Line 30:
==Connect It Up==
==Connect It Up==
Connect the power amplifier module to control board using three jumper wires. Then connect the control board to your PC with a USB cable.
Connect the power amplifier module to control board using three jumper wires. Then connect the control board to your PC with a USB cable.
<br>[[File:KS0374.jpg|500px|frameless|thumb]]<br>
<br>[[File:图片2&.png|600px|frameless|thumb]]<br>


<br>
<br>
Line 116: Line 120:
   delay(2000);
   delay(2000);
}
}
<pre>
</pre>
 
<br>
<br>
==What You Should See==
==What You Should See==
After uploading the code, you should be able to hear the song Ode To Joy. If the sound volume is too small, you can turn the potentiometer to increase it.  
After uploading the code, you should be able to hear the song Ode To Joy. If the sound volume is too small, you can turn the potentiometer to increase it.  
<br>[[File:Ks0374-0.png|600px|frameless|thumb]]<br>


<br>
<br>
==Resources ==
* '''Download Code:'''<br>
https://fs.keyestudio.com/KS0374
<br>
==Buy from ==
*[https://www.keyestudio.com/keyestudio-8002b-power-amplifier-module-speaker-buzzer-for-arduino-industrial-grade-p0496-p0496.html  '''Official Website''' ]
*[https://www.aliexpress.com/store/product/keyestudio-8002B-Power-Amplifier-Module-Speaker-Buzzer-for-Arduino-Industrial-Grade/1452162_32956844326.html?spm=2114.12010612.8148356.3.65312f0crgODvO  Shop on aliexpress ]
[[category:Module]]

Latest revision as of 14:06, 4 March 2021


keyestudio Power Amplifier Module


Introduction

The keyestudio power amplifier module integrates an adjustable potentiometer, a speaker, an audio amplifier 8002B chip and a 3pin header interface.
It can amplify the small audio signal output, about 8.5 times magnification, and can play it out via a small power speaker.
It can also be used to play music, or used as an external sound amplification device for some music playback devices.
Pay close attention that should adjust the sound volume to a minimum before use, then slowly increase the speaker volume, preventing from burning the speaker.
When testing, after connected to microcontroller, input square waves of different frequency and different duration at the signal end, so that can edit the sound produced from the speaker.


Parameters

  • Amplifier chip: SC8002B
  • Operating voltage: DC 5V
  • Operating current: ≥500MA
  • Maximum power: 2W
  • Operating temperature: 0-40°
  • Speaker power: 0.15W
  • Speaker sound volume: 80db
  • Property: ROHS


Technical Details

  • Dimensions: 47mm*30mm*13mm
  • Weight: 8.4g


Connect It Up

Connect the power amplifier module to control board using three jumper wires. Then connect the control board to your PC with a USB cable.
thumb


Upload the Code

Copy and paste below code to Arduino IDE and upload.

#define D0 -1
#define D1 262
#define D2 293
#define D3 329
#define D4 349
#define D5 392
#define D6 440
#define D7 494
#define M1 523
#define M2 586
#define M3 658
#define M4 697
#define M5 783
#define M6 879
#define M7 987
#define H1 1045
#define H2 1171
#define H3 1316
#define H4 1393
#define H5 1563
#define H6 1755
#define H7 1971
//list out all the frequencies of all the D tune
#define WHOLE 1
#define HALF 0.5
#define QUARTER 0.25
#define EIGHTH 0.25
#define SIXTEENTH 0.625
//list out all the beats
int tune[]=        //list out the tune according to the musical notation
{
  M3,M3,M4,M5,
  M5,M4,M3,M2,
  M1,M1,M2,M3,
  M3,M2,M2,
  M3,M3,M4,M5,
  M5,M4,M3,M2,
  M1,M1,M2,M3,
  M2,M1,M1,
  M2,M2,M3,M1,
  M2,M3,M4,M3,M1,
  M2,M3,M4,M3,M2,
  M1,M2,D5,D0,
  M3,M3,M4,M5,
  M5,M4,M3,M4,M2,
  M1,M1,M2,M3,
  M2,M1,M1
};
float durt[]=       // list out the beats according to the musical notation
{
  1,1,1,1,
  1,1,1,1,
  1,1,1,1,
  1+0.5,0.5,1+1,
  1,1,1,1,
  1,1,1,1,
  1,1,1,1,
  1+0.5,0.5,1+1,
  1,1,1,1,
  1,0.5,0.5,1,1,
  1,0.5,0.5,1,1,
  1,1,1,1,
  1,1,1,1,
  1,1,1,0.5,0.5,
  1,1,1,1,
  1+0.5,0.5,1+1,
};
int length;
int tonepin=3;   // use pin 3
void setup()
{
  pinMode(tonepin,OUTPUT);
  length=sizeof(tune)/sizeof(tune[0]);   // calculate the length
}
void loop()
{
  for(int x=0;x<length;x++)
  {
    tone(tonepin,tune[x]);
    delay(500*durt[x]);   //adjust the delay time according to tone, you can change the index 500 for the music. 
    noTone(tonepin);
  }
  delay(2000);
}


What You Should See

After uploading the code, you should be able to hear the song Ode To Joy. If the sound volume is too small, you can turn the potentiometer to increase it.
thumb


Resources

  • Download Code:

https://fs.keyestudio.com/KS0374



Buy from