Skip to content

Building the Robot Chassis

Introduction

The system described in this section is the configuration that the author used during the development of the Introduction to Arduino exercises on this module, as shown in Fig 1. This configuration is the recommended configuration for the robot build, as it will be assumed that you have followed the following procedures, when you carry out the exercises.

Picture of the completed Robot.
Picture of the completed robot.

Note

Many of the pictures for this Mechanical Component Assembly section were taken during the prototyping phase of the system design and are of a slightly earlier version of the robot chassis. As a result, there may be slight differences with the robot chassis in your kit, but the describes in this documentation are all for the final chassis design.

Info

For those of you that are not familliar with breadboard circuits, Sparkfun have in intersting article on How to Use a Breadboard, describing their use and construction.

Adding the mechanical components to the chassis

This section will discuss the assembly of the mechanical system, and a later section will discuss the assembly of the electronic circuitry.

Annotated layout of the robot chassis
Annotated layout of the robot chassis.

Due to the design of the robot chassis, some elements of the robot must be constructed in the order described, due to overlapping parts, see Fig 2 for a diagram of the layout. The suggested order of construction is:

  1. Attach the yellow FIT0450 motor to the back of the chassis
  2. Attach the skinny wheel to the motor
  3. Attach the cheap plastic wheels to the front of the chassis
  4. Attach the MG996 servo to the front of the chassis
  5. Attach the IR sensor to Lolly Stick D
  6. Attach the lolly stick to the servo horn
  7. Attach the assembled lolly stick with IR sensor and servo horn to the servo shaft.

Attaching the FIT0450 and Skinny wheel

This is the most awkward component to attach to the chassis, because the orientation motor must be manipulated to slide into the final location and screw into place. The procedure for assembly is as follows:

  1. Push 2x M3x30 through the motor, from the brass shaft side.
  2. Carefully insert the motor into the chassis and manipulate it so that the screws are aligned with the screw holes in the chassis side wall.
  3. With a screwdriver inserted through the access holes in the chassis, push the screws through the holes and use 2x M3 nuts to fasten the motor to the chassis, shown in Fig 3b and c.
  4. Push the skinny wheel onto the motor shaft and use an M3x6 machine screw to fasten the wheel to the motor shaft, shown in Fig 3a.
Assembly pictures of the mounted motor
Assembly pictures of the mounted motor

A video of this process is provided in Fig 4.

Note: This video has no commentary

Motor and wheel assembly video

Note: Skinny Wheels May need drilling out

The M3 mounting hole on some of the skinny wheels is too small. This will need drilling out to 3mm. Please see one of the lab technical staff in the lab session if this is the case.

Attaching the Moulded Plastic wheels

The moulded Plastic wheels attach to the robot chassis as shown in Fig 5.

Direction of fixings for the the Molded plastic wheels.
Direction of fixings for the the Molded plastic wheels.

Do this Before Attaching The MG996 Servo

These wheels must be attached before the servo, because the servo obscures access to the screw heads for the left wheel.

Attaching the Lefthand Moulded Plastic Wheel

The lefthand moulded plastic wheel is the wheel next to the servo, at the front of the robot, and should be attached first. To attach this wheel, you require an M3x20 bolt and an M3 nyloc nut. The moulded plastic wheels are attached to the lugs at the front of the robot chassis.

The bolt for this wheel Must be pushed through from the between the lugs, with the head infront of the rectangular servo hole. This is to ensure that the servo hole is not obsured and an be inserted correctly.

Fig 6 shows a short video showing assembly of the lefthand wheel beside the servo.

Note: This video has no commentary

Video showing the attachment of the lefthand moulded plastic wheel beside the servo.

Attaching the Righthand Moulded Plastic Wheel

The righthand moulded plastic wheel is the wheel away from the servo, at the front of the robot, and should be inserted second. To attach this wheel, you require an M3x20 bolt and an M3 nyloc nut. The presence of the lefthand wheel makes screwing in the bolt difficult, if inserted from between the lugs - we advise inserting the screw from the outside of the lugs, with the bolt on the inside.

Fig 7 shows a short video showing assembly of the righthand wheel.

Note: This video has no commentary

Video showing the attachment of the plastic moulded wheel away from the servo.

Note on wheel screw tightness

When fastening the screws on the moulded plastic screws, ensure that you have sufficiently tightened the nyloc nut to prevent too much wobble in the wheel, but the wheel is still able to spin freely.

Attaching the MG996 Servo

Attach the moulded plastic wheels before the MG996 Servo

You must attach both plastic wheels before attaching the MG996 servo, otherwise, the MG996 servo bolts will obscure the placement of the moulded plastic wheel screw.

The MG996 servo is attached to the robot chassis using 4x M3x12 screws, as illustrated in Fig 8. The top screws obscure access to the bottom screws, so it is recomended that you fit the bottom screws before the top screws.

