Pages: [1]   Go Down
Author Topic: Grove speaker - takes a "signal" input?  (Read 422 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone,

I recently purchased a speaker by Grove:

http://www.seeedstudio.com/wiki/Grove_-_Speaker

This speaker is not a like a typical Piezo speaker that has two inputs (VCC and Ground). This speaker takes VCC, Ground, and Signal. The wiki explains that this speaker can be controlled by either analog or digital, but only describes the digital method. The method seems a little hacky to me and can only produce a square wave signal. It essentially writes HIGH to the speaker, delays x number of microseconds, and then writes LOW. By doing this repeatedly, a square wave is formed that oscillates at a specific rate.

This is fine to me but I would like to know how to control the speaker using an analog signal, so that I can hopefully produce a smoother waveform. Any suggestions?
Logged

Offline Offline
Edison Member
*
Karma: 56
Posts: 2174
The last thing you did is where you should start looking.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
how to control the speaker using an analog signal
The Arduino can only produce on/off signals to this speaker.
You can use digitalWrite(..) or tone() to send these same on/off signals to your device.
You can pass the Arduino o/p through a low pass filter to achieve better sound quality.

Obviously you can attach a microphone (i.e. an analog signal) to it's i/p to amplify voice etc.
Logged

Pages: [1]   Go Up
Jump to: