CAN Bus Communication with Megasquirt 3

General support questions and announcements for MS3. See also MS3 manuals.

Moderators: jsmcortina, muythaibxr

Post Reply
jacob80
Helpful MS/Extra'er
Posts: 71
Joined: Mon Mar 26, 2012 2:22 pm

CAN Bus Communication with Megasquirt 3

Post by jacob80 »

Hello!

I am working on a project which will fetch engine status data (RPM, coolant temp, etc.) from the Megasquirt 3 Box via CAN bus.

I'm just getting into the CAN bus stuff, but wanted to clarify and confirm that I can, indeed, ask Megasquirt to send, say, a coolant temperature over CAN bus to my device.

Is there any issue getting this type of information from the Megasquirt box?

Thanks for your assistance!
93white3400z
Master MS/Extra'er
Posts: 685
Joined: Mon Aug 25, 2008 11:37 pm
Location: Montreal, Quebec

Re: CAN Bus Communication with Megasquirt 3

Post by 93white3400z »

Of course you can! You have access to the whole outpc data which is equivalent to the "A" serial command.
1993 Chevrolet Cavalier Z24
3400 Turbocharged Inter-cooled
MS3 v3.57+MS3X
jacob80
Helpful MS/Extra'er
Posts: 71
Joined: Mon Mar 26, 2012 2:22 pm

Re: CAN Bus Communication with Megasquirt 3

Post by jacob80 »

93white3400z wrote:Of course you can! You have access to the whole outpc data which is equivalent to the "A" serial command.
That's good to hear!

On top of this, is the CAN interface Megasquirt uses the same protocol as ODBII CAN communication interface?
93white3400z
Master MS/Extra'er
Posts: 685
Joined: Mon Aug 25, 2008 11:37 pm
Location: Montreal, Quebec

Re: CAN Bus Communication with Megasquirt 3

Post by 93white3400z »

Nope, not at all :)
1993 Chevrolet Cavalier Z24
3400 Turbocharged Inter-cooled
MS3 v3.57+MS3X
racingmini_mtl
Super MS/Extra'er
Posts: 9130
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: CAN Bus Communication with Megasquirt 3

Post by racingmini_mtl »

You should have a look here: http://www.msextra.com/doc/ms3/can_tech.html.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
jsmcortina
Site Admin
Posts: 39617
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: CAN Bus Communication with Megasquirt 3

Post by jsmcortina »

See also
http://www.msextra.com/doc/pdf/html/Meg ... 3-247.html
and
http://www.msextra.com/forums/viewtopic ... 25&t=53115

For a new project that only needs to read data, I would suggest going the standard 11bit header route and enabling the new broadcast feature.

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

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
jacob80
Helpful MS/Extra'er
Posts: 71
Joined: Mon Mar 26, 2012 2:22 pm

Re: CAN Bus Communication with Megasquirt 3

Post by jacob80 »

jsmcortina wrote:See also
http://www.msextra.com/doc/pdf/html/Meg ... 3-247.html
and
http://www.msextra.com/forums/viewtopic ... 25&t=53115

For a new project that only needs to read data, I would suggest going the standard 11bit header route and enabling the new broadcast feature.

James
James,

Thank you for your quick response. I assume these documents break down this 11-bit header and broadcast feature set.

Is writing over CAN bus ideal? Or is RS232 still the preferred method? I've only written to my MS box via serial, and this Megasquirt 3 is brand new to me!
jsmcortina
Site Admin
Posts: 39617
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: CAN Bus Communication with Megasquirt 3

Post by jsmcortina »

For tuning your Megasquirt, stick with serial.

For simple configuration of an add-on that want to read some data, the new CAN broadcasting should be more compatible with regular CAN library code you are likely to find. The Megasquirt CAN protocol is proprietary and quite different with a steeper learning curve.

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

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
jacob80
Helpful MS/Extra'er
Posts: 71
Joined: Mon Mar 26, 2012 2:22 pm

Re: CAN Bus Communication with Megasquirt 3

Post by jacob80 »

jsmcortina wrote:For tuning your Megasquirt, stick with serial.

For simple configuration of an add-on that want to read some data, the new CAN broadcasting should be more compatible with regular CAN library code you are likely to find. The Megasquirt CAN protocol is proprietary and quite different with a steeper learning curve.

James
Thanks James, good information right there.

So tuning Megasquirt, stick with serial. Got it.

How about controlling fans, nitrous, etc? Can you do this over CAN bus? It'd be cool to have a push button device that tells Megasquirt to do things at the push of a button.
Post Reply