Ford Focus RS Forum banner

1 - 20 of 67 Posts

·
Registered
Joined
·
106 Posts
Discussion Starter #1

·
Registered
Joined
·
1,211 Posts
Much appreciated! I wish I wasn't so busy with work right now as I was playing with FORScan and it has a LOT of these CAN messages figured out already, can even log requested vs actual torque out of either side of the RDU... It would be easy to set up a CAN sniffer and figure out exactly what's going on there.
 

·
Registered
Joined
·
182 Posts
I can contribute some.

Here's the initialization data for the CAN high-level driver in the ECU. Setting up filters based on ID, direction, identifier, etc. Thus this has the list of messages that the ECU listens for and broadcasts on.
ydFf2kE.png
9qqLJ6g.png
 

·
Registered
Joined
·
106 Posts
Discussion Starter #4
Thanks @Bugasu.

I updated the spreadsheet with some ids that I found last weekend: accelerator pedal , steering angle , brake pressure, Power steering torque

Donour

Edit: everyone please note that these can be read simultaneously at high-speed using cheap devices. You don't have to send request to have these broadcast
 

·
Registered
Joined
·
878 Posts
Can I do anything useful with an Arduino and CAN-BUS Shield, or is a faster uController like Raspberry Pi or BeagleBone required, to successfully interact with the Bus?
Screenshot_2016-10-27-13-50-39.png
 

·
Registered
Joined
·
418 Posts
Keep up the good work guys!!
 

·
Registered
Joined
·
106 Posts
Discussion Starter #7 (Edited)
Can I do anything useful with an Arduino and CAN-BUS Shield, or is a faster uController like Raspberry Pi or BeagleBone required, to successfully interact with the Bus?
Yep. Pretty much anything with a can transceiver can be used to read this data. That includes arduino+your-favorite-shield. Some newer microcontrollers like the the esp32 have can bus pins and decoding hardware, but no transceiver. It's a shame, because we would all go silly over a $5 wifi/gpio/adc/can chip.

I'm using an STN1130 obd->uart controller. It's an off-the-shelf obdlink sx. I have no problem reading the full traffic stream from the HS Can bus. It's 500kb/s. I like the usb adapter because I can record the traces on my laptop and analyze immediately. When I'm not doing that the adapter is plugged into my homemade telemetry system which is built on a raspberry pi, but that's the topic of another post. Recording traces from the stn11xx controllers is dead simple

> stfcb # clear block filters

> stfcp # clear pass filters

> stfab FFF,FFF # block all messages

> stfap 123, FFF # add pass filter for any can messages with id "123"

> stm # start monitor

123 0 00 00 00 00 00
123 0 00 00 00 00 00
...
I've gone a bit further and written a simple tracing tool that enables me to watch for changes, but I'm not ready to share that code yet.

So yeah, if you've got a car, any CAN reader, and understand the stuff that I just wrote, then you can contribute a bunch!

donour

EDIT: FWIW, I just posted a full decoding of the accelerator pedal position on the _second_ page of the spreadsheet.
 

·
Registered
Joined
·
106 Posts
Discussion Starter #8
If anybody is still following, I just added some more info to the spreadsheet. I was able to decode wheelspeed and VSS from the traces that also had a GPS speed signal.

donour
 

·
Registered
Joined
·
1,211 Posts
I'm curious, what's the maximum brake pressure that you've seen?

I find your comment about 102% throttle under braking interesting. I wonder if that's how the RDU knows to zero the requested torque to the rear wheels.
 

·
Registered
Joined
·
106 Posts
Discussion Starter #10
I'm curious, what's the maximum brake pressure that you've seen?

I find your comment about 102% throttle under braking interesting. I wonder if that's how the RDU knows to zero the requested torque to the rear wheels.
I'll look when I get home. It's a trivial sql query to get the max across all recorded data.

The 102% thing was a deciding error. See the final decoding sheet, it has it right. I didn't go back and check, but I was probably including a brake status bit.

Donour
 

·
Registered
Joined
·
156 Posts

·
Registered
Joined
·
106 Posts
Discussion Starter #14
This is a noble endeavor. I was sort of doing the same. I have an APP that can help with seeing the RAW CAN data and uses the OBD BT DONGLES.

See this thread : http://www.focusrs.org/forum/18-focus-rs-wheels-tires/42834-tire-pressure-there-s-app.html

The app will show data like this on an Android device - keep in mind that you will need to filter the data due the slow thruput of the BT Dongles:
That's pretty cool. Would you mind sharing the CAN message decodings that you have found?
 

·
Registered
Joined
·
106 Posts
Discussion Starter #15
wheelspeeds

I have just updated the spreadsheet with individual wheel speeds. The CAN message updates at 100hz. The unit appears to be m/s * 300. It's not a good source for speed anyway. What it _is_ good for is as a source for wheel slip. Here are all four wheels plotted on top of each other. Observe:


wheelspeeds.png

Do you I have your attention now, track junkies? :)

donour
 

·
Registered
Joined
·
106 Posts
Discussion Starter #18 (Edited)
This is a little offtopic, but it's my thread so...

I finally got around to testing the CAN adapter that I built to plugin to the rear audio harness. Thanks to @god7illa for taking his feng unit apart and posting pictures. The HS CAN pins are very clearly marked. Thanks to @DocWalt for tracking down the part number for the factory connectors.

No more OBD-II adapters needed!

For about $20 in hardware, I have this.

IMG_0767.JPG

IMG_0768.JPG

IMG_0769.JPG

No cutting or splicing is required. Simply unplug the the CAN source from the sound augmentation thing and plug it until the custom harness. I have some low cost CAN adapters (mcp2515) that get the parts cost down <$5, but for this install I'm using a high quality USB<->CAN adapter from tindie. It plugs straight into my laptop for easy testing and is supported by socketcan on linux. I'm going to clean it up and leave it there permanently. My builtin telemetry system is almost done, I just need to decode a few more things.

donour

EDIT: specs for the chip in the USB<->CAN adapter in the pic [http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f0-series/stm32f0x2/stm32f042c6.html]
 

·
Registered
Joined
·
173 Posts
I'll be honest, I don't know much about what's going on here but it's awesome that people smarter than me are taking these strings and making them usable information. This could very well lead to some interesting developments. Maybe @Mishimoto can tap into some info regarding the PTU for their project aiming to keep it cool.
 

·
Registered
Joined
·
410 Posts
Nice work! Certainly an easily accessible tap point.
 
1 - 20 of 67 Posts
Top