0
\$\begingroup\$

I would like to ask for help designing a circuit to turn on a relay when there is CANbus activity in a vehicle. (sounds like other questions but with CAN)

What I have so far is a SPST bistable latching relay (Hella 933364027) that I am driving with a ULN2803A darlington. One line to the relay turns it on (SET) , the other turns it off (RESET).

The RESET is already taken care of. But I would like help with the SET.

The darlington is wired so the SET signal needs to go to LOW for something like 10ms < 1s. But this should only happen when the relay is not closed (SET) already.

CANbus bus voltage levels are differential, 2.5 V +/-1.25. So what I looking for is a simple circuit that looks at CAN+/- and triggers the relay to go only pulling the SET line low long enough to activate the relay. The whole system is running at around 13-14v (automotive).

The more I think about it, this looks like a 555 of some such thing that looks for voltage on the differential CAN +/- and triggers for a short while but also has a disable line.

I appreciate any help here, and will certainly give credit in my article update (https://vinthewrench.substack.com/p/building-a-simple-safe-shutdown-switch)

How can I design a circuit that turns on a relay when there is activity on the can bus?

\$\endgroup\$
2
  • \$\begingroup\$ Easiest done with a MCU and an ADC pin. If that's not an option, then (just brainstorming here, take it fwiw) maybe something like an analog comparator with takes one input from CANH and another from a fixed voltage, so that you get a voltage that's above your logic high threshold when the input is ~3.5V, otherwise below the threshold when input is ~2.5V. Probably something with a Schmitt trigger input after this comparator. Also you'll probably want to filter the input from CANH so that you won't trigger anything on mere EMI glitches, a plain RC filter might work? \$\endgroup\$
    – Lundin
    Commented Jun 10, 2022 at 8:04
  • \$\begingroup\$ I thought so first, but now agree with Jeroen3 assessment below about detecting activity \$\endgroup\$ Commented Jun 10, 2022 at 19:10

1 Answer 1

1
\$\begingroup\$

Any CAN transceiver has an RX pin that translates the differential logic to your preferred logic level.

It will also ensure your device will not put the CAN bus in an illegal state when powered off.


The commented mentions the circuit is powered down or in a low power state. You can still use a CAN transceiver, with standby pin, reducing listen-only current to about <600 uA for the SN65HVD230 or <15 uA for the TJA1049T.

CAN has a wide range of (common mode) voltages that a discrete solution would be tricky. It's not as easy as simple detecting the 1.5 and 3.5v states of the lines. This 2V difference may exist between a common mode range of -2 to 7V, especially when you are not keeping it in range with a transceiver it can drift off.

It might also interfere with the integrity of the bus itself. Making your device a potential hazard if you're going to use it in a vehicle.

That said, if you don't care about all that and just want the simplest solution without regards for possible integrity consequences:
Most CAN tranceivers have strong driven outputs, you could try a high speed optocoupler between H and L with a small forward current.

\$\endgroup\$
3
  • \$\begingroup\$ yes but the CAN transceiver is part of the system that is powered down.. I am looking for a low power drain solution please. \$\endgroup\$ Commented Jun 9, 2022 at 15:00
  • \$\begingroup\$ Thank you Jeron3 -- the TJA1049 seems like an awesome solution, what I have figure out now is how to take the output from the RXD pin in STB mode and convert it to a pulse long enough to hold the relay. It needs to go low a bit longer than 10ms and only when the relay is in the RESET state. (so I need to gate it) \$\endgroup\$ Commented Jun 10, 2022 at 16:19
  • \$\begingroup\$ wow supply chain issues suck.. Instead I found the more modern version TJA1441 which seems pretty easy to work with. Just put the S pin high (making it silent mode) and the RXD will go low when the bus is active. \$\endgroup\$ Commented Jun 10, 2022 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.