Page 1 of 1

Arduino ELM327 Emulator - Problem mit Anzeige

Posted: Mon Feb 27, 2017 7:48 pm
by CitRacing
Hallo Harry,

Ich habe einen ELM327 Emulator geschrieben. Bin noch in der Testphase und hab ein paar Schwierigkeiten mit der Anzeige in der Motor-Erweiterung.

01 11 - Trottle wird nicht richtig angezeigt bzw ist 0%
ATRV - Spannung wird nicht richtig angezeigt bzw ist -

Alles andere geht super. Übertragungsrate liegt bei 6-8Hz. Baudrate ist 115200.

Harry's GPS/OBD Buddy v20.2.3

Code: Select all

const String PID_01_11 = "41 11 F2";          // Data trottle position --- F2 --> 100% / 255 * 242(HEX F2) = 94.9%
Ich hab mal zum Testen die 01 4B probiert und wird auch nicht angezeigt. PID natürlich auf F gesetzt ;)

Code: Select all

const String PID_01_4B = "41 4B F2";          // Data trottle position --- F2 --> 100% / 255 * 242(HEX F2) = 94.9%
Aus dem Serilmonitor:

Code: Select all

Command from APP: ATZ | to APP: ELM327 Emulator v0.1

>
Command from APP: ATWS | to APP: ELM327 Emulator v0.1

>
Command from APP: ATE0 | to APP: OK

>
Command from APP: ATL0 | to APP: OK

>
Command from APP: ATS0 | to APP: OK

>
Command from APP: AT@1 | to APP: OBD2 to RS232 Interpreter

>
Command from APP: ATAT0 | to APP: OK

>
Command from APP: ATSTFF | to APP: OK

>
Command from APP: ATSPA0 | to APP: OK

>
Command from APP: 0100 | to APP: 41 00 08 3A 80 11

>
Command from APP: 0120 | to APP: 41 20 00 02 00 01

>
Command from APP: 0140 | to APP: 41 40 00 20 00 11

>
Command from APP: 0900 | to APP: 49 00 00 C0 00 00

>
Command from APP: 011C | to APP: 41 1C 01

>
Command from APP: 012F | to APP: 41 2F 91

>
Command from APP: ATRV | to APP: 12.6V

>
Command from APP: 0105 | to APP: 41 05 85

>
Command from APP: 015C | to APP: 41 5C A9

>
Command from APP: 010F | to APP: 41 0F 42

>
Command from APP: 010C | to APP: 41 0C 46 AC

>
Command from APP: 014B | to APP: 41 4B F2

>
Command from APP: 010B | to APP: 41 0B 3F

>
Command from APP: 010D | to APP: 41 0D 6F

>
Command from APP: 010C1 | to APP: 41 0C 46 AC

>
Command from APP: 014B1 | to APP: 41 4B F2

>
Command from APP: 010B1 | to APP: 41 0B 3F

>
Command from APP: 010D1 | to APP: 41 0D 6F

>
Command from APP: 010C1 | to APP: 41 0C 46 AC

>
Command from APP: 014B1 | to APP: 41 4B F2

>
Command from APP: 010B1 | to APP: 41 0B 3F

>
Command from APP: 010D1 | to APP: 41 0D 6F

>
Command from APP: 010C1 | to APP: 41 0C 46 AC

>
Command from APP: 014B1 | to APP: 41 4B F2

>
Command from APP: 010B1 | to APP: 41 0B 3F

>
Command from APP: 010D1 | to APP: 41 0D 6F

>
Command from APP: 010C1 | to APP: 41 0C 46 AC

>
Command from APP: 014B1 | to APP: 41 4B F2

>
Command from APP: 010B1 | to APP: 41 0B 3F

>
Command from APP: 010D1 | to APP: 41 0D 6F

>
Command from APP: 010C1 | to APP: 41 0C 46 AC

>
Command from APP: 014B1 | to APP: 41 4B F2

>
Command from APP: 010B1 | to APP: 41 0B 3F

>
Command from APP: 010D1 | to APP: 41 0D 6F

>
Command from APP: 010C1 | to APP: 41 0C 46 AC

>
Command from APP: 014B1 | to APP: 41 4B F2

