Tag Archives: serial interfaces

Looking at CAN bus over lunch

I’ve been looking at low level communications interfaces for microcontrollers for a while. Things like SPI and I2C seem limiting as operating voltage levels vary (at least 3.3v and 5v) and for SPI fan out is clunky/limited.

I’ve had several people whose opinion I respect say good things about CAN. It seems to be predominantly an automotive standard but the interface parts seem to be cheap enough and the interface more than flexible enough to work for general embedded projects. It runs at 5v on the physical layer and the controllers appear to be voltage flexible so that is a big plus.

A quick search turned up some microchip interface components and they have DIP versions so they’d be easy enough to use in a prototype environment.

The MCP2515 (datasheet) appears to be a reasonably priced SPI to CAN controller that would likely work nicely with either an RPi or AV controller (as in an arduino). Mouser has then for $1.88 for singles and $18..50 for ten so pretty reasonably priced.

The MCP2561 (datasheet) seems to be the physical layer companion part, also available in DIP packaging and DigiKey has these for $0.93 each or $19.31 for 25. 

I’ll likely do some more reading tonight. Once I get my workbench in the basement cleared and ready for use, I’ll likely buy a few of each of these and see what I can do with them.

PC/USB to CAN interfaces seem harder to come by. Most of what I saw online are $100.00 and up diagnostic probes. Useful items for development, but very expensive is all you want to do is talk to a device. I did find one break-out board from a side called tindie that seems to offer a $25.00 solution for the basics. Still seems a bit expensive and suggests putting together something ad-hoc with an AVR board and a controller/phy. As an initial, easy to use bootstrapping solution it looks potentially interesting though.