Grove - Speaker

Introduction

5.0V Digital
The Grove- Speaker is a module which consists of power amplification and voice outputs. The loudness can be adjusted by the on-board potentiometer. With different input frequencies, the loud-speaker generates different tones. Coding the music into arduino, DIY your own music box!

Features

  • Volume Adjustable
  • Grove Interface
Tip
More details about Grove modules please refer to Grove System

Specifications

ItemMinTypicalMaxUnit
Working Voltage4.05.05.5VDC
Voltage Gain--46db
Band Width--20KHz

Platforms Supported

ArduinoWioBeagleBoneRaspberry PiLinkIt ONE
Caution
The platforms mentioned above as supported is/are an indication of the module's hardware or theoritical compatibility. We only provide software library or code examples for Arduino platform in most cases. It is not possible to provide software library / demo code for all possible MCU platforms. Hence, users have to write their own software library.

Usage

The speaker can emit a variety of sounds like a car horn, doorbell and ignition . The different sounds are based on the frequency of the input signal.
You can supply different frequency signal to this module with Arduino. Arduino generates these signal via PWM or even digital write and delay.Here we are going to show you how to generate these signals using delay(), the speaker sound bass 1~7.
/*macro definition of Speaker pin*/ #define SPEAKER 3 int BassTab[]={1911,1702,1516,1431,1275,1136,1012};//bass 1~7 void setup() { pinInit(); } void loop() { /*sound bass 1~7*/ for(int note_index=0;note_index<7;note_index++) { sound(note_index); delay(500); } } void pinInit() { pinMode(SPEAKER,OUTPUT); digitalWrite(SPEAKER,LOW); } void sound(uint8_t note_index) { for(int i=0;i<100;i++) { digitalWrite(SPEAKER,HIGH); delayMicroseconds(BassTab[note_index]); digitalWrite(SPEAKER,LOW); delayMicroseconds(BassTab[note_index]); } }
Note
Due to the influence of the capacitance, the module can only output the bass signal, and the treble is unable to emit.

Resources

Help us make it better

Thank you for choosing Seeed. A couple of months ago we initiated a project to improve our documentation system. What you are looking at now is the first edition of the new documentation system. Comparing to the old one, here is the progresses that we made:
  • Replaced the old documentation system with a new one that was developed from Mkdocs, a more widely used and cooler tool to develop documentation system.
  • Integrated the documentation system with our official website, now you can go to Bazaar and other section like Forum and Community more conveniently.
  • Reviewed and rewrote documents for hundreds of products for the system’s first edition, and will continue migrate documents from old wiki to the new one.
An easy-to-use instruction is as important as the product itself. We are expecting this new system will improve your experience when using Seeed’s products. However since this is the first edition, there are still many things need to improve, if you have any suggestions or findings, you are most welcome to submit the amended version as our contributor or give us suggestions in the survey below, Please don’t forget to leave your email address so that we can reply.
Happy hacking