Fixing screws for the MG996 Servo
Fixing screws for the MG996 Servo.

Fig 9 shows a short video showing attachment of the servo into the chassis.

Note: This video has no commentary

Video showing the attachment attachment of the servo into the chassis.

Note: The hole for the servo has been modified since this video was filmed

For reasons of strength and printing yield, the hole for the servo has been modified on many of the robot chassis, meaning that it is a little tighter than shown in the video. With a little wiggling, you can fit the servo into the rectangular cut-out.

Also note: the servo attachment screws have been changed to all M3x12 screws, from those shown in the video.

Assembling the Lolly Stick D Assembly

The lolly stick assembly consists of the Sharp IR sensor, a laser cut plywood linkage and a servo horn for the MG996, as shown at the bottom of Fig 10.

Fixing Screws for the Lolly Stick Assembly.
Fixing Screws for the Lolly Stick Assembly.

Note: you can use any of the servo horns, shown at the top of Fig 10, for this assembly (we have used a cross). The servo horn attaches to the lolly stick with the servo spline hole pointing backwards and the flat face forwards, from the contect of Fig 10.

It is recommended that you assemble the lolly stick assembly as shown in Fig 10, because this results in the header terminals for the IR sensor being on the top side of the IR sensor, when the lolly stick is in the horizontal position, see Fig 11.

The IR sensor is fixed to the lolly stick with 2x M3x6 screws and 2x M3 nuts, as can be seen in Fig 10.

The servo horn is attached to the lolly stick using 2x M2x8mm Phillips Head Flange Screws.

Warning: Sharp Screws

The sharp ends of the Flange screws will protrude through the opposite side of the servo horn. Please be careful while handling this assembly to prevent causing minor injury on the protruding screws.

Attaching the Lolly Stick D Assembly to the Servo

The servo horn pushes onto the servo MG996 servo shaft, then a M3x6 screw is used to fix it into position. Once attached, ensure the servo can rotate between horizontal and vertical, see Fig 11.

Info

This assembly will require repositioning at the start of the control of the standard servo exercise to ensure that the position is set correctly for the exercise.

Pictures of the lolly stick assembly attached to the servo, rotated into the horizontal and vertical positions.
Pictures of the lolly stick assembly attached to the servo, rotated into the horizontal and vertical positions.

Electronic Component Layout and Connections

The layout of the electronic components on the breadboard is entirely up to you, but following sections illustrate how they were laid out during the design and prototyping stages of these exercises. The author recommends following this layout because it also follows the example code provided for the exercises, and it is a tried and tested layout.

The connections for each exercise are discussed in more detail in the following sections, but these subsections provide a bit of high level detail concerning the component placement and the DC power socket.

Breadboard layouts

We suggest that the components should be placed on the two breadboards, as shown in Fig 12, with each breadboard containing:

  • Breadboard 1: the LEDs, button and the motor driver board.
  • Breadboard 2: the DC power inlet socket, 10K potentiometer and a 12-way header strip, used to connect the motor power and encoder, MG996 servo and the Sharp IR sensor.

The location of breadboard 1 and breadboard 2 in the robot chassis is illustrated in Fig 2 and shown in the Fig 1.

Component positioning for breadboard 1 and breadboard 2.
Component positioning for (a) breadboard 1 and (b) breadboard 2.

External DC Power Socket and Connection

Some of the robot systems draw too much power to be supplied directly from the Arduino, via the USB link. If you were to power the MG996 Servo or the DC motor from the Arduino, then you may pull too much power from the +5V rail and experience erratic behaviour due to the Arduino intermittently restarting – this is referred to as a brownout restart. To overcome this problem, we will use an additional external DC power supply to provide extra current capability for some of the components – MG966 servos and DC motor driver board. To facilitate this, you will add a DC power connector to your robot system, shown in Fig 13.

Annotated picture of the external power supply connector pins
Annotated picture of the external power supply connector pins.

In previous years, we have had problems with the DC power connector slipping out of the breadboard. To significantly reduce the chances of this, a cable tie can be used strap the dc connector down to breadboard 2, as illustrated in Fig 14.

Photograph of the cable tie used to hold the DC power connector and the  positioning of the DC power connector on the breadboard.
Photograph of the cable tie used to hold the DC power connector and the positioning of the DC power connector on the breadboard.

Note

Ensure that the cable tie is tight around the board and the connector will not move, before snipping the loose end.

The following section provides important details concerning the two different power supplies on the breadboards, and MUST be read before continuing.

Arduino and External Power Supplies Lines

There are two +5V power supplies on the robot chassis:

  1. The +5V supply from the Arduino
  2. The external +5V from the AC-DC Plug-in Power Supply.

