How to control arduino board using an android phone and a bluetooth module

In this tutorial you’ll learn how to use a bluetooth module and MIT’s app inventor to create a wireless serial link between an android phone and an arduino board.
control arduino board using an android phone and a bluetooth module
Here is a short video showing an example app I created. I’ll describe how to do the wiring, write an arduino sketch that can accept basic commands and send them and how to write the app itself. I asume you’re already familiar with some of the basics, you made a few arduino projects and are familiar with the arduino IDE. If you have attempted serial communication with the arduino board everything should be fully comprehensible. If you have any problems or questions feel free to ask them in the comments section.

…and here is an example of receiving the data from the arduino board on the mobile. The temperature sensor connected to the arduino board is a ds18b20 sensor. Just to show how awesome app inventor is I added text to speech functionality – the app says the temperature every 15 seconds. The arduino code and the app is described in more detail in steps 4,5 and 6.

Step 1: Wiring & part list

The circuit is as simple as it gets so you probably already have most of them.

You will need:
– arduino board
– bluetooth serial module (I used a btm222 module on a breakout board with an inbuilt regulator )
– an LED
– resistor (100ohm)
– wires
– breadboard

The only problematic part here is the bluetooth module. There are different modules all over the internet so be sure you check the pinout in the datasheet of the one you get as it can differ.

Also notice that there are two general classes of bluetooth modules:
Class 1 has range of about 100 meter (300 feet)
Class 2 has range of about 10meter (30 feet)
In case you’re wondering they are entirely compatible and you can only get 100 meter range if both of the devices (ie the mobile and the serial module) are class one. If one of it is class 1 the maximum range is lower.

[box color=”#985D00″ bg=”#FFF8CB” font=”verdana” fontsize=”14 ” radius=”20 ” border=”#985D12″ float=”right” head=”Major Components in Project” headbg=”#FFEB70″ headcolor=”#985D00″]You will need:
– arduino board
– bluetooth serial module (I used a btm222 module on a breakout board with an inbuilt regulator )
– an LED
– resistor (100ohm)
– wires
– breadboard

[/box]

 

For more detail: How to control arduino board using an android phone and a bluetooth module


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top