CAN LOTUS BROADCAST

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

CAN LOTUS BROADCAST

Postby AbatelliCristian » Thu Jul 20, 2017 6:29 am

Hi,
is possible insert Lotus BROADCAST?
Last edited by AbatelliCristian on Thu Oct 26, 2017 4:25 pm, edited 1 time in total.
AbatelliCristian
Master MS/Extra'er
 
Posts: 787
Joined: Sun Oct 10, 2010 6:33 am

Re: CAN LOTUS BROADCAST

Postby AbatelliCristian » Tue Jul 25, 2017 12:59 pm

There is a chance to have this?
AbatelliCristian
Master MS/Extra'er
 
Posts: 787
Joined: Sun Oct 10, 2010 6:33 am

Re: CAN LOTUS BROADCAST

Postby motthomas » Wed Jul 26, 2017 11:02 am

Im not a developer but I can't see this being a priority given the specific application.

Your best bet is probably to use a CAN capable microcontroller to read the standard MS broadcast and rearrange the data into message formats readable by the Lotus dash.

Sent from my GT-I9305 using Tapatalk
motthomas
Helpful MS/Extra'er
 
Posts: 56
Joined: Wed Aug 24, 2011 2:06 am

Re: CAN LOTUS BROADCAST

Postby AbatelliCristian » Wed Jul 26, 2017 11:22 am

MS have CAN broadcast for other car (BMW, FIAT, LANCIA....). Why is problem insert this? I Think this upgrade is good for megasquirt and I think it's a simple code modification.
I would only like a response from developers. If you can not, I'll take other ways.
AbatelliCristian
Master MS/Extra'er
 
Posts: 787
Joined: Sun Oct 10, 2010 6:33 am

Re: CAN LOTUS BROADCAST

Postby jsmcortina » Wed Jul 26, 2017 1:01 pm

You've provided good information, so it should be possible in a future release.

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: 33911
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: CAN LOTUS BROADCAST

Postby AbatelliCristian » Wed Jul 26, 2017 1:26 pm

Hi James, thanks for replay.
do You have idea of the time? (to communicate it to my clients)

Thanks

Best Reagrds
Cristian
AbatelliCristian
Master MS/Extra'er
 
Posts: 787
Joined: Sun Oct 10, 2010 6:33 am

Re: CAN LOTUS BROADCAST

Postby AbatelliCristian » Fri Oct 06, 2017 6:49 am

news for Lotus CAN?
AbatelliCristian
Master MS/Extra'er
 
Posts: 787
Joined: Sun Oct 10, 2010 6:33 am

Re: CAN LOTUS BROADCAST

Postby AbatelliCristian » Wed Oct 25, 2017 8:02 am

News?

Regards
Cristian
AbatelliCristian
Master MS/Extra'er
 
Posts: 787
Joined: Sun Oct 10, 2010 6:33 am

Re: CAN LOTUS BROADCAST

Postby jsmcortina » Thu Oct 26, 2017 2:15 pm

AbatelliCristian wrote:Hi,
is possible insert Lotus BROADCAST?

For the white dash 1Mbit/s CAN (2004-2007):

CAN ID 0x400, period 10ms, Motorola endian format
/* 8 Data Bytes */

What was the source of this code? Is it under copyright?

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: 33911
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: CAN LOTUS BROADCAST

Postby AbatelliCristian » Thu Oct 26, 2017 2:52 pm

James,
I received this information from a friend. I do not know any other details.
Now I ask for info

Regards
Cristian
AbatelliCristian
Master MS/Extra'er
 
Posts: 787
Joined: Sun Oct 10, 2010 6:33 am

Re: CAN LOTUS BROADCAST

Postby flycat » Thu Oct 26, 2017 3:04 pm

Hi James, this info are writed from a guy on a lotustalk forum, he have maked a lcd dashboard for elise/exige to connect a original ecu, and it use this command set.

Bye, Luca
User avatar
flycat
Helpful MS/Extra'er
 
Posts: 51
Joined: Thu Jul 29, 2010 9:05 am
Location: slopes of Etna...

Re: CAN LOTUS BROADCAST

Postby jsmcortina » Thu Oct 26, 2017 4:01 pm

