I am working on circuit that will allow me to program my Arduino boards (I have an Arduino Uno and a couple of Arduino Pro Minis) over a wireless Bluetooth connection. I am planning to use my cheap and easy to find HC-06 Bluetooth module  for this. One of the first thing to figure out is the baud rate that the Arduino IDE uses, when uploading the sketches to the various Arduino boards. I need to make sure that my HC-06 Bluetooth module is configured to communicate at the same rate, so the avrdude stays happy.

I bit of research online revealed the following:

  • On the computer side the baud rate is specified in the Arduino IDE configuration files, and more specifically in boards.txt.
  • On the micro-controller side, the baud rate is coded in the specific bootloader, used by the board.

A looked through the boards.txt file and here is what I found:

<td width="114">
  <strong>IC</strong>
</td>

<td width="126">
  <strong>Upload Speed</strong>
</td>
<td>
  ATmega32u4
</td>

<td>
  57600
</td>
<td>
  ATmega328p
</td>

<td>
  115200
</td>
<td>
  ATmega328
</td>

<td>
  57600
</td>
<td>
  ATmega168
</td>

<td>
  19200
</td>
<td>
  ATmega328p
</td>

<td>
  57600
</td>
<td>
  ATmega168
</td>

<td>
  19200
</td>
<td>
  ATmega2560
</td>

<td>
  115200
</td>
<td>
  ATmega1280
</td>

<td>
  57600
</td>
<td>
  ATmega32u4
</td>

<td>
  57600
</td>
<td>
  ATmega32u4
</td>

<td>
  57600
</td>
<td>
  ATmega32u4
</td>

<td>
  57600
</td>
<td>
  ATmega328p
</td>

<td>
  115200
</td>
<td>
  ATmega168
</td>

<td>
  19200
</td>
<td>
  ATmega328p
</td>

<td>
  57600
</td>
<td>
  ATmega328p
</td>

<td>
  57600
</td>
<td>
  ATmega328p
</td>

<td>
  19200
</td>
<td>
  ATmega168
</td>

<td>
  19200
</td>
<td>
  ATmega168
</td>

<td>
  19200
</td>
<td>
  ATmega8
</td>

<td>
  19200
</td>
<td>
  ATmega32u4
</td>

<td>
  57600
</td>
<td>
  ATmega328p
</td>

<td>
  57600
</td>
<td>
  ATmega168
</td>

<td>
  19200
</td>
Board
Arduino Yun
Arduino Uno
Arduino Duemilanove
Arduino Duemilanove
Arduino Nano
Arduino Nano
Arduino Mega
Arduino Mega
Arduino Leonardo
Arduino Micro
Arduino Esplora
Arduino Mini
Arduino Mini
Arduino Pro Mini (5V, 16 MHz)
Arduino Pro or Pro Mini (3.3V, 8 MHz)
Arduino BT
Arduino BT
Arduino NG
Arduino NG
Arduino Robot
LilyPad Arduino
LilyPad Arduino

It seems that I need to use 115200 for my Uno and 57600 for the Arduino Pro Mini.

Comments

Comment by Ruvian on 2020-02-11 18:27:14 -0700

Beware using these modules, as they don’t even check for flipped bits over the communication. I’ve used hc-06 and I do get sometimes a bit flipped. I fixed my project by resending the data over and over again. Your program might get corrupted and will need to upload once again.