|
|
Line 1: |
Line 1: |
− | __NOTOC__
| |
| | | |
− | ==1.3.3.1. ECUs implementing Sensorboards and Actorboard==
| |
− |
| |
− | The interfaces between the sensors and actuators and the Concept Car’s CAN Bus are implemented using AT90CAN128 boards. Their main purpose is to do low level tasks, for example PWM de- and encoding.
| |
− |
| |
− | In the following, the AT90CAN128 board is presented and the ECUs that are implemented over AT90CAN128 boards are described in details. Those ECUs were presented in Figure 2.3 in the Input and Output Processing levels.
| |
− |
| |
− | ====1.3.3.1.1. The AT90CAN128 board====
| |
− |
| |
− | The AT90CAN128 board is composed by an 8-bit RISC Microcontroller with AVR core, 128K bytes of programmable Flash memory, 4K byte EEPROM and 4K byte of internal SRAM, 53 general purpose I/O lines, 32 general purpose working registers, CAN Controller , 4 timers, and others resources described in [[Bibliography|[Atm08]]].
| |
− |
| |
− | ====1.3.3.1.2. Sensorboard Steering====
| |
− |
| |
− | This ECU decodes the steering PWM channel from the radio receiver and the wheel speed sensors from the rear left and front right wheels. Analogue amplifiers (MCP6002) increase the signal level of the wheel speed sensors so their signal can be decoded on a digital input of the AT90CAN128.
| |
− |
| |
− | Table 1.2 presents the CAN messages for the Sensorboard steering.
| |
− |
| |
− | {| border="1"
| |
− | |+ '''Table 1.2: Sensorboard Steering's CAN messages'''
| |
− | ! CAN ID !! Semantics !! Interval !! Conversion
| |
− | |-
| |
− | | 0x025 || Desired steering angle (α) for the steering servo. Negative values mean “steer left”. Value range is -30° to 30°. || Radio receiver’s frequency, 20ms typ. ||
| |
− | |-
| |
− | | 0x00a || Wheel speed (ω) from rear left wheel || 50ms ||
| |
− | |-
| |
− | | 0x009 || Wheel speed (ω) from the front right wheel || 50ms ||
| |
− | |}
| |
− |
| |
− | ====1.3.3.1.3. Sensorboard Throttle====
| |
− |
| |
− | This ECU decodes the throttle PWM channel from the radio receiver and the wheel speed sensors from the front left and rear right wheels. Analogue amplifiers (MCP6002) increase the signal level of the wheel speed sensors so their signal can be decoded on a digital input of the AT90CAN128.
| |
− |
| |
− | Table 2.3 presents the CAN messages for the Sensorboard Throttle.
| |
− |
| |
− | {| border="1"
| |
− | |+ '''Table 1.3: Sensorboard Throttle's CAN messages'''
| |
− | ! CAN ID !! Semantics !! Interval !! Conversion
| |
− | |-
| |
− | | 0x022 || Desired throttle value for the engine control. Conversion result is percentage of controller’s maximum value, +100% means full speed, -100% is full stop, 0% is neither brake nor speedup. || Radio receiver’s frequency, 20ms typ. ||
| |
− | |-
| |
− | | 0x008 || Wheel speed (ω) from front left wheel || 50ms ||
| |
− | |-
| |
− | | 0x00b || Wheel speed (ω) from the rear right wheel || 50ms ||
| |
− | |}
| |
− |
| |
− | ====2.3.3.1.4. Sensorboard Distance====
| |
− |
| |
− | This ECU accesses the distance sensors over an I²C-Bus. It features safety architecture, described in [[Bibliography|[Zim09]]].
| |
− |
| |
− | Table 2.4 presents the CAN message for the Sensorboard Distance.
| |
− |
| |
− | {| border="1"
| |
− | |+ '''Table 1.4: Sensorboard Distance's CAN message'''
| |
− | ! CAN ID !! Semantics !! Interval !! Conversion
| |
− | |-
| |
− | | 0x030 || Distance (d) to the next obstacle up front. || 65ms ||
| |
− | |}
| |
− |
| |
− | ====1.3.3.1.5. Sensorboard Acceleration & Datalogging====
| |
− |
| |
− | This ECU controls the acceleration (longitudinal and lateral) and rotation (yaw rate) sensors over a SPI-Bus. It also measures the voltage of the battery that supplies the electrical components.
| |
− |
| |
− | It additionally features data logging capabilities; it dumps all data on the CAN-Bus to a file on a FAT-formatted SD- or MMC-Card.
| |
− |
| |
− | Table 2.5 presents the CAN messages for the Sensorboard Acceleration & Datalogging.
| |
− |
| |
− | {| border="1"
| |
− | |+ '''Table 1.5: Sensorboard Acceleration's CAN messages'''
| |
− | ! CAN ID !! Semantics !! Interval !! Conversion
| |
− | |-
| |
− | | 0x010 || Longitudinal Acceleration (a<sub>x</sub>) || 20ms ||
| |
− | |-
| |
− | | 0x011 || Lateral Acceleration (a<sub>y</sub>) || 20ms ||
| |
− | |-
| |
− | | 0x012 || Rotation (ω) || 20ms ||
| |
− | |-
| |
− | | 0x00d || Voltage (U) of the electrical system’s battery || 200ms ||
| |
− | |}
| |
− |
| |
− | ======1.3.3.1.5.1. Data Logging======
| |
− |
| |
− | The Sensorboard Acceleration & Datalogging can write data to a FAT16-formatted SD or MMC card that is inserted into the card reader slot. When the board is booted and a valid card is detected, a new file is created and data from all messages on the can bus is written into this file. There is no mechanism to specifically close the log file. Just remove the card or power down the board.
| |
− |
| |
− | *a) Log Indicators
| |
− | If logging is working and dumping precious driving data to the card, the red LED adjacent to the green power LED glows.
| |
− | *b) File Naming Scheme
| |
− | The data is stored to a newly created file with the naming scheme LOG<nr>.CAN. The <nr> part is a consecutive number to name all files differently and not to overwrite an older log. An internal counter increments each time a new log file is written, and the counter state is conserved in EEPROM over reboots. Reflashing the board resets the counter to 0.
| |
− | *c) Requirements for the card
| |
− | The SD or MMC card must meet the following conditions:
| |
− | ** A partition table exists.
| |
− | ** The "DOS compatibility flag" must be set.
| |
− | ** There is exactly one primary partition.
| |
− | ** The partition's type is "FAT16" (set partition code to 0x06 with fdisk).
| |
− | ** The partition is formatted with FAT16, two fats.
| |
− |
| |
− | Using a Unix/Linux system, if /dev/mmcblk0 is your MMC/SD card device,
| |
− |
| |
− | > mkfs.vfat -F 16 /dev/mmcblk0p1
| |
− |
| |
− | would create a valid FAT 16 partition.
| |
− |
| |
− | Despite having the correct partition scheme and formatting, some cards just did not work. We can not tell you why and how, just check if the red LED indicates that the logger works. Cards with 2GB or more tend to be problematic, try using a 1GB card.
| |
− |
| |
− | *d) Log file format
| |
− | The log file has a binary format, containing a dump of all CAN messages including a timestamp for each. For each CAN message, the following data fragment is written:
| |
− |
| |
− | /----------------------------------------------------------\
| |
− | | Header | Timestamp | CAN ID | Data Length | Data |
| |
− | | 0xca | 4 Bytes | 2 Bytes | 1 Byte | 0 - 8 Bytes |
| |
− | \----------------------------------------------------------------------------------------/
| |
− |
| |
− | The Header field is always one Byte with hex value 0xca. The Timestamp field holds the time in ms since the board was booted up. The remainder of the data fragment is the CAN message's id and content. For each received CAN message, a new fragment of this sort is appended to the log file. The writing format is set in [1]. Since there is no mechanism for explicitly closing the log file, the last message fragment in the log file is usually cut off.
| |
− |
| |
− | ====2.3.3.1.6. Actorboard====
| |
− | The ActorBoard's task is the creation of the PWM signals to drive the actuators. It receives the CAN messages and generates the respective PWM signals for controlling the ConceptCar’s actuators.
| |
− |
| |
− | With a switch, the board can be toggled to use either the radio receiver decoders’ data from the Sensorboards (CAN ids 0x22 and 0x25) or processed values from the Controlboard (CAN ids 0x122 and 0x125) as inputs.
| |
− |
| |
− | Based on the value from the CAN bus, the ECU implements the following features:
| |
− | * Entering a safe mode, i.e. producing a PWM signal that makes the car stop if one of these conditions hold:
| |
− | ** A Sensor Board detects a malformed PWM input signal and throws an error message on the CAN bus
| |
− | ** No new values arrive from the CAN bus (lost connectivity)
| |
− | * A hardware switch to select different CAN-IDs and by these different sources for the generated PWM signals.
| |
− |
| |
− | As described above, the Concept has two actuators, throttle motor and the steering servo.
| |
− |
| |
− | *a) Throttle
| |
− | The brushless controller gets as input a PWM signal generated by the Actuator Board based on the received CAN messages.
| |
− | *b) Steering Servo
| |
− | Steering is performed by a steering jumbo-servo that turns both front wheels. The steering servo directly processes the PWM signal that is generated by the Actuator Board.
| |
− |
| |
− | Table 2.6 presents the CAN messages for the Actorboard.
| |
− |
| |
− | {| border="1"
| |
− | |+ '''Table 1.6: Actorboard's CAN messages'''
| |
− | ! CAN ID !! Semantics !! Interval !! Conversion
| |
− | |-
| |
− | | 0x020 || Selected source for actuator control. The source can be selected with the switch on the Actorboard. || 1s ||
| |
− | |}
| |