STEMCenter USA Pi-Bot v2.00 User manual

V2.0 User Manual
A uniquely designed, complete robot kit to get you started in
building and programming!

2
Table of Contents
Introduction: Before You Begin ............................................................................................................................4
Chapter 1: Introduction to Electronics .................................................................................................................5
Electricity ..........................................................................................................................................................5
Resistors............................................................................................................................................................6
Understanding Voltage, Current, and Resistance.............................................................................................7
Circuit Symbols .................................................................................................................................................7
Breadboards .....................................................................................................................................................8
Building a Basic Circuit......................................................................................................................................9
Chapter 2: Basic Hardware Programming...........................................................................................................10
The Arduino Board..........................................................................................................................................10
Digital Input/Output .......................................................................................................................................11
The Light Emitting Diode (LED).......................................................................................................................13
Breadboarding to Prototype...........................................................................................................................14
Chapter 3: Introduction to C Programming ........................................................................................................15
The Basic Arduino Program ............................................................................................................................15
Constants and Variables .................................................................................................................................16
Control Statements.........................................................................................................................................19
Chapter 4: Assembling Your Gearbox.................................................................................................................25
Identification of the Gearbox Parts ................................................................................................................25
Assembly of the Gearbox................................................................................................................................30
Chapter 5: Building Your Basic Pi-Bot .................................................................................................................43
Mounting the Gearbox ...................................................................................................................................44
Installing Your Switch .....................................................................................................................................45
Setting Up Your Caster Wheel ........................................................................................................................47
Assembling Your Tires.....................................................................................................................................49
Mounting the STEM Board Microcontroller...................................................................................................51
Setting Up Your Battery Pack Slide.................................................................................................................54
Chapter 6: Wiring and Programming Your Basic Pi-Bot......................................................................................58
Basic Motor Wiring Schematic........................................................................................................................60
Wiring the H-Bridge........................................................................................................................................61
Making Your Pi-Bot Move...............................................................................................................................66
Chapter 7: Distance Sensor.................................................................................................................................70

3
Assembly.........................................................................................................................................................70
Wiring the Distance Sensor ............................................................................................................................73
Wiring the LEDs...............................................................................................................................................74
Programming the Distance Sensor .................................................................................................................76
Chapter 8: Line Tracking .....................................................................................................................................85
Line Tracking Sensor Assembly.......................................................................................................................85
Complete Pi-Bot Wiring Schematic.................................................................................................................87
Basic Line Following Program .........................................................................................................................89
Line Following –Advanced Programming ......................................................................................................93
Appendix A: Installing and Testing the IDE.........................................................................................................98
Preparing the Computer.................................................................................................................................98
Connecting the Arduino to the Computer....................................................................................................101
Testing the IDE..............................................................................................................................................105
Appendix B: Complete Pi-Bot Wiring Schematic ..............................................................................................110
Notes by the Team
We are excited to have you join us the Pi-Bot Adventure! STEM Center USA created the Pi-Bot to offer
users a holistic robotics experience where they could taste multiple fields of engineering. The Pi-Bot first
launched on Kickstarter in 2014 and is now used by individual users as well as high schools and colleges
worldwide.
What is the Pi-Bot?
The Pi-Bot kit is a multidisciplinary robotics experience intended for high school and college aged
students and above. It includes an introduction to mechanical, electrical, and computer science
engineering.
What makes Version 2.0 special?
We have upgraded our Pi-Bot! Some of our main updates includes:
Extra wires
Streamlined choice of fasteners (with a couple extras included!)
Longer motor wires for easier motor wiring
Zip-ties to clean up your Pi-Bot
How do these instructions vary from Version 1.5?
Version 1.5 uses different types of fasteners at various locations. It also places the breadboard on the
opposite side of the chassis for cleaner wire routing. The video tutorials for the gearbox assembly and all
wiring are the same for Version 1.5 and Version 2.0 –just watch out for the breadboard and fasteners
please! Version 2.0 Video Tutorials will be released by mid-October 2015.

