[Logo for The C Shore Landing Page]
The C Shore

Robo-Car Wiring

Step One – Wire the Motors to the Controller

Locate the two wires from each wheel assembly that you pushed through from the underside of the chassis. Select the two wires coming from the left wheel assembly. Using the screwdriver, loosen the two hold-down screws in the blue two- terminal block on the side of the motor controller closest to that wheel. Insert one lead into each of the holes under the screw and tighten the hold down screws. Repeat this step for the right wheel assembly which is on the right side of the motor controller. (See picture below)

photo of wiring for left wheel
photo of wiring for right wheel

STOP – Wait until directed before going to the next step

Step Two – Wire the UBEC to the Raspberry Pi GPIO (new parts a)

Use the UBEC output connection “harness” (two wires in one plastic connector) to connect to both the 5V (red goes to Pin 2) and Ground (black goes to Pin 6) (black). Consult the RPi GPIO Pinout Diagram before making this connection (See picture below)

photo of UBEC wired to Raspberry Pi via jumper wire

STOP – Wait until directed before going to the next step

Step Three – Connect Vcc to the Controller

On the underside of the chassis board, feed the loose Vcc wire connected to the switch through the access hole, as shown. Pull it through and connect it to the Vcc terminal on the motor controller. Using a screwdriver, loosen the Vcc terminal (the one in the blue three- terminal block that is closest to the UBEC). Insert the wire in the hole and tighten the screw. (See picture below).

photo of underside of chassis with loose Vcc wire
photo of topside of chassis with Vcc jumper connected to motor controller

STOP – Wait until directed before going to the next step

Step Four – Connect Pi and Controller Ground (new parts b)

Use the Ground terminal on the motor controller (the centre terminal on the blue three- terminal block) to attach both:

  • the Ground (black wire) from the battery

  • the RaspberryPi ground (Pin 9) by using a female-male jumper wire (See picture below).

battery ground jumper connected to motor controller
pi ground connected to motor controller

STOP – Wait until directed before going to the next step

Step Five – Wire the GPIO to the Controller (new parts c)

In this step you are going to connect the Raspberry Pi (the brains) to the motor controller (does all the work of moving the wheels). You will need four female-to-female jumper cables. (See picture below)

photo of four female to female jumper wires

Using the GPIO Pinout Diagram, make the following connections. Note: the GPIO number is not the same as the physical pin number that you have used up to this part of the lesson.

Motor Controller PinGPIO Number on Raspberry Pi
IN1GPIO 7
IN2GPIO 8
IN3GPIO 9
IN4GPIO 10


motor controller pin IN1 connected to Raspberry Pi GPIO 7
all motor controller pins connected to Pi

Stop and re-check the entire wiring diagram. Wait until directed before going to the next step.

Step Six – Lights On (new parts)

Insert the last battery into the battery holder and turn on the switch. If you have assembled the Robo-Car properly the red LED pilot lights should be on for the UBEC, the motor controller and the Raspberry Pi. If all three are not all on, turn off the switch immediately and recheck the wiring.

photo of assembled and wired chassis with last battery partially inserted
INSERT THE LAST BATTERY
fully assembled and wired chassis with power on (leds lit up)
SWITCH ON