UNDER NO CIRCUMSTANCE should the +5V line from the Arduino be connected to the External 5V line. You must, however, connect all the GND lines of these power supplies, and other systems, to a common GND net/node on your robot chassis to ensure that all the working from the same reference voltage.

The external +5V should only be connected to the Vm connection of the motor drive board and the V+ power connections of any servo used on your system. The Arduino +5V should be used for the Vcc connection of the motor drive board and any other connection requiring +5V, which is not connected to the external +5V.

Danger: You can destroy your Laptop motherboard if you get this wrong

If you connect the +5V supply of the Arduino and the external power supply together you risk destroying the motherboard of your laptop by sending a voltage spike up the USB lead when the servo or the DC motor operate.

Read the Disclaimer document before proceeding.

The University and MEE take no responsibility for damaged laptops due to this issue. We recommend using the University IT equipment to mitigate damaging your personal equipment.

At this point you may have noticed that we don't want you to connect the external +5V to the Arduino +5V. This is because we don't want to tell any other student that we will not be paying for repairs to their personal IT equipment... It is not a fun conversation to have!

Suggested Circuit Layouts for the Exercises

The electronic system for the robot can be incrementally built as required for the exercise you are working on. The exercises are designed, such that, you only need to add components to the system, with the later exercises build on the previous. This means that no circuitry needs to be removed between exercises.

Before you start any of the following exercises, you will need to add extra elements into your robot circuit.

  1. Basic: LED Pattern
    • No extra circuitry is required for the Calibration of Potentiometer Angle Exercise. This uses the potentiometer from the LED Pattern Exercise.
  2. Basic: IR Sensor Measurement + Graph
  3. Basic: Externally Powered Servo
  4. Basic: DC Motor
  5. Basic: Encoders and Motor

Note: Advanced Exercises

The advanced exercises do not require any extra circuit build. They work from the circuit that has been constructed for the final Basic Exercise: Encoders and Motor.

Note on the circuit layout diagrams in the following sections

The circuit layout drawings in the following sections are constructed using several drawing packages. As a result, some of the components/connections do not line up exactly, as desired. Please use these diagrams with the accompanying figures and tables to provide you with a complete picure on how to build the circuit.

Circuit Layout for the LED Pattern and Calibration of Potentiometer Angle Exercises

The following circuit layout is sufficient to complete both the LED pattern Exercise. This section illustrates where to layout and the connections for: the three LEDs and associated resistors, the button and the potentiometer, as illustrated in Fig. 13.

Diagram showing the suggested component layout and wiring for the LED Pattern Exercise.
Diagram showing the suggested component layout and wiring for the LED Pattern Exercise.

The extra components list required for this exercise, shown in Fig. 13, other than the Arduino and 2x breadboards:

  • 3x LED
  • 3x 470Ω resistor
  • Tactile button
  • 100nF capacitor
  • Potentiometer
  • 12-way header

Fig. 13 illustrates the component layout, but for clarity, Table 1 lists the connections into the Arduino that we recommend for this section:

Arduino Pin: Description:
DIO 4Button
DIO 11LED 1
DIO 12LED 2
DIO 13LED 3
A5Potentiometer Input
Suggested Connection table for the LED Pattern Exercise.

Circuit Layout for the IR Sensor Exercise

This section illustrates the connection of the Sharp IR sensor into the circuit, required for the IR Sensor Measurement and Graph exercise, as illustrated in Fig. 16, also see Fig 17 for details of the 6-way terminal board used to connect the IR sensor. You should keep the circuit wired from the previous section.

Diagram showing the suggested component layout and wiring for the IR Sensor Exercise.
Diagram showing the suggested component layout and wiring for the IR Sensor Exercise.

Extra parts required for this configuration:

  • Sharp IR Sensor
  • Sharp IR Sensor cable
  • 6-way Screw Terminal Breakout Board

The Sharp IR Sensor interfaces with the breadboard using the 6-way screw terminal breakout board, shown in Fig 17.

Diagram showing the pinout configuration for the 6-way screw terminal breakout board.
Diagram showing the pinout configuration for the 6-way screw terminal breakout board.

Table 2 lists the connections into the Arduino that we recommend for the IR Sensor:

Arduino Pin: Description:
A4IR Sensor Output
Suggested Connection for the IR sensor output to the Arduino.

The Sharp IR sensor cable has bare wire terminations that should be connected to the 6-way screw terminal breakout board using the connections listed in Table 3, as illustrated in Fig. 16.

IR Sensor Wire: Description: Breakout Board Terminal:
YellowIR Sensor OutputP1
Red+5V PowerVCC
Black0V Power (GND)GND
Suggested Connection Table for the IR sensor into the 6-way breakout board.

Circuit Layout for the Externally Powered Servo Exercise

The servo will be used in the Driving a Servo Motor Exercise. Fig. 18 illustrates the connections required for the servo and the external DC power socket. You should keep the circuit wired from the previous section.

Warning

UNDER NO CIRCUMSTANCE should the +5V External power supply be connected to the +5V Arduino supply. You must, however, connect all the GND lines of these power supplies, and other systems, to a common GND net/node on your robot chassis to ensure that all the working from the same reference voltage.

Diagram showing the suggested component layout and wiring for the Externally Powered Servo Exercise.
Diagram showing the suggested component layout and wiring for the Externally Powered Servo Exercise.

The extra components list required for this exercise, shown in Fig. 18, other than the Arduino and 2x breadboards:

Note

The initial servo exercise used the MG90 powered from the Arduino +5V supply, not the external 5V supply. You may wish to consider this when building your circuit.

Table 4 lists the connections into the Arduino that we recommend for the servo exercise:

Arduino Pin: Description:
DIO 6Servomotor Signal Pin
Suggested Connection Table for the Servomotor.

Circuit Layout for the DC Motor Exercise

The DC motor exercise requires both the TB6612FG and the DC motor to be wired into the circuit, as illustrated in Fig. 19. During this section you will only be wiring the power connections to the motor, and not the encoder signals. You should keep the circuit wired from the previous section.

Diagram showing the suggested component layout and wiring for the DC Motor Exercise.
Diagram showing the suggested component layout and wiring for the DC Motor Exercise.

Extra parts required for this configuration:

  • TB6612FG driver board
  • DC motor
  • DC motor power cable

Due to the most convenient orientation of the TB6612FG motor driver board on the robot, we will be using channel B for these exercises. The TB6612FG driver board is shown in Fig 20.

Picture of the TB6612FG motor driver board, with pins labelled.
Picture of the TB6612FG motor driver board, with pins labelled.

Table 5 lists the connections into the Arduino that we recommend for the DC motor exercise:

Arduino Pin: Description:
DIO 5PWM Signal Pin
DIO 7BI1 Signal Pin
DIO 8BI2 Signal Pin
Suggested Connection Table for the DC Motor.

Note

All the GND connections are internally connected on the TB6612FG breakout board, therefore, only one GND connection is needed to the power system.

Pin:Description:Connected to:
VmMotor Power System SupplyExternal +5V
VccLogic Control Power SupplyArduino +5V
GNDGroundN/C
AO1Channel A Motor Output 1N/C
AO2Channel A Motor Output 2N/C
BO2Channel B Motor Output 2Motor+ (P3 on the 6-way breakout)
BO1Channel B Motor Output 1Motor- (P4 on the 6-way breakout)
GNDGround
PWMAChannel A PWM SignalN/C
AI2Channel A Bridge Configuration Input 2N/C
AI1Channel A Bridge Configuration Input 1N/C
StandbyDriver Chip Standby SignalArduino +5V
BI1Channel B Bridge Configuration Input 1Arduino DIO 7
BI2Channel B Bridge Configuration Input 2Arduino DIO 8
PWMBChannel B PWM SignalArduino DIO 5
GNDGroundPower Supply GND
Pin connections to the TB6612FG motor driver board.

The DC motor power power terminals are connected through the 6-way screw terminal breakout board, as shown in Fig. 17. The connections for the driver board are shown in Table 6.

Circuit Layout for the Encoders and Motor Exercise

The final part of the circuit to connect is the motor encoder to the Arduino, as illustrated in Fig. 21. The encoder is connected through the 12-way header, which is detailed in Table 8.

Diagram showing the suggested component layout and wiring for the Encoders and Motor Exercise.
Diagram showing the suggested component layout and wiring for the Encoders and Motor Exercise.

Extra parts required for this configuration:

  • DC motor encoder cable

Table 7 lists the connections into the Arduino that we recommend for the DC motor exercise:

Arduino Pin: Description:
DIO 2Encoder B Signal
DIO 3Encoder A Signal
Suggested Connection Table for the Rotary Encoder.

The 12-Way Header Connections

The 12-way header connector provides a convenient method for interfacing some of the system components: motor, encoder, servo and, IR sensor, to the breadboard for easy connection to the remaining electrical system. A summary of the connections used in development are provided in Table 8.

Pin:Description:Connected to:
1N/CNot Connected
2N/CNot Connected
3Encoder A SignalArduino DIO 3
4Encoder B SignalArduino DIO 2
5Encoder GNDGND
6Encoder +5VExternal +5V
7Servo SignalArduino DIO 6
8Servo +5VExternal +5V
9Servo GNDGND
10N/CNot Connected
11N/CNot Connected
12N/CNot Connected
12-Way Header Connections to robot components.

Note

During the writing of this document, the 6-way header was added to the assembly to replace some of the 12-way header connections. As a result, some of the 12-way header connections, listed in Table 8, are marked as N/C - Not Connected.