4
Introduction: Before You Begin
Congratulations on purchasing your Pi-Bot Robot Kit! The Pi-Bot manual is meant to assist you in
building and programing. All of the instructions in this manual are designed to provide an easy step-by-
step method for every aspect of building your Pi-Bot, from start to finish. Make sure to take your time
and read through each lesson carefully. Pictures are included with every step for clarity.
This manual is for the Version 2.0 Pi-Bot which has minor changes from the Version 1.5.
Accompanying video tutorials can be found at:
http://www.stemcenterusa.com/pi-bot/tutorials-/
Before starting the assembly of your Pi-Bot, please check to make sure all necessary parts for your Pi-Bot
are included. Your kit should include the following items:

5
Chapter 1: Introduction to Electronics
Digital devices are widely used. Earlier, most electronic devices contained analog circuits which dealt
with continuously changing signals. Today, digital circuits are widely used. Personal computers and
smart phones are examples of digital devices that contain digital circuits. Digital devices use discrete
values which are zero (0) or one (1). The notation based on these two numbers is known as the Binary
system.
Electricity
The movement of electrons can be described by the analogy below:
The flow of water from one tank to another is a good analogy for an electrical circuit and the
mathematical relationship between voltage, resistance, and current. See Figure 1.1.
oForce: The difference in water levels (voltage)
oFlow: The flow of the water between the tanks (current)
oResistance: The valve that limits the amount of water (resistance)
Figure 1.1

6
Resistors
A resistor is an electronic component that resists the flow of electrical current. A resistor is typically
used to control the amount of current that is flowing in a circuit. Resistor converts electrical energy into
heat. Resistance is measured in units of ohms (Ω) and named after George Ohm, whose law (Ohm’s
Law) defines the fundamental relationship between:
Voltage - measured in Volts [V]
Current - measured in amperes [A]
Resistance - measured in ohms [Ω]
A resistor’s rating can be identified by its color “bands”. Refer to Figure 1.2 below.
Figure 1.2: Courtesy of DigiKey

7
Understanding Voltage, Current, and Resistance
Ohm’s Law: V = IR
Units:
Current (I) –Ampere
Voltage (V) –Volt
Resistance (R) –Ohm
Circuit Symbols
Below are basic circuit symbols that you should familiarize yourself with, as shown in Figure 1.4.
Figure 1.4
Be able to draw a circuit diagram for each circuit you create using the above symbols.
Figure 1.3

8
Breadboards
A breadboard is a reusable platform to quickly build and test electronic circuits. Breadboards are a
rectangular array of electrical contacts. Each contact in a row is electronically the same. See Figure 1.5,
below, for various breadboard sizes.
Figure 1.5
Each row is electrically the same. Figure 1.6 shows the back, disassembled view of the breadboard
where you can clearly see the rows. This means the voltage at any point along each row is the same.
Figure 1.6
Lighting up an LED

9
LED stands for light emitting diode. LEDs work like a one way street. They allow current to flow in one
direction only. The longer end of the LED is positive (anode) and the shorter end is negative (cathode).
An LED requires an appropriate resistor, based on the power supply, to drop the voltage. A simple LED
circuit is shown in Figure 1.7.
Figure 1.7
Building a Basic Circuit
The same circuit diagram is shown in Figure 1.8 but with the actual components. Compare this to the
symbols in Figure 1.7.
Figure 1.8
Understanding circuits is extremely important when wiring your Pi-Bot. Wire your own LED circuit like
the one in Figure 1.7 and Figure 1.8. You will have more practice and repetition in the following chapter.

10
Chapter 2: Basic Hardware Programming
The Basic Arduino Program
In this lesson, you will learn how to program the input/output ports of your STEM Board
microprocessor. The focus will be on functions needed for programming your robot. It is assumed that
you have a basic understanding of the C programming language, as described in Lesson 3: Introduction
to C Programming. After completing this lesson, you should be familiar with the digital I/O ports, the
analog-digital converter (ADC), and the pulse width modulator (PWM).
The Arduino Board
1. The STEM Board microprocessor and its features are shown in Figure 2.1. The functionality of
your STEM Board microprocessor is the same as an Arduino UNO Board.
Figure 2.1
Table of contents
Popular Robotics manuals by other brands

Universal Robots
Universal Robots UR5 Service manual

Universal Robots
Universal Robots E Series Original instructions

EFORT
EFORT ECR5 Quick start manual

RoboMaster
RoboMaster AI Robot 2020 Standard Version user manual

fischertechnik
fischertechnik Mini Bots manual

Abicor Binzel
Abicor Binzel iCAT mini operating instructions











