docs: Add notes on terminating resistors to CANBUS.md

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-04-25 15:43:59 -04:00
parent 70ea0806d9
commit 475d8a72ad
1 changed files with 21 additions and 4 deletions

View File

@ -6,10 +6,9 @@ Klipper currently only supports CAN on stm32 chips. In addition, the
micro-controller chip must support CAN and it must be on a board that micro-controller chip must support CAN and it must be on a board that
has a CAN transceiver. has a CAN transceiver.
To compile for CAN, run "make menuconfig", unselect "Use USB for To compile for CAN, run "make menuconfig" and select "CAN bus" as the
communication (instead of serial)" and then select "Use CAN for communication interface. Finally, compile the micro-controller code
communication (instead of serial)". Finally, compile the and flash it to the target board.
micro-controller code and flash it to the target board.
# Host Hardware # Host Hardware
@ -41,6 +40,24 @@ iface can0 can static
Note that the "Raspberry Pi CAN hat" also requires [changes to Note that the "Raspberry Pi CAN hat" also requires [changes to
config.txt](https://www.waveshare.com/wiki/RS485_CAN_HAT). config.txt](https://www.waveshare.com/wiki/RS485_CAN_HAT).
# Terminating Resistors
A CAN bus should have two 120 ohm resistors between the CANH and CANL
wires. Ideally, one resistor located at each the end of the bus.
Note that some devices have a builtin 120 ohm resistor (for example,
the "Waveshare Raspberry Pi CAN hat" has a soldered on resistor that
can not be easily removed). Some devices do not include a resistor at
all. Other devices have a mechanism to select the resistor (typically
by connecting a "pin jumper"). Be sure to check the schematics of all
devices on the CAN bus to verify that there are two and only two 120
Ohm resistors on the bus.
To test that the resistors are correct, one can remove power to the
printer and use a multi-meter to check the resistance between the CANH
and CANL wires - it should report ~60 ohms on a correctly wired CAN
bus.
# Finding the canbus_uuid for new micro-controllers # Finding the canbus_uuid for new micro-controllers
Each micro-controller on the CAN bus is assigned a unique id based on Each micro-controller on the CAN bus is assigned a unique id based on