Close

Design decisions and CAN basics.

A project log for CAN 2.0A/B Debugger

This device is meant to help hackers without specialized tools to develop and communicate with CAN networks.

Tomasz TargielTomasz Targiel 07/30/2014 at 09:380 Comments

The very first question that more experienced developers may ask, is why did I choose Freescale MK40 microcontroller for this project. The answer is simple, it has CAN and USB peripherals and... I have already couple of them in my possession ;) . Generally Freescale MCUs thanks to CodeWarrior and Processor Expert, are easy to use for beginners, and speedup development of my projects quite nicely.


Voltage dividers and resistor on +5V line.
Because other function of this device is to be mini power supply for my other projects, I added 1R resistor on output +5V line to measure output current. Max current supplied by USB (2.0) is 500mA, so maximal voltage drop on 1R resistor is 0.5V. Usually my projects use 3V3 linear regulator so 4.5V is more than enough. I use 3V voltage reference so all analog signals have to be reduced bellow this value. Thats why I used voltage dividers.


CAN.

MCUs that have CAN controller are not common, but even if you have state of the art device, you need  external CAN transceiver to control voltage levels of CAN bus. Logical signals are represented by difference in voltage levels between CAN high an low lines. Voltage on those lines are different than voltages representing logic signals on MCUs. That's why we need external device to communicate with CAN bus.

Discussions