CAN troubleshooting...

All questions about MS2/Microsquirt/Microsquirt module. See also MS2/Extra manuals

Moderators: jsmcortina, muythaibxr

CAN troubleshooting...

Postby Talkiet » Thu Dec 28, 2017 5:17 am

(I don't have a scope, yet)

I have installed 3.4.2 on a MS2V3.0. I have added a 2 pin connector to JS6 and JS8 and measured 120ohm across it. When connected to a teensy3.2/transceiver and an Arduino mega2560/Duinopeak CAN bus shield, I get nothing.

I have enabled Dash broadcasting with default values. None of the Arduino sketches I have tried show ANYTHING turning up

I have CTX-RX and CRX-TX and CANH-CANH and CANL-CANL. Both the MS and the Canbus transceiver both individually have the 120Ohm termination present.

Is there anything I can do further without a scope to see if there's anything actually on the line? Anything in TS that could CONFIRM if anything is being broadcast? I have put feelers out for a scope based on the physical layer troubleshooting procedures listed here - http://www.ti.com/lit/an/slyt529/slyt529.pdf - but I am hoping it's something stupid I have done.

It's just occurred to me that my cable isn't twisted or shielded - I repurposed an old serial cable. It's only about 60cm long but would that potentially be enough? How well could I expect to have CAN work over say 60cm of untwisted pair?

Any ideas?

Cheers - N
Talkiet
MS/Extra Newbie
 
Posts: 31
Joined: Sat Dec 31, 2011 4:52 pm

Re: CAN troubleshooting...

Postby Suprazz » Thu Dec 28, 2017 7:51 am

hi
the cable is not the issue. You can use unshielded cable without a problem if it's not too long.

Try to swap the canh and canl pins just in case.

Try to send data to an other teensy.

It must be a configuration issue on your side because. Check canbus filters.
Best looking and most advanced CAN-bus gauge
Toyota Supra 7MGE, 7M-GTE and 1JZ-GTE Plug and play ECUs: http://www.perfecttuning.net
Serial to Bluetooth or Serial to WiFi
DIYAutotune Canadian, EFI Source and ECUMaster reseller!
Suprazz
Master MS/Extra'er
 
Posts: 413
Joined: Mon Jan 22, 2007 7:58 pm

Re: CAN troubleshooting...

Postby grom_e30 » Thu Dec 28, 2017 11:02 am

did you connect the arduino / teency to the eug ground as well?
1990 bmw 320i daily driver with m20b25 ms3 sequential fuel, 380cc injectors, d585 coil near plug, home made cam sync, launch control, fan control, vss, homebrew egt logging what's next????
grom_e30
Super MS/Extra'er
 
Posts: 4004
Joined: Thu Mar 08, 2012 12:44 pm
Location: UK

Re: CAN troubleshooting...

Postby Talkiet » Thu Dec 28, 2017 12:26 pm

Thanks for the responses. I should have mentioned I switched CANH and CANL as well, sorry. No change to behaviour.

I have tried two completely separate hardware solutions. Teensy 3.2+transceiver, and Mega2560+Duinopeak CAN bus shield..

I'm not sure what you mean by CANbus filters... The sketches I was trying should have just dumped anything seen coming in as a test. Is there something I have missed there?

The arduino/Teensy were not connected to ecu(?) ground at all. I don't think that's a requirement, since I thought I have seen battery powered CAN loggers that just take CANH/CANL. If grounding is a specific requirement I'll certainly try that but not sure it's required.

Presumably then there's no troubleshooting I can do in TS to dump the CAN data via serial? No configuration to flash a status LED for CAN activity?

Cheers - Neil G
Talkiet
MS/Extra Newbie
 
Posts: 31
Joined: Sat Dec 31, 2011 4:52 pm

Re: CAN troubleshooting...

Postby Suprazz » Thu Dec 28, 2017 12:35 pm

if it's enabled then there is can activity.
Stop searching on the ms side (just double check that js6 and js8 is connected to where you want but because you measure the 120ohms resistance you should be fire.

Check you filters (in the programmation) can.addfilters....

And yes use a common ground
Best looking and most advanced CAN-bus gauge
Toyota Supra 7MGE, 7M-GTE and 1JZ-GTE Plug and play ECUs: http://www.perfecttuning.net
Serial to Bluetooth or Serial to WiFi
DIYAutotune Canadian, EFI Source and ECUMaster reseller!
Suprazz
Master MS/Extra'er
 
Posts: 413
Joined: Mon Jan 22, 2007 7:58 pm

Re: CAN troubleshooting...

Postby Talkiet » Thu Dec 28, 2017 12:39 pm

Hmmm. I tried googling again and this time I do see refernces about common ground. Last time I saw a couple of sites that made no mention.

Looks like I am simply wrong and I'll go ground the teensy to the car as well and try again.

Thanks for the quick reply!

Cheers! N
Talkiet
MS/Extra Newbie
 
Posts: 31
Joined: Sat Dec 31, 2011 4:52 pm

Re: CAN troubleshooting...

Postby Talkiet » Thu Dec 28, 2017 12:42 pm

Reading this seems to suggest that it's highly recommended and may be required in some cases, although there's an inference that it may not be in some cases...

http://www.copleycontrols.com/Motion/pdf/CAN-Bus.pdf

"Grounding and Isolation
Copley recommends that the CAN_GND be connected between
devices. Even when using isolation, Copley recommends that
the CAN_GND still find a path to earth ground.
The Copley AccelNet and StepNet panel amplifiers have CAN
isolation so a path to ground is required in the system."

Adding it now.

N
Talkiet
MS/Extra Newbie
 
Posts: 31
Joined: Sat Dec 31, 2011 4:52 pm

Re: CAN troubleshooting...

Postby Talkiet » Thu Dec 28, 2017 12:44 pm

Sheesh!

https://www.edn.com/electronics-blogs/d ... on-Ground-

Code: Select all
I asked my sources at Microchip Technology, which manufactures CAN-bus expanders, and got the answer, "No common reference is required.  The definition states that CAN communication is a two-wire differential protocol (CANH and CANL) bus.  Dominant and recessive states of the bus are determined based upon the differential voltage read between CANH and CANL."


Whatever. Can't hurt to try!

N
Talkiet
MS/Extra Newbie
 
Posts: 31
Joined: Sat Dec 31, 2011 4:52 pm

Re: CAN troubleshooting...

Postby Talkiet » Thu Dec 28, 2017 3:23 pm

Hours of frustrating work later I am pretty sure you're right and the issues are all on the non-MS end. I have 3 Teensys and a Mega2560, and several (of the same) transceivers and a full shield, and I can make no combination of them and combination of CAN libraries (which is a minefield in and of itself with the CAN libraries not being compatible from version to fork to version yet being named the same), speak to each other.

If I can't get arduino to arduino trivial sketches working then I am stuffed. I give up.

Thanks for the assistance so far. At least now I am moderately confident that I have the MS side working even if I'll never get to use it :-(

Cheers - N
Talkiet
MS/Extra Newbie
 
Posts: 31
Joined: Sat Dec 31, 2011 4:52 pm

Re: CAN troubleshooting...

Postby grom_e30 » Thu Dec 28, 2017 3:36 pm

you may have a better time one you get 2 of the devices talking to each other. post examples sketches and links to your can hardware. it took me a while to get to the bottom of it at first
1990 bmw 320i daily driver with m20b25 ms3 sequential fuel, 380cc injectors, d585 coil near plug, home made cam sync, launch control, fan control, vss, homebrew egt logging what's next????
grom_e30
Super MS/Extra'er
 
Posts: 4004
Joined: Thu Mar 08, 2012 12:44 pm
Location: UK

Re: CAN troubleshooting...

Postby Talkiet » Fri Dec 29, 2017 1:12 am

FYI I got it all working eventually. I was having several different problems on different platforms. What finally clicked was that the CANTX from the Teensy had to go to CANTX on the transceiver (and RX-RX)... I don't know where I was so 100% sure that wasn't how it was done, but that made it start working... The dash broadcasting is working (well, I can see a couple of values changing live so I presume the rest are there and I just need to extract them) so all is good. I upgraded from 310 to 342, fixed the issues with idle, added in the CAN connector to the ECU after the builder used SPR1(or2) for something else, and managed to get Dash broadcasting working so it's been a frustrating but ultimately rewarding couple of days!

Now to integrate the CAN data with the tyre temp logging system and I'll be really happy.

Cheers - N
Talkiet
MS/Extra Newbie
 
Posts: 31
Joined: Sat Dec 31, 2011 4:52 pm


Return to MS2/Extra, MS2, Microsquirt and Microsquirt module support

Who is online

Users browsing this forum: M103EFI and 2 guests