Recently, i got a requirement to design a audio announcement system which would play an audio every hour. So i came across a MP3 player chip and this idea crossed me that why shouldn't i just make one multipurpose control board which would control home appliances and give audio feedback like Amazon Alexa.
So i designed this board, which can control the relays on board, based on the inputs provided either from cloud or from a call using DTMF.
For the first iteration we designed it to have the following features,
- 4 cube Relays driven by MOSFET's to control 110V to 230V AC appliances
- SIM800C 2G Quadband GSM module for cloud/call connectivity with micro SIM card connector
- External Whip Antenna with right angle SMA connector
- MP3 player with micro SD card
- STM32 Cortex M0 Low power MCU with RTC
- Switching power supply to take inputs from 5V to 24V DC
- DC power jack for power input
- SWD connector for programming and debugging
How the DTMF version works :
- Insert the SIM card and SD card containing MP3 files into the device.
- Power on the device using a DC adapter
- Network LED blinking every 3 seconds will indicate that the device has connected to the network.
- Wait for 30 seconds for initialization and ring the SIM card number.
- Your call will be auto answered after 2 rings (Security can be added to answer only specific numbers)
- An audio will be played on the call and you should hear, "Welcome to Valetron Systems, Press 1 to control Device number 1, Press 2 to control Device number 2 , Press 3 to control Device number 3,Press 4 to control Device number 4"
- You press 1 on the dial pad of your phone and you should hear, "You have selected Device number 1, Press 1 to turn ON device number 1, Press 2 to turn OFF device number 1"
- You press 1 on the dial pad of your phone and you should hear, "Device number 1 turned ON, Press 2 to turn off device number 1, Press # to return to main menu". At the same time, Relay 1 will be turned on and LED 1 will be turned on indicating that Relay 1 is in ON state now.
- You press # and you will go back to hearing the Welcome message.
This is how the DTMF control of the device works.
State machine based code:
The code is written as a state machine and each state can be changed to perform a different action easily. If the user knows the flow, when he calls, he can quickly enter the inputs so that he doesn't waste time waiting to hear the audio instructions.
Multiple language support :
We can also add different language support and ask for selection of language in the welcome message and switch to playing only that language audio for that specific user.
The first iteration of the board was successful and here is the demo video.
This board can be used as a,
- DTMF controlled home automation device.
- Cloud/GPRS/IOT based home automation device.
- SMS based building/home automation device.
- Voting system where people can call and leave their feedback for small businesses who cannot afford a expensive IVRS system.
- IVRS booking system where people call and enter inputs to book a service like entering a gas booking number for ordering a cylinder refill.
I call this module VALTALK v1 :)
P.S : MQTT based version is under development and you can control the relays using MQTT protocol with the help of online broker servers like CloudMQTT , Mosquitto or EMQ.