Bluetooth Mini Robot

Bluetooth Mini Robot Banner
Got another new robot kit and decided to create a bluetooth controlled robot with it.

dfrobot_miniq

It’s from DFRobot and it’s called the MiniQ. Here it is assembled.

IMG_1755

Created a simple circuit on a donut board with a L293 H-Bridge and Arduino Nano.

IMG_1531

It is powered by a 2 cell Lithium Polymer battery. Typically each cell provides 3.7V so that amounts to 2 x 3.7V = 7.4V. You would normally find these in RC shops. I believe this battery is used in small RC helicopters and wireless controllers.

IMG_1538

The circuit is shown below.

bluetooth_mini_robot_sch_schem

The circuit is just a typical H bridge connection with two motors. It’s relatively simple to build and easy to program because it’s an Arduino.

For the bluetooth connection, I’m using a cheap bluetooth module I got from ebay.

IMG_0769

IMG_0770

It works on a serial connection and it connects to pins TX/RX on the Arduino. I’ve programmed the Arduino to perform certain actions upon receiving a byte of data from the bluetooth module.

mini_code

The bluetooth protocol used here is called the SPP (Serial Port Profile) and only one mobile platform supports it, Android. Both iOS and Windows Phone doesn’t allow the developer to access the SPP protocol although the hardware is capable in doing so. I would have loved to develop it on iOS but too bad I can’t. So Android it is!

I’m using MIT’s App Inventor to develop the Android app because it’s easy to learn and use. I was up and running in just less than 10 minutes. There are no learning curves because there’s absolutely no coding at all, just connecting blocks together.

fsscr000

Click on Invent, and create a new project.

You can drag desired items from the Palette to the screen. There are no logic involved yet, it will be done in the Blocks Editor.

There are already libraries such as Timer, Bluetooth, Accelerometer, Gyroscope and Twitter. It’s quite sufficient to build a useful app.

fsscr027

Launch Blocks Editor to establish the logic in the app.

fsscr026

Drag, drop and connect relevant blocks together to create the logic in the app. Absolutely no coding required.

Make sure to turn on USB debugging mode in your android device so that App Inventor can upload the app into your phone.

2013_12_07_02.52.59 2013_12_07_02.53.16

Click on Connect to Device and select your phone. The app should now be running in your phone.

2013_12_06_23.46.44

Here’s a video demonstration of the robot being controlled by the Android device.

Download link for both the Arduino and Android code.

Download

  1. Zx lee04-29-2014

    May I know how much weight does the robot able to lift?

    • Wai Hung04-30-2014

      Not much. Probably around 1kg.
      If you get a higher gear ratio of this micro dc motor, you might be able to lift heavier things.

  2. Rozaimi04-05-2014

    hye, do you have any tutorials on how to control the mobile robot using accelerometer sensor built in android phone? Thanks

  3. Rozaimi03-04-2014

    Hello, can I get the code for the android app? I already downloaded through your link given above but there is no file of app (.aia) in there.. Thanks

    • Wai Hung03-05-2014

      I’m using the first version of app inventor. Google app inventor beta and import the zip file there.

Leave a Reply to Zx lee Click here to cancel reply.