Close

Home Automation with DTMF

A project log for Play FPGA like Arduino

Build cool things with M10. For starters, you can build a Lego Monster Truck with it. For more fun, how about home automation through DTMF?

changyi-guChangyi Gu 10/14/2017 at 01:520 Comments

The M10 is  a FPGA board with a soft core MCU running at 96MHz. It also features a rich set of onboard peripherals like voice CODEC, (including microphone and speaker jack), microSD socket, SRAM, onchip A/D converter, Temperature sensor diode and dual voltage IO etc. It can be used as a core module and can morph into a lot of cool things. Below is a demo of using the M10 board to make a small home automation system that allows you to check your home temperature when you are away.

Here is how the demo system works:

  1. You call your home number from somewhere far away
  2. The answer machine will pick up the call after it rings twice.
  3. When the answer machine asks you to leave a message after the tone, key in the pass-code that is configured beforehand. In this case, it will be *1234#
  4. The M10 board has onboard microphone and voice codec. The keys you pressed will be heard as DTMF signals over the answer machine, and those DTMF keys will be collected and decoded by the M10 board.
  5. If the pass-code matches, the M10 board will pick up the phone.
  6. To make the demo more interesting, the phone is actually picked up through a DC motor that ties to a Lego crane, as shown above in the diagram.
  7. BTW, To drive the DC motor, you need two things: one is the PWM signal, which the M10 board has hardware controller and software drivers built-in. The other is a motor driver that has a H bridge in it, so you can drive the DC motor with high current, and control the direction the motor rotates. For that, an Arduino shield from Sparkfun it used.
  8. After the phone is picked up, a welcome message will be played out. The welcome message is actually played from an audio wave file stored on the microSD card.
  9. At this point, you can start to key in commands that are predefined. In this demo, command *888# will trigger an action to get the current temperature, and read the temperature numbers out loud by playing audio files for each digit.
  10. To hang up. Key in the command *999#, which will rotate the DC motor in opposite direction and hang off the phone. Or you could choose to sit idle and let the system timeout after about 20 seconds, which will also trigger the DC motor and hang off the phone.

Now, without further ado, let me give the demo:

Discussions