0
\$\begingroup\$

I am looking for a can it be done and, if someone is willing, a how to.

I am building an OBD2 breakout box for easily scoping automotive computer data lines and want to add LEDs as a quick visual of bus activity. I was planning on having them on the can and LIN bus signals

I have read that 1k ohm resistor between CAN sig and the LED and then to ground will not affect the bus activity. Others sources have said you need a microcontroller.

I figured I would have a master switch on the ground side so I can turn them off when actually measuring data.

Thank you in advance for any and all help.

EDIT to simplify or sum up I am looking for help making an led illuminate when there is activity on a can bus network, as a visual indicator, without affecting communication between automotive modules. There is a can high and a can low as well as lin bus networks. Hopefully there is someone with enough knowledge of can networks and electrical circuits that won't mind helping. It is more of a hobby of mine to build not buy, I like making tools that fit my needs. If this isn't practical then I will omit it.

\$\endgroup\$
4
  • \$\begingroup\$ there is a difference between powering and controlling ... do you mean controlling led? \$\endgroup\$ Commented May 4, 2024 at 19:50
  • \$\begingroup\$ I want the led to light, flash, just some visual indicator when there is activity on the network. \$\endgroup\$ Commented May 4, 2024 at 20:16
  • \$\begingroup\$ Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. \$\endgroup\$ Commented May 4, 2024 at 20:52
  • \$\begingroup\$ The issue I am worried of is if I connect the led directly to the data line and then to ground there will not be enough resistance to stop it from pulling the entire bus down to 0v. The can system has 2 120ohm resistors in parallel for 60 ohms of impedance. So I don't know if I just need resistors larger than that to not affect the data signal or I need to wire it another way. I am an automotive mechanic so any electrical engineering knowledge I have is only due to a need for understanding how to diagnose and repair. I am looking for someone who is willing to help me this work. \$\endgroup\$ Commented May 4, 2024 at 22:11

2 Answers 2

0
\$\begingroup\$

There are various more or less bad ways to do it, check out CAN BUS monitoring with a LED. I wouldn't be too worried about the LED series resistor messing up impedance, there are bigger problems:

  • You need a LED with low Vfwd or it won't lit up at all. You'll have less than 2.5V on the anode.
  • The LED will always be lit since the bus doesn't return to zero, unless maybe if you manage to tweak the circuit so that the Vfwd happens to be between 2.5V and 3.5V. Or otherwise make an analog solution ensuring it, as the OP amp example in the link posted. Quite a cumbersome solution though.
  • There is no way for the LED to distinguish between valid data frames and error frames. So the LED will never be an indicator that the bus is working as it should, it will only be an indicator that some manner of bus traffic is there.
  • Depending on baudrate, the frame might pass too quickly for the human eye to pick anything up. At 1Mbps, frames are in the microsecond range. So a solution with a one shot timer IC might be necessary.

It would be better to hook the LED up on the "TTL level" signals on the other side of a CAN transceiver. So one way to do it is to use a 5V transceiver + a monostable multivibrator which lits the LED for a certain fixed amount of time.

LIN is another story since it uses a different hardware layer. Please ask a separate question about that.

\$\endgroup\$
1
\$\begingroup\$

Putting a LED with 1k resistor directly on the CAN bus loads the bus approximately equal to putting 10 or 20 CAN devices. You don't know if it affects the bus functionality or not. While you could do it, you really should not.

You also don't need a microcontroller, it would also not be a correct thing to put directly to a CAN bus.

All you need is a CAN bus physical interface chip, or rather, just the receive portion of it. You can drive the LED with the receive output.

While you could build a CAN bus physical receiver with a comparator and some resistors, it sounds like you want to have a proper solution.

\$\endgroup\$
4
  • \$\begingroup\$ All of the CAN bus interface chips I have seen (very quick google search) only have 1 receive output. I was hoping to have an led per pin of the obd2 connector, minus the 2 grounds. I have LEDs for all unused pins so if they are used in the future I can add them in. The 12v I am assuming is the easy one to do. Thank you for your response. You are right I would like to do it right but it has to obtainable and doable for me. \$\endgroup\$ Commented May 4, 2024 at 22:51
  • \$\begingroup\$ @ToreanPW Well the last thing you want is to damage something by putting LEDs on buses directly. If you want a proper tool then make a proper tool that does not load the probed signals. Which means, you need to know what you can put there and what voltage levels are used, in order to make a reciver/buffer for that wire or bus, and drive LEDs through that buffer. \$\endgroup\$ Commented May 5, 2024 at 8:11
  • \$\begingroup\$ Would a mosfet be able to do the job. Can high and low rest at 2.5 volt and high is raised to 3.5 and low is dropped the 1.5 when there is a data packet. I want the lights to come on when there is a packet ideally. If a p and a n type mosfet exist with the correct voltage threshold could they be used with out providing a path to ground dropping the network voltage? If so what would a wiring diagram look like. If not could it be wired to just light the led with any voltage to indicate there is some amount of voltage. \$\endgroup\$ Commented May 5, 2024 at 14:04
  • \$\begingroup\$ @ToreanPW You could design something that can receive CAN out of FETs, but that is why ICs like CAN transceivers, comparators, opamps, or other ICs exist - so that you don't need to design the hardest part yourself. \$\endgroup\$ Commented May 5, 2024 at 14:13

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.