Control Arduino Projects Using Android Phone

Droiduino Blog
4 min readSep 19, 2020

Inspiration can come from anywhere. Even though not a tabletop gamer, I love reading core rulebooks for cyberpunk themed tabletop games such as Shadowrun and Cyberpunk 2020. For me, those books are full of inspiration for my next projects.

One thing in common for those 2 games is that they both have some kind of PAN (Personal Area Network) embedded in their game mechanics. It is a system that is centralized around a person’s commlink (smartphones equivalent for the cyberpunk world) and is connected via wireless to various peripheral gadgets that the person can interact, control, and monitor, while at the same time connected to the matrix (a.k.a the internet).

These gadgets can be weapons, AR glasses, bomb detonators, proximity sensors, etc. In the cyberpunk universe, most of the gadgets, devices, and appliances are equipped with some kind of wireless connection. Pretty much like IoT nowadays. If you can’t imagine what is PAN in the cyberpunk, these arts may spark your imagination.

This is what I am trying to achieve with the Droiduino project. Using an Android phone as the hub that is connected with various peripheral gadgets that I can control and monitor. For that to succeed, I have to equip those devices with some kind of wireless transmission so it can talk with an Android phone.

This is where Bluetooth comes in

Bluetooth connection is my first choice for giving a device/gadget a wireless connection. The plan is to connect a Bluetooth module to an Arduino board that in turn controls another device.

Why not WIFI, RF, or IoT ?

One of the project requirements is that the system must be able to be used outdoor, so for the time being, I rule out WIFI. RF is a promising tech to be used for this system, but it cannot directly connect to a smartphone so it must be connected to another middle hardware first. In this project, I am also exploring to connect an RF device to an Arduino board. IoT is also another promising tech, however, it relies heavily on the mobile network and for a PAN system where the distances between devices are not far, IoT seems overkill. But in the future, I might be experimenting with IoT to monitor some remote sensors.

Requirements

Some requirements and constraints that I decide on for this project :

  1. The components must be off-the-shelf, widely available, and affordable. The plan is to share this project with others. And if the components that I use are available in my country, it should also be available in most countries.
  2. Utilize the platform that I am already familiar with. There’s a probably better platform than Arduino for this purpose and it’s always a good thing to learn new knowledge, but for this project, I want it up and running quickly with a minimum learning curve. On top of that, Arduino has very active communities, so if there is anyone encounters difficulties with this project, they can also get help from Arduino communities.

Architecture design

After some initial research, this is the system architecture that I will proceed with :

Android phone is connected to Arduino board(s) using Bluetooth modules, and in turn, those Arduino boards are controlling or monitoring other devices, appliances or sensor, wired or wireless. However, this system architecture may, of course, evolve throughout the project if I discover better ways to do things.

Some more advantages…

After playing around with Android + Arduino for some time, I realized that there are some advantages to this combination.

Since Android phone can act as a very versatile display and user interface for the Arduino device, I can eliminate the needs for physical display and buttons connected to the board.

If you are using Arduino to monitor remote sensors, Android phone can be used as a temporary storage for the sensor data. And since Android phone has much more processing power than an Arduino board, it can also be used to pre-process the sensor data before it is passed to a more powerful computer. With Android phone as a temporary data storage, I can eliminate the needs to store data on Arduino.

And last, with the elimination of those peripheral hardware from an Arduino board, I can make my Arduino device very compact which also ease in the design for an electronic enclosure for the Arduino device i.e. no need to create openings on the box for the display and buttons.

Of course, on the downside, it feels like a redundant effort since I need to code on both Arduino IDE and Android Studio. And, on top of that, I have to make sure that both ecosystems communicate with each other properly. This can be difficult for Makers who are already used to Arduino but has no or limited Android programming experience.

In my other posts, I will give Makers some basic knowledge on how to interface Arduino with Android and make some interesting projects out of it.

So let’s start creating some cool stuffs…

--

--

Droiduino Blog

Droiduino is about sharing knowledge in the realm of Android app programming, Arduino project creation and using R for processing data.