Welcome Anonymous !

Everything you need to modify your ride
 

GM Technical Document Discussion

Software On ELM Street - OBD2 Software Development

A place to discuss the technical documents for GM vehicles such as Holden, Chevrolet, Opel, Vauxhall, Buick, Cadilac and Daewoo
Forum rules
To gain access to the Invite Only forum you must be invited by a member of that forum. That member will PM the mods or admins (NOT you) saying that they nominate you for access. THEY will be responsible for your actions. If you don't post and just leech info, you will BOTH be removed. Dont send a PM to the moderators or admins asking for access, you really dont want to see the result. If you submit information, you may simply be invited :)

Postby TazzI » Sun Feb 22, 2015 11:22 am

Time for an update. v0.0.1.0 now up.

Whole bunch of changes have been applied from the last update. Should hopefully work a bit smoother for auto detecting the elm. See front change log for updates.
User avatar
TazzI
Moderator
 
Posts: 986
Images: 2
Joined: Thu Dec 22, 2011 8:02 pm
Has thanked: 16 times
Been thanked: 41 times

Postby TazzI » Tue Mar 03, 2015 9:28 pm

Now up to v0.0.1.2!

Heaps of changes. Starting to get this freeze frame data 100% sorted on both protocols :D
User avatar
TazzI
Moderator
 
Posts: 986
Images: 2
Joined: Thu Dec 22, 2011 8:02 pm
Has thanked: 16 times
Been thanked: 41 times

Postby Gandalv » Fri Apr 03, 2015 3:18 pm

Hi guys!
I am a beginner programmer in the car.
I'm trying to write my own program - on-board computer for Opel Antara 2.2 diesel with elm327.
I ran into a problem: reading pids 0104, 010C, 010D is slow and error is high.
How can I catch this information using commands ATСRA ATMA?

Or does anyone know how to calculate consumption for the diesel engine?
I'm trying to read via the engine load and engine speed by multiplying by a certain factor.

Here some logs:

    time=93,384#load=59,6#rpm=747,5#speed=0,0#cool=48,0
    time=93,675#load=58,4#rpm=749,0#speed=0,0#cool=48,0
    time=93,964#load=57,3#rpm=764,0#speed=3,0#cool=49,0
    time=94,216#load=57,6#rpm=757,3#speed=3,0#cool=49,0
    time=94,489#load=61,6#rpm=728,5#speed=3,0#cool=49,0
    time=94,756#load=62,7#rpm=730,3#speed=3,0#cool=49,0
    time=95,035#load=62,7#rpm=752,5#speed=4,0#cool=49,0
    time=95,310#load=63,1#rpm=751,0#speed=4,0#cool=49,0
    time=95,635#load=63,1#rpm=753,5#speed=4,0#cool=49,0
    time=95,924#load=62,0#rpm=766,0#speed=4,0#cool=49,0
    time=96,211#load=60,4#rpm=770,8#speed=4,0#cool=49,0
    time=96,488#load=61,6#rpm=749,0#speed=4,0#cool=49,0
    time=96,750#load=62,0#rpm=741,8#speed=4,0#cool=49,0
    time=97,066#load=62,4#rpm=716,0#speed=4,0#cool=49,0
    time=97,378#load=57,3#rpm=793,3#speed=4,0#cool=49,0
    time=97,628#load=62,7#rpm=752,3#speed=4,0#cool=49,0
    time=97,885#load=61,6#rpm=750,3#speed=4,0#cool=49,0
    time=98,160#load=62,0#rpm=747,0#speed=3,0#cool=49,0
    time=98,436#load=61,2#rpm=757,8#speed=3,0#cool=49,0
    time=98,721#load=60,8#rpm=760,8#speed=3,0#cool=49,0
    time=99,025#load=62,4#rpm=764,8#speed=0,0#cool=49,0
    time=99,280#load=60,8#rpm=768,0#speed=0,0#cool=49,0
Gandalv
Newbie Modder
 
Posts: 4
Joined: Fri Apr 03, 2015 3:05 pm
Has thanked: 0 time
Been thanked: 0 time

Postby TazzI » Sat Apr 04, 2015 12:40 pm

