CANbus to Instruments etc. working

This forum is for the discussion of other projects on Megasquirt/Microsquirt hardware that don't fit into any of the other forums

Moderators: jsmcortina, muythaibxr

Re: CANbus to Instruments etc. working

Postby racingmini_mtl » Thu Aug 23, 2012 1:59 pm

NArcher wrote:@ stevevp
I would like to get my instrument cluster to talk with my MS3. I have a Mazda 3 that I recently installed MS3+MS3X on, but do not have rpm, speed, etc., because I could not figure out how to communicate with instrument cluster. I have the hex ID's for most of the signals that the Mazda 3 uses on CAN, but I'm only a novice programmer at best and cannot figure out how to implement the signals to allow MS to communicate with instrument cluster. Maybe someone can help me on this? Any help is much appreciated! I can also make a donation if need be for this to happen.

Post what you have. You not only need the ID but also the content of the message so that the correct value is displayed.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
racingmini_mtl
Super MS/Extra'er
 
Posts: 7950
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada

Re: CANbus to Instruments etc. working

Postby NArcher » Thu Aug 23, 2012 3:44 pm

This is what I have so far. I will try to dig up more info.
NArcher
Helpful MS/Extra'er
 
Posts: 55
Joined: Wed Mar 23, 2011 1:38 pm

Re: CANbus to Instruments etc. working

Postby stevevp » Thu Aug 23, 2012 4:19 pm

Be aware from the start this is going to be a big job, and a large number of signals need to be emulated that the MS3 currently does not know or care about.
The MS3 firmware will need to be modified to suit or cheat a little and grab a MSGPIO to look after the extra signals with your own firmware and interfaces.

I would start with the first and second bytes of 201 as per below.

Code: Select all
        id = 0x201 //
        dataLen = 0x08;
        data[0] = (unsigned char)((outpc.rpm) & 0x00FF ); //byte 1 = RPM, L
        data[1] = (unsigned char)((outpc.rpm) /256 );        //byte 2 = RPM, H
        data[2] = 0x00;
        data[3] = 0x00;
        data[4] = 0x00;
        data[5] = 0x00;
        data[6] = 0x00;
        data[7] = 0x00;
        ECANSendMessage(id, data, dataLen, MSG_STD);


or maybe reversed high and low values

Code: Select all
        id = 0x201 //
        dataLen = 0x08;
        data[0] = (unsigned char)((outpc.rpm) /256 );        //byte 1 = RPM, H
        data[1] = (unsigned char)((outpc.rpm) & 0x00FF ); //byte 2 = RPM, L
        data[2] = 0x00;
        data[3] = 0x00;
        data[4] = 0x00;
        data[5] = 0x00;
        data[6] = 0x00;
        data[7] = 0x00;
        ECANSendMessage(id, data, dataLen, MSG_STD);


and keep adding signals until you are happy its enough.

another valuable tool for this kind of development is a canbus interface
Microchip do a very effective one http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en546534
Steve
stevevp
Helpful MS/Extra'er
 
Posts: 37
Joined: Fri Nov 11, 2011 3:43 am
Location: Brisbane, Australia

Re: CANbus to Instruments etc. working

Postby Black99rt » Mon Aug 27, 2012 8:02 am

Matt Cramer wrote:
Paul_VR6 wrote:I am can-stupid, but can this be used to send generic different format can messages to an aftermarket digital dash?


AIM has already set up their MXL series digital dashes to talk to MegaSquirt CAN.


Can you point me to documentation for this? Their website doesn't seem to mention MS, nor do their integration documents I could find.
1999 Dakota 5.9L R/T-
MSIIe 3.1.2 Batch Fuel/MSD single coil dizzy/Stepper idle
LC-1
Black99rt
Experienced MS/Extra'er
 
Posts: 364
Joined: Tue Mar 14, 2006 10:38 am

Re: CANbus to Instruments etc. working

Postby atomic6 » Mon Aug 27, 2012 8:32 am

1986 G.N. (sold)
1967 Nova II wagon (sold)
ex-MSer
atomic6
Experienced MS/Extra'er
 
Posts: 317
Joined: Sat Nov 13, 2004 11:29 pm
Location: omaha

Re: CANbus to Instruments etc. working

Postby NArcher » Sat Sep 01, 2012 12:56 pm

