Teensy 4.1 and HC-05

RobotMan

Member
Hi everyone,

I am pretty new to teensy and I just tried to connect my teensy 4.1 to an HC-05 to connect it to my android. I am using the app "Arduino BlueControl." I connected RX to pin 7 and TX to pin 8 (I also tried the reverse), but I am getting no response on the app terminal. Here is my test code. Any help would be appreciated.

Yehuda Tager

void setup() {
Serial2.begin(9600);
}

void loop() {
Serial2.println("hello");
delay(100);
}
 
Hi Yehuda,
Just checked your code on a Teensy 4.1 & HC-05 module and it is working fine.
Teensy pin 7 connects to HC-05 pin TXD, pin 8 to pin RXD.
Do you power the HC-05 by 3V3 like I did? And did you pair it?
Does the LED flash on your HC-05 module?

Here is my setup and Android terminal program output:

IMG_20200824_201026.jpg

Screenshot_20200824-200608.png

Paul
 
Thanks so much for helping me out. Yes I did power the HC-05 with 3.3 volts (from the output of the teensy, so it should be regulated nicely). The light was blinking with 2 quick flashes, then a pause. What does pair it mean? The app on the phone did say that it was connected to HC-05.
 
With pair I meant Bluetooth pairing. But you did that obviously.
The 2 quick flashes are shown when a program connects to the HC-05 module.
Perhaps you should try the app I used? Serial Bluetooth Terminal

Paul
 
Hi Yehuda,
Just checked your code on a Teensy 4.1 & HC-05 module and it is working fine.
Teensy pin 7 connects to HC-05 pin TXD, pin 8 to pin RXD.
Do you power the HC-05 by 3V3 like I did? And did you pair it?
Does the LED flash on your HC-05 module?

Here is my setup and Android terminal program output:

View attachment 21462

View attachment 21463

Paul

I tried the same but the bluetooth did not power up. It's the same model and they have mentioned that the voltage range for the input is 3.6v to 6v. The output is gonna be around 3.3v. I was able to power up using 5v and gnd. However I am scared that my current would be too much for the gpio pins.
Below are the measured reading from a multimeter.
Powered Up with 5V and gnd:

Output (TX, Voltage): 3.1V
Output (TX, Current - Pairing Mode): 35mA

I believe RX would be within limits as it's transmitted from Teensy.

Do you want me to add a resistor in series to avoid sinking too much current into the input pin?
I also want to know if I can use 0,1 in teensy as its also a UART Pin Set?

Front.jpg
Back.jpg
 
Output (TX, Voltage): 3.1V
Output (TX, Current - Pairing Mode): 35mA
That voltage measurement I understand, but the current measurement I do not understand at all.
How did you actually measure that current? Does this current actually flow from the HC-05 TX pin into the Teensy pin?
Can you show us a photo of your current measurement?

Paul
 
Current.jpg
Closeup.jpg

The yellow wire is the common ground and tx is the blue wire (Fourth pin from the right as shown in the picture). It keeps changing from 25 to 30 or 35 mA.
 
I'm not sure I see all wires correctly but are you shorting the HC-05 TX pin to GND with a current meter in series?
That case you are measuring the maximum output current the module can supply. Why would you do that?

Paul
 
I wanted to check if the current that flows to the RX pin of Teensy is within range. Am I wrong? Just to be safe I wanted to check the current and voltage supplied through the tx pin. If the current is high I thought of putting a resistor in series before connecting to teensy gpio. Please let me know if my understanding is wrong.

Red wire is 5V and black is GND of the teensy pin. Blue is TX of HC 05 which should be connected with RX of Teensy. The RX pin of HC05 was not connected in that picture.
 
The HC-05 TX pin is an output for a digital signal ranging between ~0V (low) and ~3V3 (high). It's not meant to output any significant current. The actual current flowing from that TX pin into a high-impedance Teensy input pin is in the micro-amp range. No series resistor needed.
Please don't short it out; you may kill the HC-05 module!

And to answer your other question: yes, you can use Teensy serial pins 0 &1. You have to change your software from Serial2 to Serial1.

Hope this helps,
Paul
 
Back
Top