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!



Michael Brown, KG9DW, is a regular contributor to AmateurRadio.com and writes from Illinois, USA. Contact him at [email protected].

10 Responses to “Arduino DTMF Decoder and Relay Controller”

  • Stefan DO4NOB:

    Hi Michael,

    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 😉

    Regards

    Stefan

  • Ron WB8YFL:

    Did you have a time library installed in your arduino ide?
    Thanks
    Ron

  • Ron WB8YFL:

    Timer library that is.
    sorry
    Ron

  • Ron WB8YFL:

    Added timer library, to clear errors from that. Now i’m left with the below. (i’m new to arduino can you tell?)
    Any suggestions.
    Thanks
    ron

    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

  • Ron WB8YFL:

    Looks like I needed to update my IDE.
    ron

  • audiofill42:

    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.

  • Firas:

    THE BEST CODE EVER, YOU ARE A GENIUS BROTHER.

  • WB7EGF:

    I too cannot locate the Timer.h library. Am I missing something? The sketch compiles if I comment out the timer line.

  • Sean wx8l:

    Ever figure out the timer.h issue. What library? Running genuino here…

  • Sean wx8l:

    Figured out the timer.h library issue.

    Using the Arduino compiler add the timer-master zip found here:
    https://github.com/JChristensen/Timer/archive/master.zip

    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)

Leave a Comment

Subscribe FREE to AmateurRadio.com's
Amateur Radio Newsletter
News, Opinion, Giveaways & More!

E-mail 
Join over 7,000 subscribers!
We never share your e-mail address.



Also available via RSS feed, Twitter, and Facebook.


Subscribe FREE to AmateurRadio.com's
Amateur Radio Newsletter

 
We never share your e-mail address.



Do you like to write?
Interesting project to share?
Helpful tips and ideas for other hams?

Submit an article and we will review it for publication on AmateurRadio.com!

Are you a reporter covering ham radio?
Find ham radio experts for your story.

How to Set Up a Ham Radio Blog
Get started in less than 15 minutes!

Sign up for our free
Amateur Radio Newsletter

Enter your e-mail address: