# Why do you have to use a voltage divider with HC-05 bluetooth module? (Arduino) [closed]

simulate this circuit – Schematic created using CircuitLab

I am trying to connect my bluetooth module to my Arduino but it takes 3.3 volts (the bluetooth module HC-05, The Arduino mega takes 5v) and the tutorials online say to connect the RX pin to the Ground with a voltage divider.

With a Arduino mega instead but it's still the same thing.

heres the Tutorial i'm following: https://www.youtube.com/watch?v=hyME1osgr7s

i'm not sure how it works but i don't understand because if i'v learned anything by playing around with electronics it would be that you should never connect positive voltage to GND. I mean it's not connecting 5v to GND but it seems like a bad idea i'm not sure. If someone could explain this that would be quite helpful. Could i just use a resistor from the RX from the Arduino to the HC-05, to make it 3.3v? Is RX and TX considered Positive voltage?

## closed as unclear what you're asking by Marcus Müller, Dmitry Grigoryev, Daniel Grillo, Bimpelrekkie, uint128_tJan 21 '17 at 19:36

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• please edit your question and include the schematic you're talking about. I don't think anyone wants to watch a youtube video, just to know what you're referring to. – Marcus Müller Jan 15 '17 at 19:33
• Also, when asking the same question on superuser.com You've been pointed to a misunderstanding, and you haven't addressed that, as far as I can tell. – Marcus Müller Jan 15 '17 at 19:35
• I decided to post this on the correct site for the question. – techset Jan 15 '17 at 19:39
• so, do you know what a voltage divider is? (Still, I'd prefer you add a real schematic, using the built-in schematic editor. I'm not asking you to do so out of meanness – it really helps your own understanding a lot if you make a schematic out of such a wiring diagram and label everything) – Marcus Müller Jan 15 '17 at 19:57
• as I said, yes. It has a button. That button looks like a diode, a capacitor, a resistor in parallel with a yellow pen. – Marcus Müller Jan 15 '17 at 20:39

I think you are missing many concepts here. Keep in mind that the HC-05 and the mega328 in arduino both use different voltage levels for representing information

## What is a logic level

Logic levels are the physical variables that represents the information content in any digital circuit. Assume your Bluetooth circuit is trying to send some information to the arduino. This information is encoded as a bit stream of 1 and 0 for example 1010101 this info is sent by changing the voltage level across the HC-05 Tx wire between the HC-05 allowed voltage levels which are 0V for a digital 0 and 3.3V for a digital 1. Even though the arduino logic levels are different [0V for a digital 0 and 5V for a digital 1] it would be able to read this data.

Take a look at the Mega328 datasheet

VIH = 0.6*5 = 3V this means that any voltage level more than 3V will be translated as a valid logic 1

So we dont need any thing on the arduino Rx line. Now take a look at the output high voltage of the arduino Uno

VOH = 4.2V this is higher than the operating voltage of the HC05 which is 3.3V. In this case one way to lower the voltage across the HC-05 Tx line would be using a voltage divider

## What is a voltage divider

Network of resistors that are used to scale the voltage by an amount which is determined by the values of the resistors in this network

where $$V_o = V_i *\frac{R_2}{R_1+R_2}$$

Now imagine the bitstream i mentioned earlier is being sent from the arduino to the BT module.

The upper waveform represents the arduino output, the voltage is altering between 5V and 0V to represent digital 1 and 0, while the lower waveform represents the divider network output. You can see that they are both synchronized but the divider output is altering between 3.3V and 0V

You might want to check Logic levels and Voltage dividers

• That animation adds very little in exchange for how annoying it is – Scott Seidman Jan 16 '17 at 0:13
• @ScottSeidman i agree ill replace it. – Elbehery Jan 16 '17 at 0:23
• thank you very much that definitely helps me understand, i will now connect my circuit confidently without thinking it will start smoking thanks. – techset Jan 16 '17 at 1:05

The output of the Arduino is a 0V - 5V logic level. The HC-05 needs a 0V - 3.3 volt logic level. The two resistors divide the 5V high level to create a voltage at the RX pin of $$2k / (2k+1k)* 5.0V$$ or 3.3 volts. The divider must be connected to ground in order to work. The Arduino will be able to read a 3.3v logic level correctly, so nothing needs to be done to the HC-05 output. See here for a discussion of voltage dividers.

• ok, thank you i will test my circuit tonight hopefully it works. – techset Jan 15 '17 at 21:11
• Appreciate that BobT said, "The Arduino will be able to read a 3.3v logic level correctly, so nothing needs to be done to HC-05 output" I was curious about why the Tx pin didn't need the divider and that answered it. Kudos! – raddevus Jul 31 '18 at 20:18