>
Command from APP: 010B1 | to APP: 41 0B 3F

>
Command from APP: 010D1 | to APP: 41 0D 6F

>
Command from APP: 010C1 | to APP: 41 0C 46 AC

>
Command from APP: 014B1 | to APP: 41 4B F2

>
Command from APP: 010B1 | to APP: 41 0B 3F

>
Command from APP: 010D1 | to APP: 41 0D 6F

>
Command from APP: 010C1 | to APP: 41 0C 46 AC

>
Command from APP: 014B1 | to APP: 41 4B F2

>
Command from APP: 010B1 | to APP: 41 0B 3F

>
Command from APP: 010D1 | to APP: 41 0D 6F

>
Command from APP: 010C1 | to APP: 41 0C 46 AC

>
Command from APP: 014B1 | to APP: 41 4B F2

>
Command from APP: 010B1 | to APP: 41 0B 3F

>
Command from APP: 010D1 | to APP: 41 0D 6F

>
Command from APP: 010C1 | to APP: 41 0C 46 AC

>
Command from APP: 014B1 | to APP: 41 4B F2

>
Command from APP: 010B1 | to APP: 41 0B 3F

>
Command from APP: 010D1 | to APP: 41 0D 6F

>
Command from APP: 010C1 | to APP: 41 0C 46 AC

>
Command from APP: 014B1 | to APP: 41 4B F2

>
Command from APP: 010B1 | to APP: 41 0B 3F

>
Command from APP: 010D1 | to APP: 41 0D 6F

>
Command from APP: 010C1 | to APP: 41 0C 46 AC

>
Command from APP: 014B1 | to APP: 41 4B F2

>
Command from APP: 010B1 | to APP: 41 0B 3F

>
Command from APP: 010D1 | to APP: 41 0D 6F

>
Command from APP: 010C1 | to APP: 41 0C 46 AC

>
Command from APP: 014B1 | to APP: 41 4B F2

>
Command from APP: 010B1 | to APP: 41 0B 3F

>
Command from APP: 010D1 | to APP: 41 0D 6F

>
Command from APP: 010C1 | to APP: 41 0C 46 AC

>
Command from APP: 014B1 | to APP: 41 4B F2

>
Command from APP: 010B1 | to APP: 41 0B 3F

>
Command from APP: 010D1 | to APP: 41 0D 6F

>
Command from APP: 010C1 | to APP: 41 0C 46 AC

>
Command from APP: 014B1 | to APP: 41 4B F2

>
Command from APP: 010B1 | to APP: 41 0B 3F

>
Command from APP: 010D1 | to APP: 41 0D 6F

>
Command from APP: 012F1 | to APP: 41 2F 91

>
Command from APP: ATRV | to APP: 12.6V

>
Command from APP: 01051 | to APP: 41 05 85

>
Command from APP: 015C1 | to APP: 41 5C A9

>
Command from APP: 010F1 | to APP: 41 0F 42

>
Command from APP: 010C1 | to APP: 41 0C 46 AC

>
Command from APP: 014B1 | to APP: 41 4B F2

>
Command from APP: 010B1 | to APP: 41 0B 3F

>
Command from APP: 010D1 | to APP: 41 0D 6F

>


PS: Mit Torque hab ich keine Schwierigkeiten.

Hast du ein Tip für mich?

Re: Arduino ELM327 Emulator - Problem mit Anzeige

Posted: Fri Mar 03, 2017 8:29 pm
by Harry
Ich würde empfehlen einfach mal ein Trace Log mitlaufen zu lassen (viewtopic.php?f=39&t=1933). Buddy gibt Dir detailliert eingehende Daten und deren Verarbeitung aus - da siehst Du alles. Es reicht wenn Du die OBD Sensor Trace Klasse auswählst. Bei der Gaspedalstellung / Drosselklappe gibt es ja auch noch einen Kalibrierungsschritt. Richtige Werte kommen da erst nach einer gewissen Variation raus. Hintergrund: in realen Fahrzeugen wirst Du niemals die Range von 0 bis 100% (0-255) bekommen sondern z.B. 22 bis 76% (bzw. das entsprechende Byte).

- Harald