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
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
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.
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
- Attach the yellow FIT0450 motor to the back of the chassis
- Attach the skinny wheel to the motor
- Attach the cheap plastic wheels to the front of the chassis
- Attach the MG996 servo to the front of the chassis
- Attach the IR sensor to Lolly Stick D
- Attach the lolly stick to the servo horn
- 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:
- Push 2x M3x30 through the motor, from the brass shaft side.
- 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.
- 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 . - 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 .
A video of this process is provided in
Note: This video has no commentary
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
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.
Note: This video has no commentary
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.
Note: This video has no commentary
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
Note: This video has no commentary
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
Note: you can use any of the servo horns, shown at the top of
It is recommended that you assemble the lolly stick assembly as shown in
The IR sensor is fixed to the lolly stick with 2x M3x6 screws and 2x M3 nuts, as can be seen in
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
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.
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
Breadboard layouts
We suggest that the components should be placed on the two breadboards, as shown in
- 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
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
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
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:
- The +5V supply from the Arduino
- 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.
- Basic: LED Pattern
- No extra circuitry is required for the Calibration of Potentiometer Angle Exercise. This uses the potentiometer from the LED Pattern Exercise.
- Basic: IR Sensor Measurement + Graph
- Basic: Externally Powered Servo
- Basic: DC Motor
- 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
The extra components list required for this exercise, shown in
- 3x LED
- 3x 470Ω resistor
- Tactile button
- 100nF capacitor
- Potentiometer
- 12-way header
| Arduino Pin: | Description: |
|---|---|
| DIO 4 | Button |
| DIO 11 | LED 1 |
| DIO 12 | LED 2 |
| DIO 13 | LED 3 |
| A5 | Potentiometer Input |
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
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
| Arduino Pin: | Description: |
|---|---|
| A4 | IR Sensor Output |
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
| IR Sensor Wire: | Description: | Breakout Board Terminal: |
|---|---|---|
| Yellow | IR Sensor Output | P1 |
| Red | +5V Power | VCC |
| Black | 0V Power (GND) | GND |
Circuit Layout for the Externally Powered Servo Exercise
The servo will be used in the
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.
The extra components list required for this exercise, shown in
- DC Servo
- DC power socket (SG90 for the
initial servo exercise and final assessed Exercise)
Note
The
| Arduino Pin: | Description: |
|---|---|
| DIO 6 | Servomotor Signal Pin |
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
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
| Arduino Pin: | Description: |
|---|---|
| DIO 5 | PWM Signal Pin |
| DIO 7 | BI1 Signal Pin |
| DIO 8 | BI2 Signal Pin |
Note
All the GND connections are internally connected on the TB6612FG breakout board, therefore, only one GND connection is needed to the power system.
The DC motor power power terminals are connected through the
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
Extra parts required for this configuration:
- DC motor encoder cable
| Arduino Pin: | Description: |
|---|---|
| DIO 2 | Encoder B Signal |
| DIO 3 | Encoder A Signal |
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
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