KS0374 keyestudio Power Amplifier Module: Difference between revisions
Keyestudio (talk | contribs) |
Keyestudio (talk | contribs) No edit summary |
||
Line 18: | Line 18: | ||
* Speaker sound volume: 80db | * Speaker sound volume: 80db | ||
* Property: ROHS | * Property: ROHS | ||
<br> | <br> | ||
==Technical Details== | ==Technical Details== | ||
Line 26: | Line 27: | ||
==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|600px|frameless|thumb]]<br> | <br>[[File:KS0374.jpg|600px|frameless|thumb]]<br> | ||
<br> | <br> | ||
==Upload the Code== | ==Upload the Code== | ||
Copy and paste below code to Arduino IDE and upload. | Copy and paste below code to Arduino IDE and upload. | ||
Line 119: | Line 118: | ||
} | } | ||
</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. | ||
Line 132: | Line 131: | ||
'''Download the Code:'''<br> | '''Download the Code:'''<br> | ||
https://drive.google.com/open?id=1gPuX_5gebnE-XO4chG5b1R0iNnz43ajA | https://drive.google.com/open?id=1gPuX_5gebnE-XO4chG5b1R0iNnz43ajA | ||
<br> | <br> | ||
==Buy from == | ==Buy from == | ||
*'''Official Website:''' http://www.keyestudio.com/ks0374.html | *'''Official Website:''' http://www.keyestudio.com/ks0374.html |
Revision as of 10:35, 28 April 2019
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.
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.
Resources
Download the PDF:
https://drive.google.com/open?id=1bPF882-TP4v8pcOgsq2aN58S6STj657K
Download the Code:
https://drive.google.com/open?id=1gPuX_5gebnE-XO4chG5b1R0iNnz43ajA
Buy from
- Official Website: http://www.keyestudio.com/ks0374.html