Control Light Animations Using Android App

By Aniket Subham and Shibendu Mahata

4896
Advertisement

In this project, an Android application is developed to control light animations using six different LED chasing patterns. Additionally, blinking speed of LEDs is also controlled from the smartphone using fast, moderate and slow buttons on the app. The authors’ prototype is shown in Fig. 1.

Authors’ prototype wired on breadboard along with smartphone for Control Light Animations
Fig. 1: Authors’ prototype wired on breadboard along with smartphone for Control Light Animations

Circuit and working

The circuit diagram of the project is shown in Fig. 2. Components used in this project are mentioned below.

Circuit diagram of the for Control Light Animations project
Fig. 2: Circuit diagram of the for Control Light Animations project

Arduino Uno. Arduino Uno is an AVR ATmega328P microcontroller (MCU)-based development board with six analogue input pins and fourteen digital I/O pins. The MCU has 32kB ISP flash memory, 2kB RAM and 1kB EEPROM. The board provides serial communication capability via UART, SPI and I2C.

The MCU can operate at a clock frequency of 16MHz. In this project, Arduino receives the command from Android app (in the smartphone) through Bluetooth module, and correspondingly blinks the LEDs (at their specified speed) connected to nine digital pins (5 through 13) of Arduino. Super LEDs can be used to eliminate current-limiting resistors (R1 through R9) in series with them.

HC-05 Bluetooth. HC-05 module is an easy-to-use Bluetooth SPP (Serial Port Protocol) module, which is designed for wireless serial connection setup. This module has a fully-qualified Bluetooth V2.0+EDR (enhanced data rate) 3Mbps modulation with complete 2.4GHz radio transceiver and baseband. It uses CSR Bluecore 04-External single-chip Bluetooth system with CMOS technology having adaptive frequency hopping (AFH) feature.

Android smartphone. The controlling app is based on Android, and has been designed using MIT App Inventor, which is an intuitive, visual programming environment that allows the user to build fully-functional apps for smartphones and tablet PCs. The project has been tested on Redmi 3S smartphone.

Software

For execution of the project, connect Arduino Uno board to the laptop/PC using a USB cable.

Open the source code (LEDchaser_app.ino), and select proper board and COM port under Tools menu. Compile and upload the source code to Arduino Uno.

Serial.println() function helps control the LEDs from Tx pin of Bluetooth to Arduino. Now, make connections as per the circuit diagram (Fig. 2).

Download and install LED.apk on the smartphone. After successful installation, turn on Bluetooth of the smartphone and connect it with HC-05 module; default password for HC-05 is 1234 or 0000.

After successful pairing with Bluetooth and the smartphone, open the app in the smartphone. Now, press the pushbutton with Bluetooth logo. From paired devices list, choose HC-05 device. After successful connection, ‘Connected’ will be displayed on the app in the smartphone.

You can control the glowing patterns of LEDs in three modes, namely, fast, moderate and slow. Android app can now control the LEDs with six different patterns when you tap on the corresponding button.

Download Source Folder

MIT App Inventor design

Some important development stages of app development, that is, screenshots of Designer and Blocks section as designed using MIT App Inventor are shown in Figs 3 and 4, respectively.

Screenshot of Designer section in MIT App Inventor
Fig. 3: Screenshot of Designer section in MIT App Inventor
Screenshot of Blocks section in MIT App Inventor
Fig. 4: Screenshot of Blocks section in MIT App Inventor

LED.apk is generated from MIT App Inventor after completion of above stages.


Aniket Subham has a keen interest in designing MCU-based embedded systems.

Shibendu Mahata is MTech (gold medallist) in instrumentation and electronics engineering from Jadavpur University. He has keen interest in MCU-based real-time embedded signal processing and process control systems.

Advertisement


4 COMMENTS

  1. Dear Mr.Aniket,
    In that source Folder ,only Arduino program is there but LED.apk not available.Kindly post the same.

SHARE YOUR THOUGHTS & COMMENTS

Please enter your comment!
Please enter your name here