Old assembly instructions

This build guide is intended to be an easy to use guide of how to build a MOPED care based on Raspberry Pi. Note that MOPED car is a research lab platform and it has a very complex electronics and software setup compared to a standard RC car. However the intended usage is completely different since the MOPED platform is a smaller version of the electrical architecture of future cars.

moped_car

Parts list

Pcs Ref Item Identifier Supplier Order number
1 M1 Model car chassis including servo Turnigy SCT 2WD 1/10 Brushless Short Course Truck (ARR) HobbyKing 9249000001
1 E1 Speed controller Hobbyking X-Car 45A Brushless Car ESC (sensored/sensorless) HobbyKing 9164000009
1 E2 Sensored brushless motor Turnigy TrackStar 17.5T Sensored Brushless Motor 2270KV HobbyKing 9192000029
1 B1 Rechargable battery ZIPPY Flightmax 4000mAh 2S1P 30C hardcase pack HobbyKing Z40002S1P-30
3 E3,E4,E5 Raspberry Pi model B RASPBERRY-PI – RPI-B-512-CASED Farnell 2217158
3 E6,E7,E8 SDHC memory 4GB SAMSUNG – RASPBERRY-PI / PROG-4GB-SDCARD Farnell 2113756
1 E9 5V power supply TURNIGY 8-15A UBEC for Lipoly HobbyKing TR-UBEC15
2 E10,E11 Reflective sensor wheelspeed OPTEK TECHNOLOGY – OPB715Z – OPTO SWITCH, REFLECTIVE Farnell 85414090
1 E12 Ultrasonic sensor Ultrasonic Module HC-SR04 Arduino HobbyKing 387000005
1 E13 9DOF IMU Acc/Gyro/Mag sensor MPU-9150EVB DigKey 1428-1010-ND
1 E14 Optionally (not tested): Ethernet Switch DLINK DES-105 Dustin 5010620335
1 E15 WiFi Dongle ELEMENT14 – WIPI – DONGLE, WIFI, USB, FOR RASPBERRY PI Farnell 2133900
1 E16 A/D Converter MCP3008 Farnell 1627174
1 E17 Servo (Part of M1 if ordernumber above is used)
Resistors 3x 2.2Kohm, 270ohm, 560ohm
Capacitors 100nF
3 H1,H2,H3 Optionally (not tested): Ethernet cable DELTACO UTP CAT.6 UNSHIELDED RJ45 0.3M Dustin 5010379761
3 H4,H5,H6 Micro USB harness PRO SIGNAL – HK-US10/1 – LEAD, USB A MALE-MICRO B MALE, 1M Farnell 2085464
3 CAN boards See separate description
1 Wires Female-Female Arduino Female-Female 3 x 40P 200mm Wire Jumper Cable HobbyKing 438000073
1 Wires Male-Female Arduino Male-Female 3 x 40P 200mm Wire Jumper Cable HobbyKing 438000072
Shrinkage tube
Headers 2,54mm spacing
PROTOTYPE BOARD, 100X160 Farnell 1201477
Charger Turnigy Accucel-6 50W 6A Balancer/Charger HobbyKing ACC6
Programming Card Hobby King HKSS programming card for HK 150A ESC HobbyKing HKSS-prog

 Build steps

Exchange motor

Start with an empty chassis.

empty_chassis

The original motor is not suitable for low speed. Exchange the motor and speed controller to the one in the part list which has lower KV and is sensored.

  • Disassemble the motor by first removing the motor cover.
  • Under the motor cover loosen the hex screws holding the motor
  • Loosen the small hex screw on the motor pinion and remove the pinion.
  • Mount the pinion on the new motor
  • Fasten the motor with the hex screws from the old motor. Adjust the freeplay between pinon and the big gear so there is some small play in between the pinion and the gear.

 

motor_gear

Connect speed controller and motor 

Now it’s time to solder the wires from the speed controller to the motor. Check carefully the order of wires through the markings om the speed controller and the motor. Usually they are A, B and C.

Route the wires through the chassis before soldering. Also ad about 15mm shrinkage tube on each wire. Then connect the black sensor cable between the speed controller and the motor, routed similar to the power cables.

motor_wires

Battery power harness to speed controller 

Cut the power wires to the speed controller to be able to solder the wires to the BEC. Also ad the battery sensor wire and voltage divider as shown in the picture below. Cover the soldering with 20mm long shrinkage tube. Use a 270ohm and a 560ohm resistor.

speed_controller_wires

Mount the BEC on top of the battery plate with adhesive velcro tape, and the speed controller and its decoupling capacitors on the chassis rear firewall in front of the motor.

speed_controller_mounting

Wheel sensors

Mount 5 strips of reflective aluminum tape inside right front wheel and right rear wheel.

wheel_strips

On right rear wheel, mount the reflective sensor with some dual sided scotch and some plastic coated single wire or a cable tie.

wheel_sensor

Solder 2,54mm single wire header connectors. On the white wire ad a xxx kohm resistor.

wheel_sensor_cables

Servo and Speed controller board

To be able to connect speed controller and servo signaling and power a small distribution board is needed.

speed_servo_controller

 5V rail power distribution board

Several items need 5V powerdistribution from the BEC. See the pictures below.

5V_dist_board

 Raspberry Pi power distribution cords (3pcs)

Cut micro-USB harness to suitable length for  connecting the three Raspberry Pi:s. Typical these harness has read, black, white and green wiring inside. Black and red are ground respective 5V supply. Now solder 2,54 mm single wire headers to the black and the red wires. See the pictures below. Cover with shrinkage tubes.

power_dist_cords

 Ultrasonic sensor board

To mount the ultrasonic sensor build a small breadboard as shown in the pictures below. The breadboard is mounted in the front of the chassis, just behind the protection bar. The trig signal (white wire on the picture) needs a 2,2 kohm resistor in series.

ultrasonic

 A/D converter

To be able to measure battery voltage there is need for an A/D converter board.

adc_board

 The A/D converter is connected to the SPI port on the SCU. See the connection table.

Preparing Raspberry Pi boards

During development it’s convenient to have possibility for manual reset of the raspberry Pi:s. To enable reset – solder a 2 pin header on the raspberry Pi board before putting the board into the lower half of the plastic case.

rpis

Mount the three Raspberry Pi:s by adding velcro fastners as shown in the pictures below.

rpi_fasteners

 Solder a header to the IMU board. Mount the IMU board with a screw in the front right pre drilled hole in the chassis bottom plate.

imu_board

If CAN communication is to be used (this is the setup that is currently supported by the MOPED software), mount one CAN board on each Raspberry Pi by just putting them on the P1 connector. Connect the boards by simple wires, and put a jumper on one of the end nodes.

can_board

Optionally, if Ethernet is to be used (this is a promising approach but needs further software development), the Ethernet switch can be mounted on underside of the chassis. The switch has to be able to be supplied by 5V. Connect RJ45 cables in between the switch and the Raspberry Pi:s.

Now connect wires as described in the connection table to the Raspberry Pi:s. See the high res picture below about the final result.

moped_car_high_res