SparkFun OBD-II UART burned car fuse

Hi!
I am working on a car data logger project where I basically log data from GPS and OBD(UART) to an sd card

It was working great while testing the OBD2-UART serial, but when I tried to finally run my final code, which I use ELMduino, the OBD2 port stopped working and my car's instrument cluster shutdown. I guess it burned one fuse. What are the possible mistakes that I've made?
THanks, if necessary I can send my code

Unless a component of your circuit has a major short, or the CAM connection has a GND or V+ voltage wire switched, even in this scenario, these devices fuses onboard are wayyyyy weaker than your cars fuses and will blow first, or you will have a catastrophic failure onboard the arduino or another of your components.

Sounds like you may have had a internal car electrical issue as these units can not draw enough amperage to even think of blowing a cars fuse.

ALSO: Posting your code may give us a clue!!!

Thanks @whizatit
I just think it's too much coincidence as I never had any electric issues with my car.
The instrument cluster and the OBD stopped working, and as I checked there is a fuse for these.

code:

#include <Adafruit_GPS.h>
#include <SoftwareSerial.h>
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <SD.h>
#include <ELMduino.h>




#define GPSSerial Serial1
// Connect to the GPS on the hardware port
Adafruit_GPS GPS(&GPSSerial);

//obd ports
#define ELM_PORT Serial2
ELM327 myELM327;



const int chipSelectSD = 53;
#define PMTK_SET_NMEA_UPDATE_1HZ  "$PMTK220,1000*1F"
#define PMTK_SET_NMEA_UPDATE_5HZ  "$PMTK220,200*2C"
#define PMTK_SET_NMEA_UPDATE_10HZ "$PMTK220,100*2F"

// turn on only the second sentence (GPRMC)
#define PMTK_SET_NMEA_OUTPUT_RMCONLY "$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29"
// turn on GPRMC and GGA
#define PMTK_SET_NMEA_OUTPUT_RMCGGA "$PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28"
// turn on ALL THE DATA
#define PMTK_SET_NMEA_OUTPUT_ALLDATA "$PMTK314,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0*28"
// turn off output
#define PMTK_SET_NMEA_OUTPUT_OFF "$PMTK314,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28"

#define PMTK_Q_RELEASE "$PMTK605*31"

#define GPSECHO  true
const byte SCREEN_WIDTH = 128; // OLED display width, in pixels
const byte SCREEN_HEIGHT = 64; // OLED display height, in pixels

// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
const int OLED_RESET = -1; // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

void setup() {
  while (!Serial); // wait for Serial to be ready

  Serial.begin(115200); // The serial port for the Arduino IDE port output
  GPS.begin(9600);
  delay(2000);


  // initialize with the I2C addr 0x3C
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  


  // Clear the buffer.
  display.clearDisplay();
    
  // Display Text "Hello Word"
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0,28);

  if (!SD.begin(chipSelectSD))
  {
    display.println("Falha ao acessar o cartao !");
    Serial.println("Verifique o cartao/conexoes e reinicie o Arduino...");
    display.print("Cartao SD nao esta funcionando!"); 
    display.display();

    return;
  }
  display.println("Cartao iniciado corretamente !");
  Serial.println();
  
  ELM_PORT.begin(9600);
  Serial.println("Attempting to connect to ELM327...");
  if (!myELM327.begin(ELM_PORT, false, 5000))
  {
    Serial.println("Couldn't connect to OBD scanner");
    //while (1);
  }
  Serial.println("Connected to ELM327");
 }

 


uint32_t timer = millis();
void loop()                     // run over and over again
{
  char c = GPS.read();
  // if you want to debug, this is a good time to do it!
  /*
  if ((c) && (GPSECHO))
    Serial.write(c);
  */
  // if a sentence is received, we can check the checksum, parse it...
  if (GPS.newNMEAreceived()) {
    // a tricky thing here is if we print the NMEA sentence, or data
    // we end up not listening and catching other sentences!
    // so be very wary if using OUTPUT_ALLDATA and trytng to print out data
    //Serial.println(GPS.lastNMEA());   // this also sets the newNMEAreceived() flag to false

    if (!GPS.parse(GPS.lastNMEA()))   // this also sets the newNMEAreceived() flag to false
      return;  // we can fail to parse a sentence in which case we should just wait for another
  }
  
  // approximately every 2 seconds or so, print out the current stats
  if (millis() - timer > 2000) {
    timer = millis(); // reset the timer
    File dataFile = SD.open("datalog.txt", FILE_WRITE);
    Serial.print("\nTime: ");
    printGPSTime(GPS.day, GPS.month, GPS.year, GPS.hour, GPS.minute, GPS.seconds, GPS.milliseconds, Serial);
    Serial.println("");
    Serial.print(GPS.day, DEC); Serial.print('/');
    Serial.print(GPS.month, DEC); Serial.print("/20");
    Serial.println(GPS.year, DEC);
    Serial.print("Fix: "); Serial.print((int)GPS.fix);
    Serial.print(" quality: "); Serial.println((int)GPS.fixquality);

    // show sensors status
    display.clearDisplay();
    display.setCursor(0,28);
    display.print("Satellites: "); 
    display.print((int)GPS.satellites);
    // check obd connection
    display.println("");
    display.print("OBDII: ");
    display.print(myELM327.connected);
    // sd
    display.println("");
    display.print("SD: ");
    display.print(dataFile);
    display.display();

    if (GPS.fix) {
      //ETCG Notes -- The Following Gives Coordinates in formant you can plug into
      //Google Maps (Degrees)
      
      Serial.println("Location in Degrees");
      Serial.print(GPS.latitudeDegrees, 8);
      Serial.print(", ");
      Serial.println(GPS.longitudeDegrees, 8);

      Serial.print("Speed (knots): "); Serial.println(GPS.speed);
      Serial.print("Angle: "); Serial.println(GPS.angle);
      Serial.print("Altitude: "); Serial.println(GPS.altitude);
      Serial.print("Satellites: "); Serial.println((int)GPS.satellites);
      //Grava as informacoes no arquivo
      if (dataFile)
      {
        printGPSTime(GPS.day, GPS.month, GPS.year, GPS.hour, GPS.minute, GPS.seconds, GPS.milliseconds, dataFile);
        dataFile.print(",");
        dataFile.print(GPS.latitudeDegrees, 8);
        dataFile.print(",");
        dataFile.print(GPS.longitudeDegrees, 8);
        //dataFile.println("");
        //Fecha o arquivo
        
      }
        
    }
    // if not gps fix
    else{
       dataFile.print(",,,");
    }
    // car info
    if (myELM327.connected){
      float tempRPM = myELM327.rpm();
      float kph = myELM327.kph();
      float oilTemp = myELM327.oilTemp();
      float coolTemp = myELM327.engineCoolantTemp();
      float fuelPr = myELM327.fuelPressure();
      float torque = myELM327.torque();
      if (myELM327.nb_rx_state == ELM_SUCCESS)
        {
          if (dataFile) {
            dataFile.print(tempRPM);
            dataFile.print(",");
            dataFile.print(kph);
            dataFile.print(",");
            dataFile.print(oilTemp);
            dataFile.print(",");
            dataFile.print(coolTemp);
            dataFile.print(",");
            dataFile.print(fuelPr);
            dataFile.print(",");
            dataFile.print(torque);
          }
        }
    }
    if(dataFile){
      dataFile.println("");
      dataFile.close();
    }

  } 
}

void printGPSTime(int day, int month, int year, int hour, int minute, int seconds, int milliseconds, Stream &stream){
  stream.print(day, DEC); stream.print('/');
  stream.print(month, DEC); stream.print("/20");
  stream.print(year, DEC);
  stream.print(" ");
  if (hour < 10) { stream.print('0'); }
  stream.print(hour, DEC); stream.print(':');
  if (minute < 10) { stream.print('0'); }
  stream.print(minute, DEC); stream.print(':');
  if (seconds < 10) { stream.print('0'); }
  stream.print(seconds, DEC); stream.print('.');
  if (milliseconds < 10) {
    stream.print("00");
  } else if (milliseconds > 9 && milliseconds < 100) {
    stream.print("0");
  }
  stream.print(milliseconds);
}

Were there any errors given? Connection issues to car or any of the arduino accessories? Before or after the fuse blew?

I was having exactly this problem. Attempting to use library with Sparkfun OBD II UART board · Issue #111 · PowerBroker2/ELMduino · GitHub
Solved by increasing the timeout to 5s
before fuse blew. after that, no errors

1 Like

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project.

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