Hardware configuration

Below, the general composition of the MOPED platform is described, while detailed assembly instructions can be found here.

Mechanics
The mechanical platform consists of an off-the shelf radio controlled car in scale 1/10, 53 cm long and with a turning diameter of 1.2 m. It is equipped with a brushless electrical DC motor for driving the rear wheels, and a servo motor for steering the front wheels. It is sufficiently large to allow easy packaging of electronics, and still conveniently small for driving indoors. In order to use the car indoors without risking devastating crashes, the original motor was replaced with a weaker one rated at 190W, and then the new motor was further down-calibrated for slower driving.

The MOPED model car
The MOPED car

Electronics
A key decision in the project was which hardware to use for the ECUs, and main factors here was accessibility and extensibility. The hardware should be readily available on the open market at a low cost, but still be fairly powerful to not limit future extensions. Two alternatives emerged in the evaluation: Arduino and Raspberry Pi model B, and the latter was selected. The rationale for this was that at the time of the decision, it was more capable than the corresponding Arduino alternative. However, current versions of the Arduino, e.g. Arduino Due, would also be feasible. The decision on ECU hardware is quite fundamental though, since a lot of embedded software is closely related to hardware, in particular OS and device drivers.

Raspberry Pi, model B
Raspberry Pi, model B

The Raspberry Pi has many powerful features, and only some of them are used in this project. It has an ARM11 based processor running at 700 MHz, 512 MB RAM, and contains an SD card for storing software. Peripherals include Ethernet connection, USB ports, 8 general-purpose I/O pins, UART, I2C-bus, and SPI-bus.

To make the architecture realistic, it was decided to build a distributed system with three ECUs, connected through a network. The ECUs are named Vehicle Control Unit (VCU), Sensor Control Unit (SCU), and Telematics Control Unit (TCU), to indicate their principle responsibilities. The rationale for using three ECUs was to allow a certain complexity in distributed control functionality, while at the same time keep a reasonable package volume and cost. Similarly as this is normally done in real vehicles, the ECUs are connected through a CAN network.

moped_architecture

Since the model car is intended for indoor use, no particular protection has been used against environmental factors, such as temperature, dust, moisture, etc.

Electrical Power
The electrical power system consists of a lithium-polymer battery of 4000 mAh, of a standard type used for radio control models, and the rationale for this choice was simply that the mechanical platform was adapted for it. The battery has 7.2V nominal voltage, which is fed to the motor and steering servo. For the motor, there is in addition a 45A speed controller. To feed the ECUs, 5V power is required, so a voltage regulator is needed between the battery and the ECUs.

Sensors and Actuators
The platform is equipped with various sensors and actuators, using the general-purpose I/O pins available on the ECUs. On the VCU, two optical wheel speed sensors are used to determine vehicle speed, measuring both a front and a rear wheel to be able to detect wheel slip. It also has sensors for measuring battery voltage. Actuators include control of the motor and steering servo, and these are based on PWM signals. There is also a set of light-emitting diodes, that can be turned on or off individually, to mimic the different lights of a real car.

The SCU contains more advanced sensor systems, and includes connection to an inertial measurement unit with nine degrees of freedom, which contains accelerometer, gyro, and magnetometer, each in three axes. This sensor is connected using an I2C protocol. It also contains a forward-looking sensor for measurement of distance to obstacles. Currently, a simple ultrasonic sensor with a range of approximately 4 m is used, but future plans include an investigation of more advanced sensor solution, and most likely also sensor fusion to give an improved picture of the outer world.

The TCU currently contains a WiFi interface through a USB dongle. Previously, a Bluetooth serial connection has also been implemented. There are plans to later include an indoor positioning functionality in this, to provide something similar to GPS navigation in real vehicles.

The rationale for selecting this particular set of sensors and actuators has been to include sensors that are representative of functionality in real vehicles, and using similar technology. However, the MOPED platform is also used for experimenting with different sensor solutions, and therefore it is expected that many other interfaces, complementing or replacing the ones mentioned above, will be introduced over time.