CAN interface bus to USB converter. PCB design

GKMN.468351.006


A device that connects to an IBM PC compatible computer via USB interface, is intended for diagnostics and configuration of control and data acquisition systems based on the CAN-bus network. The CAN-bus-USBnp interface, connected to a modern high-performance computer running Windows OS, allows you to create effective software and hardware solutions for configuring and testing CAN networks. The device is especially convenient in mobile applications together with portable wearable computers and the CANwise program for testing CAN networks in field and industrial conditions, including for vehicle diagnostics. The device can be used for testing and configuring equipment that uses protocols top level J1939 and CANopen when working in conjunction with loadable modules of the CANwise program.

The device is an alternative to CAN controllers in PCMCI format.

Main characteristics of the device:

  • 2-channel CAN controller corresponding to the CAN 2.0B specification;
  • uses an interface that complies with the USB 2.0 High Speed ​​specification;
  • primary processing of CAN network frames is performed by a built-in 32-bit ARM microcontroller;
  • CAN-bus interface (in accordance with CiA DS-102) with galvanic isolation of 1000 Volts, protection against overvoltage and impulse noise;
  • Nutrition from USB bus; current consumption - no more than 200 mA;
  • dimensions 107*53*28 mm;
  • operating temperature range: 0..+70 C.

User Guide

Software:

  • The CHAI library includes a unified CAN interface driver, a text CAN monitor;
  • universal program for testing and configuring the CAN network with graphical user interface CANwise. The free basic version comes with a loadable CAN network monitor module and a number of modules for the CANopen and J1939 protocols.

The following are supported OS: Windows XP/Vista/7.

The CAN-bus-USBnp interface supports the official CANopen Conformance Test of the international organization CAN in Automation (CiA).

Product cost: 10,200 rub. including VAT

USBCANPlus- adapter that converts USB signals to CAN. It connects the PC via a USB interface to the CAN bus. The CAN port and USB are protected against static electricity and comply with IEC 61000-4-2 (8KV contact/16KV air). Since everything modern computers Since they have several USB ports, installing the product is quite simple. Even a port with the outdated USB1.1 standard, operating at speeds up to 12Mbps, allows you to work with USB-CAN+.

The CAN bus is widely used in industrial applications, as well as for monitoring and control tasks in automobiles. The USB-CAN+ adapter can be used to monitor data traffic in such equipment, as well as to transmit control information. USB-CAN+ performance - one of the best of these products on the market. Since automatic hardware flow control is carried out at the interface between the CAN controller and the PC, the data reliability is very high.

  • The ASCII conversion protocol is useful in developing and testing any configuration. Users simply open a serial port through the Terminal Program and receive a channel to work with the CAN controller. In the same way they can receive and transmit CAN frames.
  • User-programmed applications load a dynamic-link library (DLL) that transparently manages ASCII conversion. The API is supported in C/C++, C#, VB.NET, Delphi and LabVIEW.
  • On Linux, Socket CAN can be used as an alternative to the vs_can_api library. VScom CAN devices support the standard Serial Line CAN (slcan) driver.
  • USB-CAN+ also supports CANFestival, the Open Source CANopen Framework. CANopen is a CAN-based upper layer protocol that is used for a variety of applications such as medical equipment, off-road vehicles, marine electronics, railway applications and building automation. CANopen frees the developer from working with CAN-specific data. It provides standardized communication objects with real-time data, configuration and network management data.
  • CANHacker is a tool for analyzing and transmitting frames on the CAN bus, included in the package.
  • A set of Mapper DLL modules simulates the operation of CAN devices from other manufacturers. Users configure their system for these devices or a USB-CAN+ adapter as a replacement. Thus, the existing software will use USB-CAN+ without changing the application or changing it.
  • USB-CAN Plus is a new version USB-CAN adapter from VScom.

Rice. USB-CAN Plus converter

Distinctive features:

  • connects PC to CAN bus via USB;
  • supports CAN 2.0A and CAN 2.0B;
  • high-speed CAN up to 1 MBit/s;
  • USB and CAN port are protected from static electricity;
  • remote frame support, listen mode only;
  • support from Windows 2000 to Server 2012, CE;
  • Linux kernel 2.6+ support;
  • support for C/ C++, C#, VB.NET, Delphi and LabVIEW;
  • CANopen is supported by CANFestival;
  • USB 2.0 FS, USB powered;
  • The driver emulates a serial port for easy access;
  • library (DLL) for standard access;
  • ASCII conversion protocol via serial port;
  • debugging support Bosch Busmaster;
  • metal case.

Documentation and software can be found on the manufacturer's website.

The announcement was compiled and prepared
Shraga Alexander,
a.

This project is intended for the manufacture simple device for monitoring the CAN bus. I chose the NUC140LC1CN 32K Cortex-M0 microprocessor for one main reason - it has USB and CAN peripherals.

Project characteristics

  • Ease of development
  • Compatible with LAWICEL CANUSB protocol
  • Monitoring device appears as USB FTDI device
  • Supports 11-bit CAN 2.0A and 29-bit CAN 2.0B frames
  • Availability of internal FIFO CAN message buffer
  • Nutrition from USB port
  • Bootloader stored in USB memory storage device, for firmware updates
  • Firmware available for download

Circuit design

To enable the peripheral unit NUC140 CAN connection to the CAN bus requires a CAN transceiver. The microcircuit is most suitable for this purpose T.J.A.1051 T from NXP. Block NUC140 can operate from a 5V power source. Therefore, there is no need to use an additional 3.3V voltage stabilizer. This makes it possible to significantly simplify the task of implementing a CAN bus interface. The scheme provides three LED indicator states:

  • D1 – USB connection status indicator with host
  • D2 displays CAN bus activity
  • D3 displays CAN interface errors

NUC140 does not have a built-in bootloader and the only way to program it is to use the ARM Serial Wire Debug (SWD) interface (J2 connector) and the Nuvoton ICP programmer. Well, of course, if the bootloader is already pre-programmed, then it can be activated. For this purpose it is necessary to use jumper JP1. Using jumper JP1 before applying power to the interface will launch the bootloader.

Loader

Flash memory NUC140LC1 divided into two sections. One of them is designed to execute the user program code (APROM) of 32K size, and the other is for the bootloader (LDROM). The LDROM is only 4K in size, which makes creating a fully functional USB bootloader problematic. I used a mass storage device (MSD) bootloader provided by Nuvoton. Setting jumper JP1 starts execution of the bootloader. As a result removable drive will be displayed in file system host size is 32 kB. Simply copy and paste or drag and drop the CAN-USB firmware update onto the bootloader disk. Disconnect USB cable, remove the jumper and connect the cable again. The updated firmware should now be running.

Programming the CAN-USB interface and NuTiny-SDK-140

For programming the processor NUC140 You will need the Nu-Link programmer from Nuvoton and the Nuvoton ICP software application. But I decided to use a demo board instead NUC140(NuTiny-SDK-140), available from . It has two parts, the part with the NUC140 chip and the Nu-Link programmer itself. The board is evenly perforated to allow the Nu-Link portion to be detached. In fact you can make this device exclusively on the NuTiny-SDK-140 demo board, adding only an additional CAN transceiver chip.

When you connect Nu-Link, programming the NUC140 is easy. The key issue is to choose to boot from LDROM instead of APROM (in Config settings) to ensure USB bootloader functionality.

Software

The CAN-USB interface is compatible with the LAWICEL CANUSB protocol and will work with applications designed for this protocol. I tested two applications with the CAN-USB interface:

CANHacker V2.00.02

This is a free CANHacker application. I couldn't find a user manual for this application. However, it is quite simple and intuitive to use.

CAN Monitor Pro V2.2

This application is developed by wgsoft.de. Please note that this developer site is primarily in German.

PCB design

List of radioelements

Designation Type Denomination Quantity NoteShopMy notepad
IC1 ChipNUC140LC1CN1 To notepad
IC2 ChipTJA1051T1 To notepad
D1 Light-emitting diodeGreen1 To notepad
D2 Light-emitting diodeYellow1 To notepad
D3 Light-emitting diodeRed1 To notepad
C1, C6 Capacitor10 µF2 To notepad
C2, C3, C7, C8 Capacitor0.1 µF4 To notepad
C4, C5 Capacitor20 pF2 To notepad
R1, R2 Resistor

100 Ohm

2 To notepad
R3 Resistor

10 kOhm

1 To notepad
R4-R6 Resistor

330 Ohm

3 To notepad
X1 Quartz resonator12 MHz1

I already mentioned a little and you might think that I would now start talking about another industrial standard CAN, but this is not so, I will talk about how to transfer data between and CAN interfaces.


What I read on the Internet:The physical data transmission medium of the CAN interface, characteristics of transceivers, connector layout, cable properties, network topology are not covered by the BOSCH CAN specification v.2.0 A/B. The physical layer is the subject of various international, national, industrial and even in-house specifications.

We won’t go deeper, I’ll say this: “Most developers use ready-made implementations of this bus, in the form of long-invented microcircuits,” but we, as users of these two standards, have connection problems. Let's consider the most common situation, when there is a bus, several devices are connected to it, and suddenly we need to connect another one, but it turns out to have a different type of interface - CAN. Although the interface converter has such a connector and the ability to work with two interfaces at once, in this situation it is necessary to pull out an additional twisted pair to a new device, which is not rational. What to do? We are assembling a new connection diagram.

Let's check and enjoy life...
You understand that this scheme is only valid for converting the physical level of signals. The presence or absence of ECHO in packets will be configured by an internal jumper in the converter and the ECHO checkbox.


For some interface converters, pull-up resistors are not installed. The only thing left is a resistor between A and B.





Product in stock! Prices 2019

Conditions for ordering and delivery of adapters for communication with Mercury meters
(requests by email [email protected] or by phone 8-909-283-34-16)


1) Cost 5000 rubles. Buy. Miniature SPD for polling lists of Mercury meters via any of the connected USB-RS485/CAN/IRDA/optoport interfaces. It can independently poll 10 three-phase Mercury meters, or create an end-to-end tunnel for polling through itself external programs unlimited list of counters.

2) Ethernet-RS485 (VR-008.1) Cost 3300 rubles. Buy. Finished hardware device data transfer between local network Ethernet and wired RS485 interface. Widely used to automate readings from metering meters, including Mercury electricity meters. Works with all types of TCP/IP protocols in server and client modes. Can be connected to the Internet for remote monitoring of ASKUE metering objects.

3) USB-IRDA (model VR-001) Cost 1950 rubles. Buy. Interface converter for electricity meters Mercury-230, 231, CE-102 containing IRDA interfaces. To connect to an electric meter, it does not require opening the terminal box.

4) USB-RS485/CAN (model VR-002) Cost 1950 rubles. Buy. Universal converter of wired interfaces RS485/CAN. Can supply power to the electric meter interface. Suitable for Mercury-200, 203.2T, 206, 230, 233, 234, 236 containing RS485/CAN. Connection requires opening the terminal box. It is possible to connect highways with meters.

5) USB-RS485 (model VR-004) Cost 850 rubles. Buy. Suitable for Mercury electricity meters that do not need to power the communication interface. It has only output terminals D+ and D-. Can be used with Mercury-203.2T, 206, 230, 233, 234, 236, containing RS485. It is necessary to open the terminal box for connection.

6) USB optical port (model VR-005) Cost 1950 rubles. Buy. Suitable for electricity meters Mercury-201.8TLO, 203.2T, 206, 233, 234, 236, containing an optical port. Connection does not require opening the terminal box.

8) JTT-A (RS485/CAN) (433 MHz radio modem, 100 mW) Cost 4000 rubles. Buy. Miniature radio modems with a transparent communication channel, allowing you to work with electricity meters in radio extender mode. They have the ability to connect to industrial RS485/CAN interfaces and allow you to create group or single electricity metering units in hard-to-reach places.

9) 3G modem (Hilink) Cost 2000 rubles. Buy. The modem has specialized Hilink firmware, works with all SIM cards, has advanced settings (built-in firewall, SMS, USSD, displays service information about signal levels and much more). Allows you to provide VR-007 automation nodes with the Internet and create the ability to poll electricity meters via 3G networks.

10) Automation unit - WiFi router (model VR-007.3) Cost 4200 rubles. Buy. A smart home element that allows automated polling of a three-phase Mercury meter through any of the connected USB-RS485/CAN/IRDA/optoport interfaces. It has its own adaptable Web interface, a database, and can conduct a minute-by-minute survey of instantaneous values ​​of currents, voltages, powers, and build energy graphs by month and day. It has the ability to broadcast a webcam and weather stations through itself; it is an element of a smart home capable of transmitting consumption data to email user and sales. Can output data to the Narodmon.ru server and report critical situations.

The CAN interface converter is widely used in industrial automation. The modules are designed to convert RS-232, USB, TCP/RTU to CAN. Many models support CAN to SC conversion and multimode fiber. Converters are produced in various designs - plastic or metal cases.

Interface converters differ from each other:

  • sizes,
  • design option,
  • number of ports and supported interfaces,
  • the presence of galvanic insulation,
  • speed and other data transfer parameters.

Our catalog presents a wide range of CAN interface converters to optical fiber and USB converters, RS-232 to CAN. The products are able to operate without failure in conditions of high humidity and a wide range of temperatures. Products from leading manufacturing companies meet quality and safety standards, are compatible with other devices and are easy to use.

We offer to buy converters from ICP DAS, MOXA, Titan (VSCom) at favorable prices. Costs and additional characteristics of items are presented on product pages. Detailed information The manager will provide information about the conditions for purchasing converters over the phone.