Torque app and Canbus

Post Reply
User avatar
Joxson
Posts: 15
Joined: Tue Oct 22, 2019 6:29 am
Location: Sweden

Torque app and Canbus

Post by Joxson »

Hi!

Im trying to make a working gauge cluster via obd2 and the app torque. It has a function for "HPEV Motor RPM" but that doesnt give me any read out. I feel kind of lost in the CAN-jungle, what do I need to do in the inverter to get orion bms to read the RPM? The CAN speeds are set to the same but no nothing.


Here is the table from orion if it helps:
Name Short Name Mode & PID Equation Minimum Maximum Unit OBD2 Header Scale Factor
HPEV RPM HPEV RPM B48601 ((A*256)+B) 0 5000 RPM See Note #1 x1
HPEV Motor Temp HPEV Motor Temp B48601 C -40 200 C See Note #1 x1
HPEV Control Temp HPEV Cont Temp B48601 D -40 200 C See Note #1 x1
HPEV Amps HPEV Amps B48601 ((E*256)+F)/10.0 -32767 32767 A See Note #1 x1
HPEV Voltage HPEV Volts B48601 ((G*256)+H) 0 65535 V See Note #1 x1
HPEV Frequency HPEV Frequency B48602 ((A*256)+B) 0 65535 Hz See Note #1 x1
HPEV Fault HPEV Fault B48602 C 0 255 Status See Note #1 x1


Image

Anyone got clues? Or possibly have used Torque app?
Best Regards
Joachim Westerlund :)
WeeLee
Posts: 5
Joined: Sun May 14, 2023 6:52 pm
Has thanked: 2 times
Been thanked: 5 times

Re: Torque app and Canbus

Post by WeeLee »

This guide from Thunderstruck EV might be of use. http://www.thunderstruck-ev.com/images/ ... 7208046029
After installing, take the following steps to upload the data file into Torque Pro. These steps are based on
an Android tablet at ThunderStruck (other devices similar).
1. Connect via USB to your tablet using a Windows computer. Download a file to that computer
from our website after navigating to the following location:
2. Instrumentation/Can Translator for Sevcon/Curtis/Leaf
3. Look for a link on that page entitled: [your controller name] “Torque App Config File"
4. Download the [your controller name]-PID.csv data file.
5. Transfer the file to your tablet under the following directory on the display: Internal shared
storage\.torque\extendedpids\
6. If the file does not end up in that directory, use the tablet’s file manager to move it. Touch and
hold on the file name until a move/copy option appears.
7. Open Torque Pro on your tablet, click on the "gear" icon in the lower left and select "settings."
8. Select the option "Manage extra PIDs/Sensors."
9. In the upper right-hand corner of that list you will see some dots suggesting a menu list - touch
on that, and then select the option "add predefined set."
10. You will see the file name you transferred in the list. Select that, and complete the process.
11. Now, in your “Manage extra PIDs/Sensors” list, you will see some new values.

Next, you will assign the new “PIDs/Sensors” to displays you create in Torque Pro.
1. Start up the Torque Pro app and select the "Realtime Information" option in the first screen.
2. Touch and hold in a blank space, then select “Add display.” Select one of the listed display types.
3. Review the long list of PID options, and locate the ones identified by the controller type from
your project.
4. From the option list, select the custom PID associated with the display/gauge you are creating.
5. Perform this one at a time for the desired display/gauges.
6. Displays can be edited by touch/holding on any display/gauge until an option list shows – select
“Display Configuration” to edit or test.
So it looks like you want to create a PID.csv file with the CAN IDs used by your inverter/Orion and copy it to your mobile device running the Torque Pro app. I don't have Torque Pro yet so I'm not sure of the format of the csv it's looking for but there might be existing files in Internal shared storage\.torque\extendedpids\ to give you an idea.

In terms of getting Orion to recognise the RPM from the inverter, in very broad terms you need to make sure the Message ID and bit position of the RPM value Orion is listening for matches that being sent from the inverter. So you can either edit the Orion listener to match what the inverter is sending or configure the inverter to send the RPM using the Message ID and format that Orion is expecting by default.
peterdiffey
Posts: 17
Joined: Sun Aug 20, 2023 8:30 pm
Location: South Cumbria, UK
Has thanked: 6 times
Been thanked: 4 times

Re: Torque app and Canbus

Post by peterdiffey »

Hi I have Zombieverter v2.15 installed and attached to a Leaf inverter and EM57 motor.

I am trying to connect to Torque Pro running on an Android phone via a wired OBD-2 connector and a Konnwei BT adapter. The LEDs on the adapter flicker, however I am unable to get RPM data.

