Go Down

Topic: Building a CAN API for Arduino DUE (Read 138 times) previous topic - next topic

Collin80

By default the canbus library (well, my version) has a 32 entry rolling receive buffer so you can afford to have that many messages come in while you are busy. Changes are you won't be getting that many behind your back unless the bus is *really* busy.

Also, FWIW, I just updated the library. I fixed the examples to call the proper header and added keywords.txt so things are actually highlighted/colored properly.

DarkKnightWong

Hi Everyone

Ive been reading up on this thread for a while now. 
I tinker around with old cars, and have been wanting to figure out how to put a gauge cluster out of a 09 Corvette into my current project.
Im a software developer by day and junk yard mechanic by night :-)

I would like to get started with the Arduino DUE to tinker with the can bus on the cluster.
Its GMLAN which I read that they have a Highspeed and low speed can bus in there system.

Im about to order the DUE, but what other hardware should I order to get me started using the CAN API.
I come from a OO background so I probably will look into AdderD branch of the CAN API, since he mention its a little more structured for OO

I saw earlier post that people are making a shield with SN65HVD243..  I search online a bit and havnt found a place to order these...
What other fun stuff will I need to order ?  And possibly from where if its allowed to be posted ..

Thanks in advance!  Cant wait to get started
Allen

Collin80

I ordered most of my stuff from Mouser. The transceiver chip ends in 234 which is maybe why you can't find it. Here it is at Mouser: http://www.mouser.com/_/?Keyword=SN65HVD234&FS=True

You will need one of those chips for each canbus port (so, two per Due) and some misc other goodies (60 or 120 ohm resistors, small value capacitors, etc). Also, use a schmartboard 1.27mm arduino board which is part # 206-0004-02 (also available at mouser). This board has a place to put the transceiver chips as well as having pins that go into a normal arduino board. It is not the proper size for a Due but you can run jumper wires to the proper pins of the Due. It's sort of a cobble job at the moment but it does work.

DarkKnightWong

#138
Mar 25, 2013, 06:33 pm Last Edit: Mar 25, 2013, 10:01 pm by DarkKnightWong Reason: 1

I ordered most of my stuff from Mouser. The transceiver chip ends in 234 which is maybe why you can't find it. Here it is at Mouser: http://www.mouser.com/_/?Keyword=SN65HVD234&FS=True

You will need one of those chips for each canbus port (so, two per Due) and some misc other goodies (60 or 120 ohm resistors, small value capacitors, etc). Also, use a schmartboard 1.27mm arduino board which is part # 206-0004-02 (also available at mouser). This board has a place to put the transceiver chips as well as having pins that go into a normal arduino board. It is not the proper size for a Due but you can run jumper wires to the proper pins of the Due. It's sort of a cobble job at the moment but it does work.


Hi AdderD

Thank you for the links and info.
The page with the transceiver chip has different ones.
Which one do I need and whats the difference between these ?
SN65HVD234D
SN65HVD234DG4

Can you recommend a Arduino bread board start kit also ?

Thanks Again
Allen

Sherlock3112

Thanks for your earlier support AdderD, and the continued development. I've got the Due happily taking data off a 1MHz bus with a DTA ECU and accelerometer spamming it.

Code: [Select]
CAN message received:
13036 0x2000 0x1EFF Ext 8b 0 0 5C 0 14 0 12 0 
13042 0x498 0x1EFF Std 8b 7F CD 7F 4F 88 34 80 7 
13049 0x2001 0x1EFF Ext 8b 64 0 3 2 0 0 11 0 
13055 0x2002 0x1EFF Ext 8b 2C 1 3C 0 79 0 0 0 
13061 0x2003 0x1EFF Ext 8b 0 0 0 0 0 0 0 0 
13067 0x2004 0x1EFF Ext 8b CD E 0 0 0 0 0 0 
13073 0x2005 0x1EFF Ext 8b 0 0 0 0 1F 1 42 3 


Working a treat. I don't suppose anyone knows if there's some industry standard for converting data put out by the ECU to something useable? I know our ECU has 6 data frames (0x2000-0x2005), each 8-byte with 2 bytes for each value (engine rpm, throttle position etc) but not sure if there's a standard way to turn this into something useable (0x5C00 doesn't mean much as an idle throttle position!) or if I'm going to have to ask the ECU manufacturer nicely to give us some help converting.

Go Up