Gandalv wrote:Hi guys!
I am a beginner programmer in the car.
I'm trying to write my own program - on-board computer for Opel Antara 2.2 diesel with elm327.
I ran into a problem: reading pids 0104, 010C, 010D is slow and error is high.
How can I catch this information using commands ATСRA ATMA?

Or does anyone know how to calculate consumption for the diesel engine?
I'm trying to read via the engine load and engine speed by multiplying by a certain factor.

Here some logs:

    time=93,384#load=59,6#rpm=747,5#speed=0,0#cool=48,0
    time=93,675#load=58,4#rpm=749,0#speed=0,0#cool=48,0
    time=93,964#load=57,3#rpm=764,0#speed=3,0#cool=49,0
    time=94,216#load=57,6#rpm=757,3#speed=3,0#cool=49,0
    time=94,489#load=61,6#rpm=728,5#speed=3,0#cool=49,0
    time=94,756#load=62,7#rpm=730,3#speed=3,0#cool=49,0
    time=95,035#load=62,7#rpm=752,5#speed=4,0#cool=49,0
    time=95,310#load=63,1#rpm=751,0#speed=4,0#cool=49,0
    time=95,635#load=63,1#rpm=753,5#speed=4,0#cool=49,0
    time=95,924#load=62,0#rpm=766,0#speed=4,0#cool=49,0
    time=96,211#load=60,4#rpm=770,8#speed=4,0#cool=49,0
    time=96,488#load=61,6#rpm=749,0#speed=4,0#cool=49,0
    time=96,750#load=62,0#rpm=741,8#speed=4,0#cool=49,0
    time=97,066#load=62,4#rpm=716,0#speed=4,0#cool=49,0
    time=97,378#load=57,3#rpm=793,3#speed=4,0#cool=49,0
    time=97,628#load=62,7#rpm=752,3#speed=4,0#cool=49,0
    time=97,885#load=61,6#rpm=750,3#speed=4,0#cool=49,0
    time=98,160#load=62,0#rpm=747,0#speed=3,0#cool=49,0
    time=98,436#load=61,2#rpm=757,8#speed=3,0#cool=49,0
    time=98,721#load=60,8#rpm=760,8#speed=3,0#cool=49,0
    time=99,025#load=62,4#rpm=764,8#speed=0,0#cool=49,0
    time=99,280#load=60,8#rpm=768,0#speed=0,0#cool=49,0


How do you know it is slow? And high error?

What sort of setup commands have you send to the elm? Do you have headers on? Is the CAN autoformat on or the CAN error reporting on?

Need to know alot mre about your current programming setup for the ELM before we can work out exactly why your not getting answers back!
User avatar
TazzI
Moderator
 
Posts: 986
Images: 2
Joined: Thu Dec 22, 2011 8:02 pm
Has thanked: 16 times
Been thanked: 41 times

Postby Gandalv » Mon Apr 06, 2015 3:55 pm

Ok.
I setup ELM327 with commands

ATWS
ATZ
ATE0
ATL0
ATH1
ATI
AT@1
AT@2
ATRV
ATSP0
0100
ATDP

After that I read PIDs

case "0104": return x * 100 / 255; break;//load
case "010C": return x / 4; break;//rpm
case "010D": return x; break;//speed
case "0105": return x - 40; break;//water temp

I have time to read 3-4 times per second, these PIDs.
After one cycle readed i use this formula fuel = load*rmp*k*timediff
where k = some coefficient, timediff = time difference between the two measurements

I tried to pick up this factor on the integrated on-board computer, but at different speeds it differs in several times.

rpm k
829 1/95016
1684 1/40262

After these attempts, I began to read about the team ATCRA. But here, nothing happens.

I initialized elm327. Then sent a team ATCRA7E8
elm327 said ok.
I sent ATMA
and more get nothing in return.
If i send something elm327 says stopped.
I tried different headings 7e0 5e8 5e0 but nothing caught.
Gandalv
Newbie Modder
 
Posts: 4
Joined: Fri Apr 03, 2015 3:05 pm
Has thanked: 0 time
Been thanked: 0 time

Postby TazzI » Mon Apr 06, 2015 5:58 pm

Gandalv wrote:Ok.
I setup ELM327 with commands

