Welcome Anonymous !

Everything you need to modify your ride
 

ECU - OBDII DTCs and PIDs

GM CAN with Arduino and CAN shield SEEeeed

Discuss Diagnostic Trouble Codes and Parameter IDs for the Holden VE Commodore, VEII Series Commodores, and HSV E1, E2, and E3 models

Postby odysseyjr » Tue Feb 17, 2015 10:19 am

I'm attempting to connect to GM CAN highspeed 500kbps and can't make any connections with my arduino uno and CAN shiled by seeed. Has any one had any luck at initiating there network..I'm using the code that comes with shield but I can't even get the CAN initiating.


If you need more info then what I'm giving then please do ask and tell..I'm just trying to figure this thing out and get a hack on!
odysseyjr
Kicking Tyres
 
Posts: 6
Joined: Tue Feb 17, 2015 9:47 am
Location: Indiana, United States
Has thanked: 0 time
Been thanked: 0 time

Postby Rerouter » Tue Feb 17, 2015 7:05 pm

CAN BUS Shield init fail

As from CAN BUS shield V1.1 to latest version, we changed CS pin from D10 to D9 by default.

So please do this modification "MCP_CAN CAN(9); // Set CS to pin 9" in the example. ??

From seeds wiki,
Rerouter
Starting Ignition
 
Posts: 32
Images: 6
Joined: Wed Oct 08, 2014 7:35 pm
Location: Sydney Australia
Has thanked: 0 time
Been thanked: 2 times

Postby TazzI » Wed Feb 18, 2015 2:47 am

Id assume they added that modification into the latest firmware automatically?

Make sure you have the correct Arduino board connected up and selected in the arduino IDE. Also make sure the orientation of the shield is correct!
User avatar
TazzI
Moderator
 
Posts: 986
Images: 2
Joined: Thu Dec 22, 2011 8:02 pm
Has thanked: 16 times
Been thanked: 41 times

Postby odysseyjr » Wed Feb 18, 2015 9:19 am

WOW just saw that they listed it's pin 9 by default! Thanks for posting this.. I have seriously tried everything including removing the R3 resistor and putting in my own 120 ohm resistor.(I've also tried without)

I'm going to grab some DATAerrrrs tomorrow.


Thanks for the help..I"ll be sure to post more noob questions i'm sure!
odysseyjr
Kicking Tyres
 
Posts: 6
Joined: Tue Feb 17, 2015 9:47 am
Location: Indiana, United States
Has thanked: 0 time
Been thanked: 0 time

Postby odysseyjr » Thu Feb 26, 2015 8:26 am

Thanks for your help I got it to receive data and I'm attempting to decode the 6L80 Transmission current gear.

So far I have the CANiD as 300 and the 4th bit seems to be the changing number in the equation.

768.0.0.9.8.237.6
The 9 changes and seems to be the variable.


I'm new to this arduino and CAN data logging in general. I'm attempting to get this data to translate into something simple like a display or even serial monitor but I'm hitting a roadblock with my limited knowledge.
I just need to figure out how to translate the incoming data as a simplified Park, Reverse, Neutral, Drive 1-6.

Well I'm going to keep at it and work out some of this high speed CAN data!
odysseyjr
Kicking Tyres
 
Posts: 6
Joined: Tue Feb 17, 2015 9:47 am
Location: Indiana, United States
Has thanked: 0 time
Been thanked: 0 time

Postby Rerouter » Thu Feb 26, 2015 11:26 am

For the most basic, figure out what value is what gear,

you can then either use a case statement, or a bunch of if statements, so when it sees the gear has changed, serial print the new gear in text that you can understand,

so for writing the code, you would read in that string from your can interpreter, bitshift it across as needed, then & with 0xF, to get just that value

You use switch/case to create a list of what number corresponds to what gear, and have a variable that remembers the last gear so it doesn't update on every can message, but only when it changes,

you then use the serial print to print thr output of the switch/case and away you go,


if you want to use a display, i can walk you through using a generic 16x2 character display easily (takes up 6 pins i believe)
Rerouter
Starting Ignition
 
Posts: 32
Images: 6
Joined: Wed Oct 08, 2014 7:35 pm
Location: Sydney Australia
Has thanked: 0 time
Been thanked: 2 times

Postby odysseyjr » Sun Mar 01, 2015 3:57 am

Thanks ReRouter. I have a TFT Touch shield currently by seeduino but I "should" be able to adapt the 16x2 LCD code to that if you wouldn't mind helping.

I have actually determined that what I originally thought was the gear indicator was wrong.

I now believe that 1312.0.254.4.0.0.0 is the gear indicator for gear 1. The bit that shifts is 4 and it shift in multiples of 4 so Gear 2 is 8, Gear 3 is 12 and so on. EXAMPLE: 1312.0.254.24.0.0.0 is 6th Gear on 6L80 programmed as a vette transmission (T43)


So i do need your help in translating Can message 1312.0.254.4.0.0.0 to display SerialPrint Gear 1 or any LCD/Display.

I took a few semesters of college with programming but that was about 5 years ago and I have since purchased and read the book Programming Arduino, Getting Started with Sketches by Simon Monk. I also just bought the 2nd book in the series but haven't started it. I need to reread the first and do some of the examples but I feel as if the CAN stuff will still be over my head since it's a shield that has code I don't fully comprehend.

The book was informative but translating the Can data to text is daunting to me.

I have altered a default program with the CAN Shield to filter the gear message and only display it but I don't know how to isolate the changing bit.

I have CAN.init_Filt(0,0,0x520); and it will display the data but then I'm lost.

Thanks for your time I really do appreciate it.
odysseyjr
Kicking Tyres
 
Posts: 6
Joined: Tue Feb 17, 2015 9:47 am
Location: Indiana, United States
Has thanked: 0 time
Been thanked: 0 time


Return to ECU - OBDII DTCs and PIDs

  • View new posts
  • View unanswered posts
  • Who is online
  • In total there are 6 users online :: 0 registered, 0 hidden and 6 guests (based on users active over the past 5 minutes)
  • Most users ever online was 405 on Sat Mar 30, 2024 1:42 am
  • Users browsing this forum: No registered users and 6 guests