AST-CAN485 Hookup Guide
Example: Multi-Node CAN Network
In this example a larger CAN network is constructed. Multiple nodes send messages and one node relays them to a PC over a serial port.
The following materials are required for this example. You may not need everything though depending on what you have. Add it to your cart, read through the guide, and adjust the cart as necessary.
- 3x or More CAN485
- 2x 120Ω Resistors*
- USB Cable
- Breadboard, Jumper Wires, etc
- 1x External Power Supply**
- 1x DC Barrel Jack Adapter Female**
Construct the network as shown.
Ensure that the CAN485 boards and CAN library have been installed. The example code is installed with the CAN library. It is available in the Arduino IDE under the examples menu.
Upload the transmitter example code to the each of the transmitter nodes. Make sure to change the message IDs (
MESSAGE_ID) to unique values for each node.
Then upload the receiver example code to the receiver node.
What You Should See
The transmitter nodes will each send a message every 500ms. The receiver node will receive it and pass it on to the PC over the serial port. Open the serial port on the PC using the Arduino Serial Monitor (or your favorite serial terminal) and select 1000000 (1MBaud).