Getting Leaf to talk to Torque App (OBD2 custom PIDs)

My Nissan Leaf Forum

Help Support My Nissan Leaf Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

miscrms

Well-known member
Joined
Sep 5, 2014
Messages
142
Location
Phoenix, AZ
This is still mostly academic interest at this point, but I wanted to try and understand what it would take to get the Leaf talking to the Torque App on Android. This is not intended as a knock on LeafSpy, which is a phenomenally useful tool. It's DTC capabilities alone have already been indispensable and well worth the purchase price. I just have a potential interest in doing customized dash board type layouts on a tablet that can't be done with LeafSpy. The options seem to be to create my own fully custom HW and SW, or look at what is required to get the Torque App working and leverage its existing display capabilities and flexibility.

Here's my understanding of the problem, which is admittedly limited. At this point I understand CAN a little, but OBD2 almost not at all.

Torque normally requests and receives standard OBD2 parameters through the diagnostic port. These parameters are common to all modern vehicles as required by emissions laws. Additionally Torque has the capability to actively request custom parameters (PIDs) that are unique to specific vehicles, but are all still conveyed by a mechanism that is defined within the standard in terms of the request and response IDs. From that I've inferred that Torque does not have the ability to just listen passively for any custom defined CAN message ID, or perhaps even to talk CAN natively at all. What CAN info it can "see" may be all translated through the traditional OBD2 (K-line?) com format in a way that's defined in the standards. The problem then seems to be that the Leaf is not set up to provide these standard OBD2 outputs, or to respond to active PID requests as defined in the standard.

Hopefully I've got that about right. If so, here was my first thought.

Torque is already configured to talk directly to an Arduino board at least through bluetooth, possibly other interfaces as well:
https://torque-bhp.com/wiki/Arduino_code

There are also CAN interfaces and libraries available for the same Arduino boards:
https://www.sparkfun.com/products/13262

So I'm wondering if a possible solution could be to set up an Arduino board to listen to the Leaf CAR-CAN (similar to LeafSpy) and store the current value of various parameters into variables. And then respond to active PID requests from the Torque App by sending back the current value stored in the appropriate variable.

If that would work, it seems like a solution that while not trivial would require no custom HW and pretty minimal coding. As a reference, here are some partially relevant examples:
Using Torque as display for a non-automotive Arduino project.
Using Arduino Analog/Digital inputs to feed data to Torque from a pre-OBD2 car.
Arduino as an OBD2 interface for Torque.

Any thoughts/incites/corrections/points in the right direction would be much appreciated.

Thanks,
Rob
 
I think Turbo3 is the author of Leaf Spy.. if anybody can answer.. it is probably him.

Leaf drive train into a light fiberglass SAAB Sonnet... wooo boy.
gotta be a thrill... and smells better too !
 
Back
Top