|
XC90 '02–'15 General Forum for the P2-platform XC90 model |
Information |
|
Arduino in an XC90 - who wants to join me?Views : 3376 Replies : 38Users Viewing This Thread : |
|
Thread Tools | Display Modes |
Jan 9th, 2018, 12:36 | #11 |
Premier Member
Last Online: Yesterday 23:06
Join Date: Oct 2014
Location: Near Bicester, Oxon
|
Would a chimp with a hammer be of any use in your enterprise?
PM me if yes. I have my own hammer |
Jan 9th, 2018, 16:46 | #12 |
Junior Member
Last Online: Apr 16th, 2024 20:29
Join Date: Sep 2017
Location: West Sussex
|
Interesting project! I can't help, but I'm very interested. Please post updates as you make progress.
|
Jan 9th, 2018, 19:36 | #13 |
Premier Member
Last Online: Mar 20th, 2024 18:26
Join Date: Jan 2016
Location: Cross Country
|
UPDATE 1 (of many to come)
So here's my first update:
1. Dusted of my Ardunio Uno board - literally, it was covered in dust. Shame on me. 2. Updated my Ardunio IDE to v1.8.5 3. Installed the mcp2515 library and various other CAN bus libraries 4. Studied some examples 5. Started writing my first example code to get debugging working First output: Welcome to SwissXC90's VolvoXC90 CAN of Worms Example Version: 09 Jan 2018 0 1 Yeah it's not much but I've got to get the debugger working first before anything else, so gotta make sure the Serial.println() is working and understand the basic structure. Next steps: Research the code to use with CanHacker Windows software Solder the headers onto my CAN bus board - I have this one: https://www.seeedstudio.com/CAN-BUS-....2-p-2256.html Try it!
__________________
XC90 R-Design MY2009, Black Sapphire Metallic. HP-Sound, RSE, Nav, Tel, ParkingCam, BLIS, ParkingHeater, RestHeat, Removable Towbar, Summer: CRATUS 20x8 on Pirelli Scorpion Zeros 255/45, Winter: NEPTUNE 17x7 on Continental WinterContact 4x4 235/65. Last edited by SwissXC90; Jan 9th, 2018 at 21:36. |
Jan 9th, 2018, 21:35 | #14 |
Premier Member
Last Online: Mar 20th, 2024 18:26
Join Date: Jan 2016
Location: Cross Country
|
Update 2
OK, managed to decypher and understand the source code of some examples. Heavy going, especially when the original example is very sparsely documented.
My Ardunio code compiles and produces: Welcome to SwissXC90's VolvoXC90 CAN of Worms Example Version: 09 Jan 2018 Can't Init CAN Which is exactly what it should do as the CAN interface is not yet built. This is all desktop stuff at the moment, haven't touched the car yet. Enough for tonight, off to bed.
__________________
XC90 R-Design MY2009, Black Sapphire Metallic. HP-Sound, RSE, Nav, Tel, ParkingCam, BLIS, ParkingHeater, RestHeat, Removable Towbar, Summer: CRATUS 20x8 on Pirelli Scorpion Zeros 255/45, Winter: NEPTUNE 17x7 on Continental WinterContact 4x4 235/65. |
Jan 10th, 2018, 12:20 | #15 |
SilverBrick Lives!
Last Online: Apr 5th, 2024 19:06
Join Date: Apr 2015
Location: Poynton, Cheshire
|
I'm looking at replacing the ECU in my pickup with a Speeduino (Arduino based standalone system) in the future.
I will follow this, as I am also interested in the CAN stuff.
__________________
Jeep ZJ, 960, Past:- Mazda2, Jumbuck, V70 (2002), 945 (1995), Hyundai Coupe, Golf Mk4, Previa, Carina, 2 x Corsa, 4 x Astra, 944 16v (1991), Espace, Escort, Audi 80, Renault 21 Savanna, Polo, Mini Clubman/Pickup, Standard 8, Capri, Maxi. |
Jan 10th, 2018, 12:22 | #16 |
SilverBrick Lives!
Last Online: Apr 5th, 2024 19:06
Join Date: Apr 2015
Location: Poynton, Cheshire
|
So far I have got a dallas button working to use as the immobiliser key.
__________________
Jeep ZJ, 960, Past:- Mazda2, Jumbuck, V70 (2002), 945 (1995), Hyundai Coupe, Golf Mk4, Previa, Carina, 2 x Corsa, 4 x Astra, 944 16v (1991), Espace, Escort, Audi 80, Renault 21 Savanna, Polo, Mini Clubman/Pickup, Standard 8, Capri, Maxi. |
The Following User Says Thank You to GreenBrick For This Useful Post: |
Jan 10th, 2018, 13:54 | #17 |
Premier Member
Last Online: Mar 20th, 2024 18:26
Join Date: Jan 2016
Location: Cross Country
|
You're a few steps ahead of me then
__________________
XC90 R-Design MY2009, Black Sapphire Metallic. HP-Sound, RSE, Nav, Tel, ParkingCam, BLIS, ParkingHeater, RestHeat, Removable Towbar, Summer: CRATUS 20x8 on Pirelli Scorpion Zeros 255/45, Winter: NEPTUNE 17x7 on Continental WinterContact 4x4 235/65. |
Jan 10th, 2018, 22:23 | #18 |
Premier Member
Last Online: Mar 20th, 2024 18:26
Join Date: Jan 2016
Location: Cross Country
|
Update 3
A mixed bag tonight
Went to solder the headers onto the CAN interface, and found I'd lost a header. Swore and cursed and hunted and eventually found it. Fitted the headers. Connected to the Arduino and tried to initialise the CAN interface. Init failled. Scratched my head and thought hard and then realised I left of the ISP header, not thinking it was needed. So soldered that on. Tried again. Init fail. Googled and hunted and tried a few things. One post said sometimes an external supply works. So got my 12V supply, and connected it, and OOPS - laptop crashed. Thats not good. Static / voltage leakage and all that. Rebooted laptop, picked up Arduino and OOPS - Arduino regulator smoking hot. Thats not good. Disconnected everything pronto, let it cool, reconnected it. Ardunio dead. Won't run, won't reset. Drats, I thought these Arduinos were foolproof. Obviously not. Grabbed my 2nd Arduino (clone) Fitted the CAN board. Tried to init. Init fail. Googled Changed CS from pin9 to pin10 Tried again and.... Enter setting mode success set rate success!! Enter Normal Mode Success!! CAN BUS Shield init ok! In loop Finally! Then went back to the dead Arduino, checked the regulator- Shorted input to output. All the 5V components had 12V on them. Dead. Totally. Damn. Better buy a few spare Arduinos then.... OK, that's enough for tonight, off to bed.
__________________
XC90 R-Design MY2009, Black Sapphire Metallic. HP-Sound, RSE, Nav, Tel, ParkingCam, BLIS, ParkingHeater, RestHeat, Removable Towbar, Summer: CRATUS 20x8 on Pirelli Scorpion Zeros 255/45, Winter: NEPTUNE 17x7 on Continental WinterContact 4x4 235/65. |
Jan 10th, 2018, 23:13 | #19 |
Premier Member
Last Online: Mar 20th, 2024 18:26
Join Date: Jan 2016
Location: Cross Country
|
Update 4
Just bought 3 x replacement Arduino clones
They cost around 6 EUR each. incl shipping!
__________________
XC90 R-Design MY2009, Black Sapphire Metallic. HP-Sound, RSE, Nav, Tel, ParkingCam, BLIS, ParkingHeater, RestHeat, Removable Towbar, Summer: CRATUS 20x8 on Pirelli Scorpion Zeros 255/45, Winter: NEPTUNE 17x7 on Continental WinterContact 4x4 235/65. |
Jan 13th, 2018, 13:30 | #20 |
Premier Member
Last Online: Mar 20th, 2024 18:26
Join Date: Jan 2016
Location: Cross Country
|
Update 5 - Live Data being read!
So today after having prepared myself with sufficient information, my Ardunio and CAN bus shield, some cables, my laptop and a battery charger, I went down to the garage
Opened the boot of the XC90 Connected the battery charger to the power outlet in the boot to ensure I don't get a flat battery. Opened up the boot floor Removed the rear quarter side panel to access the REM and the Parking Camera PAC (which I have). I had already determined the PAC was the easiest place to get into the active low-speed CAN bus. Disconnected the connector from the PAC (with ignition off, as the PAC is only powered with key in PosI and PosII) This connector has PosI ACC power, Ground, CAN-H, CAN-L and nothing else I connected the Ardunio CAN shield to the CAN bus Nothing. Drats. I check the connections, all OK Then I thought: maybe the CAN bus is not active? I turned on the Ignition and BINGO - the CAN activity LEDs on the CAN shield started blinking and the CAN messages started appearing on my serial power monitor. Success at first connection! I had already set the bit rate to 125000 bps (the Volvo low-speed CAN runs at 125kbps) Currently, I am just printing the messages to the serial port to show them on my PC And logging them like this: "13.01.2018 13:32:35",ID: 0 Data 0 0 0 0 0 0 0 0 "13.01.2018 13:32:36",ID: 42 Data 96 48 0 64 7 0 25 0 "13.01.2018 13:32:36",ID: 190 Data 128 49 64 6 0 160 160 2 Here's is what I learnt so far
I am now modifying my Arduino code to use with a CAN bus sniffer program I grabbed from the net, to save me writing my own sniffer.... Back to the garage I go....
__________________
XC90 R-Design MY2009, Black Sapphire Metallic. HP-Sound, RSE, Nav, Tel, ParkingCam, BLIS, ParkingHeater, RestHeat, Removable Towbar, Summer: CRATUS 20x8 on Pirelli Scorpion Zeros 255/45, Winter: NEPTUNE 17x7 on Continental WinterContact 4x4 235/65. |
The Following User Says Thank You to SwissXC90 For This Useful Post: |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|