NEO-6M GPS Module and ESP 32 Pico Kit V4.1 Serial port information not displaying in Arduino IDE

knightridar
Posts: 32
Joined: Sun Nov 25, 2018 10:05 pm
Contact:

NEO-6M GPS Module and ESP 32 Pico Kit V4.1 Serial port information not displaying in Arduino IDE

Postby knightridar » Thu May 27, 2021 6:48 am

NEO-6M GPS Module and ESP 32 Pico Kit V4.1 Serial port information not displaying in Arduino IDE

Hi, I've been trying to use simple sample code found online to display GPS information via the NEO-6M Gps module and it communication with the serial port of my ESP32 Pico Kit.

I am only getting a blank screen when I try to open the serial monitor in the Arduino IDE.
I made sure I'm using the right baud rate and that the correct pins are connected.
I'm making sure I have 3.3V being supplied to the GPS module.
I'm providing power via the 3V3 pin of the ESP32 Pico Kit module.
The power to the module is coming from the USB connection from the PC.

I tried scouring the internet for ESP32 Pico Kit or even ESP32 connecting with a NEO-6M GPS module but can't find anything.
I initially tried to use hardware serial and tried to use pins 9,10 for serial communication, but everything shows as blank on the serial monitor. Same thing happens with software serial. Pins 9,10 seem to be the RX, TX pins based on the ESP32 PICO KIT pinouts info. on the Espressif site.

Can anyone provide insight as to what may be wrong? Thanks.

Code: Select all

#include <TinyGPS++.h>
#include <SoftwareSerial.h>

static const int RXPin = 9, TXPin = 10;
static const uint32_t GPSBaud = 9600;

// The TinyGPS++ object
TinyGPSPlus gps;

// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);

void setup(){
  Serial.begin(9600);
  ss.begin(GPSBaud);
}

void loop(){
  // This sketch displays information every time a new sentence is correctly encoded.
  while (ss.available() > 0){
    gps.encode(ss.read());
    if (gps.location.isUpdated()){
      Serial.print("Latitude= "); 
      Serial.print(gps.location.lat(), 6);
      Serial.print(" Longitude= "); 
      Serial.println(gps.location.lng(), 6);
    }
  }
}
Free CAD files for hobby and engineering projects:
https://grabcad.com/has-2

lbernstone
Posts: 829
Joined: Mon Jul 22, 2019 3:20 pm

Re: NEO-6M GPS Module and ESP 32 Pico Kit V4.1 Serial port information not displaying in Arduino IDE

Postby lbernstone » Thu May 27, 2021 1:40 pm

There are a whole lot of pins you can use for a serial connection, but gpio9 & 10 are not available, as they are used by the SPI flash. Try 22 & 23. https://github.com/espressif/arduino-es ... ard-pinmap

knightridar
Posts: 32
Joined: Sun Nov 25, 2018 10:05 pm
Contact:

Re: NEO-6M GPS Module and ESP 32 Pico Kit V4.1 Serial port information not displaying in Arduino IDE

Postby knightridar » Sun May 30, 2021 8:59 am

Sorry I was referring to the pinouts on the PICO-Kit v4.1
https://docs.espressif.com/projects/esp ... o-kit.html

Aren't those hardware serial pins good enough?
Pins 9 and 10

I still get a blank output in the serial monitor, using the code below.
Free CAD files for hobby and engineering projects:
https://grabcad.com/has-2

knightridar
Posts: 32
Joined: Sun Nov 25, 2018 10:05 pm
Contact:

Re: NEO-6M GPS Module and ESP 32 Pico Kit V4.1 Serial port information not displaying in Arduino IDE

Postby knightridar » Sun Aug 08, 2021 9:10 am

So I found some other sample code here:
https://randomnerdtutorials.com/guide-t ... h-arduino/

This is the code I used except I added a few comments and I changed the pins to pins 22,23 for rx and tx connections.
I downloaded the ESP32 software serial library to run software serial for the pins.

Code: Select all

/*
 * Rui Santos 
 * Complete Project Details https://randomnerdtutorials.com
 */
 
#include <SoftwareSerial.h>

// The serial connection to the GPS module
// rx,tx pin order from left to right (antenna side facing up) on neo 6m gps module

//rx, tx
SoftwareSerial ss(22, 23);

void setup(){
  Serial.begin(9600);
  ss.begin(9600);
}

void loop(){
  while (ss.available() > 0){
    // get the byte data from the GPS
    byte gpsData = ss.read();
    Serial.write(gpsData);
    }
delay(5000);
}
I know the NEO-6M gps module runs at 9600 bps rate, and my serial monitor is running at the same rate.
Based on the site above I don't think this should be an issue with the ESP32.

However, I am getting messed up readings below. Does anyone know why this is happening?
I even gave the GPS a separate power supply and still grounded the ground connection to ESP32 but still got the bad results below.
Lots of commas, and not clean NMEA text like the site above has.

Code: Select all

$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,,,,,,,,N*30
$GPGGA,,,,,,0,00,9$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,,,,,,,,N*30
$GPGGA,,,,,,0,00,9$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,,,,,,,,N*30
$GPGGA,,,,,,0,00,9
Free CAD files for hobby and engineering projects:
https://grabcad.com/has-2

Who is online

Users browsing this forum: No registered users and 70 guests