ATWS
ATZ
ATE0
ATL0
ATH1
ATI
AT@1
AT@2
ATRV
ATSP0
0100
ATDP


Alright. Lets redo your initial setup here.
You will want to do this:
ATI (This should be done first to check if the cable is present!. No point doing it later!)
ATE0
ATL0
ATH1
ATSP6 (This is CAN 11bit 500kb/s)
ATSH7E0 (Sets CAN 11bit header to 7E0.. most ecus accept this)
AT@1 (Not really needed)
AT@2 (Not really needed)

So basically, using SP0 doesnt always work, it *attempts* to automatically detect the protocol which is pretty iffy! Or can be slow and affect other function. Set to the correct protocol.. which in your case is CAN 11bit 500kb/s (I think!?)

ATZ and ATWS are not needed, just time wasting there really!

0100 and ATDP dont need to be used at all.
ATDP just repeats back whatever you enter in the AT SP, so thats not needed either!

ATRV can be used.. but again, is useless unless the voltage reading is important for the actual protocol being used, which is only VPW and PWM. CAN protocols dont really car about the voltage on pin16 of the obd2 connector


Gandalv wrote:After that I read PIDs

case "0104": return x * 100 / 255; break;//load
case "010C": return x / 4; break;//rpm
case "010D": return x; break;//speed
case "0105": return x - 40; break;//water temp

I have time to read 3-4 times per second, these PIDs.
After one cycle readed i use this formula fuel = load*rmp*k*timediff
where k = some coefficient, timediff = time difference between the two measurements


Alright, when you read PIDs if you want it to be alot faster, you need to tell the ELM how many responses you are expecting.
So send you commands with a "1" at the end to signify only 1 response is expected. eg.
0104 1
010C 1


Gandalv wrote:After these attempts, I began to read about the team ATCRA. But here, nothing happens.

I initialized elm327. Then sent a team ATCRA7E8
elm327 said ok.
I sent ATMA
and more get nothing in return.
If i send something elm327 says stopped.
I tried different headings 7e0 5e8 5e0 but nothing caught.


Alright, ATCRA simple sets a "receive" filter for the CAN 11bit protocol. It can be useful if specifically searching for a response or monitoring data.. say if monitoring data from a scantool!
So, if I wanted to filter for data sent FROM a scantool, I would do ATCRA7E0
And if I wanted to filter the data sent FROM the ecu, I would do ATCRA7E8

Now, ATMA is only useful for VIEWING live communication data. You cannot send any information while monitoring.
Now,if we do ATMA (Monitor all data on communication line) to monitor the data sent to/from various stuff in your car. If you have set a CAN filter (ATCRA) then it will only display data with that filter header (eg 7E0)

Generally.. your car WILL NOT display any information if you set a filter of 7E0 or 7E8 since those two filters are normally only used for scantool diagnostics!
Also, if you send anythig to the elm.. this will make it say "Stopped" as its ending the "monitor all" session.
User avatar
TazzI
Moderator
 
Posts: 986
Images: 2
Joined: Thu Dec 22, 2011 8:02 pm
Has thanked: 16 times
Been thanked: 41 times

Postby Gandalv » Mon Apr 06, 2015 7:04 pm

Thank you for the response.
ATDP says that I have AUTO, ISO 15765-4 (CAN 11/500)
As I understand I need to throw out the extra initialization string, set the protocol hands 6. And when reading pids specify how many responses wait.

Now another question:
I have compiled a list of available pids in my car.

    0100
    0101 Monitor status since DTCs cleared. (Includes malfunction indicator lamp (MIL) status and number of DTCs.)
    0103 Fuel system status
    0104 Calculated engine load value
    0105 Engine coolant temperature
    010B Intake manifold absolute pressure
    010C Engine RPM
    010D Vehicle speed
    010F Intake air temperature
    0110 MAF air flow rate
    0111 Throttle position
    0113 Oxygen sensors present
    011C OBD standards this vehicle conforms to
    011F Run time since engine start
    0120
    0121 Distance traveled with malfunction indicator lamp (MIL) on
    0123 Fuel Rail Pressure (diesel, or gasoline direct inject)
    0124 какаято лямбда
    012C Commanded EGR
    012D EGR Error
    012F Fuel Level Input
    0130 # of warm-ups since codes cleared
    0131 Distance traveled since codes cleared
    0133 Barometric pressure
    0134 какаято лямбда
    013C Catalyst Temperature Bank 1, Sensor 1
    013E Catalyst Temperature Bank 1, Sensor 2
    0140
    0141 Monitor status this drive cycle
    0142 Control module voltage
    0145 Relative throttle position
    0146 Ambient air temperature
    0149 Accelerator pedal position D
    014A Accelerator pedal position E
    014C Commanded throttle actuator
    014D Time run with MIL on
    014E Time since trouble codes cleared
    0151 Fuel Type
    015A Relative accelerator pedal position

