CANopen to USB?

1

0

I have one of these digital pressure trasmitters that outputs a CANopen (CAN-BUS) signal.

What is the best way to get the data via a USB port on my computer? Can I just wire the CAN_H and CAN_L to the USB + and USB- and the V+/- to an external power supply?

Maybe USB isn't the way to go. Can I wire this to the ethernet port?

Once the wiring is done, what's the easiest way to then decode the data on my OS? I won't shy away from a bit of programming, but I'm lost in a sea of CAN protocols and need some direction! I have access to a Linux box, a Mac box, and a PC here.

vimes1984

Posted 2014-04-19T20:40:58.283

Reputation: 33

Answers

1

I'm not sure what your application is, but reading the data from this sensor is not that simple. As André said, this is a CAN device; specifically, it is a CANopen protocol device. Wiring it to USB will wreak havoc upon the poor computer to which you connect it.

I would recommend doing some research on the CAN-BUS protocol to see how it works. To get you started, I would recommend purchasing an Arduino (perhaps a starter kit like this or this) and this CAN-BUS Shield (here's a library). Then look at the datasheet for your sensor to see how to communicate with it. The USB connection with the Arduino will allow you to access serial information sent from the Arduino to your computer (e.g. the pressure level). However, the Arduino is a microcontroller, and it may be satisfactory as a controller alone for your application, negating the need for USB.

If all of this seems over your head, you might want to opt for a simpler pressure sensor like this one (datasheet) from the Honeywell MLH series. It is a simple analogue sensor that uses voltage (5V, perfect for the Arduino) to output the pressure value.

The sensor you have is very heavy-duty (metal case with a range of about 1200 PSI), and it is probably overkill for most applications, but I don't know what you are using it for. If it's something simple with not nearly that much pressure, I would recommend purchasing a different sensor that has better precision and accuracy for the pressure range you are gauging.

While you could opt for a CAN to USB adapter like this commercial one or this more documented one, I would bet that you will find yourself rather limited in capability immediately, and/or in the future. That being said, I would recommend the Arduino solution over the USB adapter one.

evan.bovie

Posted 2014-04-19T20:40:58.283

Reputation: 2 758

I've ended up going for a comercial adapter, the first one you referenced on amazon :D do you know of any software for ubuntu so i can monitor the can device? – vimes1984 – 2014-06-19T19:40:05.580

2

CAN-USB conversion adapters that I have seen incorporate a dedicated micro-processor for handling the conversion details, so I'm not too sure about the possibility of soldering one for yourself.

An example on Amazon is USB-CAN USB to CAN Bus Converter Adapter with USB Cable, costing $46.99. I don't know what this device will look like to Windows and whether it requires a special driver.

harrymc

Posted 2014-04-19T20:40:58.283

Reputation: 306 093

1

That sensor outputs data on a CAN bus, which is a network mainly designed for automobile usage (it's widely used to interconnect ECUs inside vehicles and allow them to communicate together).

CAN is very different from USB and connecting them directly can result in a disaster by damaging the USB controller and possibly the entire motherboard.

If you still want to use this sensor you'll need a device to convert the CAN bus to something your computer can accept, like USB, RS232 (if you have a serial port) or even Ethernet - here's an example CAN<->USB converter.

Note that there is no software already made to read data from a sensor like this, because almost every CAN interface has its own APIs and each sensor itself has different data formats and stuff, so you'll need to program an application to read the sensor.

Look at the SDK and examples provided with your CAN interface for how to "talk" to the CAN bus, and then look at the datasheet of your sensor for how to actually "talk" to it and get its values.

user256743

Posted 2014-04-19T20:40:58.283

Reputation: