• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

esp32 Bluetooth with external power

Q&A Forum › Category: ESP32 › esp32 Bluetooth with external power
0 Vote Up Vote Down
Manoj Jamsandekar asked 6 years ago

Hello,

I have a program which communicates with android phone over serial bluetooth. (SerialBT) of ESP32. When my ESP32 is connected with my laptop, the bluetooth communication works fine. Here also after uploading the program first time I need to open the Serial monitor and only after that I can connect with ESP32 bluetooth. However after that if I remove and replug the laptop cable the Bluetooth communication works without Serial monitor.

When I power my ESP32 through external power supply, I am unable to connect with it from my app.  I have checked the voltage supplied by the external power and it is providing 3.1V. I have tried pressing Enable button to reset the ESP32 but it has not helped either. Any inputs are appreciated.

My code is as follows.

#include "BluetoothSerial.h"
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif
BluetoothSerial SerialBT;
String t,h;
int tval, hval;
int thresholdH=0;
int thresholdT=0;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  SerialBT.begin("ESP32smarshoe"); //Bluetooth device name
  Serial.println("The device started, now you can pair it with bluetooth!");
}
void loop() {
  // put your main code here, to run repeatedly:
  t="T";
 h="H";
 tval=analogRead(34);
 hval=analogRead(35);
 t+=tval;
 t+="T";
 t+=hval;
 Serial.println(t);
 SerialBT.println(t);
 delay(200);
}

Manoj

Question Tags: ESP32
4 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Hello Manoj and thanks for posting your question.

I haven’t used BluetoothSerial with the ESP32, yet. I have that topic lined up to be added to the ESP32 as the next Unit/Module.

Which ESP32 development board are you using?

  • You need to provide 5V in the Vin pin or use a USB power source with 5V…
  • Alternatively, you can power the ESP with 3.3V directly in the 3.3V pin, but you can’t just supply 3.1V…
0 Vote Up Vote Down
Manoj Jamsandekar answered 6 years ago

Hello Rui,
Thanks for your prompt reply. I will try the alternatives you have suggested and revert back.
 

0 Vote Up Vote Down
Manoj Jamsandekar answered 6 years ago

Hi Rui,
Thanks for your inputs. The problem got solved by providing 3.1V in the 3.3V pin. It also works with 5V USB but we didn’t use that option. 
Thanks again.
Manoj
 

0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Thanks for letting me know, but the 3.3V should always be powered with 3.1V. I’m not sure what’s happening with your board, but I’m glad it’s working. I’ll mark this thread as “Resolved”. Regards!

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.