GPS Speedometer display issue

Hi, please everyone for advice. I built a GPS speedometer using an Arduino Nano board (clone), a GPS module with NEO-8M (Hglrc China), a 0.96" Oled display.
When I powered the board from USB port ,the display remains off. If I disconnect the GPS module power ( VCC or GND) the display turn on.
I also tried to supply power from external 5V with the same problem.
I changed the Arduino board, no effect.
I tested the GPS module with example code, I received properly the data.
Can you please help me with this issue?

Here are the connection:
OLED Display:
SCL- A5;
SDA - A4;
VCC - 3V3;
GND - GND.

GPS Module:
RX- D4;
TX - D3;
VCC- 5V;
GND- GND.
Here is the code :

#include <SoftwareSerial.h>
#include <Wire.h>
#include <Adafruit_SSD1306.h>
#include <TinyGPS++.h>
 
#define rxPin 3
#define txPin 4
SoftwareSerial mygps(rxPin, txPin);
 
#define SCREEN_WIDTH 128       // OLED display width, in pixels
#define SCREEN_HEIGHT 64       // OLED display height, in pixels
#define OLED_RESET -1          //Reset pin # (or -1 if sharing Arduino reset pin)
#define SCREEN_ADDRESS 0x3C    //See datasheet for Address
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
 
TinyGPSPlus gps;
 
 
void setup()
{
  Serial.begin(115200);
  mygps.begin(9600);
 
  if (!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS))
  {
    Serial.println(F("SSD1306 allocation failed"));
    for (;;); // Don't proceed, loop forever
  }
  display.clearDisplay();
  display.display();
  delay(2000);
}
 
void loop()
{
  boolean newData = false;
  for (unsigned long start = millis(); millis() - start < 1000;)
  {
    while (mygps.available())
    {
      if (gps.encode(mygps.read()))
      {
        newData = true;
      }
    }
  }
 
  //If newData is true
  if (newData == true)
  {
    newData = false;
    display.setTextColor(SSD1306_WHITE);
 
    if (gps.location.isValid() == 1)
    {
      //String gps_speed = String(gps.speed.kmph());
      display.setCursor(8,8);
      display.setTextSize(6);
      display.print(gps.speed.kmph(),1);
 
    
      display.display();
      delay(1500);
      display.clearDisplay();
    }
  }
 
  else
  {
    display.setTextColor(SSD1306_WHITE);
    display.setCursor(0, 20);
    display.setTextSize(3);
    display.print("No Data");
    display.display();
    delay(1500);
    display.clearDisplay();
  }
}

Now, a drawing, with ALL your connections, power sources and components clearly indicated.

1 Like

The drawing is showing the external power supply, from 12v to VIN . The same issue.
With all connection when I connect the board power the display remain off ( also I tested with multimeter, the display is powered with 3,3V, but no data). If I remove the GPS power ( GND or VCC) the display turn on (showing "No Data", which is correct because no data from GPS). If I reconnect immediate the GPS power ,then the display turn off, but If I delay the connection more then 10 sec. the display stay on.

I also tried another board with LGT8F328P microcontroller, Nano compatible ( with the same code). I have the same problem with this one with the difference that after power connection I have to press restart button to turn on the display.

That appears you are using the Arduino as a power supply which is it not. the GPC will draw Current consumption: less than 150mA @ 5V by itself plus the other loads. Hmmmmmmmmmmmmmm!

Gil's Crispy Critter Rules, they apply to processor hardware:
Rule #1. A Power Supply the Arduino is NOT!
Rule #2. Never Connect Anything Inductive (motor, speaker) to an Arduino!
Rule #3 Don't connecting or disconnecting wires with power on.
Rule #4 Do not apply power to any pin unless you know what you are doing.
Rule #5 Do not exceed maximum Voltages.
LaryD's Corollary's
Coro #1 when first starting out, add a 220R resistor in series with both Input and Output pins.
Coro #2 buy a DMM (Digital Multi-meter) to measure voltages, currents and resistance. Violating these rules tends to make crispy critters out of Arduinos.
Hint: It is best to keep the wires under 25cm/10" for good performance.

Thank you for advices. I also powered the Arduino and GPS from external 5V power supply with the same results. Current consumption when all connection ( display off) 70 mA. If disconnect GPS power the display turn on and current consumption is 22 mA. If reconnect GPS the display turn off no matter how much time I let disconnected.

Sound awfully like you have cooked something.
Did you try powering the display separately?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.