Pages: [1]   Go Down
Author Topic: Can I generate DTMF through a Piezo speaker  (Read 1858 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I see the Melody tutorial that show how to play a tone of specified frequency through a Piezo, but what about if I need to play dual tones simultaneously.....like DTMF tones.  Is that going to be possible with a Piezo?  As a newbie there is much I don't understand, but it seems like since the Piezo is connected to a single pin I don't see how I can generate a tone that includes two frequencies.
Logged

B0100111001000011, USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1503
I'm confused.  Wait, maybe not..
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm pretty sure you'd need 2 piezos running at the same time to generate a dual tone.  :-/
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The latest version of the Tone library supports generating DTMF on board and there is an example sketch showing how:

http://code.google.com/p/arduino-tone/source/browse/trunk/examples/DTMFTest/DTMFTest.pde

However, I don't think a  Piezo is the best choice for DTMF as piezos tend to be pretty peaky in their frequency response. You would probably be better off using a very small dynamic speaker (with a series current limiting resistor), say like this on:

http://www.allelectronics.com/make-a-store/item/SK-230/20-MM-32-OHM-SPEAKER/-/1.html

Lefty
Logged

B0100111001000011, USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1503
I'm confused.  Wait, maybe not..
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The latest version of the Tone library supports generating DTMF on board and there is an example sketch showing how:

Wow!  And here I was thinking that DTMF required two piezos/speakers  :smiley..
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Wow!  And here I was thinking that DTMF required two piezos/speakers  

Oh course not, otherwise we would all have to be wearing stereo headphone for your telephone conversations.  smiley-wink

Lefty
Logged

B0100111001000011, USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1503
I'm confused.  Wait, maybe not..
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Fair point smiley-razz.  I guess I never gave it much thought? smiley
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks so much for the quick and helpful answer!
Logged

Pages: [1]   Go Up
Jump to: