User`s guide
APPENDIX A: CAN Addresses
Full documentation is available on the web at: http://www.rpi.edu/dept/ecse/mps/mps_handouts.html
The CAN interface on the car will receive messages with several message IDs:
0x01: Headlights. This message should contain 2 data bytes. These data bytes represent the desired state of the
headlights on the car. 0x0000 turns the headlights off, and any non-zero value turns them on.
0x02: Left Turn Signal. The format of this message is identical to that for 0x01: Headlights. When this feature
is activated, the left front and rear signal lights will blink at a frequency of approximately 1 Hz.
0x03: Right Turn Signal. The format of this message is identical to that for 0x01: Headlights. When this
feature is activated, the right front and rear signal lights will blink at a frequency of approximately 1 Hz.
0x04: Horn. This message should contain 2 data bytes. If these data bytes are non-zero, the horn will begin to
sound. If 0x0000 is received, the horn will stop sounding.
0x05: Motor Speed. This message should contain 2 data bytes with a value between 0 and 4095. [The first data
byte represents the motor power as a value from 0x00 (0) to 0xff (maximum power.) The second data byte
represents the motor direction. 0x00 represents forward and 0x01 represents reverse.] In the current
hardware, reverse is not implemented and can’t be used.
0x06: Steering Position. This message should contain 2 data bytes. These bytes represent the pulse width (in
10-us units) that will be sent to the steering servo. This value should vary between 0x352 (850) and 0x866
(2150), with the servo center position being at 0x5DC (1500). Inputting values outside the valid range will
result in undefined behavior and may damage the hardware.
The CAN interface on the car transmits several messages with real-time data from sensors (RTR set high):
0x07: Motor Temperature. This transmits the temperature sensor output voltage as a value on a linear scale
from 0 (-50 °C) to 1758 (150 °C); 50 °C => 910.
0x08: Speed. This transmits the rotational speed of the wheel in counts/second. The sensor counts twice per
wheel rotation so actual rotations per second is this value divided by 2. (There is a delay in outputting this
value as the processor averages over a short time period.)
0x09: Motor Current. This transmits the current flow measured through the motor, as a value on a linear scale
from 0 (0 mA) to 4095 (~1023 mA). The motor current is extremely noisy and this is only a reasonable
approximation to the true value.
0x0A: Left Turn Signal. This outputs the state of the left turn signal (0x00 for off and 0xFF for on.)
0x0B: Right Turn Signal. This outputs the state of the right turn signal (0x00 for off and 0xFF for on.)