Skip to content
Jean-Paul PETILLON edited this page Nov 3, 2025 · 4 revisions

Arduino bluetooth code loader

UART signals (RX and TX)

First, the RX and TX signals are internally connected to the USB<=>UART adapter (a CH340 circuit in Arduino UNO chinese clones).

It is not feasible to connect the TX from the internal CH340 together with the TX from the HC-05. Luckily, the UART signal idle state is always high. So it is possible to connect two TX outputs together provided they are of open collector type, and that the two TX's don't emit together. A shottky diode is adequat to transform a totem-pole output into an open-collector one.

Second, the HC-05 logic signals have 3.3V levels (a priori not 5V-compatible) while the Arduino UNO generates 5V levels. A simple resistor was then inserted in the line from Arduino to HC-05. Combined with the ESD protection diodes at the input of the HC-05 clamps the signal to 3.3V.

Arduino reset signal

The reset circuit in an Arduino is a simple capacitor connected between the UART DTR signal and the MCU reset input. Combined with the pull-up resistor of the MCU RESET input, it forms a differentiator: When the DTR signals goes low, the falling edge is passed through the capacitor and activates the reset input.

The "STATE" signal behaves the same than a DTR signal: it is activated when the connection is established. However, this signal may be either active low or high. The default setting is active-high.

Some authors propose to change the setting for active-low (as the DTS signal) and use only a capacitor. This configuration suffers of paralleling the capacitor inside the Arduino with the external one, resulting in halving the signal magnitude (or worst, depending on the respective values of the capacitors).

I prefered to use an open collector transistor to increase the strength of the external RESET, while keeping the internal one operative (when the transistor is blocked, the internal RESET circuit is absolutly not disturbed).

Other circuitry

In the above schematic, one can see an MCP2515-based module. This is related to my project (CAN bus to bluetooth bridge), but has no relationship with the bluetooth code loader that is highlighted in this post.

Tests

On the one hand, the Arduino was connected to a laptop via an USB wire. On the otherone hand, the HC-05 bluetooth module was paired with said laptop. The blink example was uploaded successively via the two COM ports: the one over USB and the one over bluetooth. Both uploading worked well, without any interference betweens the RXs, TXs and RESETs circuitries.

Clone this wiki locally