flycat wrote:Hi James, this info are writed from a guy on a lotustalk forum, he have maked a lcd dashboard for elise/exige to connect a original ecu, and it use this command set.

Bye, Luca

Yes... but I cannot just use his code without permission.

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: 33911
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: CAN LOTUS BROADCAST

Postby AbatelliCristian » Thu Oct 26, 2017 4:13 pm

I do not understand ... addresses could have been detected by a sniffer ...
AbatelliCristian
Master MS/Extra'er
 
Posts: 787
Joined: Sun Oct 10, 2010 6:33 am

Re: CAN LOTUS BROADCAST

Postby jsmcortina » Thu Oct 26, 2017 4:20 pm

AbatelliCristian wrote:I do not understand ... addresses could have been detected by a sniffer ...

You posted someone's code. By default it is protected by copyright. So unless that guy specifically gives permission to re-use it, I won't.

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: 33911
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: CAN LOTUS BROADCAST

Postby AbatelliCristian » Thu Oct 26, 2017 4:27 pm

It could be said in July ...
Removed post


Thanks
Cristian
AbatelliCristian
Master MS/Extra'er
 
Posts: 787
Joined: Sun Oct 10, 2010 6:33 am

Re: CAN LOTUS BROADCAST

Postby flycat » Thu Oct 26, 2017 10:35 pm

Now, from a lotustalk forum i have found this info:


400h 8 AA BB CC DD EE FF GG HH

AA -----------------------> adjusted speed ~= d(XXh)-11d (61h-->97-11=86 mph)

BB --------------------> unused (always 00)

CC DD --------------> tach rpms [d(CCh)*256]+d(DDh) 06 D2 = 1746 rpm

EE -----------> fuel level (00=empty, FF=full)

FF --------> engine temperature ~= d(XXh)-14d (D0-->208-14=194F)

GG -----> MIL (04-oil, 02-engine, 01-shift)

HH --> unused (always 00)

bitmask patterns:

01 00000001 shift light
02 00000010 engine light
04 00000100 oil light
08 00001000
10 00010000
20 00100000
40 01000000
80 10000000
the can trace that you posted in the other thread shows that at least bits 3 and 7 are used (40 and 08) in the MIL byte (byte 7 of 8). Also your trace shows that byte 8 (the one that reads 20) is now used whereas in 2005 it was not.
Finally the text frame only shows 7 bytes being able to be sent... have you ever seen a message on the cluster that is bigger than 7 bytes and if so can you post a quick trace.

frame data: aa bb cc ddeeff gg hh

aa = dash understands speed in kilometers per hour (good as i live in Australia and we are metric)

bb = unused

cc = first part of rpm. take rpm from ecu output eg. 4000rpm and divide by 256 = 15 (dont care about the decimal left overs(.625)) now convert 15 to hex (0F) and send to the dash.

dd = second part of rpm. take the second two digits of rpm eg 4090, now just use 90 and convert to hex (5A) and send to the dash.

ee = fuel - all depends on your ECU calibration. as Rob states - 00 - FF

ff = engine temp. dash needs to understand engine temp in deg F for some reason. and has an offset of -14. so for 90 deg C engine temp use the following: ((tempin * 9.0 / 5.0)+32)+14 where tempin variable is 90

gg = various dash lights:
send the following to the dash - all in hex. tc = traction control light.
00 = off. 01 = shift light. 02 = MIL. 03 = Mil&Shift. 04 = oil. 05 = oil&shift.
06 = oil&mil. 07 = oil&mil&shift. 08 = tc. 09 = tc&shift. 0a = tc&mil.
0b = tc&mil&shift. 0c = tc&oil. 0d = tc&oil&shift. 0e = tc&oil&mil.
0f = tc&oil&mil&shift

hh = unused by dash.
The lotus network uses a CAN based network for three conection points in the elise. these points are the ECU, the instrument cluster, and the OBD connector. CAN uses a twisted pair cabling with arbitration, which means that it still functions under a variety of conditions including either signal wire being severed or shorted to ground or 12 volts. it also uses differential signaling; both wires normally rest at 2.5 volts and a data bit is signalled by 3.5 volts on the CANH wire and 1.5 volts on the CANL wire. the advantage of this is that the differential between the two wires constitutes signal and any induced noise will either raise or lower both lines by the same amount, thus not changeing the differential.

