Author Topic: CAN bus to USB  (Read 10337 times)

0 Members and 1 Guest are viewing this topic.

Online Jeroen3Topic starter

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
CAN bus to USB
« on: April 07, 2015, 08:00:41 pm »
Does anyone know of any reliable CAN bus to USB interfaces?
I want to build my own application around it, so the api must be available.

Currently I have ADFweb HD67390's, but they can only do a maximum of 25kbaud (2 kBps) of actual bridging. A little poor, don't you think?
I'm investigating possibilities for a CAN bootloader, but at 25kbaud flashing (max) 1MB is going to take "forever". (~10minutes)
Although, you can load to multiple devices at once. But that will require some more advanced bootloader on-target.

Compared to 1 Mbaud uart, which will take 10 seconds, excluding overhead.
 

Offline dadler

  • Supporter
  • ****
  • Posts: 851
  • Country: us
Re: CAN bus to USB
« Reply #1 on: April 07, 2015, 08:08:52 pm »
Does anyone know of any reliable CAN bus to USB interfaces?
I want to build my own application around it, so the api must be available.

Currently I have ADFweb HD67390's, but they can only do a maximum of 25kbaud (2 kBps) of actual bridging. A little poor, don't you think?
I'm investigating possibilities for a CAN bootloader, but at 25kbaud flashing (max) 1MB is going to take "forever". (~10minutes)
Although, you can load to multiple devices at once. But that will require some more advanced bootloader on-target.

Compared to 1 Mbaud uart, which will take 10 seconds, excluding overhead.

I have one of these: http://www.can232.com/?page_id=16

Works very well, is quite mature, and the company has been consistently updating the firmware over the lifetime of the product.

It has both a virtual serial port interface and a direct API (for faster speeds). I am quite happy with it.

I believe I purchased it from here, as they had it in stock: http://www.equinox-tech.com/products/manufacturer.asp?ID=15

Received in California 2 days after order was placed.
 

Offline max_torque

  • Super Contributor
  • ***
  • Posts: 1275
  • Country: gb
    • bitdynamics
Re: CAN bus to USB
« Reply #2 on: April 07, 2015, 09:26:01 pm »
I use these:

http://www.peak-system.com/PCAN-USB.199.0.html?&L=1

Cheap(ish), reliable, and has a free "API" for numerous languages/platforms
 

Offline TwinScroll

  • Contributor
  • Posts: 19
  • Country: gb
Re: CAN bus to USB
« Reply #3 on: April 07, 2015, 09:40:16 pm »
Another one to consider :::

http://www.cananalyser.co.uk

Very good support from the developer.

 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13741
  • Country: gb
    • Mike's Electric Stuff
Re: CAN bus to USB
« Reply #4 on: April 07, 2015, 10:08:02 pm »
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Online Jeroen3Topic starter

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: CAN bus to USB
« Reply #5 on: April 08, 2015, 05:38:57 am »
I forgot to mention it has to be isolated.
The CANUSB mentions in their manual they can only sustain 125kb for a short time.
 

Offline aiq25

  • Regular Contributor
  • *
  • Posts: 241
  • Country: us
Re: CAN bus to USB
« Reply #6 on: April 08, 2015, 05:23:43 pm »
If you want to go Open Source you could use the USBtin. Although I tried to build the circuit and couldn't get it work. I ended up making a simple device using a PIC and CP2102 module from eBay, it was for a class and it worked very well for my needs. The USBtin would need some modifications in my opinion, look at the schematic.

http://www.fischl.de/usbtin/
 

Online Jeroen3Topic starter

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: CAN bus to USB
« Reply #7 on: April 08, 2015, 07:00:32 pm »
Open Source is typically very far away from begin user friendly. As are some proprietary solutions.
Using custom USB drivers and other non-signed stuff. Remember that all "users" are using Microsoft by default.

The HD67390's from ADFweb use FTDI chips which auto-install on almost every workstation on the planet.
 

Offline rollatorwieltje

  • Supporter
  • ****
  • Posts: 571
  • Country: nl
  • I brick your boards.
Re: CAN bus to USB
« Reply #8 on: April 08, 2015, 09:21:04 pm »
At work we use IXXAT USB-CAN Compact adapters, they work fine and can handle up to 1 mbit. It comes with a C and C# api. It can also report CANbus errors properly (instead of just saying "screw you, its broken"), which is useful for debugging purposes. They are quite expensive though, I though they were in the order of 200 euro.
 

Offline veeev

  • Newbie
  • Posts: 3
Re: CAN bus to USB
« Reply #9 on: April 09, 2015, 04:51:36 pm »
I have this one: http://www.kreatives-chaos.com/artikel/can-debugger (Sorry, it's in German).
It uses the documented Lawicel protocol or a simple shell interface.
CAN is galvanically isolated, a termination resistor may be activated via shell interface.
I used it to communicate with my CAN-based home automation system. Hasn't disappointed me for 6 years by now.
 

Offline Christopher

  • Frequent Contributor
  • **
  • Posts: 429
  • Country: gb
Re: CAN bus to USB
« Reply #10 on: April 09, 2015, 06:39:05 pm »
FTDI's Easysync division do a few : http://www.easysync-ltd.com/category/123/canbus-solutions.html

I have used the isolated version of this in an install and it works great. Easy USB/Serial interface
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: CAN bus to USB
« Reply #11 on: April 09, 2015, 07:25:40 pm »
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16276
  • Country: za
Re: CAN bus to USB
« Reply #12 on: April 09, 2015, 07:35:19 pm »
To be fair Vince, you use it every day at work............

It can even change the radio volume for you.
 

Offline Kohanbash

  • Regular Contributor
  • *
  • Posts: 175
  • Country: us
    • Robots for Roboticists
Re: CAN bus to USB
« Reply #13 on: April 09, 2015, 07:41:48 pm »
I use these:

http://www.peak-system.com/PCAN-USB.199.0.html?&L=1

Cheap(ish), reliable, and has a free "API" for numerous languages/platforms

There is an isolated version of this one (that costs more). I also use the PCAN-USB. The hardware is pretty good. The software is average and gives basic read and writing of CAN messages.
Robots for Roboticists Blog - http://robotsforroboticists.com/
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26896
  • Country: nl
    • NCT Developments
Re: CAN bus to USB
« Reply #14 on: April 09, 2015, 08:39:44 pm »
Open Source is typically very far away from begin user friendly. As are some proprietary solutions.
Using custom USB drivers and other non-signed stuff. Remember that all "users" are using Microsoft by default.

The HD67390's from ADFweb use FTDI chips which auto-install on almost every workstation on the planet.
Still I would look for a solution which doesn't use FTDI or any other serial bridge chips. There is no reason why not to use a controller which has USB and CAN so you can have a CDC serial class device. That way the baudrate doesn't matter; the only limit is the 12Mbit USB provides.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Christopher

  • Frequent Contributor
  • **
  • Posts: 429
  • Country: gb
Re: CAN bus to USB
« Reply #15 on: April 14, 2015, 09:49:30 pm »
It's much easier (probably) to isolate uart serial than canbus.

You could roll your own but the solutions here are good enough
 

Online Jeroen3Topic starter

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: CAN bus to USB
« Reply #16 on: April 15, 2015, 08:01:28 am »
I could run my own. Maybe I would, just because I can. For self-training purposes, I've never done anything with USB vcom other than 115200-8N1.

Isolating CAN is cheaper. You'd only need a few 10's mW of isolated power and two channels. Instead of 4 channels (rx/tx/cts/rts) and (several) 100mW of isolated power.
You isolate can before the transceiver.
 

Offline Mad ID

  • Regular Contributor
  • *
  • Posts: 167
  • Country: 00
Re: CAN bus to USB
« Reply #17 on: April 15, 2015, 10:15:51 pm »
Does anyone know of any reliable CAN bus to USB interfaces?
I want to build my own application around it, so the api must be available.

Currently I have ADFweb HD67390's, but they can only do a maximum of 25kbaud (2 kBps) of actual bridging. A little poor, don't you think?
I'm investigating possibilities for a CAN bootloader, but at 25kbaud flashing (max) 1MB is going to take "forever". (~10minutes)
Although, you can load to multiple devices at once. But that will require some more advanced bootloader on-target.

Compared to 1 Mbaud uart, which will take 10 seconds, excluding overhead.

I use PCAN from peak system, very good. They provide API.
 

Online Jeroen3Topic starter

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: CAN bus to USB
« Reply #18 on: May 04, 2015, 07:09:57 am »
To make it even worse. The converter I'm currently using does not default to passive.
So when plugged in, it destroys 90% of the frames.  |O


Edit: This problem has been fixed in a firmware update.
« Last Edit: May 18, 2015, 07:17:18 am by Jeroen3 »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: CAN bus to USB
« Reply #19 on: May 05, 2015, 01:37:53 am »
I got recently 4 of these prototype boards:

CY8CKIT-059 PSoCĀ® 5LP Prototyping Kit
http://www.cypress.com/?rid=108038


Have not played with the CAN bus but it's supported provided you use CAN transceivers for the differential signal.

