Introduction: Correct Arduino UNO Bluetooth

Picture of Correct Arduino UNO Bluetooth

This little Instructable is a spin-off from our Creative Robotix instructable project. We needed a way to conveniently communicate with an Arduino UNO/MICRO/NANO using the hardware Serial via Serial Bluetooth, but without interfering with the Arduino programming cycle, using the standard Arduino Bootloader. We also wanted to respect the Bluetooth modules signalling levels of 3.3 volts. We came up with a straightforward solution using a voltage divider to deal with the transmission voltages from the Arduino and a simple 'bus' like solution using a transistor to manage the two serial receive lines between the hardware UART on the Arduino and the Bluetooth module.

Required parts:

  • Arduino UNO / Micro / Nano
  • HC-05/06
  • 2 10K resistors
  • 1 20K resistor
  • 1 2N222A transistor (or virtually any other NPN transistor)
  • 5 patch wires
  • 1 cable tie
  • Basic assembly tools, and if preferred, some electrical tape for insulation

Estimated build time, 10 minutes.

Step 1: Wire-up the Voltage Divider...

Picture of Wire-up the Voltage Divider...

The Bluetooth module we are using, the HC-05/06, operates on 3.3 volt signalling, the Arduino board we are using operates on 5 volt signaling. The 3.3 volt transmissions from the Bluetooth module to the Arduino are fine, in 5 volt logic a logic 1 is seen as a voltage greater than 2 volts, so we're all good. However, the 5 volt transmissions from the Arduino to the Bluetooth module may cause very bad things to happen to the RX input, over driving the input potentially causing damage, so we need to regulate these transmission voltages down to an acceptable level. This can easily be achieved with a 'voltage divider'. In this case we need to bring 5 volts down to 3.3 volts, so we need a 20K resistor across the modules RX input to ground and a 10K resistor from RX the input. The RX input resistor will connect to the the TX output on the Arduino Uno.

Notes:

  • How to 'read resistor values'
  • The 20K resistor will be banded red, black, orange
  • The 10K resistor will be banded brown, black, orange

Step 2: Prepare the Transistor...

Picture of Prepare the Transistor...

We need to create a 'bus' line for the serial TX output on the Bluetooth module, this will allow us to have the Bluetooth module and the USB serial device connected together at the same time. To implement this 'one line bus' we need to use a transistor. Here we use one PNP, 2N222A, transistor and a 10K base input resistor.

Step 3: Attach the Transistor to the Bluetooth Module, Wire-up and Test.

Picture of Attach the Transistor to the Bluetooth Module, Wire-up and Test.

Using the long nosed pliers connect the transistors Emitter to the Bluetooth modules TX output. Ensure there are no short circuits. Strip off a group of 5 wires from a main patch cable set and connect to the Bluetooth module. Loop back and secure the cable with a cable tie. The unconnected transistor leg connects to the RX input on the UNO and the base resistor on the transistor connects to the RX enable line on the UNO, we use Pin 12.

Test using the attached script, with Pin 12 activated you can send and receive on both the USB and Bluetooth serial without interference.

Wiring in the picture:

  • Orange wire is +5 Volts
  • Yellow wire is GND
  • Purple wire connects to the base resistor connected to the transistor and is the activation line to Pin 12
  • Blue wire connects to the RX resistor on the Bluetooth module and to the TX output, Pin 1, on the UNO
  • Green wire connects transistor leg on the Bluetooth module and to the RX input, Pin 0, on the UNO

Comments

Samithawaba (author)2016-12-13

thank you very much for sharing.

so once I do all of that and upload the code, can I control the Arduino via mobile bluetooth ? I did not quite understand what are the final results, please explain.

You're welcome.

Yes, that's right, this will let you connect any device that supports Bluetooth to the Arduino.

The novelty to this instructable is that it allows you to share the hardware serial on pins 0 and 1 without interference. Which is good, especially if your project can't use the software serial (like ours) or you you can't spare the additional pins a software serial takes up (again like ours).

If you can use software serial, then you don't need the transistor.

About This Instructable

877views

17favorites

License:

Bio: The Creative Science Foundation (CSf) is a nonprofit organization, dedicated to the exploration and promotion of creative methods for supporting science, engineering, business and sociopolitical ... More »
More by Creative Science:Creative Robotix - Science Fiction Prototyping - TimEE Creative Robotix - Educational Platform - TimEECreative Robotix - Educational Platform - 3DP
Add instructable to: