USB to CAN
I started this project to research CAN messages bouncing around my car.
The CAN interface is isolated from the USB using a DC-DC converter and Analog's excellent ADUM1201. Although the STM32F103 MCU supports USB natively, it unfortunately cannot use USB and CAN at the same time. The USB to serial conversion is therefore done by FT230XS IC.
The project is an isolated alternative to USBtin. It implements the same frontend protocol (SLCAN).
Bill of materials
|Qty||Value / Farnell code||Device||Size||Parts|
|9||100n||multilayer||0805||C5, C6, C7, C8, C12, C14, C15, C16, C17|
|1||USB B con.||X1|
Although there are several tools available freely to communicate with the interface, I've written my own in python, so I could quickly adapt it to my needs. The script is very short and basic, so you can do the same.
Start the script by specifying serial interface and CAN baud rate in kHz.
moncan.py com15 50
To transmit CAN messages, write SLCAN commands to the bottom edit box and press enter. The command is sent unchanged to the interface. I needed to send some commands repeatedly so there's also a Send every 100ms button.
To compile the sources, my STM32F10x library is required.