2
\$\begingroup\$

I have a motor whose driver board communicates via the CAN protocol. I need to programmatically command the driver board from my laptop computer using CANopen.

I am looking into buying a USB to CAN adapter. I came across this article: USB-to-CAN Adapters connect CAN bus devices to PC., which suggests two potential adapters:

  • USB2-F-7001
  • USB2-F-7101 (adds optical isolation between CANbus transceiver and CANbus controller, costs $100 more).

diagram showing optical isolation

(Source)

I am totally new to CAN. I am wondering:

  • Is this optical isolation necessary?
  • Am I really putting my computer at risk by not optically isolating it from the CAN bus?

Related Questions

Does CANbus need to be isolated?

Suggests it may not be a big deal, if the motor is well grounded. However, it's not specifically for the USB-to-CAN adapter, so I am asking it explicitly.

\$\endgroup\$
3
  • \$\begingroup\$ Are you going to be anything unusual that might blow the motor driver? How how high voltage is all this anyways? Blowing your laptop is one thing, electrocuting yourself because something blew is another. Alternatively, I suppose you could get a USB-USB optical isolator and use that for everything. Has more uses. \$\endgroup\$
    – DKNguyen
    Apr 4, 2020 at 22:02
  • \$\begingroup\$ @DKNguyen USB-USB isolator works just for very few examples. USB is very tricky, it would be a nice solution, but it doesn't work. For example, also the JTAG comes in isolated version, it would be cheaper to use USB/USB isolator and non-isolated JTAG, but is a no go. \$\endgroup\$ Apr 4, 2020 at 22:31
  • \$\begingroup\$ @MarkoBuršič so usb isolators are really finicky? \$\endgroup\$
    – DKNguyen
    Apr 5, 2020 at 0:06

3 Answers 3

3
\$\begingroup\$

Is this optical isolation necessary?

If you work in the office, probably not. Industrial environment is somehow different, motors are mounted on a production line over long distance. Current leaks are everywhere. If you connect a computer on a nearby socket, the difference in earth potential is such that creates ground loops.

Am I really putting my computer at risk by not optically isolating it from the CAN bus?

Sure. Any industrial bus, like RS485, RS232,... I do have only isolated converters, even for my hobby. I don't have any confidence in direct connection, I guess it's just my habit after decades of industrial computing.

You have to see also what software you get with the converter. For many years a reference point was PEAK-System PCAN. You can have also some cheap isolated converters (under 100$) for programming the motors, but it doesn't say CAN, it can work only for dedicated drive (I know it is isolated CAN, because I made a teardown of it)

I need to programmatically command the driver board from my laptop computer using CANopen

You would also need an API that can send telegrams from your C++ app to the CAN bus. Preferably it needs to run in a real-time kernel, but this is very difficult using USB converter. Don't expect that if you buy a converter it will be plug and play. If you don't intend to write the CANopen Master, then you would need to buy the license. Therefore I would recommend you to first get the price for the software and only then buy the compatible HW device.

\$\endgroup\$
2
\$\begingroup\$

I always "forced" my superiors to buy isolated CAN interfaces. They simple always work as soon termination is OK and the right baud-rate is selected. Also no currents can flow between your device under test and the PC.

  • less chances to damage something
  • always works

So in my opinion: worth the money

Edit:

https://www.kvaser.com/products-services/our-products/#/?descriptors=pc_int

provides really good ones, I always used their stuff (re-branded by vector informatik)

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

I think there is a misconception that grounding one side of the circuit (motor in your example) protects your equipment. In fact, grounding the motor might increase transient spikes if you shuffle around with your laptop disconnected from mains and then plug it into well grounded CAN bus.

Any kind of galvanic isolation (optical being one of them) provides transient protection and deals with ground potential differences too.

Having said that, the CAN transceivers usually have pretty decent TVS protection built-in. So, if all you do is experimenting with CAN at your desk your laptop should be relatively safe. At most you will burn the adapter or motor driver. If, however, you are planning on using the adapter for a long time and in various environments then extra $100 does not sound as much for a peace of mind.

\$\endgroup\$

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.