science tinker

Bluetooth module (HC-05)

A small radio that links a microcontroller to a phone or laptop over Bluetooth: whatever one side sends as serial text arrives at the other.

Boards and wiring · Elements inside: SiCuOC

Function: what the HC-05 does in a circuit

A small radio that links a microcontroller to a phone or laptop over Bluetooth: whatever one side sends as serial text arrives at the other.

  • Links a board to a phone by Bluetooth
  • Carries serial text both ways without a cable
  • Lets a phone control robots and lamps

HC-05 key facts

Supply3.6 V to 6 V on VCC
Logic level3.3 V (use a divider on RXD)
Default speed9600 baud
Pairing code1234 (or 0000)
Rangeabout 10 m
PinsSTATE, RXD, TXD, GND, VCC, EN
LibrarySoftwareSerial

HC-05 pinout

The legs from left to right, as the part is drawn in the simulator:

No.Name
1STATE
2RXD (data in)
3TXD (data out)
4GND
5VCC (5 V)
6EN

How it works

The module is a "wireless serial cable". Its TXD pin sends what the phone typed and its RXD pin takes what the sketch prints, at 9600 baud unless you change it. Because the Uno has only one hardware serial port, sketches use the SoftwareSerial library on two other pins: SoftwareSerial bt(2, 3) with the module TXD on pin 2 and RXD on pin 3. The wires cross: the sender on one side goes to the receiver on the other. The red LED blinks fast while it waits and slowly once a phone is paired (the default code is 1234).

What it is made of

  • Radio chip: Silicon Bluetooth chip (2.4 GHz) Si
  • Antenna: A zig-zag copper track on the board Cu
  • Board: Glass-fibre and epoxy circuit board SiOC

Where the materials come from: Silicon from quartz sand; copper from ores such as chalcopyrite; gold for the pad plating from gold mines.

The chemistry

The radio waves at 2.4 GHz are the same kind as Wi-Fi and microwave ovens use: electromagnetic waves about 12.5 cm long.

Biology connection

Nerves also carry messages as timed pulses along a line, one after another, much as serial data travels down a wire. Nerve impulses →

Safety and the environment

Power VCC from 5V, but the RXD pin is a 3.3 V input: on a real module put a voltage divider (1 kΩ and 2 kΩ) between a 5 V Arduino pin and RXD. Both sides must use the same baud rate, or the text arrives as rubbish.

Did you know? Bluetooth is named after Harald "Bluetooth" Gormsson, a tenth-century king who united Denmark and Norway; its logo joins the runes for H and B.

Try it in the simulator

Build and code a circuit with a Bluetooth module in these practice projects:

Questions students ask

What does the HC-05 do?

A small radio that links a microcontroller to a phone or laptop over Bluetooth: whatever one side sends as serial text arrives at the other. Main functions: links a board to a phone by Bluetooth; carries serial text both ways without a cable; lets a phone control robots and lamps.

How do I connect an HC-05 to an Arduino Uno?

VCC to 5V, GND to GND, TXD to pin 2 and RXD to pin 3 (through a 1 kΩ and 2 kΩ divider on a real board). In the sketch use SoftwareSerial bt(2, 3); and bt.begin(9600); then read with bt.read() and send with bt.print().

What are the connections of the HC-05?

In order: STATE, RXD (data in), TXD (data out), GND, VCC (5 V), EN.

How does the HC-05 work?

The module is a "wireless serial cable". Its TXD pin sends what the phone typed and its RXD pin takes what the sketch prints, at 9600 baud unless you change it. Because the Uno has only one hardware serial port, sketches use the SoftwareSerial library on two other pins: SoftwareSerial bt(2, 3) with the module TXD on pin 2 and RXD on pin 3. The wires cross: the sender on one side goes to the receiver on the other. The red LED blinks fast while it waits and slowly once a phone is paired (the default code is 1234).

What is the HC-05 made of?

Radio chip: Silicon Bluetooth chip (2.4 GHz). Antenna: A zig-zag copper track on the board. Board: Glass-fibre and epoxy circuit board.

Is the HC-05 safe? How should it be recycled?

Power VCC from 5V, but the RXD pin is a 3.3 V input: on a real module put a voltage divider (1 kΩ and 2 kΩ) between a 5 V Arduino pin and RXD. Both sides must use the same baud rate, or the text arrives as rubbish.

More boards and wiring

Know someone who would use this?

It’s free for every learner. Send it to your class, team or club.

Updated · Free, no sign-up ·

Connected tools

The same idea from another angle, across the site.