Note: This tutorial could be outdated, please go here for a more current version.
Introduction
Like every phone, the GSM module on your Arduino MKR GSM 1400 can recognize DTMF tones. These are the tones that you can hear whenever you press a key on your phone's keyboard during a call.
How It Works
The operating principle of this tutorial is very simple: every time a phone call is received, the board answers the call and waits for a DTMF tone. When the tone is pressed, the board parses it, prints it on the serial monitor, and changes the LEDs color according to the pressed button.
Hardware Connections
As you can see from the breadboard layout, a transistor is present between the Arduino board and the NeoPixel input. This is placed since the MKR GSM 1400 operates at 3.3V while the NeoPixel works at 5V. The transistor is used as a voltage translator. In the layout, there is also a single NeoPixel placed instead of the ring just for the sake of simplicity.
Setup
The setup to use this code is very simple. You just have to:
- Plug the antenna into the board
- Plug a micro SIM card into your board
- Connect the LEDs as shown in the scheme
- Plug the battery into the board
- Plug the micro USB cable and connect it to your PC
- Load the code on the board using the Arduino Java or Web IDE
- Open the serial monitor
- Call the board and enjoy pressing buttons on your keyboard!
See Also
This example is based on the Arduino MKR GSM library.
EXPANDED TECHNICAL DETAILS
Global DTMF Telecommand Hub
This advanced cellular project allows you to control physical hardware from any telephone in the world using standard Dual-Tone Multi-Frequency (DTMF) tones.
- Cellular Audio Stream Decoding: The MKR GSM 1400 established a voice call with the user. The Arduino then captures the audio stream and uses a software-based FFT or a hardware DTMF decoder to identify the "Keypresses" from the caller's phone.
- Remote Action Mapping: Every key (0-9, *, #) is mapped to a specific Arduino action—such as "Toggle Gate," "Check Battery," or "Reset System"—providing an internet-free, global remote control.
Security
- Caller ID White-Listing: Includes a security layer that only accepts DTMF commands from pre-authorized phone numbers stored in the MKR's secure memory.