Arduino DTMF Decoder and Relay Controller
Another Arduino project I’ve been working on is a DTMF decoder used to control a relay board. Using a ham radio receiver, I can switch lights, radios, computers…anything…on or off from miles away. Here’s the video:
Here’s the wiring diagram. And here’s the Arduino code.
I’m using a Sainsmart 4 relay board, although pretty much any relay board would work. You’ll also need a MT8870 DTMF decoder – these run about $2 on ebay. And of course, you’ll need an Arduino Uno. Again, check out ebay for these as well. The total cost here should be less than $12 and you’ve got a fully functioning radio controlled DTMF relay controller!
thank you for publishing this code.
I will use it in my High Altitude Balloon Project. I will remotely cutdown the balloon from the payload over DTMF. Hope it works 😉
Did you have a time library installed in your arduino ide?
Timer library that is.
Added timer library, to clear errors from that. Now i’m left with the below. (i’m new to arduino can you tell?)
Arduino: 1.0.6 (Mac OS X), Board: “Arduino Uno”
/Users/lucy/Downloads/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -I/Users/lucy/Downloads/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -I/Users/lucy/Downloads/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard -I/Users/lucy/Downloads/Arduino.app/Contents/Resources/Java/libraries/EEPROM -I/Users/lucy/Documents/Arduino/libraries/Timer-master /var/folders/Wv/Wv5lPBaAEjuGr0r-BcC3ik+++TI/-Tmp-/build45350888285611995.tmp/dtmf_relay.cpp -o /var/folders/Wv/Wv5lPBaAEjuGr0r-BcC3ik+++TI/-Tmp-/build45350888285611995.tmp/dtmf_relay.cpp.o
dtmf_relay.ino: In function ‘void setup()’:
dtmf_relay:86: error: ‘class EEPROMClass’ has no member named ‘get’
dtmf_relay:107: error: ‘class EEPROMClass’ has no member named ‘put’
dtmf_relay:108: error: ‘class EEPROMClass’ has no member named ‘put’
dtmf_relay:109: error: ‘class EEPROMClass’ has no member named ‘put’
dtmf_relay:110: error: ‘class EEPROMClass’ has no member named ‘put’
dtmf_relay.ino: In function ‘void loop()’:
dtmf_relay.ino:137: warning: comparison between signed and unsigned integer expressions
Looks like I needed to update my IDE.
Hello, Very nice project. But I would like to ask if it is possible to add a sequence at startup, where you should “login” first then give commands to the arduino.
This way will be safer in use this project!
Thanks a lot.
THE BEST CODE EVER, YOU ARE A GENIUS BROTHER.
I too cannot locate the Timer.h library. Am I missing something? The sketch compiles if I comment out the timer line.
Ever figure out the timer.h issue. What library? Running genuino here…
Figured out the timer.h library issue.
Using the Arduino compiler add the timer-master zip found here:
SKETCH > INCLUDE LIBRARY > Add .ZIP library
FWIW, I used a 4 relay shield instead of the shown relay board and had to modify the relay pins before compiling (2, 3, 4, 5 in the included code, my shield uses 4, 5, 6, 7)
I try to connect a radiometrix Rx2A to DTMF module. Should I use the Vin pin and maybe some other circuit?
It seems that the output of the RX2A Radiometrix is not decoded.
When I use a different DTMF source (portable radio) the output is decoded and correctly displayed.
hi, great proyect.
we used it to remotely turn on and off an RPT.
Did you continue to work on the sketch?
Hi Michel.I want to work 8 relays.How can I do it…!!!!
CAn i use any bulb or what ever the thing with output to relay module without having any extra code please?
Just wanted to let you know I built this little gadget in 2016 and installed it at our Repeater site about 20 miles form my place for remote shutdown & start up of the Repeater. There is no Internet service there. Later I added switching for battery power, separate from the usual auto transfer for extended battery life during a Utility power interruption. Now I just need to find someone in our group who is interested enough to maintain this little project after I am unable.
Thanks for the design work and the video.
How can i change the password? Can you help me please