It seems all can messages are going out on CAN1 bus, I get nothing on CAN2 (using a 'scope).

Reading the Can_OBD2.cpp file, it looks like the inverter spits out standard RPM messages, ie RPM should be 0x0C, however I don't get anything into Torque.

Anybody managed to connect this way?
Pete
peterdiffey
Posts: 17
Joined: Sun Aug 20, 2023 8:30 pm
Location: South Cumbria, UK
Has thanked: 6 times
Been thanked: 4 times

Re: Torque app and Canbus

Post by peterdiffey »

Further investigation by dumping the can messages using a Hobbytronics canbus device, I do not get RPM messages.
The only messages I see on the canbus are:
0x0120
0x011A
0x01D4
0x01DA
0x01DB
0x01DC
0x050B
0x055A
0x055B
0x059E
0x05BC

As far as I know RPM messages are sent out at 100ms intervals, and are not can response messages, so either there is a bug in the code or there is a zombieverter config setting I have missed.

Any ideas?
Pete
royhen99
Posts: 222
Joined: Sun Feb 20, 2022 4:23 am
Location: N. Wiltshire. UK
Has thanked: 19 times
Been thanked: 111 times

Re: Torque app and Canbus

Post by royhen99 »

No request or reply on 0x7df and 0x7e8.
I don't have Torque app but by sending the appropriate request on 0x7df with SavvyCAN I get the correct rpm data on 0x7e8.
peterdiffey
Posts: 17
Joined: Sun Aug 20, 2023 8:30 pm
Location: South Cumbria, UK
Has thanked: 6 times
Been thanked: 4 times

Re: Torque app and Canbus

Post by peterdiffey »

Hi Roy,
After further poking about and reading Damien's code, I realised my error, years of using Torque on various cars, I had not realised that Torque was seeing canbus messages that were in response to requests sent from the car VCU, ie in most cases it just snoops on canbus activity.

I have been looking at the the Torque 'extra PID' functionality, and figured I need to send 7DF, but no success.

I have a Hobbytronics canbus arduino board, there is a getRPM script in the arduino library, I found that works just fine, so more experimenting with Torque...
Pete
johnlr
Posts: 20
Joined: Mon Mar 20, 2023 10:55 am
Has thanked: 1 time
Been thanked: 10 times

Re: Torque app and Canbus

Post by johnlr »

peterdiffey wrote: Fri May 17, 2024 6:59 pm The only messages I see on the canbus are:
0x0120
0x011A
0x01D4
0x01DA
0x01DB
0x01DC
0x050B
0x055A
0x055B
0x059E
0x05BC
You can find RPM in message 0x01DA 10ms message
User avatar
uhi22
Posts: 777
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 112 times
Been thanked: 472 times

Re: Torque app and Canbus

Post by uhi22 »

To clarify some confusion: From what I know the torque app uses diagnostic communication, not the normal cyclic CAN messages. The diagnostic of a certain control unit runs over a pair of CAN messages, a request (from the diagnostic tester, e.g. torque, to the control unit), and a response (from the control unit to the tester). The diagnostic communication uses a transport protocol (ISO-TP), which allows to transport longer messages (at least some hundred bytes), and these are split-up into the normal 8-byte-CAN messages.
When using torque, the torque sends e.g. a ReadDataByIdentifier UDS message, with a certain diagnostic identifier (DID). A control unit normally supports multiple (many) DIDs. So to use torque to read a certain information, we need the following:
- the request CAN ID
- the response CAN ID
- the DID
- the position of the information in the response message
johnlr
Posts: 20
Joined: Mon Mar 20, 2023 10:55 am
Has thanked: 1 time
Been thanked: 10 times

Re: Torque app and Canbus

Post by johnlr »

The attached may help (found online somewhere), it only shows the decoding for motor torque and temperature, so you would have to figure out to get rpm.
Attachments
Leaf2018-CAN.pdf
(146.24 KiB) Downloaded 22 times
tom91
Posts: 1417
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 116 times
Been thanked: 253 times

Re: Torque app and Canbus

Post by tom91 »

Founder Volt Influx https://www.voltinflux.com/
Webstore: https://citini.com/
peterdiffey
Posts: 17
Joined: Sun Aug 20, 2023 8:30 pm
Location: South Cumbria, UK
Has thanked: 6 times
Been thanked: 4 times

Re: Torque app and Canbus

Post by peterdiffey »

uhi22 wrote: Fri Jun 07, 2024 9:47 am To clarify some confusion: From what I know the torque app uses diagnostic communication, not the normal cyclic CAN messages. The diagnostic of a certain control unit runs over a pair of CAN messages, a request (from the diagnostic tester, e.g. torque, to the control unit), and a response (from the control unit to the tester). The diagnostic communication uses a transport protocol (ISO-TP), which allows to transport longer messages (at least some hundred bytes), and these are split-up into the normal 8-byte-CAN messages.
When using torque, the torque sends e.g. a ReadDataByIdentifier UDS message, with a certain diagnostic identifier (DID). A control unit normally supports multiple (many) DIDs. So to use torque to read a certain information, we need the following:
- the request CAN ID
- the response CAN ID
- the DID
- the position of the information in the response message
Thanks for that, Youtube has not been q good source of info on Canbus, the subject is well covered at the physical layer, ie Can ID, messages formats etc, but there is very little on the higher level protocols, so I had not delved into the ISO-TP stuff most videos totally ignore that stuff. Does anybody know of a good primer on practical usage of iso-tp?

I have managed to get some data out of zombieverter by modifying Damien's Can_OBD2.cpp code, but it it is mostly poke and hope!

Pete
Pete
User avatar
uhi22
Posts: 777
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 112 times
Been thanked: 472 times

Re: Torque app and Canbus

Post by uhi22 »

Maybe this: https://munich.dissec.to/kb/chapters/isotp/isotp.html and this: https://en.wikipedia.org/wiki/ISO_15765-2 for the beginning.
In case of detailled questions I think I can explain some details.
Post Reply