loading

Introduction

If you have been looking for an easy and inexpensive way to wirelessly integrate an Arduino and a BeagleBone Black (BBB), or Raspberry Pi (RPi) look no further, this tutorial will show you how!

What You Will Need

  1. A BeagleBone Black Microcontroller with the Debian 2014-05-14 image installed or RPi with wheezy installed.
  2. An Arduino Mirocontroller.
  3. An HC-06 Bluetooth Slave Module.
  4. A Plugable USB-BT4LE Bluetooth 4.0 USB Adapter
  5. Three 1k Ohm resistors.
  6. A copy of the PyMata software library, version 1.58 or greater.
  7. An external 9 volt power source for Arduino.
  8. An external 5 volt power source for BeagleBone Black or RPi.

Step 1: Using the Arduino to Program the HC-06 for 57600 BPS

Why Change Speed?

The HC-06 has a default baud rate of 9600 bps. Since we will be running PyMata on the BBB to control the Arduino, we will need to change the speed of the HC-06 to 57600.

Wiring Up - Preparing to Program the HC-06

Wire the HC-06 as shown in the illustration above with the following temporary exceptions:

  1. The blue wire that's connected to pin 1 (TxD) of the Arduino in the diagram, should be moved to Pin 4.
  2. The yellow wire connected to pin 0 (RxD) of the Arduino, should be moved Pin 3.

3.3 Volts?

Make sure that you connect the HC-06 VCC pin to the 3.3 volt pin of the Arduino, since the HC-06 is a 3.3 volt device. Also, make sure that you create the voltage divider using the three 1k Ohm resistors. The divider is needed because Arduino output pins provide 5 volts and not the 3.3 volts the HC-06 require. If you were to connect the Arduino TxD pin to the HC-06 RxD pin without the divider, you might damage the HC-06.

Ready, Set, Program !

Others have written articles about programming the HC-06, and so as not to duplicate their fine efforts, here are 2 excellent links:

The first reference provides a link to a sketch that I used to program my HC-06.

HC-06 Bluetooth Module – Getting this sucker into AT Command Mode

Modify The HC-05 Bluetooth Module Defaults Using AT Commands

Once the programming is complete and you are satisfied with its success, return the blue and yellow wires to their original positions as shown in the illustration. Also, disconnect the USB cable from the Arduino and power the Arduino with an external 9 volt power source. This is to prevent having a signal conflict between the USB interface and the HC-06 device for Arduino pins 0 and 1.

About This Instructable

14,325views

48favorites

More by MrYsLab:Wireless Arduino Control Using the BeagleBone Black or Raspberry Pi Going Beyond StandardFirmata - Adding New Device Support The Snap!Mobile - Start Your Physical Computing Engines! 
Add instructable to: