Go Down

Topic: Grove speaker - takes a "signal" input? (Read 920 times) previous topic - next topic


Hello everyone,

I recently purchased a speaker by Grove:


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?


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.
No technical PMs.
The last thing you did is where you should start looking.

Go Up