Nissan 370Z Forum  

CAN-bus project

Hi all, I've started an open source project to interface a carPC with the CAN-bus in the car. In theory this should allow me to do everything a typical OBDII

Go Back   Nissan 370Z Forum > Nissan 370Z Tech Area > Audio & Video


Like Tree3Likes
  • 3 Post By Knio

Reply
 
LinkBack Thread Tools Display Modes
Old 10-08-2012, 03:43 PM   #1 (permalink)
Base Member
 
Knio's Avatar
 
Join Date: May 2011
Location: Palo Alto, CA
Posts: 141
Drives: 40th
Rep Power: 14
Knio has a spectacular aura aboutKnio has a spectacular aura about
Default CAN-bus project

Hi all,

I've started an open source project to interface a carPC with the CAN-bus in the car. In theory this should allow me to do everything a typical OBDII scanner can do, but also give access to data and sensors that aren't exposed over OBDII, and also the ability to control/automate some parts of the car, and possibly use as an alternative to buying a CONSULT-III.

For example, as a proof of concept, I've gotten my laptop to read the 6MT gear position sensor, headlight knob, and start button, so you could use these as inputs to do whatever you wanted on a carpc.

After searching for a while, I haven't found much information about the Nissan's CANbus. Does anyone know of any documentation/manuals for the data protocols used, or about the consult-III interface, or any similar software? I found nissandatascan.com but that's only for older nissans before canbus.

I will keep reverse engineering it myself if I have do, but if anyone knows more it would speed up the process


CAN interface: CANUSB - The Low cost CAN to USB converter

First data log: privatepaste.com :: Paste ID 33001e0679
Knio is offline   Reply With Quote
Old 10-08-2012, 04:01 PM   #2 (permalink)
Premium Member
 
SouthArk370Z's Avatar
 
Join Date: Nov 2010
Location: South Arkansas
Posts: 8,435
Drives: 2014 Challenger
Rep Power: 324198
SouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond repute
Default

I have been looking for a project like this. I have been trying to find out where the vehicle-specific PIDs are, but without much luck. The info is proprietary and all I have to work with is a ScanGaugeII and a few freebie monitoring apps for my laptop. The freebies are nice for logging data, but, as one would expect from a freebie, aren't much good for exploring (or maybe I just haven't figured it out).
If I can be of any help, please PM me.

I have a private wiki set up on my personal server that has a database I've filled with most of the Mode 1-3 PIDs with description, data format, range, raw data to human readable form formulae (for ScanGaugeII, but should be easy to convert to any other device/app that allows custom entries), &c.
If you would like access to that, just PM me and I'll setup an acct for you. The wiki was setup just for my own use, but if you want to add your data, I will open it up to at least The370Z members, if not the Universe.
SouthArk370Z is offline   Reply With Quote
Old 10-09-2012, 03:20 PM   #3 (permalink)
Base Member
 
Knio's Avatar
 
Join Date: May 2011
Location: Palo Alto, CA
Posts: 141
Drives: 40th
Rep Power: 14
Knio has a spectacular aura aboutKnio has a spectacular aura about
Default

Quote:
Originally Posted by SouthArk370Z View Post
I have been looking for a project like this. I have been trying to find out where the vehicle-specific PIDs are, but without much luck. The info is proprietary and all I have to work with is a ScanGaugeII and a few freebie monitoring apps for my laptop. The freebies are nice for logging data, but, as one would expect from a freebie, aren't much good for exploring (or maybe I just haven't figured it out).
If I can be of any help, please PM me.

I have a private wiki set up on my personal server that has a database I've filled with most of the Mode 1-3 PIDs with description, data format, range, raw data to human readable form formulae (for ScanGaugeII, but should be easy to convert to any other device/app that allows custom entries), &c.
If you would like access to that, just PM me and I'll setup an acct for you. The wiki was setup just for my own use, but if you want to add your data, I will open it up to at least The370Z members, if not the Universe.
Thanks!! I'll PM you a bit later, I just got started and haven't coded PID scanning yet. It should help a lot.
Knio is offline   Reply With Quote
Old 10-10-2012, 10:09 AM   #4 (permalink)
A True Z Fanatic
 
