2 LED Logic probe for CAN bus

Thread Starter

cork_ie

Joined Oct 8, 2011
428
Hi all,
It's been a while since I posted on here but I am back again looking for help and ideas.
My project is to build a quick and simple logic probe for CAN bus.
I have all the oscilloscopes, CAN interfaces etc. , but I often just want to do a quick test to see if the bus is running or not.

What I really want is to make a small battery powered logic probe with two flickering LED's that will tell me that data is running on both the CAN Low and CAN High lines of the bus.
I don't want to unduly load the bus so I need something with a fairly high impedance input, 10K or greater.
The two signal lines of the bus, CANH and CANL, in the quiescent recessive state, are passively biased to ≈ 2.5 V. The active state on the bus takes CANH ≈ 1V higher to ≈ 3.5V, and takes CANL ≈ 1V lower to ≈ 1.5V, creating a typical 2.0V differential signal.
I have looked at several DIY logic probe circuits and unfortunately 2.5V is smack in the middle of the area of uncertainty between high and low in most logic circuits and a standard logic probe circuit is unlikely to be reliable.
 
Last edited:

Papabravo

Joined Feb 24, 2006
21,159
Yeah. What you want is a dual comparator with thresholds set to >4V and <1V for example. The outputs can drive separate LEDs or be wire-ORed together. Should be a straightforward circuit.
 

#12

Joined Nov 30, 2010
18,224
I would make the deadband from 2V to 3V with a high impedance divider to set the unconnected input at 2.5V. Using 5V CMOS R-R Dual op-am. Buss can pull the input high (3.5V) or low (1.5V). I poked the internet 2 or 3 times today looking for an excellent battery for this, and my google-fu doesn't seem to be working. (3) AA batteries? A Lithium at 3.6V? Not really sure what the limits are today. A probe should be convenient in your hand, but I can't seem to imagine the batteries correctly.

What number is that 2.5V regulator chip that MikeML is so good with? I think I'm going to need one for this.

Found it. TL431
 
Last edited:

AnalogKid

Joined Aug 1, 2013
10,987
Do you want to test each line independently for signal activity (2 LEDs), or only indicate that the bus is changing between valid 0 and 1 states (1 LED)?

ak
 

Thread Starter

cork_ie

Joined Oct 8, 2011
428
I have just been looking at LM339 spec sheet which should do the trick, it is a quad comparator and I can use the two spare outputs to drive a buzzer to also give an additional audible signal indicating bus activity.
For the battery I am considering 2 x 3V button cells in series with a simple momentarily push to make switch as I will only to operate it for a few seconds .
I will try and prepare a circuit diagram and post it for evaluation , all comments welcome.
 

#12

Joined Nov 30, 2010
18,224
The LM339 eats 600 ua and it's a quad. Part of my frustration was about the awfully low current the button cells can provide. That's why I was thinking about a 5V Cmos dual.

Just a, "heads up".
 

Attachments

#12

Joined Nov 30, 2010
18,224
Just divorce the op-amps at the center strap and make another input line with it's own meg to a 2.5V reference.
 

Thread Starter

cork_ie

Joined Oct 8, 2011
428
Do you want to test each line independently for signal activity (2 LEDs), or only indicate that the bus is changing between valid 0 and 1 states (1 LED)?

ak
Yes I need two inputs , One for CANH and one for CANL , they are basically the same signal but inverted.
 

Thread Starter

cork_ie

Joined Oct 8, 2011
428
Just divorce the op-amps at the center strap and make another input line with it's own meg to a 2.5V reference.
Thanks. What you say makes perfect sense, I will study the schematic and try redraft it.
What is the function of the 1M resistor? Is it connected at the 2.4K and 12K resistor joint?
 

#12

Joined Nov 30, 2010
18,224
The junction of the K level resistors is a 2.5V reference on that particular regulator chip. The meg resistor floats the inputs at 2.5 volts so they are in the dead zone for a can buss. The meg of impedance insures that the can buss can drag the voltage away from 2.5 volts.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
10,987
Yes I need two inputs , One for CANH and one for CANL , they are basically the same signal but inverted.
They're supposed to be inverted versions of the same signal, but that is one of the conditions to monitor. I was asking about output, not the inputs. If you want to detect not only bus activity, but valid bus activity, then you need to put the two comparator outputs through what are basically exclusive-OR gates, so the LEDs come on only when both inputs are in one of the two valid states.

ak
 

#12

