CANBUS Receiving
Moderators: jsmcortina, muythaibxr
CANBUS Receiving
Hi All,
I've been looking at Implementing support for Mk6 Fiesta Dashboard Via canbus, I have all the basics working apart from the Speedo.
The Dashboard Get its VSS from the ECU but the ECU gets is VSS data from the ABS module via canbus broadcast.
Now I've seen the canbus Receive feature but it seems it can only handle each byte separately.
Ford ABS from what I've researched broadcasts all 4 wheels speeds in 4 words with the formula (km/h * 100) + 10000
Is there a way to specify high and low bytes of each can VSS or will I need to modify the canbus receive code?
I've been looking at Implementing support for Mk6 Fiesta Dashboard Via canbus, I have all the basics working apart from the Speedo.
The Dashboard Get its VSS from the ECU but the ECU gets is VSS data from the ABS module via canbus broadcast.
Now I've seen the canbus Receive feature but it seems it can only handle each byte separately.
Ford ABS from what I've researched broadcasts all 4 wheels speeds in 4 words with the formula (km/h * 100) + 10000
Is there a way to specify high and low bytes of each can VSS or will I need to modify the canbus receive code?
MY BLOG
NOT WORKING ON ANY MEGASQUIRT PROJECTS CURRENTLY
NOT WORKING ON ANY MEGASQUIRT PROJECTS CURRENTLY
-
- Site Admin
- Posts: 39619
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: CANBUS Receiving
Please post the full technical details.
James
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".
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".
Re: CANBUS Receiving
Ford ABS broadcast each wheel speed on id 0x4B0
Each Wheel speed is a 16bit value as follows
Byte 0 & 1 = Left Front wheel speed
Byte 2 & 3 = Right Front wheel speed
Byte 4 & 5 = Left Rear wheel speed
Byte 6 & 7 = Right Rear wheel speed
The wheel speed values needs a formula to get KM/H (km/h * 100) + 10000
This information was taken from http://sergeyk.kiev.ua/avto/ford_CAN_bus/ (Sadly in russian)
Each Wheel speed is a 16bit value as follows
Byte 0 & 1 = Left Front wheel speed
Byte 2 & 3 = Right Front wheel speed
Byte 4 & 5 = Left Rear wheel speed
Byte 6 & 7 = Right Rear wheel speed
The wheel speed values needs a formula to get KM/H (km/h * 100) + 10000
This information was taken from http://sergeyk.kiev.ua/avto/ford_CAN_bus/ (Sadly in russian)
MY BLOG
NOT WORKING ON ANY MEGASQUIRT PROJECTS CURRENTLY
NOT WORKING ON ANY MEGASQUIRT PROJECTS CURRENTLY
-
- Site Admin
- Posts: 39619
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: CANBUS Receiving
The CAN receiving code already supports 16bit values with either big-endian or little-endian. The existing code should enable one received packet to match multiple rules so you can pick out the four 16bit speed values.
Perhaps in the future, pre-coded receiving rules would be useful.
Not sure how to interpret this:
James
PS. Don't forget to enable CAN Receiving with the master enable at the top of the pane.
Perhaps in the future, pre-coded receiving rules would be useful.
Not sure how to interpret this:
MS3 needs ms-1 * 10. i.e. a raw value of 123 means 12.3 metres per second.The wheel speed values needs a formula to get KM/H (km/h * 100) + 10000
James
PS. Don't forget to enable CAN Receiving with the master enable at the top of the pane.
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".
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".
Re: CANBUS Receiving
Ahh I get it now, I hadn't read the help bubble properly.
Speed works out as
0 km/h = 10000 or 0x2710
50km/h = (50*100)+10000 = 15000 or 0x3A98
or
(15000 - 10000) /100 = 50KM/H
I don't think the order of the maths will be able to convert the data into the correct values.
For now I don't actually need to have the ECU interpret the values(that can be done later), I just need it to re broadcast one of them (or an average) back to the dash.
Speed works out as
0 km/h = 10000 or 0x2710
50km/h = (50*100)+10000 = 15000 or 0x3A98
or
(15000 - 10000) /100 = 50KM/H
I don't think the order of the maths will be able to convert the data into the correct values.
For now I don't actually need to have the ECU interpret the values(that can be done later), I just need it to re broadcast one of them (or an average) back to the dash.
MY BLOG
NOT WORKING ON ANY MEGASQUIRT PROJECTS CURRENTLY
NOT WORKING ON ANY MEGASQUIRT PROJECTS CURRENTLY
-
- Site Admin
- Posts: 39619
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: CANBUS Receiving
How so?SordFish wrote:I don't think the order of the maths will be able to convert the data into the correct values.
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".
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".
Re: CANBUS Receiving
I need to take 10000 off first then devide by 100.
According to the help bubble the formula is
Result = ((raw_data * mult) / divide) + add
I would need
Result = (raw_data + add) / divide)* mult
add = -10000
devide = 100
mult = 0.277778 (to get meters per second)
According to the help bubble the formula is
Result = ((raw_data * mult) / divide) + add
I would need
Result = (raw_data + add) / divide)* mult
add = -10000
devide = 100
mult = 0.277778 (to get meters per second)
MY BLOG
NOT WORKING ON ANY MEGASQUIRT PROJECTS CURRENTLY
NOT WORKING ON ANY MEGASQUIRT PROJECTS CURRENTLY
Re: CANBUS Receiving
Got it working to some degree, I have an Arduino broadcasting the ABS data which is controlled with a pot.
I've setup CAN receiving on the MS3 with B2U for each wheel and set vss1-4 to digital input type "can vss".
The data hasn't been processes yet so MS3 thinks I'm doing 7000mph but for now it doesn't matter.
I have it re broadcasting vss3 verbatim back to the dash on another ID. Video below
I've setup CAN receiving on the MS3 with B2U for each wheel and set vss1-4 to digital input type "can vss".
The data hasn't been processes yet so MS3 thinks I'm doing 7000mph but for now it doesn't matter.
I have it re broadcasting vss3 verbatim back to the dash on another ID. Video below
MY BLOG
NOT WORKING ON ANY MEGASQUIRT PROJECTS CURRENTLY
NOT WORKING ON ANY MEGASQUIRT PROJECTS CURRENTLY