I will begin working on implementing the MS3 CAN into my current car's network this weekend. Thanks everyone for their inputs. I would like to try the AIM display, but with a price tag of over $1000, I can't fit it into my project car budget. :(
NArcher
Helpful MS/Extra'er
 
Posts: 55
Joined: Wed Mar 23, 2011 1:38 pm

Re: CANbus to Instruments etc. working

Postby piledriver » Mon Sep 03, 2012 9:18 pm

Heck, I'm looking at a 996 cluster on ebay, and i have a sawzall in my right hand...
Wanted to redo my dash anyway.
Is there any particular cluster that's preferred?

Is this code in mainline yet, or is there a patch handy?
(I guess I have to wait until the current non-buggy ms3 code is released?)
Always doing things the hard way, MS2 sequential w/ v1.01 mainboard, LS2 coils. 80 mile/day commuter status.
piledriver
Super MS/Extra'er
 
Posts: 1634
Joined: Tue Oct 27, 2009 6:24 am
Location: Van Alstyne, Texas

Re: CANbus to Instruments etc. working

Postby NArcher » Tue Sep 04, 2012 1:04 am

I hope James can release the source code soon. Can we just copy and paste the code that is in the previous posts? I understand that I am going to have to modify the code to suite my unique situation (i.e. CAN id's, data values, ect.) but, what else is required to get this running? I guess I am going to have to play with it when the source code comes out.
NArcher
Helpful MS/Extra'er
 
Posts: 55
Joined: Wed Mar 23, 2011 1:38 pm

Re: CANbus to Instruments etc. working

Postby stevevp » Tue Sep 04, 2012 6:02 am

any of the 996 canbus enabled clusters will do - even boxster if you wish
2001+ I think, with the small clock and digital speed windows in dials 2&4
Steve
stevevp
Helpful MS/Extra'er
 
Posts: 37
Joined: Fri Nov 11, 2011 3:43 am
Location: Brisbane, Australia

Re: CANbus to Instruments etc. working

Postby piledriver » Tue Sep 04, 2012 10:23 am

stevevp wrote:any of the 996 canbus enabled clusters will do - even boxster if you wish
2001+ I think, with the small clock and digital speed windows in dials 2&4


Excellent, flexible is good.
Always doing things the hard way, MS2 sequential w/ v1.01 mainboard, LS2 coils. 80 mile/day commuter status.
piledriver
Super MS/Extra'er
 
Posts: 1634
Joined: Tue Oct 27, 2009 6:24 am
Location: Van Alstyne, Texas

Re: CANbus to Instruments etc. working

Postby stevevp » Tue Sep 04, 2012 4:46 pm

the best way to confirm a series two dash is the connectors on the rear

green/blue/grey = series two with canbus

black/white/blue = series one without

Image
Steve
stevevp
Helpful MS/Extra'er
 
Posts: 37
Joined: Fri Nov 11, 2011 3:43 am
Location: Brisbane, Australia

Re: CANbus to Instruments etc. working

Postby piledriver » Tue Sep 11, 2012 9:28 pm

Thank you for the pic!

I was ...amused... to discover that Boxster clucsters seem to go for the same or more than 996 clusters, esp if you can replace the clock/odo reset stalks..
(looks like there's probably a decent buisiness just doing that, they must be horribly delicate things)

My only worry at this pont is will it FIT.
(...and... will it be supported in the ms3 firmware)

I'm trying to find a scan or pattern or something with dimensions with no joy, I don't want it sticking halfway up my windscreen.

Have ordered an SLC-OEM eval kit and set aside the funds for a IOX for my first foray into CAN, but this is still up there on my list, as I despise my current dash.
Always doing things the hard way, MS2 sequential w/ v1.01 mainboard, LS2 coils. 80 mile/day commuter status.
piledriver
Super MS/Extra'er
 
Posts: 1634
Joined: Tue Oct 27, 2009 6:24 am
Location: Van Alstyne, Texas

Re: CANbus to Instruments etc. working

Postby acab » Tue Sep 18, 2012 12:21 pm

i add fiat\alfa\lancia C-CAN (can line from stock ecu to body computer)

Since rpm information from the engine control unit node (NCM) travels on the C-CAN network (high transmission speed) to reach the instrument panel node (NQS), which is connected to the B-CAN network (low transmission speed) it must be processed by the Body Computer (NBC) via the gateway function. Only after reprocessing does the body computer transfer the required information to the instrument panel node via the B-CAN network. (rev counter management)


Code: Select all
561 8 00 00 00 xx 00 00 00 00
xx= kühlmitteltemperatur -40 gr.C bis + 215 gr.C / auflösung 1 gr.C / offset - 40gr.C

561 8 00 00 00 00 xx xx 00 00
xx= kraftstoffverbrauch (fuel consumption) 0-132 L/Stunde
auflösung 0,0022

561 8 00 00 00 00 00 00 xx 00
xx= motordrehzahl 0-8000 upm / auflösung 32 upm


I write some programm for my Alfa Romeo
Image

Video with work...
http://www.youtube.com/watch?v=Ly7jbOvC ... r_embedded

I make all that, becouse i didnt wanna disconnect body computer from dashboard. I wanna see some stuff like outside temp, opened dors and other usefull stuff.
User avatar
acab
Experienced MS/Extra'er
 
Posts: 207
Joined: Tue Aug 21, 2012 5:52 am
Location: Minsk, BY

Re: CANbus to Instruments etc. working

Postby NArcher » Thu Dec 20, 2012 3:03 pm

Did anyone get this code working with MS3? I copied the code, just not sure where to put it.
NArcher
Helpful MS/Extra'er
 
Posts: 55
Joined: Wed Mar 23, 2011 1:38 pm

Re: CANbus to Instruments etc. working

Postby jsmcortina » Thu Dec 20, 2012 4:07 pm

NArcher wrote:Did anyone get this code working with MS3? I copied the code, just not sure where to put it.

It is already included in MS3.

James
I can supply, repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 33830
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: CANbus to Instruments etc. working

Postby NArcher » Thu Dec 20, 2012 5:00 pm

Thanks James, I'll look at it tonight.
NArcher
Helpful MS/Extra'er
 
Posts: 55
Joined: Wed Mar 23, 2011 1:38 pm

Re: CANbus to Instruments etc. working

Postby frank_ster » Thu Dec 20, 2012 5:22 pm

any chance of 2005 subaru legacy ? can dash control ?

how are you guys identifying each can bit ? i have access to a scope. various atmega chips and atmega avr in system programmer.
2005 subaru legacy with buick grandnational engine and awd :D
1976 gmc k10 pickup vortec 383 tbi ms2 nv4500 3.42 final drives
frank_ster
Experienced MS/Extra'er
 
Posts: 226
Joined: Tue Sep 11, 2007 11:07 am

Re: CANbus to Instruments etc. working

Postby NArcher » Sat Dec 22, 2012 2:27 pm

frank_ster wrote:any chance of 2005 subaru legacy ? can dash control ?

how are you guys identifying each can bit ? i have access to a scope. various atmega chips and atmega avr in system programmer.


Stevevp mentioned earlier in this post of a CAN tool to analyze CAN signals and retrieve the ID's and bits. Other than that, you can do an exhuaustive search on the web like I did to find the necessary info. :D
NArcher
Helpful MS/Extra'er
 
Posts: 55
Joined: Wed Mar 23, 2011 1:38 pm

Re: CANbus to Instruments etc. working

Postby frank_ster » Sat Dec 22, 2012 10:10 pm

maybe we could get racingmini_mtl to make such a device. sort of a reverse jim stim.

what do you think jean ?
2005 subaru legacy with buick grandnational engine and awd :D
1976 gmc k10 pickup vortec 383 tbi ms2 nv4500 3.42 final drives
frank_ster
Experienced MS/Extra'er
 
Posts: 226
Joined: Tue Sep 11, 2007 11:07 am

Re: CANbus to Instruments etc. working

Postby racingmini_mtl » Sat Dec 22, 2012 10:59 pm

I don't see the link with the JimStim.

What you need is a CAN sniffer that will read the CAN messages from a working setup. But then the fun begins: you need to identify what each ID message is for and what the format of the payload is. For example from all the messages going through the bus, you need to find which ID has the RPM data in it and then find you how that data is encoded in the payload. That could be months of boring an tedious work.

That's why the data is so hard to find on the web. Most people who have spent the time and money to find this information (since the OEM doesn't make that available) will keep it for themselves and sell products that use this information.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
racingmini_mtl
Super MS/Extra'er
 
Posts: 7950
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada

PreviousNext

Return to Other Development

Who is online

Users browsing this forum: No registered users and 1 guest