Joined Nov 30, 2010
18,224
They're supposed to be inverted versions of the same signal, but that is one of the conditions to monitor. I was asking about output, not the inputs. If you want to detect not only bus activity, but valid bus activity, then you need to put the two comparator outputs through what are basically exclusive-OR gates, so the LEDs come on only when both inputs are in one of the two valid states.

ak
You are ahead of me on the definition of Can buss. That's why my schematic is so lacking. When I see what you just said, I realize I had a very wrong belief about the signals.
 

#12

Joined Nov 30, 2010
18,224
@AnalogKid
The way you talk, I am guessing the CANH signal can go high OR low, and the same with the CANL signal. I thought CANH can only be 2.5V or high and CANL can only be 2.5V or low. Wanna clear this up for me?
 

AnalogKid

Joined Aug 1, 2013
10,987
They should be as you describe, but if they are then you don't really need a monitor. Testing for what they might do, it is entirely possible for both signals to swing the full 0V-5V and beyond. If you proclaim a 1.0 V 0/1 threshold and that signals above +5 V and below 0 V are ok (for example, a CANH signal at 5.7 V), then you have a basic tester with two single comparators, one on each line (no true window comparators): CANL trips at 1.5 V and CANH trips at 3.5 V.

Power the monitor with 6 V or 9 V
1 - LM358
1 - CD4093
1 - LM4040-4.1 or some other reference

EDIT: OR, replace the 4093 with two 1N914's. Yup.

Connect the two LEDs inverse parallel between the two LM358 outputs with 1 current limit resistor and two 1N914's in series. Flip over one of the two 358 inputs and you get the decode logic for free. The idea here is that if only one comparator trips the output voltage difference is not enough to light an LED with a 914 in series to increase the total Vf.

As alluded to above, a better circuit would have a true window comparator circuit on each CAN line.

ak
CAN-Bus-Mon-1-c.gif
 

Attachments

Last edited:

#12

Joined Nov 30, 2010
18,224
They should be as you describe, but if they are then you don't really need a monitor. Testing for what they might do,
I totally agree. My first rule of trouble shooting is, "Electricity will either be where it shouldn't be or not be where it should be." If that wasn't true, you wouldn't be troubleshooting!

Of course, this part comes after the Safety Rules like, "Never stand behind an electrician's elbow.":D
 

Thread Starter

cork_ie

Joined Oct 8, 2011
428
The junction of the K level resistors is a 2.5V reference on that particular regulator chip. The meg resistor floats the inputs at 2.5 volts so they are in the dead zone for a can buss. The meg of impedance insures that the can buss can drag the voltage away from 2.5 volts.
I have looked up the datasheet for the TL431 and you understand what you mean. Irrespective of whether I use them in this project or not they are very cheap and handy to have, so I will order a few.


he way you talk, I am guessing the CANH signal can go high OR low, and the same with the CANL signal. I thought CANH can only be 2.5V or high and CANL can only be 2.5V or low. Wanna clear this up for me?
You are quite correct, I know there are different flavours of CAN but I only work on automotive CAN and it is tightly specified in ISO 11898
I have never seen a CAN transceiver that operates at above 5V and quite a few of the newer ones are 3.3V. The voltage levels for CAN H & L are as described in my original post. The Bus is terminated by 2 120 Ohm resistors, one at either end, giving an ideal bus impedence of 60 Ohm .
I don't doubt that modules get wet,& plugs get corroded etc. but generally the CAN transceivers are tolerent of short circuits up to vehicle system voltage 12V DC.

All I need in this probe is a quick Go/NoGo bus monitor that I can quickly determine if data is being transmitted on the bus or not. I have thousand of Euros worth of scopes and CAN interfaces available if I need to delve deeper. I just need a quick bus monitor so that I can very quickly see if the bus is active or not as I disconnect different nodes .
 

Thread Starter

cork_ie

Joined Oct 8, 2011
428
1 - LM358
1 - CD4093
1 - LM4040-4.1 or some other reference

EDIT: OR, replace the 4093 with two 1N914's. Yup.

Connect the two LEDs inverse parallel between the two LM358 outputs with 1 current limit resistor and two 1N914's in series. Flip over one of the two 358 inputs and you get the decode logic for free. The idea here is that if only one comparator trips the output voltage difference is not enough to light an LED with a 914 in series to increase the total Vf.

As alluded to above, a better circuit would have a true window comparator circuit on each CAN line.

ak
View attachment 98677
Thanks for the schematic and all your help.
I understand most of what you are saying but am not sure what the CD4093 (NAND Schmitt Trigger) does or how the four 1N914's do the same thing
 
Top