Last week, the FSAE Electric Racecar worked hard assembling the car. At the rate that we are going, we will have a running vehicle by the end of week 9.
This week, Ken Tran will be describing the design of the Controller Area Network, the system that allows all the electronics on the car to communicate with each other.
Controller Area Networks (CAN), is a standard automotive communication protocol which simplifies wiring harnesses and provides for increased fault tolerance compared to other communication schemes. CAN allows the racecar’s ECUs to transmit data lengths of up to 8 bytes, with a maximum data rate of 1 Mbps. The protocol is also modular, allowing CAN-capable devices to easily connect to the network and begin communication with other CAN modules.
The robustness is provided by twisted pairs and within the protocol itself. The protocol operates with differential signalling, where the wire pairs will use complementary voltages to transmit bits. In addition, the protocol may also operate in single-ended mode, where one wire will change in voltage to convey information. Therefore, the physical failure of one wire will not cause the communication system to fail. The twisted pair wiring scheme is also resistant to electromagnetic interference, as the motors’ changing magnetic fields can induce voltages and currents in the chassis. CAN twisted pairs are terminated at the end of the bus with a 120 ohm resistor, to suppress signal reflections.
The CAN code was implemented on NXP’s KEAZ128 microcontroller development board and API library. The CAN communication channel is initialized and buffers are configured for receive or transmit, with ID values associated to each buffer. Lower ID values take precedence over the channel and these messages are transmitted first. The received data is verified with an acknowledgement by the receiving module. Each module contains a receive and transmit error counter, which counts the number of failed communication. The counters allows the network to detect a faulty CAN device and take preventative measures, such as resetting or setting the faulty CAN device into sleep mode.
By implementing CAN, the FSAE Electric Racecar team improves the reliability and simplicity of the racecar. CAN is able to replace bundles of wire with a single wire. Reducing wire count means easier manufacturing as well as faster troubleshooting. Additionally, CAN is able to detect errors, which reduces troubleshooting times further.