Is a relay my only option??

Hi, Hopefully I can explain what I'm looking for.. As far as my experience and knowledge I know resistors, capacitors, diodes,some basic transistors, voltage regulators, etc.. If I have something to start with I can probably read some data sheets and come up with a workable circuit..
ok, onto my latest project..

I have a single wire CAN data stream, operating at 33k.. I can already read the data and messages on this stream, and I can also send messages as needed.. What I need is to be able to intercept and block certain messages from coming through.. Not all the time, just when I have my device activated.. Say a message is sent on this data line to shut off a device and I want it to stay on a bit longer.. I cannot allow the 'turn off' messages to continue on down the CANbus data line, I need to intercept the 'turn off' message and instead keep on sending the "stay on" message..

The simplest way I know of, and it does seem to work ok in a prototype is to use a small relay controlled by the arduino and have 2 different CAN 'modules' that both can read and send data independently.. I believe this could be called a "man in the middle" device.. If the relay is un-energized all data passes thru the relay's normally closed contacts from the 'brain' to the controlled 'module' and operates as designed.. Once my device is activated the relay is energized and the Canbus signal is stopped at the relay.. I then monitor and read all the data on the incoming side and resend the data I decide is ok to send to the controlled 'module' at the end.. I can read each packet and forward only what I want, and also change a command or two as I need.. Does this make sense?? I

This Canbus is a standard single wire Canbus protocol, operating at a slightly odd rate of 33.3k.. Is there an easier way to do this? A relay works, but I'd prefer to increase my knowledge while I'm building this and if something else might fit this design a little better, I'd be interested to try it out.. Thanks, Tom

A relay would likely be very unreliable, as the contacts are noisy and will wear. There are bidirectional CAN bus repeaters and you may be able to find one with an enable line that would allow you to use it as an electronic switch.

jremington:
A relay would likely be very unreliable, as the contacts are noisy and will wear.

Not if it's a solid state relay.

Thanks jremington, googling and looking into bidirectional CAN repeaters.. Haven't found any capable of single wire CAN with high voltage wakeup yet, but I'm still looking.. I did forget to mention that.. I can do without being able to send the high voltage wakeup messages myself, but I need the repeater capable of forwarding it one as it is sent during normal operation..

Honestly, to be able to interrupt a signal, you are going to have to install something in line that will act as a repeater, but also interpret your messages to be able to stop them from completing. It will need to be in series with everything, interpret what is going on, and then repeat it if it is allowed. This means you'll need to add some latency into the signal to pass through it, and it will probably interfere with communication (I don't know much about CANBUS, but I assume there is some form of ACK signal involved like in I2C that would be problematic if you had another device blocking it to be retransmitted).

Yup, that's what I want to do.. I want to allow all transmissions 90% of the time.. I don't want to block them in any way.. I can already monitor the data as needed, and even send some data as I need/want to.. Then I when I want to, I want to be able to cut off the data line to this one device and begin sending my own messages to this single device.. A relay does work, but it has already been mentioned that the contacts could cause issues, if not now, possible down the road.. Not sure about a solid state relay? I have a couple a/c solid state relays but they have a minumum voltage specified that is a LOT higher than this circuit.. I could look into a dc solid state relay and see how it does as passing CANbus messages?

How quickly do you want it to stop the message is really the big question. Does it need to be while it is being transmitted? Or after a particular command is transmitted, can it then interrupt?

Speed isn't a particular concern as far as interrupting the data.. Once it's interrupted and I can send my own data unhindered by the data streams I'm stopping.. I am not in a race to cancel out a command, If I could do that, great, but I think that would be a pita.. Seems easier to simply take over and mimic the status and commands I want..

tek1229:
Not sure about a solid state relay? I have a couple a/c solid state relays but they have a minumum voltage specified that is a LOT higher than this circuit.. I could look into a dc solid state relay and see how it does as passing CANbus messages?

A solid state relay is basically just two MOSFETs back to back so that current can flow in both directions (through one or the other).

Grab a few datasheets and look at the MOSFET characteristics, see if your signal can pass through them or not.

think of the CAN bus as a bunch of people in the room.
someone yells 'turn off the light'
you want to stop the people from hearing that command, or prevent the guy next to the light from performing their assigned function.

you need to take that one device and block it so that it cannot (A) hear the command or (B) perform the task.

if you can add a repeater so that the one specif device is not able to hear the initial command, but only can hear your repeated command, you can evaluate everything and only pass what you want to allow. the key word is everything.

another alternative is to put something between that remote controller and repeat the control signal.

another possibility is latency of the control action. if the command 'turn off the light' is given, can you receive that, recognize the specif command and then issue a 'belay that order' command to turn the light back on ?

can you have a system monitor that waits for that one command and then breaks the control signal and then keeps it where it is for your time-out period ?

if you have access to the programming of the remove device, and it has a pin you can address. your device could just hold that pin high. the remote device programming looks at that pin and if that is high, just do what you are told. if that pin goes low, the program would stop that control and wait for it to go high.

tek1229:
I believe this could be called a "man in the middle" device.. If the relay is un-energized all data passes thru the relay's normally closed contacts from the 'brain' to the controlled 'module' and operates as designed.. Once my device is activated the relay is energized and the Canbus signal is stopped at the relay.. I then monitor and read all the data on the incoming side and resend the data I decide is ok to send to the controlled 'module' at the end.. I can read each packet and forward only what I want, and also change a command or two as I need.. Does this make sense??

Not knowing anything about it I just read 'CAN bus -101' at wikipedia. I get the priority and multi-master details and such. Sounds very useful.

Reed relays can run millions of cycles, and they're designed for signal switching. Whether it's enough for your application is another story. The advantage is that they're very-very fast so you don't interrupt the line for very long.

There are CAN monitors that -may- do what you need, and avoid having to build anything. But of course that's $ rather than designing it yourself.