Introduction: Arduino: Time Programs & Remote Control From Android App

I've always wondered what happens with all those Arduino boards that people don't need after they finish their cool projects. The truth is a bit upsetting: nothing. I've observed this at my family's house, where my father tried to build his own home automation solution but since he's an electrician he couldn't get over the programming part.

In this project I'm trying to address the problems he faced:

  • Programming is hard.
  • It takes time to build valuable software.
  • Home made apps look boring and aren't user friendly.

It took couple of months to get it right, but the project was worth it. I intend to solve my father's problem by providing an Android app which connects over bluetooth and supports time programs, scenes & manual control out of the box without any programming knowledge. Let's start!



  • 1x Arduino Uno
  • 1x HC-05 bluetooth module
  • 1x DS1302 RTC module
  • 1x Breadboard
  • 3x Resistor 1k ohm (can be also 220 ohm or 10k ohm)
  • 1x USB 2.0 cable type A/B
  • 12x Jumper wires
  • Smartphone with Android 5.0+ (bluetooth available)
  • Laptop/PC


Step 1: Upload Bluetooth Module Configuration

First, you must configure your bluetooth adapter from your laptop/PC. Connect Arduino board to USB port of your computer. Launch Arduino IDE, open new sketch, copy & paste the code below.


void setup() {

void loop() {

Make sure these options are selected in your IDE:

  1. Tools → Board → Arduino Uno
  2. Tools → Port → the port to which you connected Arduino

Compile and upload the program.

Step 2: Connect Bluetooth Module

Connect your HC-05 as presented on the scheme. General instructions:

  • VCC connects to Arduino 5V pin.
  • GND connects to Arduino GND pin.
  • TXD connects to Arduino RXD pin.
  • RXD connects to Arduino TXD pin through voltage divider as the logic voltage level of the data is 3.3V. Arduino TXD (transmit pin) is 5V, therefore if you won't use voltage divider, you'll burn your module.

Step 3: Setup HC-05 Module

In this step we'll apply the configuration from step 2 to the bluetooth module. Follow these instructions:

  1. Disconnect USB cable from your computer.
  2. Press and hold the KEY button on your HC-05 module for 5 seconds while connecting USB cable.
  3. Click RESET button on your Arduino board.
  4. Wait 10 seconds before the configuration is applied.
  5. Disconnect USB cable and connect it again.

Step 4: Connect DS1302 RTC Module

Connect your DS1302 as presented on the scheme. General instructions:

  • VCC connects to Arduino 5V pin.
  • GND connects to Arduino GND pin.
  • CLK connects to Arduino pin 8.
  • DAT connects to Arduino pin 7.
  • RST connects to Arduino pin 6.

Step 5: Upload Arduino Program

Yeah! All the hardware is set now. Let's catch up with software. First, download the firmware for your board available under this link:

Next, disconnect the HC-05 bluetooth module. This is very important as new code cannot be uploaded while the module is connected.


AVRDUDE is a tool used to upload firmware to AVR microprocessors, and it is included in the Arduino IDE so you already have it.

Open console and navigate to your Arduino IDE installation directory. Usually it's located somewhere in Program Files. Once you find it, navigate to this folder: /hardware/tools/avr/bin/.

Linux / Mac OS

If you installed Arduino IDE from official sources, you should already have avrdude added to your executable path.

Windows, Linux & Mac OS

Verify avrdude installation with this command. If help is displayed then you can proceed further. If you encounter any problems don't hesitate to ask Google about it.

avrdude --help

Upload firmware to your Arduino Uno board. Note: the firmware has been built specifically for Arduino Uno and it will not work for other Arduino boards.

avrdude -v -patmega328p -carduino -b115200 -P<arduino-usb-port> -D -Uflash:w:<path-to-firmware>:i

Once the firmware is uploaded, connect back the HC-05 bluetooth module.

Step 6: Install Maya App From Play Store

Your board is now ready to be used. Download Maya App from Play Store for Android 5.0 or newer with available bluetooth adapter.

With Maya you can upgrade your house to be smart without investing lots of money in expensive brands. You can reuse the electronics you already have.

Time Programs - set your daily routines in a customizable time programs. For instance you can order your board to turn on and turn off periodically lights to scare off thieves.

Scenes - be spontaneous and activate actions which end up automatically after delay that you set.

Manual Control - works as a switch. Activate or deactivate pins according to your wish. For PWM pins percentage value is supported.

Step 7: Connect to Your Board From Maya

Alright, so far so good. Open the app and connect to the board.

  1. On the welcome screen choose I already configured a board. Let's connect to it.
  2. Enable bluetooth and scan for available devices. Once your board is discovered (Arduino_Maya) please click on it.
  3. Bluetooth pairing starts. Android OS will ask you for the pin in order to connect to the board. For HC-05 it's 1234 by default.
  4. In case for whatever reason you'll be disconnected, please report an issue using this link.
  5. You are connected. Congratulations! :D

Useful links

Help Center:
Facebook Page:
Maya in Play Store: