Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ONE ERROR #7

Open
toprakb66 opened this issue Sep 14, 2024 · 158 comments
Open

ONE ERROR #7

toprakb66 opened this issue Sep 14, 2024 · 158 comments

Comments

@toprakb66
Copy link

"Hello my friend, I hope you're doing well. I made this project and connected everything according to the schematic you showed using Arduino Nano. I also added the code and connected it to the car, but I can't establish communication with the OBD no matter what I do. There's no communication, and I'm about to lose my mind. Can you give me some ideas?"

@toprakb66
Copy link
Author

"Initialising... The serial monitor keeps saying this."

@muki01
Copy link
Owner

muki01 commented Sep 15, 2024

Hello.

  1. Which scheme are you using?

  2. Which pins are you using with Arduino nano?

  3. Is there pin 7 on your car's OBD2 connector?

@toprakb66
Copy link
Author

"I am using pins 7 and 8, yes, my car's OBD has a pin 7. I am using the Basic Code, the one with the .ino file."

@toprakb66
Copy link
Author

"I was able to get a response when I connected the OBD2 device using the 'ISO9141' and 'ISO14230_Slow' protocols. There is no issue with the car."

@toprakb66
Copy link
Author

"I'm stuck in this loop with the messages: 'Initialising... Received Data: 55 8 8 Received Data: F7'. What could be causing this?"

@toprakb66
Copy link
Author

"I’m receiving the following responses when using the protocol String protocol = "ISO14230_Fast";:

Live Data: Writing Data Received Data: C2 33 F1 1 D F4 Speed: 0 Writing Data Received Data: C2 33 F1 1 C F3 Engine RPM: 0 Writing Data Received Data: C2 33 F1 1 5 EC Coolant Temp: 0 Writing Data"

@toprakb66
Copy link
Author

Received Data: C2 33 F1 1 5 EC 83 F1 18 7F 1 12 1E
Coolant Temp: 0
Writing Data
Received Data: C2 33 F1 1 F F6 83 F1 18 7F 1 12 1E
Intake Air Temp: 0
Writing Data
Received Data: C2 33 F1 1 11 F8 83 F1 18 7F 1 12 1E
Throttle: 0
Writing Data
Received Data: C2 33 F1 1 E F5 83 F1 18 7F 1 12 1E
Timing Advance: 0

@muki01
Copy link
Owner

muki01 commented Sep 15, 2024

Received Data: C2 33 F1 1 5 EC 83 F1 18 7F 1 12 1E Coolant Temp: 0 Writing Data Received Data: C2 33 F1 1 F F6 83 F1 18 7F 1 12 1E Intake Air Temp: 0 Writing Data Received Data: C2 33 F1 1 11 F8 83 F1 18 7F 1 12 1E Throttle: 0 Writing Data Received Data: C2 33 F1 1 E F5 83 F1 18 7F 1 12 1E Timing Advance: 0

If you get data like "C2 33 F1 1 5 EC 83 F1 18 7F 1 12 1E", it means your Arduino is connected to car ECU. This request code "C2 33 F1 1 5 EC" is written by Arduino and this "83 F1 18 7F 1 12 1E" is the response of the car, but this response means an error. Can you message me the console output in ISO9141 protocol.

@toprakb66
Copy link
Author

"Of course, buddy. The result with the 9141 protocol is as follows:

Received Data: F7
Initialising...
Received Data: 55 8 8
Received Data: F7
Initialising...
Received Data: 55 8 8
Received Data: F7
Initialising...
Received Data: 55 8 8
Received Data: F7
Initialising...
Received Data: 55 8 8
Received Data: F7
Initialising..."

@muki01
Copy link
Owner

muki01 commented Sep 15, 2024

Ops my bad your protocol is ISO14230_Slow but i dont know why your car response like this. What you receive here

Serial.println("Suported LiveData: ");
  for (int i = 0; i < 32; i++) {
    Serial.print(supportedLiveData[i]);
    Serial.print(", ");
  }
  Serial.println();

after you Arduino is connected to your car?

@toprakb66
Copy link
Author

"Yes, the Arduino is currently connected to my car. Could there be an issue in the code?"

@muki01
Copy link
Owner

muki01 commented Sep 15, 2024

Wait, I will modify the code and you will try with the modified code.

@toprakb66
Copy link
Author

"My friend, I’m waiting excitedly for your response. I’m so grateful for your help, I’ve been working on this for four days now."

@muki01
Copy link
Owner

muki01 commented Sep 15, 2024

I think I had a bug in the Basic code. Try this code and send me serial output.
Basic_Code.zip

@muki01
Copy link
Owner

muki01 commented Sep 15, 2024

Keep the protocol in automatic mode, don't change it and send me serial output.

@toprakb66
Copy link
Author

I'm encountering the following error in my new code: C:\Users\elato\AppData\Local\Temp\5631c5f7-2852-428a-a332-5a3985e80d62_Basic_Code.zip.d62\Basic_Code\Basic_Code.ino: In function 'void loop()':
C:\Users\elato\AppData\Local\Temp\5631c5f7-2852-428a-a332-5a3985e80d62_Basic_Code.zip.d62\Basic_Code\Basic_Code.ino:38:25: error: 'init_OBD2' was not declared in this scope
bool init_success = init_OBD2();
^~~~~~~~~
C:\Users\elato\AppData\Local\Temp\5631c5f7-2852-428a-a332-5a3985e80d62_Basic_Code.zip.d62\Basic_Code\Basic_Code.ino:38:25: note: suggested alternative: 'init_OBD'
bool init_success = init_OBD2();
^~~~~~~~~
init_OBD
C:\Users\elato\AppData\Local\Temp\5631c5f7-2852-428a-a332-5a3985e80d62_Basic_Code.zip.d62\Basic_Code\Basic_Code.ino:46:5: error: 'read_K' was not declared in this scope
read_K();
^~~~~~
C:\Users\elato\AppData\Local\Temp\5631c5f7-2852-428a-a332-5a3985e80d62_Basic_Code.zip.d62\Basic_Code\Basic_Code.ino:46:5: note: suggested alternative: 'read_ID'
read_K();
^~~~~~
read_ID

exit status 1

Compilation error: 'init_OBD2' was not declared in this scope
It seems like a library error, and I'm currently working on fixing it.

@muki01
Copy link
Owner

muki01 commented Sep 15, 2024

Unzip all the files into one folder and it will work.

@toprakb66
Copy link
Author

Initialising...
Received Data: 55 8 8
Your Protocol is ISO9141
Received Data: F7
Initialising...
Received Data: 55 8 8
Your Protocol is ISO9141
Received Data: F7
Initialising...
Received Data: 55 8 8
Your Protocol is ISO9141
Received Data: F7
Initialising...
Received Data: 55 8 8
Your Protocol is ISO9141
Received Data: F7
Initialising...

@toprakb66
Copy link
Author

toprakb66 commented Sep 15, 2024

"I can only see these kinds of values in Fast mode: Speed: 0
Writing Data
Received Data: C2 33 F1 1 C F3 83 F1 18 7F 1 12 1E
Engine RPM: 0
Writing Data
Received Data: C2 33 F1 1 5 EC 83 F1 18 7F 1 12 1E
Coolant Temp: 0
Live Data:
Writing Data
Received Data: C2 33 F1 1 D F4 83 F1 18 7F 1 12 1E
Speed: 0
Writing Data
Received Data: C2 33 F1 1 C F3 83 F1 18 7F 1 12 1E
Engine RPM: 0
Writing Data
Received Data: C2 33 F1 1 5 EC 83 F1 18 7F 1 12 1E
Coolant Temp: 0
Live Data:"

(FAST PROTOCOL)

@muki01
Copy link
Owner

muki01 commented Sep 15, 2024

I don't know why this happens to you. I have tested all the protocols and they worked for me. I guess it's due to the timing because all ECUs send the response at different times. I'll tell you a few things to change and try.

  1. Increase the time in line 99 "REQUEST_DELAY = 50;" from 50 to 100 and test.
  2. In line 103 "if (resultBuffer[1])" change resultBuffer[1] to resultBuffer[0]

Try these steps separately. Keep the protocol in automatic mode.

@muki01
Copy link
Owner

muki01 commented Sep 15, 2024

I dont know how you can receive data like this C2 33 F1 1 C F3 83 F1 18 7F 1 12 1E . This means you are initialised in ISO14230_Fast but your protocol is ISO9141. This is very strange.

@toprakb66
Copy link
Author

"Buddy, I translated it and here’s what happened:

Live Data:
Writing Data
Received Data: 68 6A F1 1 D D1
Speed: 0
Writing Data
Initialising...
Received Data: 55 8 8
Your Protocol is ISO9141
Received Data: F7
Init Success !!
Live Data:
Writing Data
Received Data: 68 6A F1 1 D D1
Speed: 0
Writing Data
Received Data: 68 6A F1 1 C D0
Engine RPM: 0"

@toprakb66
Copy link
Author

After the last adjustment, the results turned out like this.

@toprakb66
Copy link
Author

Although a value has been read from the OBD, it's indicating 161 degrees Celsius (based on the conversion from hex C9), which seems to be incorrect. This suggests there's an issue either with how the data is being interpreted or a sensor error. Received Data: 68 6A F1 1 5 C9
Coolant Temp: 0

@toprakb66
Copy link
Author

That means it worked!

@muki01
Copy link
Owner

muki01 commented Sep 15, 2024

No, this 68 6A F1 1 5 C9 is the request code that the arduino sends, not the response from the ECU.

@muki01
Copy link
Owner

muki01 commented Sep 15, 2024

Ops my bad not in lines 66 and 70 in lines 99 and 103. if you changed in this lines and the response is this, change the time to 40 in line 99. and in line 103 the code should look like this "if (resultBuffer[1]) {"

@toprakb66
Copy link
Author

Unfortunately, the result is the same. Are there any other alternatives?

@muki01
Copy link
Owner

muki01 commented Sep 16, 2024

Which pins do you have in your car's OBD2 port
for example in the OBD2 port of my car I have pins 2,4,5,7,8,16

@muki01
Copy link
Owner

muki01 commented Sep 17, 2024

Do you still need help?

@toprakb66
Copy link
Author

Should I provide VCC to the L9637 from the ESP or 12V?

@muki01
Copy link
Owner

muki01 commented Oct 1, 2024

From ESP

@toprakb66
Copy link
Author

Is there a 3V output on the ESP that can trigger?

@toprakb66
Copy link
Author

The ESP is providing 3V; will it be able to trigger the L9637?

@muki01
Copy link
Owner

muki01 commented Oct 1, 2024

I didn't quite understand what you meant.

@toprakb66
Copy link
Author

Bro, the ESP8266 is providing a 3V output. Is this 3V enough for the L9637?

@muki01
Copy link
Owner

muki01 commented Oct 1, 2024

Yes

@toprakb66
Copy link
Author

The result is still negative; there is no response from the vehicle again. I can't proceed without the serial monitor, so it seems I will have to wait for the ESP32. My only concern is that the L9637's datasheet states an operating voltage of 5V, but you operated it at 3V.

@toprakb66
Copy link
Author

I made a protocol change, but the result is still the same. While changing the protocol, the Wi-Fi connection keeps disconnecting and reconnecting. Is this normal?

@muki01
Copy link
Owner

muki01 commented Oct 1, 2024

The result is still negative; there is no response from the vehicle again. I can't proceed without the serial monitor, so it seems I will have to wait for the ESP32. My only concern is that the L9637's datasheet states an operating voltage of 5V, but you operated it at 3V.

Where did you read that it says 5 volts see the picture.

a

@muki01
Copy link
Owner

muki01 commented Oct 1, 2024

I made a protocol change, but the result is still the same. While changing the protocol, the Wi-Fi connection keeps disconnecting and reconnecting. Is this normal?

Yes it is normal.

@toprakb66
Copy link
Author

It was written on the website where I bought the chip; I didn't check the datasheet. My friend, what’s the plan now? What can we do? Should I wait for the ESP32?

@muki01
Copy link
Owner

muki01 commented Oct 1, 2024

In my opinion, with ESP32 the result will be the same as with Arduino Nano. It does not depend on the microcontroller and with the simplest microcontroller that has a UART it should work. If I find something, I will write to you.

@muki01
Copy link
Owner

muki01 commented Oct 1, 2024

Are you changing anything in the code at all?

@toprakb66
Copy link
Author

no

@muki01
Copy link
Owner

muki01 commented Oct 1, 2024

Can you try this code with Arduino Nano. This code is for ISO9141 only and my first code that I tested in an ISO9141 car and it worked.

OBD2_ISO9141.zip

@muki01
Copy link
Owner

muki01 commented Oct 1, 2024

This code doesn't have many features and is very short.

@toprakb66
Copy link
Author

It got stuck at initializing.

@toprakb66
Copy link
Author

If it’s working on your Uno like this, the only explanation is that there is an issue with my circuit.

@toprakb66
Copy link
Author

There was another friend having the same issue, and he recently started a new thread. I’m eagerly waiting for his results.

@muki01
Copy link
Owner

muki01 commented Oct 1, 2024

Can you show me the schematics you made in detail.

@toprakb66
Copy link
Author

Received Data: C1 33 F1 81 66
Initialising...
Writing Data
Received Data: C1 33 F1 81 66
Initialising...
Writing Data
Received Data: C1 33 F1 81 66
Initialising... The serial monitor I got using basic code on Arduino Uno.

@toprakb66
Copy link
Author

5f3651c9-1cfe-4fd7-9a00-9274c57b7815
2683fe1f-d75c-49bc-96b5-88f95e5be0a8
4709f242-e266-4cb0-94d5-f15d1f9d2d9d
bd389990-ad44-4e8a-8467-84e4961fdf56

@toprakb66
Copy link
Author

I made it on a breadboard for better understanding. I also have the same version on a soldered PCB, and I'm using that one.

@toprakb66
Copy link
Author

![son](https://github.com/user-attachments/assets/beb49e56-c526-4c1a-aa8d-42d7b5941684)

@toprakb66
Copy link
Author

son

@muki01
Copy link
Owner

muki01 commented Oct 2, 2024

The schematic looks good. Just change the protocol to İSO9141 because in this picture it only uses İSO14230 Fast and the car doesn't respond anything and with İSO9141 the car responds well and your car's protocol is İSO9141

@toprakb66
Copy link
Author

Initialising ISO9141...
First 3 Bytes: 55 8 8
Other Bytes: F7
Init Success !!

@toprakb66
Copy link
Author

Bro, I got this response in the short and simple code you gave me."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants