GPS Neo 6M not working with ESP32

I am beginner to this tech and i wanted to use ESP32 with Neo6M (GY-GPS6MV2) model but i can not connect it.

This is my connections :
VCC -----> 3.3v from esp32
GND ----> GND of esp32
Rx -------> GPIO 17
Tx -------> GPIO 16

This is my code :

#include <SoftwareSerial.h>

SoftwareSerial gps(16,17);
void setup()
{
 Serial.begin(115200); 
 gps.begin(57600); 

}

void loop()
{
 if (gps.available())  Serial.write(gps.read());
}

I also tried many codes and tried printing gps.avaliable(). I got false and i read in forums that to wait for some time. so I waited patiently for around 30mins but still i get gps.avaliable() as false and still got no data in my serialmonitor.

PS : Initially i connected the vcc of the gps to 5v output from the esp32 and i have a confusion in this also

Please help me

Do not power the sensor from the esp32, use a dedicated power supply.

is there any possibility that i fried my Neo 6m module by connecting with 5V of the esp ? but my neo 6m module doesn't even heat up

Consult the technical specs for your module.

It is hard for us to provide any definitive answers without knowing the exact module you have (there are likely many different variants of the modules from the various Chinese manufacturers of such things, all advertised and marked under similar names), but the one I found after a quick Google search said:

  • Input Supply Voltage Range: 3.3V-6V, on board voltage regulator maintains 3.3V

This is the model I have https://www.electronicscomp.com/neo-6m-gps-module?gad_source=1&gclid=EAIaIQobChMIj8bxhOTjiAMVzqRmAh1F9xDiEAQYASABEgLd0_D_BwE

Unfortunately that seller doesn't provide much technical information.

From this statement:

  • Supply voltage: 3.3 V

We might infer that VCC must be 3.3 V. However, I do see what appears to be a voltage regulator on the board in the product picture, just the same as on the module I found that specifies 3.3 -6 V:

image

Thanks a lot.. This means that I didn't fry up my Gps module. Then what could be the problem why I am not getting Serial data from the GPS module. Any solutions ?

Why are you using SoftwareSerial rather than hardware Serial1 or Serial2?

Example of hardware Serial2 on the ESP32. Other pins can be selected.

//DEV MODULE selected for ESP32-CAM
// works as expected with UART2, RX=14, TX=15
#include <HardwareSerial.h>
HardwareSerial SerialPort(2); // use UART2
void setup()  
{
  Serial.begin(115200);
  while (!Serial);
  Serial.println("Serial test");
  SerialPort.begin(115200, SERIAL_8N1, 14, 15); 
} 
void loop()  
{ 
  while (Serial.available()) {
    SerialPort.write(Serial.read());
  }
  while (SerialPort.available()) {
    Serial.write(SerialPort.read());
  }
}

Thanks for your code and time but still not working.

I used HardwareSerial too but no response from the GPS.

The GPS receivers that I have had all seem to use 9600Bd as the default baud rate.

Have you tried 9600 baud?

Here is your code (modified for the pins my GPS receiver is connected to) working at 9600Bd:

1 Like

My GPS module has Configurable Baud from 4800 Baud to 115200 Baud rates and 9600 being the default. I tried all the Baud rate combinations but nothing works

Unless you have successfully reconfigured the baud rate then it will still be at the default value.

How to reconfigure it? Even though my GPS doesn't work in 9600 baud rate

As far as I know, you can't reconfigure it unless you can communicate with it at it's current baud rate. That is why I suggested it is still at the default value.

The fact that you are asking how to reconfigure it reinforces my supposition that it is still at the default setting.

Install u-center (not u-center2) from ublox site.
Select "auto baudrate" (or something like that) in the menu.
You need a usb-ttl module to connect the gps with your pc.

Perhaps it's a fault in the bread board. I know I damaged one of my bread boards by pushing the header pins of an ESP32 into it. I've also helped with remote fault finding which turned out to be a dupont jumper cable being open circuit.
If you have a continuity tester, or a multimeter with resistance range, then with no power applied, check for ~0 Ohms between each of the pairs A1-A2, B1-B2, C1-C2, D1-D2. If you have a multimeter put in on the volts range and check you have 3.3V between D2 and A2 when power is applied.

The device pictured is NOT a Nano ESP32 !

That should be established from Post No.2 - if not Post No.1

1 Like

Looks like you forgot to change the pin numbers. The photo shows connections to pins 16 and 17, the code is for 14 and 15.