DIGItonium's Avatar
 
Join Date: Jan 2009
Location: Kansas
Posts: 3,800
Drives: 09 Z34-TT 6MT
Rep Power: 42
DIGItonium has a reputation beyond reputeDIGItonium has a reputation beyond reputeDIGItonium has a reputation beyond reputeDIGItonium has a reputation beyond reputeDIGItonium has a reputation beyond reputeDIGItonium has a reputation beyond reputeDIGItonium has a reputation beyond reputeDIGItonium has a reputation beyond reputeDIGItonium has a reputation beyond reputeDIGItonium has a reputation beyond reputeDIGItonium has a reputation beyond repute
Default

I recommend creating a database of the PIDs so your program can run an SQL query to pull up the PID definition to decode and display the data. You can probably pull up a bunch of PIDs and not have immediate information, so it's nice to build this database to constantly update the PID definitions.

So column headers can include ID, data size, MSB/LSB resolution, units, etc. It'll be fairly flat, unless you want to make it relational by creating tables listing units, etc.

If you like, you can make the display HTML formatted so one can create all sorts of display styles or use images. Imagine using an image to indicate valve or switch opening and closing, or use color text to indicate warnings.
__________________
http://www.the370z.com/image.php?type=sigpic&userid=950&dateline=13162988  42
DIGItonium is offline   Reply With Quote
Old 03-22-2013, 11:23 PM   #5 (permalink)
Base Member
 
Knio's Avatar
 
Join Date: May 2011
Location: Palo Alto, CA
Posts: 141
Drives: 40th
Rep Power: 14
Knio has a spectacular aura aboutKnio has a spectacular aura about
Default

Update!

I've figured out a lot of the data I'm getting off the CAN-bus, and there's lots of cool stuff in there. I've started making a datalogging app to see what everything is doing, you can check out the prototype at CarHack

I'm looking forward to using it next autocross... and there's still lots more I haven't figured out yet.
GaleForce, gomer_110 and asorg31 like this.
Knio is offline   Reply With Quote
Old 03-23-2013, 04:50 PM   #6 (permalink)
A True Z Fanatic
 
cheshirecat's Avatar
 
Join Date: Jan 2009
Location: Florida
Posts: 1,428
Drives: N54 135i
Rep Power: 292
cheshirecat has a reputation beyond reputecheshirecat has a reputation beyond reputecheshirecat has a reputation beyond reputecheshirecat has a reputation beyond reputecheshirecat has a reputation beyond reputecheshirecat has a reputation beyond reputecheshirecat has a reputation beyond reputecheshirecat has a reputation beyond reputecheshirecat has a reputation beyond reputecheshirecat has a reputation beyond reputecheshirecat has a reputation beyond repute
Default

The BMW guys do a lot of Canbus stuff. I'm not too familiar with the code myself but it may be a place to look.
cheshirecat is offline   Reply With Quote
Old 07-29-2013, 09:55 PM   #7 (permalink)
A True Z Fanatic
 
sig11's Avatar
 
Join Date: Jun 2009
Location: Detroit
Posts: 1,294
Drives: 09 370Z Red Sport-MT
Rep Power: 18
sig11 has a spectacular aura aboutsig11 has a spectacular aura about
Default

This is awesome and I can't believe I just found it now. I just started working on OpenXC and have been dreaming a bit about reverse engineering the 370's can. What do you guys recommend for a cheap interface?

Will be a lot harder to add signals without p-can and the dbc files but I can add some support.
sig11 is offline   Reply With Quote
Old 08-26-2013, 03:37 AM   #8 (permalink)
A True Z Fanatic
 
wstar's Avatar
 
Join Date: Mar 2009
Location: Houston, TX
Posts: 4,024
Drives: too slow
Rep Power: 3594
wstar has a reputation beyond reputewstar has a reputation beyond reputewstar has a reputation beyond reputewstar has a reputation beyond reputewstar has a reputation beyond reputewstar has a reputation beyond reputewstar has a reputation beyond reputewstar has a reputation beyond reputewstar has a reputation beyond reputewstar has a reputation beyond reputewstar has a reputation beyond repute
Default

