Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Comments on CAN BUS monitoring with a LED

Parent

CAN BUS monitoring with a LED

+1
−0

Hi, how can I use can bus monitoring through a simple led without disturbing the can line , I started with a diagram found on this forum, I need your help to correct where necessary, I want to use it as an external source (12-14v) Thanks !

Image_alt_text

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

What do you have? (1 comment)
Post
+0
−0

CAN lines in the most common implementation have 60 Ω impedance between them. Anything that is substantially larger than that won't effect the lines much. I'd use 1 kΩ at least, preferably more. The lead from the bus line to the resistor must also be short to minimize the characteristic impedance disruption of the bus.

That all said, putting an indicator directly on a CAN line is not a good idea in the first place. Think of what the user really wants to know in the field, which is whether CAN messages are being transmitted and received. This is best done by the microcontroller when it transmits and receives packets. Now there is no electrical impact on the CAN bus at all.

Another advantage of having the micro control the CAN activity LEDs is that it can do pulse stretching. One CAN frame is usually too short to cause a reliably visible blip on an LED. I found that 20 ms is about right for the minimum LED blip duration. The firmware essentially implements a retriggerable one-shot for each event you want to show activity for.

History
Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

There maybe only 2 V between CAN-High and CAN-Low, in dominate bus state (0 V in passive state). 2 V ... (2 comments)
There maybe only 2 V between CAN-High and CAN-Low, in dominate bus state (0 V in passive state). 2 V ...
H_H‭ wrote 5 months ago

There maybe only 2 V between CAN-High and CAN-Low, in dominate bus state (0 V in passive state). 2 V and 1 kΩ will probably be too dim, especially when you consider that on average, only about halve of the time during a frame, the bus is in dominant state. Depending on the LED colour, the LED itself needs more than 2V.

The µC solution is of course a much better idea.

Olin Lathrop‭ wrote 5 months ago · edited 5 months ago

Actually the nominal difference from CANH to CANL is only 1.8 V with the bus in dominant state. In any case, I wasn't suggesting to run the LED directly off the CAN bus. I was expecting the other end of the resistor driving a transistor or something. I assumed the OP was planning that considering the circuit he posted in the question.