Affiliate Disclaimer: "installtekz.com is supported by it's readers. Please assume all links are affiliate links. If you purchase something from one of our links, we may make a small commission from Amazon or other third parties. It helps us pay for the running of this website. Thank You"
This practical project guide will take you through the steps needed to build a 16×2 LCD (Liquid Crystal Display) module with an Arduino Uno board using a Bluetooth connection to an Android device.
I have also created an Android app for this project which allows you to:
- Send data from Android over Bluetooth to display on the LCD
- Send commands from Android over Bluetooth to control the LCD
This app saves time by sending data and commands on-the-fly to the Arduino and omitting the need to flash the Arduino sketch every time a change is made to it.
This project is great for:
- Beginner’s who want to learn more about how to control a 16×2 LCD
- Anyone building an LCD project who needs to work out what lines of Arduino code should be executed in any given order
Project Skill Level: Beginner
1. Hardware You Will Need:
Basic Tools And Equipment
Section 10 in the above guide is where you will find the relevant information under the heading: “How to build your own Arduino starter kit”.
For this project you will need a 16×2 LCD display.
These components are cheap to produce and are available almost anywhere online. Usually you can find them with a green or blue backlight and should ship with a 16 pin header.
You may need to solder this header on yourself if you choose to use it or you could solder a female header connector if that suits you best.
As you can see from the images above, I have soldered the header pins on to the front of the module as it gives me easier access for prototyping projects.
If this LCD was destined to be built in to a more permanent project then I would have placed the pins facing out of the back of the module to create a cleaner look.
Here is a link to Amazon.com where you can find one of these 16×2 LCD modules.
You will also need the following: (Amazon.com links supplied below)
- Arduino Uno or other compatible microcontroller board
- Jumper wires at various lengths and with various connectors (Male to Male, Male to Female, Female to Female) I recommend the Dupont connectors
- Potentiometer. Various types, sizes and values will work for this project however I use the 10K Preset Pot here. This is used to adjust the backlight of the LCD module to your preferred contrast for better lighting.
Bluetooth Module And Supporting Components
To follow along with this tutorial you will need to either:
- Build the Bluetooth module with supporting components such as resistors and jumper/hook-up wire using the solder method
- Or simply plug all of the components into the breadboard
In a nutshell then, these are the components needed for the Bluetooth Module if you plan to use the solderless breadboard method:
The following images show one of my HC-06 bluetooth modules in a permanent build by soldering to stripboard:
Other Equipment You Will Need
Other than having all of the needed components, equipment and tools ready for this project you will also need the following:
- PC or Laptop
- Android device
- USB cable to suit Arduino to PC/Laptop connection (Not only will this cable power our project but it is also used to write the Arduino sketch to the Arduino)
2. Software You Will Need:
The following list of software will be needed for this project:
- Arduino IDE
- Android App (Arduino LCD Playground)
- By installing the Arduino IDE executable program. The package type you need will depend on what operating system you have on your computer
- Or you can use the online IDE known as the Web Editor
Both of these options are provided by Arduino.cc here.
(Personally I use the install method on linux).
The Android App
3. Flashing The Arduino Sketch
Before we begin to build the electronic circuit it’s a good idea to flash the Arduino sketch into the Arduino Uno first.
However, if you have already built the circuit then there is something that you NEED to do before a successful write will happen..
Make sure that the Bluetooth module is not connected to the Arduino as this may cause problems with the sketch upload. (The TX pin on the Bluetooth module to RX on the Arduino will need disconnecting for the duration of the software write.)
If this happens, simply wait for the write process to time out after the 10th attempt then remove the TX-to-RX pin as stated above, then try the write process again.
7 Steps To Flash The Arduino Sketch
By following the steps below we can successfully flash the Arduino:
- Connect the USB cable to the Arduino
- Connect the other end of the USB cable to the PC/Laptop
- Start the Arduino IDE software
- Copy and paste the Arduino sketch into the Arduino IDE. The sketch can be found further down this page
- At this point you may need to select the USB port in place of the “COM” port and the IDE may warn/guide you on how to change this (Tools>Port)
- Click the “Verify” button to check that the code will compile
- Click the “Write” button to flash the sketch into the Arduino
Over time I will probably roll out new versions of the Android App. When I do this, I may also need to update the Arduino sketch below too.
For this reason I will provide a compatibility note below. Please check that your Android App version that you have installed is compatible with the Arduino Sketch provided here.
Otherwise your App may not function as intended.
The following screenshot shows the sketch inside the Arduino IDE:
Once you’re happy with the sketch you can then click the ‘Verify’ button to confirm there are no errors in the code:
It’s now time to flash the sketch into the Arduino board by clicking the ‘Upload’ button as indicated below:
That’s the Arduino sketch flashing process complete!
4. Building The Arduino Project
The Circuit Layout
Other than flashing the Arduino sketch to the Arduino we also need to connect up all of the electronics.
The following image shows the wiring diagram of how to connect your project together. Once this is complete we need to power the Arduino with the USB cable to a PC/laptop or you can use another source of power if you wish.
The following images show my final hardware setup without power applied to the Arduino:
So now we have the Arduino sketch written into the Arduino, the electronic circuit is built and the Arduino has power.
Don’t forget to adjust the potentiometer with your fingers/screwdriver to vary the backlight contrast of the LCD.
The next steps will involve:
- installing the Android app onto an Android device such as a tablet or phone
- Configure the Bluetooth connection on this Android device
- And finally use the app to control the LCD
The rest of this post will now take you through these next steps:
5. Download & Install The Android App (Arduino LCD Playground)
The Arduino LCD Playground App utilizes the ‘LiquidCrystal’ library supplied by the Arduino team to provide an interactive learning environment and make prototyping more efficient.
I have supplied various methods below in which to install the Android app by either:
- Scanning the QR code using your Android device. This will prompt you to install the app directly from me
- Click the “Direct Download APK” button to install the app directly from me
- Or click an App Store button to take you to the relevant app store.
If you are installing the app directly from me then you may need to change a setting on your android device which allows you to ‘install apps from other sources’.
Install APK On Android (Approx. 6.8MB)
6. Configure Bluetooth On Android
Now we need to provide power to our circuit.
Once the Arduino is switched on, the Bluetooth module should be broadcasting it’s identity and you should see an LED light flashing rapidly.
We can see the identity from an Android device when we activate Bluetooth on Android.
We may need to scan for nearby Bluetooth devices. If you are using the HC-06 Bluetooth module then you should see this displayed on Android as “HC-06“.
If you are prompted for a password then try “1234” to pair Android to the HC-06 Bluetooth module.
The below screenshots show me connecting to Bluetooth from Android:
7. How To Use The 'Arduino LCD Playground' App
Connect Via Bluetooth
Once you have successfully paired your Android device to the Bluetooth module it’s now time to open the app.
Click the Bluetooth icon as shown in the image below and select your Bluetooth module which should be displayed in the list as “HC-06” along with it’s MAC address.
Give the connection a few seconds to establish and you should notice the LED light on the HC-06 Bluetooth module flash less rapidly.
It may take more than one attempt to successfully connect.
You are now ready to go!
How To Create Your Own LCD Characters
From the home screen there is an icon of a man. Tap this icon to take you to the “Character Creator” screen:
From here you can tap the squares to create your character. Once you are happy with the character you will need to give it a name then hit the “Save” button. Now we can navigate back to the main screen.
We can now select our new custom character from the main screen to send as data to display on the LCD display as shown in point 4 in the image below:
This instructional guide was intended for anyone wanting to control an LCD module display on an Arduino Uno by using an Android app over Bluetooth communication.
My aim here was to provide you with educational material in the form of an interactive mobile application to learn how to program the LCD.
As this project has no real goal other than to be educational, the app also serves as a playground for sending data and commands to the LCD.
I hope that not only will beginner’s find this project useful but anyone simply wanting a little fun with LCD’s from the comfort of a graphical interface.