User`s guide

Table 1: Car Controller Command Functions (& specifications for potentiometers outputs)
Function
Message ID
Data
Headlights
0x01
2 bytes: 0=Off 1=On
Left Turn Signal
0x02
2 bytes: 0=Off 1=On
Right Turn Signal
0x03
2 bytes: 0=Off 1=On
Horn
0x04
2 bytes: 0=Off 1=On
Drive Motor
0x05
2 bytes: 0 - 4095
Steering Servo Motor
0x06
2 bytes: 0 – 4095 but must be mapped
to range: 850 (fully right) - 2150 (fully left)
Table 2: Car Meter Monitor Functions (specifications for analog meters)
Function
Message ID
Data Format
Temperature
0x07
2 bytes: ADC Reading 0 – 4095
(50 °C => 910)
Rotational Speed (RPM)
0x08
2 bytes: 0 - ~700
Motor Current draw
0x09
2 bytes: PIC ADC Reading 0 – 4095
(I
motor
(mA) PIC ADC Reading/4)
Left Turn Signal
0x0A
1 byte: 0=Off 0xFF=On
Right Turn Signal
0x0B
1 byte: 0=Off 0xFF=On
With the internal 2.4V reference voltage (the only value used here for convenience and to reduce the chance of
accidentally destroying equipment and EVB boards):
Make sure the correct jumpers are on J22 VREF pins on the EVB.
The analog MPH meter goes from 0 to 48 MPH with an analog input voltage from 0V to ~2.4V (= 4095). A good
scaling to get MPH is to multiply the RPM value by 6.7. This is an arbitrary constant to give a meter reading
that spans the range of the meter and provides a value that can be loaded directly into the DAC input registers.
The analog Motor current meter goes from 0 to ~0.850A with an analog input voltage from 0V to ~2.4V (= 4095).
With a PWM signal driving the Temperature meter, 0% - 100% duty cycle will drive the meter from 0 to ~48°C.
When setting the analog MUX channel for 12-bit ADC0 conversions a small delay is required between when the
channel is selected and when conversion is started. The capacitance of the track and hold circuit requires
somewhat less than a millisecond to achieve steady state with the switched input voltage.
Known PIC Issues:
Sending the values 1141 or 1142 in the steering command (CAN ID = 6) causes the steering servo to thrash past
the leftmost limit. Until this is corrected on the PIC microcontroller please avoid sending these values or at
least send any legal value immediately afterwards.
If the RPM value stops working it may be due to the reed relay sticking closed. Tapping the relay behind the
left drive wheel may release the stuck contacts.