Anyone have technical details about accessing some of these values on the canbus (specific addresses / modes / PIDs / whatever)?

My biggest wishlist stuff to get get from the CAN bus:

1) Brake Pedal Pos (for the datalogger)
2) Oil temp (to feed datalogger, also to display on dash somewhere so I can get rid of the triple-meter).
3) 7AT TCM Temp (also for datalogger + dash).

If I at least had technical details, maybe I could get RaceKeeper to consider adding support for logging them alongside my other data. It would be really cool to get the those two temps onto CAN-driven dash gauges as well, something like this: 2-1/16" Freedom CAN-BUS Oil Temp Gauge 140-300F. Auto No Warning Light From Speedhut. , but those are for late-model GM ECUs only.

I had a hint on oil temps in the past, which I lifted from elsewhere... Mode 45 (that's hex, I think, not decimal?), PID 111F (hex). I never got any results trying to use that in various ways through simple OBD-II tools like Torque, though.
__________________
7AT Track Car!
Journal thread / Car setup details
wstar is offline   Reply With Quote
Old 08-26-2013, 08:26 AM   #9 (permalink)
Premium Member
 
SouthArk370Z's Avatar
 
Join Date: Nov 2010
Location: South Arkansas
Posts: 8,435
Drives: 2014 Challenger
Rep Power: 324198
SouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond reputeSouthArk370Z has a reputation beyond repute
Default

Quote:
Originally Posted by wstar View Post
Anyone have technical details about accessing some of these values on the canbus (specific addresses / modes / PIDs / whatever)? ...
I did some researching about a year ago but got frustrated by the lack of free data for the non-standard PIDs (most, if not all, modes above $0A are proprietary). Most of the info is available but it is quite expensive - too much for a hobbyist. You can find most of my results at the link in my sig.

If you look through Knio's source code, you can find the Mode/PIDs he is using.

During my research, I got the feeling that some of the CAN-to-computer I/Fs were not made for "exploring" the CAN bus. They massage the data and will sometimes not pass certain messages. Not sure this is actually true. Apparently, the I/F Knio is using works well.


Edit: PS: As far as I can tell, mode and PID addresses are always given in hex.
__________________
Steering Lock Links - Search The370Z Bookmarklet - FSM @ NICOclub
Mankind has progressed past the need for war but we haven't evolved that far. - NachoMahma
SouthArk370Z is offline   Reply With Quote
Old 09-04-2013, 11:44 AM   #10 (permalink)
Enthusiast Member
 
mfeinst's Avatar
 
Join Date: May 2012
Location: Greater Philly Area
Posts: 272
Drives: Mercedes C43 AMG
Rep Power: 13
mfeinst is on a distinguished road
Default

Subbed for future info. Very interested in something like this.
mfeinst is offline   Reply With Quote
Old 09-04-2013, 08:21 PM   #11 (permalink)
Base Member
 
sylpher's Avatar
 
Join Date: Aug 2013
Location: TN
Posts: 47
Drives: 10 PG Nismo
Rep Power: 12
sylpher is on a distinguished road
Default

agreed
__________________
2010 Nissan 370z Nismo - Platinum Graphite / 6MT / Stillen G3 / Window Tint / Alpine INE-W927HD
sylpher is offline   Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Project RB-Z docaam Member's 370Z Gallery 335 04-10-2015 09:26 AM
Project X windex Movies / Celebrity Gossip / Entertainment / Music 2 03-11-2012 03:16 PM
new project car Z_ealot Nissan 370Z General Discussions 7 01-30-2012 10:31 PM
My new project car! SCORPION Nissan 370Z General Discussions 8 01-27-2012 12:51 PM
Project Mu MursePaolo Brakes & Suspension 4 07-01-2009 03:00 AM


All times are GMT -5. The time now is 11:38 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 PL2