the network follows the standard CAN 2.0 spec for the physical layer; it uses 120 ohm impedance twisted pair cabling with each line having a 60 ohm impedance in relation to gnd. the network uses standard TJA1054 CAN transcievers (texas instruments) or 82C251 (phillips). both are very common parts availabl through digikey. the wiring is as follows:

Code:
sig ECU cluster obd wire color
--------------------------------------------
can H 85 C1 6 red
can L 79 C7 14 violet
gnd -- A2 5,4 blk
the CAN spec specifies that a number of different bitrates can be used, with 250 and 500kbs being the most popular for C level or engine management networks. the elise actually goes one better and runs the network at 1000 kb/s or 1 mb/s which is actually very fast but does make the network more susceptable to noise issues; at 1MB, any loose connection in the signal wires causes data corruption. CAN specifies that data is transfered in frames; each frame has an ID#, a length descriptor and 1 to 8 bytes of data (sometimes a return request flag too). the ID number designates the type of information sent and sometimes also the sending node though multiple nodes can send messages with identical id's, it is not recommended. the arbitration mechansim is such that lower ID#'s are given priority over higher ones so that if two messages are transmitted at the same time, the node that is sending the higher ID# will back off and allow the lower one to transmit. (for more info on how this happens google the CAN spec and start reading) this allows for message prioritization, and consequently important messages (say like "switch on the high cam NOW!") are given low ID#'s to insure that they transmit as quickly as possible.

theelise regularly transmits only one frame/message ID# and that is 400h (hex). The message is transmitted and thus updated 10 times a second (allowing a resolution of 10 hz). the frame is 8 bytes and so far it looks as though 2 bytes are unused. the frame carries the following data: rpm, speed, temperature, MIL, and fuel. the frame layout and approximate conversions are as follows:

Code:
lotuseliseecu-->cluster broadcast frame


400h 8 AA BB CC DD EE FF GG HH

AA -----------------------> adjusted speed ~= d(XXh)-11d (61h-->97-11=86 mph)

BB --------------------> unused (always 00)

CC DD --------------> tach rpms [d(CCh)*256]+d(DDh) 06 D2 = 1746 rpm

EE -----------> fuel level (00=empty, FF=full)

FF --------> engine temperature ~= d(XXh)-14d (D0-->208-14=194F)

GG -----> MIL 06-on, 04-crank, 00-running, 01-shift light

HH --> unused (always 00)

the speed and temperature conversions are only approximate; they need to be calibrated against controlled readings. the fuel sender reading needs to be averaged over time as the value fluctuates in relation to the fuel sloshing around and moving the float. the MIL data may correspond to more than what i have listed; i have not had a chance to check bits 3-7.

one more thing: ii worked out the actual encoding of the speed sensor value... it works out to be:

d(xxh) * 0.68 = mph

so a value of ECh = 236 dec * 0.68 = 160 mph

http://www.lotustalk.com/forums/f129/ca ... sis-10866/

Elise/ExigeCanbus below:

CAN ID 0x400, period 10ms, Motorola endian format
/* 8 Data Bytes */
0 /* Vehicle Speed for speedo */
1 /* Vehicle Speed for odo */
2&3 /* Engine Speed */
4 /* Fuel Level */
5 /* Coolant Temp */
6 /* Shift 1-3, MIL, LOP, T/C Lamp Status, USA spec bit*/
7 /* Service lamp, spare 1-3, TH2o flash bit, bulb check rear fog, spare 1-2 */

Vehicle speed is scaled 1 KMH/bit
Engine Speed is not scaled (1 RPM/bit)
Fuel Level is scaled 0-255 = 0-100%
Coolant Temp is scaled 0-255 = -40-120degC (5/8 – 40)

Lamp status stat1 defined below:
SHIFT1 0x01 /* Instrument Pack Shift Light 1 */
SHIFT2 0x02 /* Instrument Pack Shift Light 2 */
SHIFT3 0x04 /* Instrument Pack Shift Light 3 */
MIL 0x08 /* Instrument Pack MIL */
LOP 0x10 /* Instrument Pack Low Oil Pressure Warning */
TRACCNT 0x20 /* Instrument Pack Traction Control Warning */
TPMSMIL 0x40 /* Instrument Pack Tyre Pressure Monitoring System Warning */
USASPEC 0x80 /* Instrument Pack Indication of USA spec vehicle (temp's in degF, etc) */

