checking CANH and CANL with scope - Page 1
Forum section: electronics / beginners

author: EEBlackSheep
author_rank: Contributor
timestamp: June 26, 2012, 02:44:14 am
content: I am making up a ODB CAN-bus cable for an EFI motorcycle. I have all the wiring figured out except I cannot tell which line is CANH and which is CANL. So I hook up each channel of the scope to each of the CAN connections and connect the ground to the ground on the OBD connector. Set the voltage of A & B to 2V, and the timebase to 2us. Turn on the bike, both channels jump up to 2.5V (which is correct), but no signals. Start the bike - no signals.Suggestions?thanks!

author: Rerouter
author_rank: Super Contributor
timestamp: June 26, 2012, 01:08:21 pm
content: have you got it triggering correctly, and are you on the right pins (6 and 14)1 wire goes positive from 2.5, 1 goes negative from 2.5, you will want 1 channel inverted,other than that you should see something,

author: EEBlackSheep
author_rank: Contributor
timestamp: June 26, 2012, 11:40:24 pm
content: Thanks rerouter. I am on the right pins (the motorcycle does not have a traditional OBD connector) but according to the schematic I am on the right wires. I do have one channel inverted. When I power up the bike, both channels pop to 2.5V (which is expected), but no data. As for triggering, well that could totally be my problem.There is also this myterious light blue wire I cannot account for, I am wondering if this needs to be pulled high or low for it to start transmitting data from the ECU. I am a little worried to much with it...

author: jerry507
author_rank: Regular Contributor
timestamp: June 27, 2012, 12:58:45 am
content: Just scoping the lines won't help you figure out which is CANL and which is CANH. Honestly, just hook them up one way and try it, then change and try again. This was pretty much the standard practice for CAN wiring troubleshooting at my last job, and I know it's pretty industry standard.As far as why you're not seeing anything when scoping it, I don't believe OBD2 just spits out data. It's all request based. I'm not a OBD2 expert though.

author: EEBlackSheep
author_rank: Contributor
timestamp: June 27, 2012, 01:30:47 pm
content: Quote from: jerry507 on June 27, 2012, 12:58:45 amThat does not make sense to me. CANH and CANL at idle will be 2.5V. If I hook a scope lead to either line, set the time base to 5ms, and if the trace jumps up, then its CAN_H. If the trace jumps down its CAN_L.I am reluctant to "just hook it up" as I do not want to damage the ECU and have to purchase a new one for $400.

author: jerry507
author_rank: Regular Contributor
timestamp: June 27, 2012, 05:36:19 pm
content: Yea, if you had any data then scoping would work. Absent data, CANL and CANH are indistinguishable.You can't damage the ECU by hooking up the CAN lines backwards. The data just won't make any sense.It's extremely common for CAN lines to be reversed in wiring harnesses on industrial machines. We used to have multiple reversals, as well as lines grounded or otherwise screwed up. If the ECU has absolutely no protection at all, then hooking outputs or your battery voltage to the CAN lines may damage them. I'd consider it extremely poor engineering practice to not optically isolate the CAN lines though.

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: June 27, 2012, 06:11:16 pm
content: I never saw an ECU with optically isolated CAN. Never ever. Best case there's some ESD protection like PESD1CAN, but usually not even this. In low cost projects even the chokes are sometimes omitted.Then again, a typical CAN transceiver like a TJA1051 will tolerate quite a bit more than +/- battery voltage (e.g. +/- 58V).Anyway, it should be impossible to damage a properly designed ECU by applying battery voltage or ground to any ECU pin.

author: EEBlackSheep
author_rank: Contributor
timestamp: June 27, 2012, 11:00:37 pm
content: OxDeadBeef,With this dirt bike setup there is just the one CAN controller (the ECU). Nothing else is on the CAN-Bus. With ODB/CAN-Bus and a single ECU would there be any traffic on the bus? Looking at the schematic it appears that none of the other devices/sensors (e.g. injector, TPS, coolant temp sensor, etc) are actually on the CAN-bus. They are directly wired to the ECU (which makes sense).Also have you seen other OBD/CAN-bus configurations that have an extra wire beyond CANH, CANL, Grnd and Positive? I am wondering what this light blue wire form the ECU is all about.thanks!

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: June 28, 2012, 10:56:14 am
content: CAN needs only the two wires. Hard to tell what the other wires are. In older ECUs, there was also a single wire diagnostic line called K-Line (ISO 9141-2) on the OBD connector.Also power ground, signal ground and vbat are usually wired on an OBD2 connector.Anyway, as stated here before, OBD2 is request driven. The tester sends a command to the ECU and the ECU answers. The ECU never sends messages without request.

author: jerry507
author_rank: Regular Contributor
timestamp: June 28, 2012, 12:58:41 pm
content: Need to take the plunge and try it out. No other way.