Thats all from 01xx
On any forum I've read that there are PIDs

1105=TRANSMISSION GEAR
199A=ACTUAL GEAR

I have not tested them yet :(
If so, is there still some PIDs (eg just spent liters for the entire life of the machine)?

Or considered as tire pressure (just wondering) :)
Gandalv
Newbie Modder
 
Posts: 4
Joined: Fri Apr 03, 2015 3:05 pm
Has thanked: 0 time
Been thanked: 0 time

Postby TazzI » Fri Apr 10, 2015 11:44 am

Gandalv wrote:Thank you for the response.
ATDP says that I have AUTO, ISO 15765-4 (CAN 11/500)

Yep, that states that the protocol is CAN 11bit 500kb/s. So you can definately just set the protocol to that rather than making the ELM waste time working it out.

Gandalv wrote:On any forum I've read that there are PIDs

1105=TRANSMISSION GEAR
199A=ACTUAL GEAR

I have not tested them yet :(
If so, is there still some PIDs (eg just spent liters for the entire life of the machine)?

Or considered as tire pressure (just wondering) :)


Those are enhanced PIDs.. or also know as manufacture specific PIDs. There are generally unknown and require extensive reverse engineering (like I have done with the Holdens) to work them out!
They also arent not just a simple request like 01 OC. They require a complex setup where multiple PID's are put inside a DPID (Dynamic PID) which can display information about multiple PIDs in one hit. ;)

Its a quite advanced routine to get setup and running really. Well, on the Holdens it is anyways.

But there is more than likely PIDs for fuel used, instantaneous litres used ect. But these need to e worked out for your vehicle. Not all PIDS (eg 199A=Actual gear) are the same.. that same PID could mean coolant temp on your vehicle for all we know!
User avatar
TazzI
Moderator
 
Posts: 986
Images: 2
Joined: Thu Dec 22, 2011 8:02 pm
Has thanked: 16 times
Been thanked: 41 times

Postby Gandalv » Fri Apr 10, 2015 4:04 pm

Like all difficult with this protocol ...

How can I check if I have different PIDs from the manufacturer Holden?
I mean, what do I need to send elm327 to try to read DPID?
Gandalv
Newbie Modder
 
Posts: 4
Joined: Fri Apr 03, 2015 3:05 pm
Has thanked: 0 time
Been thanked: 0 time

Postby TazzI » Sat Apr 11, 2015 1:06 pm

Gandalv wrote:Like all difficult with this protocol ...

How can I check if I have different PIDs from the manufacturer Holden?
I mean, what do I need to send elm327 to try to read DPID?

Thats it, you cant cant know which PIDs fro HOLDEN will wor with your car! You need to work that out yourself. Id say theres a 99% chance that none of the Holden PIDS will match up for your car.

And you dont read out DPID's. You need to set them up.. and them make the ecu spit them all out!. Its quite a complex process getting it all sorted and working. Just google DPID or dynamic PID, should see some examples. :)
User avatar
TazzI
Moderator
 
Posts: 986
Images: 2
Joined: Thu Dec 22, 2011 8:02 pm
Has thanked: 16 times
Been thanked: 41 times

PreviousNext

Return to GM Technical Document Discussion

  • View new posts
  • View unanswered posts
  • Who is online
  • In total there are 12 users online :: 1 registered, 0 hidden and 11 guests (based on users active over the past 5 minutes)
  • Most users ever online was 405 on Sat Mar 30, 2024 1:42 am
  • Users browsing this forum: Majestic-12 [Bot] and 11 guests