Lamp status stat2 defined below:
SERVICE 0x01 /* Instrument Pack Service Light */
SPARE1 0x02 /* Instrument Pack Spare Light 1 */
SPARE2 0x04 /* Instrument Pack Spare Light 2 */
SPARE3 0x08 /* Instrument Pack Spare Light 3 */
TH2oFLASH 0x10 /* Instrument Pack Flash Coolant Temp */
FOGLAMP 0x20 /* Instrument Pack Bulb Check Rear Fog Light Lamp */
SPARE4 0x40 /* Instrument Pack Spare Light 4 */
SPARE5 0x80 /* Instrument Pack Spare Light 5 */
My measurments showed:

AA -> speed (mph * 1.5)

FF -> temp (degs C * 1.6 + 64)

It could be coincidence that my speedo was inaccurate by the difference between kph and (mph * 1.5). I believe the temp calculation is accurate - the 1.6 multiplier in essence converts from dec to hex.

remember though the localised version of the speed/temps for 08+ is set in the can frame, unlike previous years where its fixed to metric and translated by the cluster



Would some kind soul post the definitive form of the "status" byte in the 0x400 CAN message for the '07? I've got

00000001 shift
00000010 engine
00000100 oil

Are these correct? Any idea on the remaining 5?

That is correct (bit 0 = immobilizer/shift light, bit 1 = check engine, bit 2 = oil pressure). The remaining 5 bits are unused.


0x22 0x3 0x34 Fastest Standing Start 0-100KMH
0x22 0x3 0x35 Fastest Standing Start 0-160KMH
0x22 0x3 0x36 Last Standing Start 0-100KMH
0x22 0x3 0x37 Last Standing Start 0-160KMH
0x22 0x3 0x39 Total number of Standing Starts


These are only address, is correct?

Bye, Luca
User avatar
flycat
Helpful MS/Extra'er
 
Posts: 51
Joined: Thu Jul 29, 2010 9:05 am
Location: slopes of Etna...

Re: CAN LOTUS BROADCAST

Postby jsmcortina » Fri Oct 27, 2017 5:02 am

Please ask the poster "Is it ok to use this information in a commercial system." It is only fair.

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: 33911
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: CAN LOTUS BROADCAST

Postby flycat » Fri Oct 27, 2017 6:15 am

James I do not understand, I'm the co-founder of the megasquirt Italian forum, I was asked if it was possible to install an Ms3 on a lotus exige / elise, and I replied that it was possible, I saw that there was a can bus communication and I asked to my friend Cristian Abatelli if it was supported and he asked, I searched for the necessary information and gave it to you, you said that waiting for the new release could be added, and so I responded to the person who contacted me.
Then I myself have been busy following the engine setup that has gone very well, now, if the first information is not good, these new ones, I think, are just addresses to which to route data, there is no reason to do these oppositions, then should we ask permission to weber or toyota to use its sensors?

I do not think so.

I begged you privately to add these instructions because I told a person who would be done, I'm not going to be false.

Now, if you want to do it, tell me what is needed, if you need a person to bind the responsibility, that person is me, Luca Scuto, the responsibility is mine.

Benefit, let's get out of this situation, I've been promoting MS in Italy for over 10 years and I do not want to make a bad figure.

Bye, Luca
User avatar
flycat
Helpful MS/Extra'er
 
Posts: 51
Joined: Thu Jul 29, 2010 9:05 am
Location: slopes of Etna...

Re: CAN LOTUS BROADCAST

Postby jsmcortina » Fri Oct 27, 2017 6:31 am

Please just get the answer to my question, then we can proceed.

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: 33911
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: CAN LOTUS BROADCAST

Postby flycat » Fri Oct 27, 2017 6:37 am

Yes, is Ok.

Bye, Luca
User avatar
flycat
Helpful MS/Extra'er
 
Posts: 51
Joined: Thu Jul 29, 2010 9:05 am
Location: slopes of Etna...

Next

Return to MS3 Development

Who is online

Users browsing this forum: No registered users and 1 guest