Subscribe to Make Magazine Today!



If you’ve ever wished you could program your Arduino without lugging a USB cable around, wanted to put an Arduino project somewhere out-of-reach but still be able to easily upload changes to it, thought about building a project that interfaces with an Android phone, or contemplated a way to get remote sensor data streamed to your computer — this project is for you.

It uses a common, low-cost Bluetooth module mounted onto a prototyping shield for durable and reliable use. Along with the module is a circuit that allows the Arduino IDE to automatically reset the Arduino when uploading a new sketch. This project also uses the latest version of the Arduino IDE which eliminates the need to hack in modified DLL files to get the serial programming to work.

Besides uploading sketches, the shield can be used for serial communication using the standard Arduino Serial library between multiple Arduinos, smartphones, computers, or even a Bluetooth-enabled Raspberry Pi.

You will need a computer with built-in Bluetooth or a USB Bluetooth dongle to use the shield to upload sketches to your Arduino. These instructions are specific to Windows 7, but should be similar for Windows 8.  Mac and Linux users can probably figure out how to get this working too. Smartphones need to support Serial Port Profile (SPP) to work (this excludes iPhones but includes many Android phones). This project is moderate to difficult, and requires soldering and previous prototyping experience.


Step #1: Install the latest, beta version of Arduino.

DIY Arduino Bluetooth Programming Shield

The current beta version of the Arduino IDE has fixed some of the issues that made Bluetooth programming difficult in the past. The most current version available today is Arduino 1.5.6-r2.

You can download the installer from:

Step #2: Breadboard the Bluetooth module setup circuit.

DIY Arduino Bluetooth Programming ShieldDIY Arduino Bluetooth Programming ShieldDIY Arduino Bluetooth Programming Shield
  • The Bluetooth module used in this project is the HC-05. It is inexpensive and one of the most common modules you'll see in a lot of other projects. The HC-05 is sold bare or mounted to a breakout board. You want one on a 6-pin breakout board. You can find them for sale on eBay and Amazon. The datasheet for the module is here.
  • Using a breadboard, temporarily wire the HC-05 Bluetooth module per the schematic.
  • With 3.3v on the Key pin, the module will enter 38400 baud command mode and will accept AT commands. The Key pin must be connected to 3.3v when the module is powered on. If it is connected afterwards, the module will enter command mode at the default baud rate (as set by the 'AT+UART=' command or 9600 baud from the factory).

Step #3: Upload the setup sketch

DIY Arduino Bluetooth Programming Shield

Get the sketch from here and upload it to your Arduino.

Step #4: Run the setup sketch and enter serial commands.

DIY Arduino Bluetooth Programming Shield
  • Open the serial console and make sure the baud rate is set to 9600 and line endings is set to be "Both NL & CR"
  • Enter the following AT commands into the serial console.
    In order, these commands tell the module to reset to factory settings, switch to slave role (transparent serial bridge), set pin 32 low on Bluetooth connection, change baud rate to match the Arduino Uno programming rate, and to initialize.
  • Disconnect 3.3v from the Key pin and cycle the power to the module. It will now be running at 115200 baud and be in pairing mode.

Step #5: Setup the Bluetooth module in Windows.

DIY Arduino Bluetooth Programming ShieldDIY Arduino Bluetooth Programming ShieldDIY Arduino Bluetooth Programming ShieldDIY Arduino Bluetooth Programming Shield
  • From the Control Panel select Add a Device.
  • Add the Bluetooth module.
  • Select enter pairing code option.

Step #6: Setup the Bluetooth module in Windows (cont'd).

DIY Arduino Bluetooth Programming ShieldDIY Arduino Bluetooth Programming ShieldDIY Arduino Bluetooth Programming ShieldDIY Arduino Bluetooth Programming Shield
  • Enter "1234" for the pairing code.
  • At the Add a device success window, click Close.
  • Device ready to use. The OS will create two serial COM ports associated with the device. Always use the one with the lower number.

Step #7: Solder a jumper onto the Bluetooth module.

DIY Arduino Bluetooth Programming Shield
  • Disassemble the breadboarded circuit. Solder a jumper wire directly to the HC-05's Pin 32.
  • Don't forget to use flux.
  • You may want to use hot glue or tape to protect the joint.

Step #8: Build the programmer circuit.

DIY Arduino Bluetooth Programming ShieldDIY Arduino Bluetooth Programming ShieldDIY Arduino Bluetooth Programming Shield
  • Build the programmer circuit onto the prototyping shield.
  • Solder on a female header for the Bluetooth module if you want to be able to easily remove it later.

Step #9: Program the Arduino With Bluetooth!