Link to prototype chip details and datasheet:
http://www.cypress.com/?mpn=CY8C5888LTI-LP097

CAN docs:
http://www.cypress.com/?docID=19093

http://ia700402.us.archive.org/2/items/CanBusInPsoc5_482/CanBusInPsocReport.pdf

But I have no experience at all with CAN so not sure if it will fit your needs.
 

Offline kaz911

  • Super Contributor
  • ***
  • Posts: 1052
  • Country: gb
Re: CAN bus to USB
« Reply #20 on: May 05, 2015, 03:58:50 am »
Does anyone know of any reliable CAN bus to USB interfaces?
I want to build my own application around it, so the api must be available.

Currently I have ADFweb HD67390's, but they can only do a maximum of 25kbaud (2 kBps) of actual bridging. A little poor, don't you think?
I'm investigating possibilities for a CAN bootloader, but at 25kbaud flashing (max) 1MB is going to take "forever". (~10minutes)
Although, you can load to multiple devices at once. But that will require some more advanced bootloader on-target.

Compared to 1 Mbaud uart, which will take 10 seconds, excluding overhead.

The gold standard being used by a lot of companies as OEM is kvaser. And by gold standard I mean they are not cheap - but comes with free API and inspection tool. http://www.kvaser.com/ - Some of the OEMs that use them are Mercruiser, Navico (Simrad), MasterVolt CZone and others. (I know the before mentioned as I work with Marine stuff :) ) - I picked mine up cheap on eBay...

They just launched an Ethernet <-> CAN adaptor as well.
 

Online Jeroen3Topic starter

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: CAN bus to USB
« Reply #21 on: May 27, 2015, 11:33:17 am »
I've bought a kvaser leaf. Overall first impresssion is great  :-+.
- They are the only one to specify (or brag about) the maximum number of frames per second.
- They claim 1 driver to rule them all.
- They explain CAN bus on their website. So at least someone they hired knows stuff.
- They sell bare boards similar to the USB dongle.
- Their CANking tool works nice. Looks feature packed.
- Virtual can networks.
- Multiple application on 1 piece of interface hardware.
However:
- It isn't fully plug&play, a 7 MB driver installer for windows is required. But maybe that is not actually needed when deploying custom application using kvaser drivers.
- Not a fan of the DB9 connector. But old habits standards die hard.

As I'm seeing now, with CANKing, I'm able to generate 90% of 250kb bus with random frames.
 

Offline kaz911

  • Super Contributor
  • ***
  • Posts: 1052
  • Country: gb
Re: CAN bus to USB
« Reply #22 on: June 03, 2015, 11:12:20 am »
Cool - let us know how you get on :)
 

Online Jeroen3Topic starter

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: CAN bus to USB
« Reply #23 on: June 03, 2015, 12:07:31 pm »
I forgot. I quickly made this based on earlier attempts with different interfaces to determine if the api is worth it.
https://github.com/Jeroen6/QtKvaser

It is. You'll need 1 dll, and there is only 1 driver to install for all kvaser devices.  :-+
You can install the driver yourself, they share the .sys/.inf files. But you can also call the installer (8MB) from your application. With arguments to opt-out or run in the background.

The api seems quite large. But I got it working with the basics.
For more elaborate applications you might be interested in filters and callbacks or events.

And you can actually connect 2 sessions to 1 interface. Just be aware that both can't be used to initialize the bus parameters.

I also contacted them to ask if they have DIN Rail solutions. They don't have now, but will have in the future.
« Last Edit: June 03, 2015, 12:11:35 pm by Jeroen3 »
 

Offline kaz911

  • Super Contributor
  • ***
  • Posts: 1052
  • Country: gb
Re: CAN bus to USB
« Reply #24 on: June 04, 2015, 02:47:09 pm »
I mainly use mine for reverse engineering the protocols :) and then I have a TI based launchpad board with my own CAN bus design on top working with the protocols. There are about 9 different "non-standard" marine CAN networks + NMEA 2000...

I forgot. I quickly made this based on earlier attempts with different interfaces to determine if the api is worth it.
https://github.com/Jeroen6/QtKvaser

It is. You'll need 1 dll, and there is only 1 driver to install for all kvaser devices.  :-+
You can install the driver yourself, they share the .sys/.inf files. But you can also call the installer (8MB) from your application. With arguments to opt-out or run in the background.

The api seems quite large. But I got it working with the basics.
For more elaborate applications you might be interested in filters and callbacks or events.

And you can actually connect 2 sessions to 1 interface. Just be aware that both can't be used to initialize the bus parameters.

I also contacted them to ask if they have DIN Rail solutions. They don't have now, but will have in the future.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf