-
Notifications
You must be signed in to change notification settings - Fork 2
CAN Gateway & Control CAN
The Kia Soul has a handful of different CAN buses on board. The C-CAN bus has vehicle state information such as steering wheel angle, wheel speeds, and brake pressure. This information needs to be available on the Control CAN bus because it is used in low level PID control for steering angle and can be useful in high level control, such as path planning.
Additionally, itβs not a great idea to simply extend the C-CAN bus by adding new control modules onto the bus. This is because the new control system will be publishing CAN messages using CAN frames that may interfere with the existing C-CAN protocol. Because of this, it is necessary to bridge C-CAN messages to the new Control CAN bus.
The Control CAN bus is the CAN bus that is added to the vehicle in order to link all the new control modules, as well as send control commands to those modules.
The image below demonstrates how the CAN gateway sits on both the Control CAN bus and the C-CAN bus, but only publishes CAN messages in one direction: towards the Control CAN bus from the C-CAN bus.
A CAN specification exists for the Control CAN bus.
Part | Price | Quantity |
---|---|---|
[[Arduino Uno | https://www.seeedstudio.com/CANBUS-Shield-V12-p-2256.html]] | $24.95 |
[[Seeed Studio CAN-BUS Shield, v1.2 | https://www.seeedstudio.com/CANBUS-Shield-V12-p-2256.html]] | $23.50 |
[[ScanTool OBD Interface Cable | https://www.amazon.com/ScanTool-143301-J1962M-Female-Interface/dp/B0091QW67O/ref=sr_1_8?ie=UTF8&qid=1476389497&sr=8-8&keywords=OBD+cable]] | $6.89 |
22 AWG Stranded Twisted Pair Wire | 30' | |
[[Solder Cup DB-9 Connector | https://www.amazon.com/Pc-Accessories-Connectors-Plastic-Connector/dp/B01HM6UBN0/ref=sr_1_4?ie=UTF8&qid=1476943955&sr=8-4&keywords=solder+DB-9+connector]] | $11.98 |
- Print the enclosure if you haven't yet.
- Modify the SPI chip, select pin on one of the shields.
- The Seeedstudio CAN shields have an SPI chip select pin pad on the board (default pin 9). Because two boards will be used simultaneously, one of the boards needs to be modified to use another pin (pin 10). The pad can be cut as described in the CAN shield documentation.
- Stack the shields and Arduino Uno and then place them in an enclosure.
- Upload the firmware from the repo.
The CAN Gateway module is a simple install. One of the Arduino CAN shields needs to be connected to the Kia C-CAN bus, which is available through two pins on the OBD connector. You will need to run twisted pair wire for the Control CAN bus.
- Use the OBD cable to connect the car to the designated C-CAN shield of the module.
- Connect the other CAN shield to the Control CAN Bus.
- Run power for the module from the non E-stop power.
- Run twisted pair to each control module and an additional length of twisted pair terminated with a DB-9 connector for connecting to a CAN interface.
A PolySync Project
Use of project plans, suggestions, parts, and supplies provided by PolySync, is at your own risk. Use of the final product resulting from the project is at your own risk. PolySync disclaims all responsibility for any resulting damage, injury, or expense. It is your responsibility to make sure that your activities comply with applicable laws, including copyright.
Want to stay updated on all things OSCC? Sign up for the OSCC newsletter here!
Jobs | Twitter @PolySync
Copyright (c) 2017 PolySync Technologies, Inc. All Rights Reserved.