DIY Arduino Bluetooth Programming Shield
  • Power on the Arduino from a battery or AC adapter.
  • In the Arduino IDE, choose the serial port of the Bluetooth module (the lower valued one of the two) and then upload a sketch like normal.
Joshua Newell

Joshua Newell

Joshua Newell is a software developer by day, and an electronics and embedded systems enthusiast by night.

  • Sidhant

    Is it possible to program the Arduino Mega with the same procedure.

    • Zootalaws


  • Stan

    Nicely done! One question – I assume with this set-up every time we try to send data to the Arduino over Bluetooth the board will be reset, correct? In other words, the Bluetooth module can only be used to program the Arduino, but will not be usable to send data from or to the board?

    • Dushyant Ahuja

      You can use the module to send data to the module – it resets only when it gets connected. You just have to start the serial port at 115200 bps.

      • Michele

        Do you need to change module settings to use it as a communications port, rather than as a programming interface?

        • Zootalaws


          I loaded (over BT) a sketch that did a serial echo and once it loaded, I loaded the IDE serial monitor and it happily echoed back everything I typed over BT.

          One major difference is that you will be using the ‘native’ hardware uart0 for serial, not software serial for BT traffic. So instead of defining the serial port with SoftwareSerial mySerial(rxPin, txPin); and mySerial.begin in void setup, you just need to Serial.Begin in void setup.

          • Michele

            Great! Thank you so much for the prompt answer!

    • Zootalaws

      I thought that would be the case, but it doesn’t.

  • Joseph

    This helped a lot .However, I didn’t need resistor 3 to get this to work. Actually, if i included R3 the circuit wouldn’t work. I am assuming that R3 will constantly output a HIGH to the arduino reset pin and will never rest.

  • Joseph

    Also, I didn’t need to solder a jumper wire to the HC-05. I just used the STATE pin on the HC-05, which happens to connect to Pin 32.

  • gugus

    Hello, I would like to know if this is safe, can the arduino be damaged (unable to upload new sketches) in case there are interferences while uploading (missing or corrupted data) ? In the Arduino IDE there is option “Check code after upload”, I suppose this might help detect upload errors, but does it work with BT? Thanks ;)

  • Fernando Mattoso Lemos

    How to configure HC-05 to program Arduino Leonardo via bluetooth ?

  • Biplab Roy

    Thanks for the Project. I have two questions.
    1. Do I need 2 ATMEGA328 chips? one in the BT programming shield & the other one is TARGET chip?
    2. Why the KEY pin is shorted & disconnected? What is the need of connecting & disconnecting the KEY pin with 3v3 pin?
    Any help shall be appreciated.

    • Joshua Newell

      1. no
      2. shorted=command mode, floating=transparent relay mode

  • Brian Impellizzeri

    Thanks a bunch for this page I connected the 3.3vpin and key pin together and removed the level shifting resistors and finally got at commands on HC-06!

  • Markus Eglin

    I had to use Baud rate of 57600 to program with Arduino 1.5.7 and Seeeduino.
    With the Baud rate 115200 it didn’t work.

    • Zootalaws

      Correct – the default for the 328P-based Arduino’s is 57600, I believe.

  • Jian Li

    the bluetooth module is always paired to the computer as a bluetooth device and is not assigned a port. How do i assign it to a port?

  • Aidas Zarskus

    Spent 2 evenings trying to replicate – no luck.
    Have perfectly operational and setup per instructions HC-05
    Get connection (slow blink) when sending sketch to the board
    But it is either “programmer not responding”, or “not in synch” errors
    At some point was able to upload sketches 2 times in a row (miracle!), but had to unplug the ground resistor (15k) to get board running, as it would remain in reset mode, I believe.
    Tried different values of divider bridge, and capacitor, to no avail.
    Anybody else have it working reliably?

    • ammy

      some time ago I was trying to look for out how to program the arduino wirelessly, I have found this, maybe this can help.

    • Zootalaws

      Yes, it works, as described in the instructions, perfectly.

      The trick is to follow the instructions to the letter – don’t try and take any short cuts.

      I was getting nowhere until I started talking it over with someone else and he pointed out a few things I was missing… my enthusiasm overriding my ability to read, it seems :)

      In essence, there are two distinct phases to making this work: The ‘programming the bluetooth module’ phase – where you wire it up and load the sketch that allows you to configure the BT module in command mode. Then there’s the ‘loading the sketch over bluetooth’ mode, where you rewire your circuit for programming over BT.

      In my case, the ‘gotcha’ was not noticing that after the first phase, you had to move the TX and RX from the pins used to setup the bluetooth module to pins 0 & 1 of the hardware UART used to program the sketch wirelessly. You have to wire the BT module to pins 0 and 1 for it to work – the bootloader is expecting to sync using the hardware UART.

      I also didn’t have all of the components needed, like the rating of resistors and 100 picofarad capacitor in the diagram, but I substituted 3.3kohm and 5.1kohm resistors and a 220 picofarad electrolytic and it still worked, so the circuit is forgiving.

      I have loaded everything from ‘blink’ to the full 30k of Ardupilot over BT reliably.

      • Joshua Newell

        Thanks for helping people out here!

        • Zootalaws

          Thank you! You did all the heavy lifting, I just had to RTFM :)

    • Claudio Aguila

      Same problem. The error mesage is “avrdude: stk500_getsync()….”

  • techietav

    Thanks for this info.. I used a HC06 and soldered a wire to the STATE header (which did not have a pin) It doesn’t work on the HC-06 as there is only the STATE which pulses while disconnected in AT mode and then stays on when connected. Tried creating a simple circuit using a low pass filter to smooth the pulses and then a NPN transistor to pull the RST low, this works, but holds it low the whole time connected. Might have to get a HC-05 instead..

    • techietav

      An update to say after trying unsuccessfully to flash a HC-06 with HC-05 firmware (which is possible). I bought a HC-05 connected up as per instructions and it works perfectly! THANKS

      • Zootalaws

        What did you use to try to reflash the HC-06?

    • Zootalaws

      It does work on the HC06 – don’t use the ‘state’ pin, but follow the instructions and solder to the Pin34 of the HC module.

      • techietav

        Tried that, but the pin doesn’t stay low when connected as the module doesn’t accept the POLAR command to invert the pin 34 state. It goes high which is the default.

        • Zootalaws

          What exact module do you have?

          The ‘Hc-05′ and ‘HC-06′ designations are loosely attributed by every various Chinese assembler with access to a firmware tool. In reality, HC-05 and HC-06 are model numbers of Linvar Ltd. I’ve seen about three or four different firmwares with variations on the AT command set. I have 10 with the most awful limited firmware that I will be re-flashing as soon as I have the correct tool. The command set on that is limited to setting the UART and password.

          If it was an actual 05 or 06, it would accept the POLAR command. Maybe it was based on another chip other than the CSR-BC417 chipset?

          • Mikolaj.K

            Hey, I have a problem ’cause AT on Arduino doesn’t working. None confirmations from Ardu.

          • Sarchasm

            Not enough information to answer that

          • Mikolaj.K

            I don’t know what is important.

          • Sarchasm

            What have you done so far? What kind of Arduino board are you using? What connections have you made? What are you using to connect to the Arduino? Do you get any sort of indication that you are connected correctly?

            Simply: If you follow the instructions above to the letter, it works – so work through the instructions one step at a time and make a note of what works – when you reach a step that doesn’t work – come back and tell us what is wrong.

            There are two distinct stages of getting this to work. The first step is to set up the Arduino to talk to the BT module so you can program it.

            That includes loading a sketch that sets up the serial pins, wiring up those pins to the BT module, powering the pin on the BT module to set it in command mode, connecting your PC to the Arduino to connect to the BT module in command mode.

            Once the BT module is programmed correctly, you have to wire it up to act as the programming interface, using serial pins 0 and 1 (1&2, depending on how you number them).

        • Zootalaws

          PS – I have a module where the ‘state’ pin is actually tied to PIO2 – pin25. You never know until you find a supplier that gives you a consistent product that you can trust.

        • Zootalaws

          FWIW, I just checked my ‘good’ HC



  • keven

    You can buy Bluetooth shields, Bluetoothduino, Bluetooth adatper here:

  • Guest

    I followed every step, but cant upload sketches. It says that COM-port is in use.

    Also when I check devices in configurationscreen. It says bluetooth disconnected.

  • Marijn

    Is it possible to program just the atmel328p chip with this procedure?

  • jb

    Good afternoon.
    Can I request for the whole details of this project? The schematics and the sketch if thats ok with you?
    Thanks. More power!

  • Sujeet Banerjee


    Baudrate set using AT+UART is a critical piece (Step 4), which if done incorrectly will lead to avrdude: stk500_getsync(). The baudrate somehow depends on the Arduino/Processor.

    Arduino Uno: AT+UART=115200,0,0
    Pro Mini: AT+UART=57600,0,0

    In case you hit, stk500_getsync() while sketch upload via bluetooth, Check out how the Arduino Software loads it using a USB/FTDI. Go to preferences and turn ON verbose mode for compile and upload. This will show you what baudrate is expected for a particular make.

    And, after lots of experimenting I found out, the level-shif resistors’, capacitor values are really not rigid. Just ensure that the resistor to ground should be at least 1.5 times of the one to Vcc.