Você está na página 1de 100

ECE 112 Lab Manual

Winter 2013

Copyright Information
c
Copyright 2013
Oregon State University
School of Electrical Engineering & Computer Science (EECS)
This document is the property of Oregon State University and the School of EECS. Limited use of this document is
allowed, according to the following criteria:
Materials are free to use, except for the cost of reproduction, and must always bear this statement in any
reproduction.
Materials created using this information may not be labeled as TekBots materials, without the prior written consent of
both Oregon State University and the School of EECS.
Disclaimer of Liability
Oregon State University, Platforms for Learning, TekBots and other partner schools are not responsible for special,
consequential, or incidental damages resulting from any breach of warranty, or under any legal theory, including lost
profits, downtime, goodwill, damage to, or replacement of equipment or property, or any costs of recovering,
reprogramming, or reproducing any data stored in or used with our products.
The aforementioned parties are also not responsible for any personal damage, including that to life and health,
resulting from use of any of our products. You take full responsibility for your product/ application, no matter how
life-threatening it may be.
Internet Access
We maintain Internet systems for your use. They can be used to obtain free TekBots software and documentation
and also to purchase TekBots products. These systems may also be used to communicate with members of TekBots
and other customers. Access information is shown below:
E-mail: tekbots@eecs.oregonstate.edu
Web: http://www.tekbots.com

ECE 112 Manual

Contents
1 Preface

1.1 How to Use This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.2 Important Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.3 Lab Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.4 Lab Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.4.1 Personal Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.4.2 Component Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2 Battery Charger and Base Assembly

11

2.1 Section Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12


2.2 Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3 How to Read a Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4 Building the Charger Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4.1 Bridge Rectifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4.2 Voltage Regulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.4.3 Voltage Divider, Error Amplifier, and Charging Rate Regulator . . . . . . . . . . . . . . . . . . . . 17
2.4.4 Fuse and Power Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.5 Assemble the Base of the Robot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.5.1 Attach Batteries to the Base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.5.2 Motor Assembly and Mounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.6 Study Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3

CONTENTS
2.6.1 Challenge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3 ECE Tools and Concepts

31

3.1 Section Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32


3.2 Basics of the Prototyping Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.2.1 Seat the Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.2.2 Protoboard Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.3 Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.4 Exercise One: Ammeter Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.5 Study Questions for Exercise One . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.6 Exercise Two: Passive Sign Convention and Power Equation . . . . . . . . . . . . . . . . . . . . . . . . 37
3.7 Study Questions for Exercise Two . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.8 Exercise Three: Power Dissipation and Equivalent Resistance

. . . . . . . . . . . . . . . . . . . . . . . 40

3.8.1 Resistors in Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40


3.9 Study Questions for Exercise Three . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

4 Motors and BJTs

45

4.1 Section Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46


4.2 Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.3 Diode I-V Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.4 Zener Diode Voltage Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.5 Bipolar Junction Transistors (BJTs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.5.1 About the Light Emitting Diode (LED) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.6 Study Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.7 The Motor Control Board

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

4.7.1 The H-Bridge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53


4.7.2 The Current Sequencer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.7.3 Testing the Motor Control Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
ECE 112 Manual

CONTENTS
4.7.4 Motor Current and the Oscilloscope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.8 Study Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.8.1 Challenge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

5 Comparators

61

5.1 Section Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62


5.2 Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.3 Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.3.1 Test Comparator Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.3.2 Circuit Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.4 Operation of the Analog Control Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.5 Building the Analog Control Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.5.1 Voltage Regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.5.2 Reference Voltage Potentiometers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.5.3 Ramp Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.5.4 Comparators and Pull-up Resistors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.6 Assemble the Bumpbot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.6.1 Mounting and Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.7 Observing the Ramp Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
5.8 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.9 Study Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
5.9.1 Challenge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

6 Appendix A: General Reference Material

73

6.1 Digital Multimeter (DMM) Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74


6.2 Schematic Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
6.3 Resistor Color Code Chart

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

6.4 Capacitor Code Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76


ECE 112 Manual

CONTENTS
7 Appendix B: Parts

79

7.1 Parts List for the Mechanical Base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80


7.2 Parts List for the Charger Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
7.3 Parts List for the Sensor Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
7.4 Parts List for the Analog Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
7.5 Miscellaneous Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
8 Appendix C: Schematics

87

8.1 Schematic of the Charger Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88


8.2 Schematic of the Sensor Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
8.3 Schematic of the Motor Controller Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
8.4 Schematic of the Analog Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
9 Appendix D: Silk Screens

93

9.1 Silk Screen of the Charger Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94


9.2 Silk Screen of the Sensor Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
9.3 Silk Screen of the Motor Controller Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
9.4 Silk Screen of the Analog Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
10 Appendix E: Suppliers

99

10.1 Suppliers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

ECE 112 Manual

c
2013
Oregon State University

Chapter 1

Preface

CHAPTER 1. PREFACE

1.1

How to Use This Manual

During this course, various tasks will be performed from the assembly of electronic devices, and through the
development process of digital logic controllers and systems. These tasks are divided into individual lab documents
that correspond to what is being taught in the Digital Logic Design lecture.
Everything learned in lecture is relevant and useful in later (related) courses and in your future career. As various
tasks are performed in these labs, try to pay attention to how the lecture material relates to these tasks.
Understanding how the lecture material is used and applied will greatly improve your understanding of the topics as
well.

1.2

Important Symbols

During this lab and other TekBots labs, you will encounter the following symbols. So, review or acquaint yourself with
these symbols, as they are widely used in this lab manual.

This symbol indicates an important note that should be remembered/memorized. Paying


attention to notes like these will make tasks easier and more efficient.

This symbol designates caution, and the information in this caution-table should be read
thoroughly, and adhered to, before moving ahead. If the caution warning is ignored, the task
may appear impossible and/or lead to damaged TekBot and systems.

This symbol represents something that helps you make your task easier by reminding you
to perform a particular task before the next step. These reminder symbols are not normally
critical things to complete, but can make things easier.

The innovation symbol will give information to enrich your experience. These sections will
give more insight into the what, why, and how of the task being done. Use these to learn
more, or to get ideas for cool innovations.

The entire lab is divided into various sections, in order to break up the tasks. Typically, each section will have the
Section Overview as the introductory paragraphs and information detailing the tasks in the Procedure paragraphs.
Towards the end, there are Study Questions (which will be your homework from this lab), and/or Challenges.

1.3

Lab Structure

1.4

Lab Safety

Safety is always important when working with electricity and electronics. This includes both the safety for you as well
as safety for the circuit components you are working with. Concerns such as high voltage or currents can affect the
human body, while static safety and proper component use can affect the life of your circuits.
8

ECE 112 Manual

c
2013
Oregon State University

1.4. LAB SAFETY

Section Overview

Procedure

Study Questions

Challenges

1.4.1

The section overview briefly describes what will be learned in the


section, and what will be done.
The procedure portion of each section contains all of the tasks to
be completed and relates to the corresponding lecture. Keeping
this in mind will help to better understand the lecture as well as the
lab material.
The study questions are intended to give more practice and insight
into what has been learned in lab and lecture. Some of the study
questions will be due in lab.
The challenge sections of labs are for extra credit. Performing
the tasks in the challenge sections will improve understanding of
what is being learned and will result in some cool TekBots and
innovations.

Personal Safety

When working with high voltages and currents, it is important you remember that you can be hurt, if your body
becomes the circuit, since the human body is a conductor of electricity. This issue has long been combated by using
the one hand rule. Whenever you are working with a potentially dangerous circuit, turn it off, but if it cannot be
turned off, use only one hand when working on it. This will prevent a circuit from being going through your heart,
which could be potentially fatal.

1.4.2

Component Safety

Many electrical components are likely to be damaged by static electricity. Static charge can build up to many
thousands of volts, but with little energy. This cannot harm humans, but it can easily damage electronic components.
To ensure static-safe handling, the best practice is to wear an anti-static strap and connect it to an earth ground such
as a computer case or a water pipe. If you do not have an anti-static wristband, you can instead touch a ground
every few minutes to discharge your static build up.

c
2013
Oregon State University

ECE 112 Manual

CHAPTER 1. PREFACE

10

ECE 112 Manual

c
2013
Oregon State University

Chapter 2

Battery Charger and Base Assembly

11

CHAPTER 2. BATTERY CHARGER AND BASE ASSEMBLY

2.1

Section Overview

This Lab teaches students how to assemble a Tekbot, in the following steps:
Describe the purpose of the charger board.
Build and test the charger board and its parts.
Assemble the base of the robot.
Mount the charger board on the base and test the system.
Bring a printed copy of Appendix C: Schematics with you to the lab. This will enable you to
work in this lab quickly (without having to flip back to the corresponding schematic in this
manual constantly).

2.2

Procedure

In the first stage, the lab consists of steps to build the charger board and its parts: bridge rectifier, voltage regulators,
voltage divider, error amplifier, charging rate regulator, and its fuse and power distribution. In the next stage, there
are instructions to assemble the base of the Tekbot and its parts: battery holders, battery pack connectors, motor
assembly and mounting, and the wheels. Finally, the charger board is mounted on the robot, and the entire system is
tested as one unit.

2.3

How to Read a Schematic

Schematics are a representation of how each component on the PCB board is connected. It is important to
remember that all grounds are connected to each other and all VCC are connected to each other. Follow the copper
traces on the PCB board and find how it relates to the schematic. The Tekbot boards are two layers, meaning it uses
both the top and the bottom. Some traces may switch sides of the board through the solder holes or holes called
vias so look on both sides of the board to follow the copper traces. It will be easier to see all of the copper traces
when the board is blank.

Figure 2.1: Schematic for charger board


12

ECE 112 Manual

c
2013
Oregon State University

2.4. BUILDING THE CHARGER BOARD


What is pin 1 of J9 of the charger board connected to?
Where do the batteries get plugged into on the charger board?
What is S1 and what does it do?

2.4

Building the Charger Board

The procedure for building the charger board parts is explained in the sub-sections: purpose, build, and test. Each
part has been shaded respectively in the schematic diagram for the charger board, found in Appendix C:
Schematics. The purpose sub-section explains why that part/shaded block is needed for the charger board. The
build sub-section describes the steps to build that portion of the circuit, as indicated in the shaded area of the
Schematic. It also explains what supporting parts need to be soldered in. The test sub-section describes the
process(es) necessary to test the block.
For complex systems such as the charger board, it is necessary to test each section as
soon as it is built, so that errors are easily isolated. By building and testing each part in
succession and checking it for functionality, it is easy to isolate errors to the most recently
built area.

2.4.1

Bridge Rectifier

Purpose:
There are basically three types of wall warts: the AC wall wart and two varieties of DC wall warts. The AC wall wart
provides an AC voltage at its output connector. The DC wall warts come in two varieties: with a positive center pin
output connector, or with a negative center pin output connector. The bridge rectifier allows the charger board to use
any of the above-mentioned wall warts without issues.
A diode lets current flow in only one direction. A bridge rectifier arrangement of diodes is able to take either polarity
of input voltage, (which includes AC voltages) and redirects the flow of current so that it enters the charger circuit
with the correct polarity. See Figures 2.2 and 2.3.

Figure 2.2: Bridge Rectifier Supplied by Negative Center


Pin

Figure 2.3: Bridge Rectifier Supplied by Positive Center Pin

NOTE: The diodes should be 1N4004.


c
2013
Oregon State University

ECE 112 Manual

13

CHAPTER 2. BATTERY CHARGER AND BASE ASSEMBLY


If a component has polarity, it must be placed into the circuit in only one orientation or it will
not work correctly. Typically, most components will be instantly damaged if their polarity is
not observed. Diodes have the characteristic of polarity too. Diodes, however, are designed
to pass current in one direction as well as to withstand substantial reverse voltage while not
passing any current.
Diodes allow current to flow from the anode to the cathode. The cathode is the side
of the diode with the band around it, (which indicates that current flows out of that end).

Build:
In order to build the bridge rectifier, read the following section Diode Placement Hint thoroughly. It will not only be
helpful, but is also essential, before working on the next section Soldering the diodes.
Diode placement hint:
For all the four diodes, line up the diode schematic symbol with its corresponding line on the silk screen of the PCB.
See Figure 2.4 for a correspondence among figure i the schematic symbol of the diode, ii the actual physical part,
and iii the board placement (silk screen on the PCB).

Figure 2.4: Diode Placement Hint


There are several types of diodes in your kits. Double-check the numbers written on each
of them, so that you do not solder the wrong diodes into the wrong places.

Soldering the diodes:


1. Solder the female coaxial power connector in at J9.
Apply a liberal amount of solder, but do so quickly (in less than 8 seconds). If not, the plastic
connector shell will melt.

14

ECE 112 Manual

c
2013
Oregon State University

2.4. BUILDING THE CHARGER BOARD


2. Solder the 1N4004 diodes in at D5, D6, D7, and D8. See Figures 2.5 and 2.6 to see the placement of D5. Also,
see Appendix C: Schematics, if you need a larger schematic of the charger board. MAKE SURE TO SOLDER
THE DIODE IN WITH CORRECT POLARITY!

Figure 2.6: Placing D5 Silk Screen on PCB


Figure 2.5: Placing D5 Schematic
Test:
Before testing the bridge rectifier, verify again the diodes are oriented correctly. Also, confirm the joints are
completely soldered.
Although there are 3 types of wall warts, (AC, DC positive, and DC negative), we only need to test the charger board
using the two DC wall warts. This is because the AC wall wart alternates between looking like a DC wall wart of one
polarity and then the other. Therefore, by testing the charger board with just the two DC wall warts, we have
effectively tested it with an AC wall wart, too.
Follow these steps for the test, and record the values:

1. Plug in the wall wart (the one in the kit) and insert its power plug into J9. Set the voltmeter to the 20V range,
and measure the voltage at test point T2. It should be approximately 13V. If not, check the direction of the
diodes and their solder joints.
2. Take the board to a TA and test the board with the next plug (negative center pin). Measure the voltage at T2
again. (It should still indicate about 13V). From this, it is certain that the full-wave rectifier works correctly.
3. If the charger does not pass either of the above checks, find out at this point and fix it. It will not function
correctly later on in further tests, if it does not pass this one.
'

ENTER THE VALUES:


The center pin of the wall wart
connector is: (Circle one).
Positive

Negative

The wall wart in the kit is rated


for:
&
c
2013
Oregon State University

V at

ECE 112 Manual

mA

%
15

CHAPTER 2. BATTERY CHARGER AND BASE ASSEMBLY

TA Signature:
(Bridge Rectifier Works)

2.4.2

Voltage Regulators

Purpose:
The op amp U1 keeps the chargers output voltage constant by comparing its output against a reference voltage. It
must be powered with approximately 13V. The op amp also needs the reference voltage, which is 2.5V. A voltage
regulator is therefore, a reliable way to obtain these two voltages.
Build
Use Appendix B: Parts List and Appendix C: Schematics to solder all of the parts needed for both: the voltage
regulator and the reference voltage regulator.
To implement the above, follow these steps:
1. Solder in C3 and C1 before you build the reference and op amp voltage regulator. (C3 has polarity, but C1
doesnt). Notice that C3 has minus signs on one side of it. Put the negative lead on that side into the hole that is
connected to ground. (Follow traces on the PCB).
2. Use Appendices B and C to solder all of the parts needed (R8, R1, D1, and D4) for both the voltage regulator
and the reference voltage regulator. All the four parts in the two regulator blocks must be installed for the
regulators to function. See Figure 2.7 to make sure the regulators are built correctly.

Figure 2.7: Reference and Op Amp Voltage Regulators


3. Pay attention to D4 while building the reference voltage regulator. (Since D4 has three leads coming out of it,
do not orient it backwards). Match the flat side of D4 with the flat side, as shown on the silk screen. Appendix A
16

ECE 112 Manual

c
2013
Oregon State University

2.4. BUILDING THE CHARGER BOARD


has a resistor color code chart to help find the correct resistors. You can double-check the resistor values using
the DMM.
Test:
The 1N5245B will regulate at about 13V to supply the op amp with power. The TL431 provides a regulated reference
voltage of 2.5V to the op amp.
These regulators will be tested:
1. Plug in the wall wart and insert its power plug into J9.
2. Measure and record the voltage from Test Point T2 to ground. It should be about the same or (+/- 0.5V) from
what was previously measured.
3. Measure and record the voltage from T3 to ground. It should be 13V (+/- 1.0V).
4. Measure and record the voltage from T5 to ground. It should be 2.5V (+/- 100mV).
5. If either voltage regulator does not pass all of the above checks, find out at this point and fix it. Not only will it
not function correctly later, but other parts will be damaged too.
'

ENTER THE VALUES:

2.4.3

Voltage T2:

Voltage T3:

Voltage T5:
&

V
%

Voltage Divider, Error Amplifier, and Charging Rate Regulator

Voltage Divider
The charger seeks to maintain 8.7V at its output terminal. This is the voltage of a fully charged battery pack. The
voltage divider multiplies the output voltage by 0.286. When the output voltage is 8.7V, the input to the op amp is
2.5V (that is, 0.286 x 8.7V).
Error Amplifier
The op amp acts as an error amplifier that senses the difference between the 2.5V reference and the divided-down
voltage at T7. If T7 is lower than 2.5V, then the error amplifier output increases its output voltage. If T7 is higher than
2.5V, the amplifier output is reduced.
Charging Rate Regulator
The rate regulator acts as the valve controlled by the error amplifier to charge the batteries at a higher or lower
voltage, as dictated by the error amplifier. This valve is needed to allow for the larger amounts of current required for
charging the batteries.
c
2013
Oregon State University

ECE 112 Manual

17

CHAPTER 2. BATTERY CHARGER AND BASE ASSEMBLY


Build:
The integrated circuit (IC) U1 has polarity. To implement the above, follow these steps:

1. Match the side of the chip with the half-circle onto the silkscreen with the same half-circle. As Q1 and Q2 both
have polarity, work with caution.

2. Solder in R7, D3, and D2. J8 is made with a male header. Again, since the LED D3 also has polarity, work with
caution.

Figure 2.8: LED Polarity

Test:
To implement the test for these parts, follow these steps:

1. Plug in the wall wart and insert its power plug into J9. LED D3 should illuminate. If it does not, immediately
unplug the wall wart and check your work.

2. If it does, measure the voltages at the indicated test points in figure 2.9.

3. The expected voltages are shown in figure 2.9. Record the actual measured voltages against the expected
voltages in figure 2.9.

4. If the actual voltage readings do not match their corresponding expected values, find out what is wrong and fix
it. Not only will it not function correctly later, but other parts will be damaged too.
18

ECE 112 Manual

c
2013
Oregon State University

2.4. BUILDING THE CHARGER BOARD

Figure 2.9: Voltage Readings

2.4.4

Fuse and Power Distribution

Purpose:
Every electrical system has to be powered by a source. Connectors provide the mechanical mechanism to do this.
The connectors primarily used on the TekBot are 0.1 socketed headers. This type of connector is common,
inexpensive, and is available in many configurations. It works well especially when the connectors need to be
inserted and removed many times over the life of the circuit.
Build:
In order to build the external connectors, follow these steps:
1. J1 to J7 are female connectors. Create these by snapping them off of the long sections of the female header
in the kit.
2. Snap one of the positions in-half so the other connectors are complete and not damaged. See Figures 2.10
and 2.11.
3. Solder in the fuse F1 and the switch S1.
c
2013
Oregon State University

ECE 112 Manual

19

CHAPTER 2. BATTERY CHARGER AND BASE ASSEMBLY

Figure 2.10: Cutting Female Header

Figure 2.11: After cutting female headers

Test:
In order to test the power connectors, follow these steps:

1. Plug in the wall wart and insert its power plug into J9. Place S1 in the ON position.
2. Insert small test wires into J1 through J7, and check for approximately 8.7V at J1 through J7.

2.5

Assemble the Base of the Robot

The procedure for assembling the robot base consists of the following: attach the batteries to the base, assemble
and mount the motor, and attach the roller ball and wheels. In addition, each step will require a test to verify that
each system functions correctly.

2.5.1

Attach Batteries to the Base

To attach the batteries to the base, the steps involved are: connect the battery holders, attach the battery pack
connectors, test the charger with the batteries, and finally attach the battery holders.
Connect the Battery Holder
In order to connect the battery holders, follow these steps:

1. Cut a black wire from one pack and the red wire of another pack to a 2 length.
2. Strip 1/4 of insulation from the ends of these wires.
3. Twist the stripped wire ends together and then solder.
4. Place heat shrink tubing over the solder joint, and shrink the tubing into place using the heat from the end of
the soldering iron. See Figures 2.12 and 2.13.
20

ECE 112 Manual

c
2013
Oregon State University

2.5. ASSEMBLE THE BASE OF THE ROBOT

Figure 2.12: Battery Connection


Figure 2.13: Connect Battery Holders

Do not put the batteries in the holders until after soldering. This is to prevent possible battery
damage.

Attach Battery Pack Connectors


The male headers must be connected to the battery leads, so that they can be connected to the charger board. In
order to do so, follow the steps below. (See the corresponding Figures 2.14 through 2.17, for an illustration of each
step).

1. Strip 1/8 insulation from the two remaining battery leads and tin them.

2. Cut off a 2-position male header and stick it into a piece of cardboard, to hold it in place for you.

3. Cut two 41 pieces of shrink tubing and slide one onto each wire.
4. Solder a wire to each pin of the header. Slide the shrink tubing down around the joints and shrink to fit it around
the soldered area.

Figure 2.14: Strip Wires


c
2013
Oregon State University

Figure 2.15: Cut male header and secure


ECE 112 Manual

21

CHAPTER 2. BATTERY CHARGER AND BASE ASSEMBLY

Figure 2.17: Shrink the tubing over connectors


Figure 2.16: Solder wires to male header with heat shrink

Test Charger with the Batteries


In order to test the charger with the batteries, follow these steps:

1. Plug the battery plug into your charger board. On the silk screen, notice that there is a small + symbol. The
red lead from your batteries should be closest to this symbol when the connector is inserted. Double and triple
check the polarity of the battery connection to the charger board.

2. Put the batteries into the holder and plug the wall wart in. LED D3 should illuminate. If it does not, immediately
unplug the wall wart and check your work.

3. If D3 does illuminate, measure the voltages at the indicated test points in figure 2.18.

4. The expected voltages are shown in figure 2.18. Record the actual measured voltages against the expected
voltages in figure 2.18.

Make sure the batteries are oriented correctly.

The voltages vary somewhat at T4 and T6. These voltages will depend upon the high/low
charge of the battery. The voltages will however, be within 30% of the values that were
measured when the batteries were not connected.

Do not make a mistake here. The results are catastrophic.

22

ECE 112 Manual

c
2013
Oregon State University

2.5. ASSEMBLE THE BASE OF THE ROBOT

Figure 2.18: Voltage Readings


5. Measure the voltage across the two terminal posts for J8. This reading will determine the battery charging
current using Ohms Law. Refer to Equation 2.1. The battery charge current is: (the voltage across J8) divided
by the resistance, which is 12.

Current(Amps) =

V oltage(V olts)
Resistance(Ohms)

(2.1)

6. If the charge current is far not within 20% of 50mA, immediately unplug the wall wart and battery pack from the
charger board.
If the battery pack is unplugged from the charger board, place some tape on the connector
ends to prevent accidental shorting. If shorted together, the battery pack wires and plastic
housing will melt in seconds. This could even damage the batteries.

Attach the Battery Holders


In order to attach the battery holders, follow these steps:
1. Remove one battery from the battery pack to avoid a shorting hazard.
c
2013
Oregon State University

ECE 112 Manual

23

CHAPTER 2. BATTERY CHARGER AND BASE ASSEMBLY


2. Place the battery holders on the TekBot frame with their leads away from the motor holes.
3. Insert the 38 4-40 flat head metal bolts (the shorter ones) through the holes in the battery holders, with the
head of the bolt inside of the battery compartment. See Figures 2.19 and 2.20.
4. Attach the nuts and tighten until snug.

Figure 2.20: Battery Holder Attached to Tekbot

Figure 2.19: Full view of Battery Holder

2.5.2

Motor Assembly and Mounting

Purpose:
This section has been divided into three phases: attaching the wires to the motors, mounting the motors, and testing
the motors.
Attach wires to the Motors
To make connections to the motors, pairs of conductors are stripped from a ribbon cable. Connectors will eventually
be attached to the ends of these wires, as they will be plugged and unplugged many times. The stranded conductors
in the ribbon cable will provide a more durable connection than a solid wire, as the latter could break after being
flexed a few times.
In order to attach wires to the motors, follow these steps:
1. Split the 10-strand ribbon cable into 5 pairs of two wires.
2. Split a pair 3.
3. Strip

1 00
4

insulation from the ends.

4. Tin the recently stripped wires.


5. Slide

1 00
2

of the heat shrink tubing over the ends of the wires.

6. Pass the wire through the motor terminal and bend it back over itself. Crimping the wire onto itself holds it in
place while the soldering is done.
7. Pass the leads of one of the three 0.1 microFarad (F ) capacitors into the two motor terminals. One lead of
each of the rest capacitors (Cap2 and Cap3) goes into each terminal of the motor.
8. Solder both the wire and capacitor leads to the terminal. For Cap2 and Cap3, solder their loose leg onto the
motors metal case, and cut off the excess leads of the capacitor. See Figure 2.21. Confirm that the solder
flows onto all surfaces: terminal, capacitor lead, and wire.
24

ECE 112 Manual

c
2013
Oregon State University

2.5. ASSEMBLE THE BASE OF THE ROBOT

Figure 2.21: Motor Terminal Connections

(a)

(b)

(c)

Figure 2.22: Motor Terminal Connections


9. Slide the tubing over the solder joint and heat it to get it to shrink.
10. Attach the pieces of the male header to the other ends of the motor wires. The process for doing so is similar to
the steps mentioned under Attach Battery Pack Connectors.
11. Repeat Steps 1 to 10 for the second motor.
Mounting the Motors
In order to attach the motors to the TekBot, follow these steps:
00

1. Use the #4 12 sheet metal screws included in the kit. Align the motor so that the shaft projects out of the frame
and screw in the screws, as shown in Figures 2.23.
2. Do not over-tighten the sheet metal screws holding the motors to the frame. (Too much torque can damage the
motors). See Figure 2.24 for a view of the motors and battery holders mounted on the chassis.

Figure 2.23: Motor being mounted on TekBot frame

Figure 2.24: Motors and Battery Holders Mounted

Test:
To test the motors, simply plug them into the charger board after charging the batteries. The charger board has six
output connectors. Use any one of them, but remember to check which holes are used on the connectors. If the
motors dont turn, find and fix the problem now.
Attach the Roller Ball
Make sure the bolts for the roller ball are placed with the heads of the bolts facing upwards. However, if the tail of the
bolt sticks upwards, it could damage the charger board by creating a short circuit. See Figure 2.25(a) for a view of
how the roller ball is mounted.
c
2013
Oregon State University

ECE 112 Manual

25

CHAPTER 2. BATTERY CHARGER AND BASE ASSEMBLY

(a) Mounted Roller Ball

(b) Disk aligned and mounted to wheel

(c) Wheel Mounted to Motor

Figure 2.25: Assembly of Roller Ball and Wheels


Attach the Wheels
In order to attach the wheels, follow these steps:
1. While keeping the adapter aligned concentrically with the wheel, drill a pilot hole (using a # 50 drill) through the
00
disk and into the wheel. Do not drill all of the way through the wheel, only about half way. Thread a #2 21 brass
screw into this hole and into the wheel.
2. After attaching one screw, confirm that the disk is centered onto the wheel. The adapter disk and wheel must
be correctly centered.
00

3. Drill a pilot hole for the second screw directly across from the first screw. Thread a #2 21 brass screw into this
hole. (Check again that the disk is centered on the wheel). Do the same for the remaining two screws. See
Figure 2.25(b) for a view of the aligned adapter disk.
4. Now that the adapter disk has been attached to the wheel, it is possible to attach the wheel (via the adapter
disk) to the motors. Attach the disk onto the motors by pressing the adapters onto the motor shafts. They
should fit snugly, and may need some force to connect them together tight. When they properly attach, there is
a distinct click.
5. Once the wheel is mounted on the motor as shown in Figure 2.25(c), temporarily connect each motor to the
battery pack and notice if the wheel is spinning true. If the wheel wobbles, then remove the screw and try
mounting the adapter again.
6. Repeat Steps 1 to 5 for other wheel.
Mounting the Charger Board on the Robot
To implement the above, follow these steps:
Do not mount the board directly to the metal base, or severe electrical damage will occur.
Use the white nylon 4-40 spacers.

00

1. Use three 4 40 12 metal machine screws, three 4-40 round spacers, and three 4-40 metal nuts to mount the
charger board to the aluminium base. See Figure 2.26(a) for a diagram of the spacer usage.
2. Align your charger board as shown in Figure 2.27. Figure 2.26(b) shows the completed TekBots base.
26

ECE 112 Manual

c
2013
Oregon State University

2.5. ASSEMBLE THE BASE OF THE ROBOT

(a) Mounted Roller Ball

(b) Disk aligned and mounted to wheel

Figure 2.26: Assembly of Roller Ball and Wheels

Figure 2.27: Robot Base with a connected Charger Board


Test the Entire TekBot System
Put in all the batteries. The direction the motors turn can be changed by changing the direction of the current flowing
through them. Set it on the floor and amaze yourself and your peers by letting your baby take its first stroll!
Now that there is a working charger, remember to use it. It takes about 14 hours to charge
a fully discharged battery pack.

TA Signature:
(Tekbot Moves Forward and Backwards)

c
2013
Oregon State University

ECE 112 Manual

27

CHAPTER 2. BATTERY CHARGER AND BASE ASSEMBLY

2.6

Study Questions

1. As was mentioned earlier, a diode only lets current flow in one direction. Why do you think that the diode D2
was included in the charger circuit? What problem(s) do you think, may occur, if it was excluded from the
circuit?

2. A bridge rectifier is a crucial part of any small electronic system. It allows for an alternating current (AC) or a
reverse center pin direct current (DC) wall wart to be converted to the desired DC current. Complete the graph
below, and refer to the schematic of the charger board to follow the current.

(a) Voltage coming into the board

(b) Complete this graph

3. Once the battery pack is connected to the charger board, power for the robot circuits is available from the
connectors on the charger board (J1 J5). To protect the battery pack, a fuse F1 is included on the board. This
is a unique kind of fuse. Using a search engine on the Internet, and the part number as the search string, find
out what makes this kind of fuse different from conventional fuses. (See Appendix B: Parts List for the part
number).

4. Describe what steps you would take to fix the charger board, if the board had no power output at J1 (the power
distribution area). A specific solution isnt required; just write a general process that would be used.

28

ECE 112 Manual

c
2013
Oregon State University

2.6. STUDY QUESTIONS

2.6.1

Challenge

A sensor needs 5V to operate correctly. Assume that you get exactly 7.2V from the power distribution area on the
charger board. Design a functional block, (represented by the gray block), which will be able to change 7.2V to 5V.
There are many solutions, so imagine that this is a task given by an employer. (See Figure 2.28 for the design).
List the options you find, give a short analysis of why each one is good or bad, and recommend which one should be
used.
Project Summary
Input:
7.2V
Output:
5V

Figure 2.28: Design Problem For Lab One

c
2013
Oregon State University

ECE 112 Manual

29

CHAPTER 2. BATTERY CHARGER AND BASE ASSEMBLY

30

ECE 112 Manual

c
2013
Oregon State University

Chapter 3

ECE Tools and Concepts

31

CHAPTER 3. ECE TOOLS AND CONCEPTS

3.1

Section Overview

This section has four exercises. Each exercise uses a prototyping board for building the circuits. Understanding how
to use a prototyping board is therefore crucial to finishing these exercises.
Following is a brief description of the four exercises:

Exercise One explores the internal resistance of an ammeter and then proceeds to use a voltmeter to
measure current.
Exercise Two uses the passive sign convention to find if the tekbot battery is generating or dissipating power.
Exercise Three explores current power and voltage are related in different combinations of resistors in series
and parallel.

Ensure that the batteries are fully charged. They need about 14 hours to completely charge.

3.2

Basics of the Prototyping Board

A prototyping board (also called a protoboard) is used to build prototype circuits. They are a quick and convenient
way to build simple circuits without soldering. See Figure 3.1.
This section describes the method to seat the contacts in the new protoboard, and about the protoboard layout itself.

Figure 3.2: Seating a protoboards contacts

Figure 3.1: A Protoboard

Using double-sided tape on the back of the prototyping board is not recommended. If
the protoboard is attached to a surface with the tape, removal may be impossible without
destroying the board.

3.2.1

Seat the Contacts

With the new protoboard, we will need to seat the contacts for the first time that we use it. Push on the back of the
board using the thumbs to ensure that the internal contacts are firmly seated.
See Figure 3.2 for a view of how to seat the contacts in the new protoboard.
32

ECE 112 Manual

c
2013
Oregon State University

3.3. PROCEDURE

3.2.2

Protoboard Layout

Component leads/wires are inserted into the holes on the board. Inside each hole are metallic contacts that connect
an inserted wire to four other adjacent holes. The sets of five holes can be used to form circuit nodes. Most of the
nodes that can be formed will consist of up to five wires. However, at the top and bottom of the board, nodes of up to
twenty wires may be created. These are most convenient for forming ground and power contacts. See Figure 3.3.

Figure 3.3: Arrangement of nodes and buses on a protoboard

When inserting a component into the protoboard, apply firm pressure. However, forcing component leads into the
protoboard that are too large in diameter may permanently deform the contacts, and future connections to those
holes will be intermittent and unreliable.

3.3

Procedure

As mentioned earlier, the procedure for Lab Two is divided into three exercises, and will deal with the following
concepts respectively:

1. Ammeter Characteristics
2. Passive Sign Convention and Power Equation
3. Power Dissipation and Equivalent Resistance

3.4

Exercise One: Ammeter Characteristics

When measuring current with an ammeter, the current being measured flows through the meter. The ammeter is
designed to have zero internal resistance ideally, because any resistance in the ammeter will alter the current flowing
through the circuit under test, resulting in inaccurate measurements. However, a real ammeter must have some
small resistance to be able to measure current. We will first examine the internal resistance of a Digital Multimeter
(DMM) ammeter. Later, a voltmeter is used as an improvised ammeter.
To implement the above, follow these steps:

1. Work with a neighbor and measure the internal resistance of each others ammeters. With one DMM set to the
200 milliAmperes (mA) setting, measure and record the internal resistance using the other DMM. (Remember
the resistance should be very small, so use an appropriate resistance setting).
2. To avoid having to hold the DMM probes, use the micrograbber wires instead of the probes. See Figure 13.4.
c
2013
Oregon State University

ECE 112 Manual

33

CHAPTER 3. ECE TOOLS AND CONCEPTS

Figure 3.4: Micrograbber Wires

3. Use the protoboard to build the circuit shown in Figure 3.5. (Use the battery pack to power the circuit.) Set the
DMM to the 200mA scale. Measure and record the current drawn by the motor.

4. Now build an improvised ammeter by placing a 1 resistor in series with the motor, and measuring the voltage
across it. The circuit is shown in Figure 3.6. The current through the motor is computed using Ohms Law
I = VR . Use the DMM in the 2V setting (not mA). Measure and record the voltage across the 1 resistor.

Using the DMM in the 200mA setting or with the leads plugged into the wrong holes for Step
4 will blow its internal fuse.

34

ECE 112 Manual

c
2013
Oregon State University

3.4. EXERCISE ONE: AMMETER CHARACTERISTICS

Figure 3.5: Measurement Circuit 200 mA setting

c
2013
Oregon State University

ECE 112 Manual

Figure 3.6: Measurement Circuit 2V setting

35

CHAPTER 3. ECE TOOLS AND CONCEPTS

3.5

Study Questions for Exercise One

1. Was there a difference in the motor current directly measured by the DMM and the ammeter improvised by
using a voltmeter and a 1 resistor, as shown in Figure 3.6.
2. What was the percent difference between the two measured current values? Show your calculations in the
space provided below, and write the answer here
.

3. Which current measurement is more accurate? Why?

4. Show how you could build an ohmmeter with an ammeter and a voltage source. Illustrate it with a drawing and
write the calculation needed to compute its resistance.

36

ECE 112 Manual

c
2013
Oregon State University

3.6. EXERCISE TWO: PASSIVE SIGN CONVENTION AND POWER EQUATION

3.6

Exercise Two: Passive Sign Convention and Power Equation

A battery can generate or dissipate power. It dissipates power while being charged, (since the energy is being used
to create chemical potential energy). However, it generates power when powering a circuit, (since the chemical
potential energy is being converted back to electrical energy). Utilizing the passive sign convention, we can
determine when power is being either generated or dissipated by the battery pack.
In Figure 3.7, the ammeter measures the current that enters or exits the battery. This circuit is a conceptual
representation of the charger board.
When the wall wart is plugged in, current flows into the battery, because the wall wart output is at a higher voltage
potential than the battery pack. In this situation, the battery pack is being charged and it therefore is dissipating
power. Since the current is entering the positive (+) ammeter terminal, it will read positive current.
When the wall wart is unplugged, the battery pack discharges through the 1K resistor then through the multimeter.
The current will not pass through the wall wart because it is not connected and acting like an open circuit. In this
situation, the battery is delivering or generating power. Since the current is flowing out of the positive (+) ammeter
terminal, it will read negative current.
Normally, the batteries should never be charged from an unregulated source like a wall
wart. However, in this case, the 1K current limiting resistor protects the wall wart and the
batteries.

Figure 3.7: Power Dissipation/Generation

c
2013
Oregon State University

ECE 112 Manual

37

CHAPTER 3. ECE TOOLS AND CONCEPTS


To implement the above, follow these steps:

1. Measure and record the voltage of the battery pack. (It should be approximately 7.5V).
Battery Pack Voltage
2. Begin with the wall wart unplugged, the switch in the off position and witht he multimeter set to the 200mA
setting.
If the multimeter is not set high enough when measuring current, the internal fuse will blow
and the multimeter will not longer function properly.

3. Borrow a 1000 ohm resistor from your T.A. and plug it into the power block. One resistor lead will plug into
GND and the other resistor lead will plug into the + terminal of the header. A resistor does not have polarity
so it does not matter which direction you plug it in.
4. Use the multimeter micrograbbers to complete the circuit. Take the red micrograbber and hook it onto the black
lead of the tekbot battery back. See figure 3.8. Take the red lead of the batter pack and plug it into the +
terminal of J7. Attach a wire to the black micrograbber and put in into the ground terminal of J7. See figure 3.9.

Figure 3.8: Micrograbber

Figure 3.9: Circuit setup

5. Flip the switch from the off position to the on positiion. Measure and record the current and direction(in or out of
the battery) in the table below.
6. Leave the switch in the on positiion and plug in the wall wart. Measure and record the current and direction.
38

ECE 112 Manual

c
2013
Oregon State University

3.7. STUDY QUESTIONS FOR EXERCISE TWO

3.7

Study Questions for Exercise Two

1. With reference to Figure 3.7, draw a schematic diagram of the circuit when the wall wart is plugged in. Show
the current magnitude, directions and the orientation of the battery. Also write down the battery voltage taken
earlier, next to the battery symbol.

2. Using the power equation, the passive sign convention and your readings, determine the power dissipated by
the battery when wall wart is plugged in.

3. Repeat questions 1 and 2 assuming that wall wart is unplugged.

c
2013
Oregon State University

ECE 112 Manual

39

CHAPTER 3. ECE TOOLS AND CONCEPTS

3.8

Exercise Three: Power Dissipation and Equivalent Resistance

Resistors have different physical sizes to accommodate different levels of power dissipation. Bigger resistors can
dissipate more power in the form of heat energy because of their larger surface area. However, a sufficient quantity
of small resistors can safely dissipate as much power as a single but bigger resistor.

3.8.1

Resistors in Series

Follow these steps:


1. Use the protoboard to build the circuit shown in Figure 3.10, Plug the batteries in last. Once the circuit is built,
plug in the batteries and quickly measure and record the voltage across the resistor. Then carefully touch the
resistor and see how hot it is. It will be fairly warm. Unplug the batteries.
2. Using the voltage just measured, compute and record the power dissipated by the resistor, as shown in
Equation 3.1. This resistor is rated at 1/8 watt maximum. Is it operating within its capabilities?

P ower(W atts) =

V oltage(V olts)2
Resistance(Ohms)

(3.1)

Figure 3.10: Voltage Across the Resistor

40

ECE 112 Manual

c
2013
Oregon State University

3.8. EXERCISE THREE: POWER DISSIPATION AND EQUIVALENT RESISTANCE


3. Consider the string of series-connected resistors in Figure 3.12. Determine the Equivalent Resistance of this
string of resistors. Record the value Req .

Figure 3.11: Resistors in Series

Req =
4. Using the protoboard, connect the string of resistors into the circuit, as shown in Figure 3.12. Plug in the wall
wart.

Figure 3.12: Series-Connected Resistors in a Circuit


5. Measure and record the values for the voltage drop and current flowing in each resistor. Also, calculate the
power dissipated by each resistor. Record these values in the table. Touch each resistor to see how hot it is.
Compare the power dissipation of each resistor with how warm it is. Is there a correlation?

c
2013
Oregon State University

ECE 112 Manual

41

CHAPTER 3. ECE TOOLS AND CONCEPTS


Resistors in Parallel

Follow these steps:

Figure 3.13: Charger Board Schematicl

1. Consider the parallel-connected resistors, R3 and R4, on the charger board schematic, figure3.13. Determine
the equivalent resistance, Req when the J8 jumper is in.

Req =

2. Connect the wall wart. Measure and record the voltages across the resistors R3 and R4.

3. Calculate the current and power of R3 and R4.


42

ECE 112 Manual

c
2013
Oregon State University

3.9. STUDY QUESTIONS FOR EXERCISE THREE

3.9

Study Questions for Exercise Three

1. Write the KVL equation for the circuit in Figure 3.12 and see if the equality holds. Write down all the steps and
identify as to which resistor each term in the equation corresponds to. Circle or mark the final solutions.

2. Write the KCL equation for the circuit in Figure ?? and see if the equality holds. Write down all the steps.
Identify each term and draw a schematic diagram indicating the direction of currents used. Circle or mark the
final solutions.

Challenge
Our battery packs are rated at about 600mAH. At a discharge rate of 46mA (that is: 7.2V /154), in theory, they
should last for 600mAH
47mA = 12.7hours. However, this is not the case for practical circuits. This calculation assumes that
the circuit will operate until the last coulomb is consumed from the battery. However, as the battery pack discharges,
its output voltage decays. A NiCad cell is considered discharged when it reaches 1V. At full charge is may be from
1.25 to 1.4V.
c
2013
Oregon State University

ECE 112 Manual

43

CHAPTER 3. ECE TOOLS AND CONCEPTS


The challenge is to record the terminal voltage of the battery pack while it is driving a fixed 154 load and from the
data, estimate how long it will take to reach a terminal voltage of 1 Volt per cell or a battery pack voltage of 6V.
Start with a fully-charged battery pack. Use the 154 string of resistors for the load and plot the battery voltage over
time. Let the batteries power the load for several hours to get a trend for the data. Initially, take more frequent
measurements. Once the trend is observed, take measurements less frequently. After sufficient data is taken to find
the trend, make a graph of the data showing the estimated point at which the battery pack will be discharged.
If there is access to a power resistor, the load could be increased too. A load of about 200mA will closely
approximate the nominal total current consumption of the TekBot. Using this load, estimate the nearest value for the
run time of a robot. However, if there is no access to a power resistor, and the load needs to be increased, an option
would be to immerse the resistor string in a glass of water, (which in turn drastically increases the ability of the
resistors to dissipate power).

44

ECE 112 Manual

c
2013
Oregon State University

Chapter 4

Motors and BJTs

45

CHAPTER 4. MOTORS AND BJTS

4.1

Section Overview

This section explores the function of two common types of semiconductors: diodes and Bipolar Junction Transistors
(BJTs), This section also introduces the oscilloscope (oscope), an electric test instrument that allows observation of
varying signals. As mentioned in Lab One, diodes allow current to flow only in one direction. They are used to
convert AC to DC (rectification), provide voltage references, and to limit or clip signals. BJTs are versatile devices,
mostly utilized as switches, or small-signal amplifiers.
In this lab, we will observe the I-V characteristics of common diodes, zener diodes, BJTs, and the current draw of the
Tekbot motors. We will also build a motor control circuit similar to the one on the motor control board. At the end of
this lab, there is a challenge problem.

4.2

Procedure

To observe the characteristics of common as well as zener diodes, two diode experiments will be performed in this
lab, followed by a BJT experiment. The motor board will then be examined to illustrate how transistors are utilized to
create an H-bridge, and how they allow the motors to go forward and backward. The oscope will be introduced to
observe the current draw of the Tekbot motors. Finally, a challenge problem is presented for building an amplifier
using a BJT, to view voice waveforms on an oscilloscope.

4.3

Diode I-V Characteristics

To observe the I-V characteristics of a common diode, follow these steps:

1. Build the circuit, as shown in Figure 4.1. The 10K resistor (with an arrow pointing towards it), is a
potentiometer (commonly called a pot). Turning the potentiometer shaft will adjust the voltage across the
diode. Use the blue, square, 10K pots in your circuit, and adjust them with a screwdriver.

Figure 4.1: Schematic for testing the I-V characteristic of a diode


2. Adjust the voltage across the diode from the most negative value to the most positive value possible. Plot eight
points on the graph alongside (Figure 4.2). Plot three negative diode voltages and five positive diode voltages
to clearly illustrate the one-way nature of the diode.
The scale of the negative diode voltages differs from the positive voltages, to make the
curves look clearer.

46

ECE 112 Manual

c
2013
Oregon State University

4.3. DIODE I-V CHARACTERISTICS

Figure 4.2: Diode I-V characteristic curve

c
2013
Oregon State University

ECE 112 Manual

47

CHAPTER 4. MOTORS AND BJTS

4.4

Zener Diode Voltage Characteristics

To observe the zener diode I-V characteristics, follow these steps:

1. Replace the diode in the first experiment with a zener diode. See Figure 4.3.

Figure 4.3: Schematic for testing the zener diode

2. Adjust the voltage from the smallest value possible, to the largest. Plot ten points on the graph in Figure 4.5.
Plot five negative diode voltages and five positive diode voltages, so the conductive properties of a zener diode
are clearly understood.

The scale of the negative diode voltages differs from the positive voltages, to make the
curves look clearer.

48

ECE 112 Manual

c
2013
Oregon State University

4.4. ZENER DIODE VOLTAGE CHARACTERISTICS

Figure 4.4: Zener Diode I-V Characteristic Curve

c
2013
Oregon State University

ECE 112 Manual

49

CHAPTER 4. MOTORS AND BJTS

4.5

Bipolar Junction Transistors (BJTs)

The simplest way to use a BJT is as a switch. The contacts of an NPN BJT switch are closed by injecting base
current and are opened by removing base current. When sufficient base current is present and collector current is
flowing, the collector and emitter terminals are essentially connected together with a voltage source of approximately
0.2V. The voltage source does not actually exist inside the transistor, but a potential difference of 0.2V still exists
between the collector and the emitter. See Figures 4.5 and 4.6.

Figure 4.5: BJT as a switch (when the transistor is ON)


Figure 4.6: BJT as a switch (when the transistor is OFF)

In order to understand the BJT as a saturated switch, this section uses a BJT to switch the motor on and off, provides
an explanation of the Light Emitting Diode (LED), and a few study questions towards the end.

1. With the wheels removed from the robot, build the circuit as shown in Figure 4.7, on the protoboard. Create
the switch using a movable wire.

2. With the switch open, measure the following:

(a) The Vbe and Vce values of the transistor. Vbe

]; Vce

].

(b) The Ib and Ic values of the transistor. (Hint: You dont have to actually measure these to know.) Ib
[ ]; Ic
[ ].
(c) The power dissipation of the transistor (with the motor off). P owerDissipated

].

3. With the switch contacts closed, the motor should begin to run. Again, measure the following values:

(a) Vbe

]; Vce

]; Ib

]; Ic

].

(b) Using these measurements just taken, compute the beta of the transistor, using the formula

Ic
Ib .

Beta

(c) Neglecting the base current (that is, considering only Ic and Vce ), the power dissipated by the transistor
is
[ ].
50

ECE 112 Manual

c
2013
Oregon State University

4.5. BIPOLAR JUNCTION TRANSISTORS (BJTS)

Figure 4.7: A switch using a NPN transistor and the pins of the 2N4401
4. With the switch contacts closed, as in Step 3, place another 2.2K resistor in parallel with the one connected
to the base lead. Again, measure the following values:
(a) Vbe

]; Vce

(b) Does the motor run any faster?

]; Ib

]; Ic

].

(Yes/ No).

You will notice that Ib increased considerably and Ic increased slightly relative to its previous value in Step 3. Also,
note the difference in Vce . It should have changed only slightly.
When Ib is substantially increased with little increase in Ic , the transistor is still in saturation.

4.5.1

About the Light Emitting Diode (LED)

Internally, the motor consists of many windings of wire. When current flows through the windings, a magnetic field is
produced in the motor that causes it to turn. But, when the motor drive current is removed, the collapsing magnetic
field produces a very high voltage, (up to 200V), which will eventually destroy the transistor.
The high voltage created when the field collapses is oriented in the opposite direction to the original applied voltage.
Therefore, the LED passes this flyback current and re-circulates it back through motor windings, thus protecting the
transistor. It is this current spike that causes the brief flash of the LED when the power is removed. You may also see
a dull glow of the LED while the motor is running.

c
2013
Oregon State University

ECE 112 Manual

51

CHAPTER 4. MOTORS AND BJTS

4.6

Study Questions

1. Use the results of Steps 3 and 4 from the previous section (i.e. The BJT as a Saturated Switch), write out your
own description of the condition of saturation. (It should include the relationship of Ib and Vce ).

2. Is the BJT an effective switch, as far as its own power dissipation is concerned? In other words, considering the
power dissipated by the transistor (either on or off), is it effective in ensuring that most of the power is delivered
to the load? Why? What characteristic feature about it being saturated makes the BJT an effective switch?

52

ECE 112 Manual

c
2013
Oregon State University

4.7. THE MOTOR CONTROL BOARD

4.7

The Motor Control Board

The motor control board needs to be able to spin both motors in either direction to allow the robot to back up and
turn. The motors are turned on or off by applying a high or low voltage level respectively to the motor drive circuits.
These signals come from digital logic gates. The digital logic gates are implemented to keep the transistors from
breaking. This protection block is called the current sequencer. The arrangement of the transistors in the motor drive
circuit gives this circuit the name H-bridge. Try to spot the H in Figure 4.7.
This section describes the function of the H-Bridge, and testing of the motor control board.

Figure 4.8: Motor Control Board H-Bridge

4.7.1

The H-Bridge

Figure 4.8 shows the H-bridge that controls the direction of current flowing through the motors, and therefore, the
direction of rotation as well, notice:
This circuit is actually a combination of the NPN and PNP switch circuits we just built.
The current flows from left to right through the motor when Q2 and Q5 are turned on.
The current flows from right to left through the motor when Q3 and Q4 are turned on.
Q1, Q6, and the various resistors are used to correctly bias the H-bridge transistors to work with logic-high on
input signals.

4.7.2

The Current Sequencer

The H-bridge of the motor control board is what determines if the motors run foward or backward. However an issue
can arise if the change of direction is too quick. When the direction of the motors changes too quickly the current can
shoot through from Q2 to Q4, bypassing the motors entirely and damaging the transistors. See figure 4.9.

Figure 4.9: Shoot Through Current


c
2013
Oregon State University

ECE 112 Manual

53

CHAPTER 4. MOTORS AND BJTS


The current sequencer, figure 4.10 is used to protect the H-bridge. The digital logic provides a delay so the direction
of the H-bridge current does not switch over too fast. As you can see in figure 4.11 as the directioin input changes
(dark line) from high to low there is a very quick period where the tekbot motors are not moving at all. The same
thing happens again when the tekbot moves foward.

Figure 4.11: Current Sequencer In Action

Figure 4.10: The Current Sequencer

4.7.3

Testing the Motor Control Board

Power the motor controller board with a 4-pin keyed power wire from the power distribution area of the charger
board. Use all four pins so that if the plug is put in backwards, there will only be NC (No Connection) plugged into +
and GND. The motor controller board inputs are active low. This means that when an input signal is zero volts, it is
logically asserted or true. When EN is connected to GND, an H-bridge passes current. When DIR is connected to
GND, then the H-bridge passes current in the reverse direction.

Since the motor controller has digital gates, a reference to EN being grounded or at 0V potential does not apply here.
Instead, the term for grounded is 0. When the inputs to the motor controller arent grounded, they are being pulled
hihg to Vcc by R2 and R3 are called 1. Thus, the inputs are essentially referred to as just 0 or 1.

Use some stripped wires to connect the motor board, as shown below in Figure 4.12.
54

ECE 112 Manual

c
2013
Oregon State University

4.7. THE MOTOR CONTROL BOARD

Figure 4.12: Diagram of the Motor Control Board

In table 4.1, write the appropriate motor actions. Indicate which LED is on: red or green.

Table 4.1: Control-Table for Tekbots Motor Board


Enable

Direction

Motor State

Stopped

Stopped

Forward

Backward

LED Color

Try each switch combination and observe the resultant motor state. If the motor runs on a direction opposite to the
one indicated, just reverse the motor connections to the board. Refer to the schematic for the motor controller in
Appendix C: Schematics.

4.7.4

Motor Current and the Oscilloscope

Motors will draw varying current depending on the physical resistance. When the motors have to overcome a greater
force to turn, a greater current will be drawn. For example, if the Tekbot needs to drive uphill it will draw greater
current. To observe the current being drawn by the motors an oscilloscope will be used. The oscilloscope is an
electric test instrument that allows the user to monitor a system with varying voltages.
Due to the cost of oscilloscopes there are a limited number. Working in groups of two is
advised.

1. Begin with the motor plugged in but with switch of the charger board in the off position.
2. Strip both ends of a small wire and solder one end to the test point T12 of the motor control board.
c
2013
Oregon State University

ECE 112 Manual

55

CHAPTER 4. MOTORS AND BJTS


3. Turn on the oscilloscope, the button is on the top of the scope in the bottom left hand corner. Open the
oscilloscope probe and connect it to channel one, toward the bottom of the oscilloscope. Before continuing, the
probe attenuation must be on the appropriate setting. Press the channel one button and be sure it says 10X
under the probe setting.
4. The alligator clip needs to connect to GND and the probe clip needs to connect to the other end of the wire
soldered to T12.
5. Oscilloscopes have auto set buttons that try their best to set up the display in the best possible way. Use auto
set to begin and adjust the display accordingly.
6. When using only one channel it is a good idea to make sure the wave is centered on the x-axis.Using the
vertical position dial adjust the waveform until it is centered on the x-axis.
7. The VOLTS/DIV knob is used to adjust the voltage scale of the display. T12 is measuring the voltage across a
1ohm resistor, therefore the current being drawn by the motors is determined using a simple Ohms Law
calculation. The current equals the voltage across R12. The scale of the display should be set to either 100mV
or 200mV for the best view.
8. The oscilloscope is very powerful and can sample voltages at incredibly fast speeds. For the purpose of this lab
we want to be able to see the increase and decrease of the voltage, so the SEC/DIV needs to be changed.
This will change the time scale. Setting it to 1.00 seconds per division will allow for a steady capture speed.
9. The RUN/STOP button allows you to pause the display and capture what you currently have recorded. The
SINGLE button allows you to capture one time interval of data and freezes after that.
10. Play with the oscilloscope settings and the resistance of the wheels to generate different wave forms of on the
display. This oscilloscope exercise will help with the first study question.

56

ECE 112 Manual

c
2013
Oregon State University

4.8. STUDY QUESTION

4.8

Study Question

1. The following oscilloscope graph is of the test point T12. Identify what is happening to the motor in the five
regions.

Figure 4.13: T12 Voltage


2. In figure 4.13 what is the maximum current draw of the motor.

3. What is the motor doing in figure 4.11.

c
2013
Oregon State University

ECE 112 Manual

57

CHAPTER 4. MOTORS AND BJTS

4.8.1

Challenge

An NPN BJT acting as a linear amplifier is more like a dimmer switch than an on/off switch. In this mode, a small
base current is able to control a much larger current flowing from the collector to the emitter. The big difference with
the BJT amplifier is that a large collector resistor is used to convert the varying collector current to a varying voltage
at the output.
Shown below in Figure 4.14, is the schematic for a small signal audio amplifier. The amplifier consists of two single
transistor amplifiers in series. By doing so, the two stages of amplification can together boost the microphone output
level over 150 times. The microphone output level is only about 20mV peak-to-peak. The composite gain of the
amplifier is simply: gain of the f irst stage gain of the second

Figure 4.14: Schematic for a two-stage audio amplifier.


The output voltage of both the microphone as well as of the amplifier can be measured with an oscilloscope. The
oscilloscope plots a waveform of voltage versus time on its screen. Your TA will set up the oscilloscope at your
workstation appropriately. (Please share the oscilloscope with your neighbor). In order to implement this challenge,
follow these steps:
1. First analyze the amplifier circuit in Figure 4.14 and determine its collector voltage, and its collector current.
(Hint: Write the KVL loop from the supply through Rc , Rb , Vbe , and finally Re ). Do this for both stages of the
amplifier. Use a beta of 100. Outline your work below.

First stage computed value: Vc


[ ]; Ic
[ ].

]; Ic

]. Second stage computed value: Vc

2. Build the amplifier on the protoboard and apply power to the circuit. Confirm that the voltages just computed
are identical in the amplifier. The voltages and currents should be within about 30% of computed values. If they
are not, check your circuit for errors.
58

ECE 112 Manual

c
2013
Oregon State University

4.8. STUDY QUESTION


Actual Value: Vc

]; Ic

].

3. If your amplifier voltages match, adjust the knob labeled CH 1 VOLTS/DIV to the setting 50mV for the 10x
probe. Attach the ground lead of the oscilloscope probe to the circuit ground. Touch the oscilloscope probe tip
to the junction of the microphone and the 10K resistor. Whistle or hum into the microphone and note the
voltage level.
mV (Should be 20mV peak-to-peak)
Average Microphone Output-Voltage Level:
4. Next, touch the probe to the collector of the transistor Q1. Adjust the knob labeled CH 1 VOLTS/DIV to the
setting 0.1 for the 10x probe. Now hum or whistle into the microphone again at about the same level and notice
the output signal in Q1. It should be significantly bigger. From the relative size of both the input and output
voltages, estimate the voltage gain of the amplifier.
Approximate amplifier gain of Q1 (observed)
5. Given the values of the resistors in the amplifier, what would you estimate the gain to be?
Approximate amplifier gain of Q1 (rule of thumb estimate)
6. Finally, touch the probe to the collector of the second transistor Q2. Adjust the knob labeled CH 1 VOLTS/DIV
to the setting 5 for the 10x probe. Now hum or whistle into the microphone again at about the same level and
notice the output signal in Q2. It should be significantly bigger than that seen at Q1s collector. From the relative
size of Q1s and Q2s output voltages, estimate the voltage gain of the amplifier. (Hint: The input to Q2 is simply
the output of Q1.)
Approximate amplifier gain of Q2 (observed)
7. Given the values of the resistors in the amplifier, what would you estimate the gain to be?
Approximate amplifier gain of Q2 (rule of thumb estimate)

c
2013
Oregon State University

ECE 112 Manual

59

CHAPTER 4. MOTORS AND BJTS

60

ECE 112 Manual

c
2013
Oregon State University

Chapter 5

Comparators

61

CHAPTER 5. COMPARATORS

5.1

Section Overview

Comparators are used to compare two voltage levels and typically provide a logic level output indicating the result of
the comparison. One confusing aspect of comparators is the open collector output that can pull the output to ground
but cannot drive it to a high voltage level. In this Lab, we will examine the behavior of the comparator.

5.2

Preparation

Make sure that the batteries are charged. Obtain either a printed or electronic copy of the datasheet for the LM339
Quad Comparator chip, from an On-line source, or from the TekBots Web-page (under the Reference section).

5.3

Procedure

In the first part of this Lab, a test comparator circuit is constructed and analyzed. Later, there is a description of the
operation, construction of an analog control board and an oscilloscope task. Finally, after assembling and testing the
entire system, there is a challenge problem to perform with the newly-constructed TekBot.

5.3.1

Test Comparator Circuit

Construct the circuit, as shown in Figure 5.1. (Most of these parts will be used later on the analog control board: so,
please be careful and gentle with them).
The comparator in the schematic (Figure 5.1), is inside a dual in-line package (DIP) package. Physically, the comparator has very little resemblance to the schematic symbol. In
order to understand what leads connect to what components, use a datasheet for the parts
being used.
The important section is the Pin Diagram section.

Figure 5.1: Schematic of the comparator test circuit

5.3.2

Circuit Description

R1 and R2 are used as voltage dividers to provide a variable input voltage to the inputs of the comparator. The
position of the slider in the pot is adjusted with a screwdriver. R3 is a 1K resistor connected from the comparator
62

ECE 112 Manual

c
2013
Oregon State University

5.3. PROCEDURE
output to the supply voltage. This resistor allows the comparator output to go to the supply voltage level when the
comparison is true. Therefore, when the non-inverting input (+) is higher than the inverting input (-), the output will be
driven by the resistor to the supply voltage. However, when the non-inverting input (+) is lower than the inverting
input (-), the comparator output will go to ground.
To implement this circuit, follow these steps:

1. Apply power to the circuit from your battery pack. Apply the given comparator input levels and then fill in the
corresponding output levels. (It is not necessary to set the input voltages exactly) For each voltage setting,
record the comparator output voltage. Indicate the logical output level with a 1 if the output is near the supply
voltage, and with a 0 if the output is near ground.
The annotations 2+ and 2- indicate that the voltage is set to just above or just below 2V
respectively. For example, 2- could be 1.9. This is done to make the comparator output
decisive for our settings. The comparator could resolve between 2.0 volts and 2.000001
volts, but it is not possible to set the potentiometers to such precise readings.

2. Using the table as a guide, describe in your own words a rule that describes as to when the comparator logic
output is high.

3. Remove the resistor between the comparator output and the supply voltage. Set the potentiometers using the
table you just filled in, so that the output should be logic high. What voltage do you read? Explain the result of
the readings.

4. In step 1, at what point did we measure the Vce of the output transistor?

c
2013
Oregon State University

ECE 112 Manual

63

CHAPTER 5. COMPARATORS

5.4

Operation of the Analog Control Board

The analog control board is used to control the forward, backward, and turning behavior of the TekBot. The robot
goes forward until either one or both of the buttons on the sensor board strikes an object. Depending upon which
button is depressed, the robot first backs up. It then turns towards the opposite side at which the button was struck,
and proceeds forward again. This is referred to as bumpbot behavior.

Figure 5.2: Schematic for the sensor board


Refer to figure 5.2 in order to understand the following example:
If a button on the sensor board hits a wall, it connects pin 1 of J1 or J2 to ground through a 100 resistor.
J1 and J2 are connected to J1 and J2 of the analog control board. When the button is depressed, the 10F
capacitor of the ramp generator is discharged and the non-inverting input to the comparators are brought to a
ground potential. The comparators signal a low voltage output indicating the non-inverting inputs are lower than
the inverting.
This signal is passed to the motor control board which interprets the low voltage signal (logic 0) as an
indication to reverse the motors.
Once the robot has reversed its direction, and the sensor switch no longer is depressed by the obstacle, the
switch opens again. This allows the 10F capacitor to be charged again by the 100K resistor.
However, the large resistor makes the capacitor charge slowly. The charging of the capacitor through the
resistor forms a voltage ramp with an exponential curve.
Refer to Figures 5.3 and 5.4 for an illustration of the following Ramp Generator behavior:
The slowly changing voltage ramp provides a way to create the turning action. The robot turns by running one
motor in reverse while the other is going forward.
The amount of time spent in turning is determined by the difference in the voltage comparison points of two
comparators and the slope of the ramp. The slope of the ramp is fixed by the 100K resistor and 10F
capacitor, but the comparison points of the comparators is set by two potentiometers.
64

ECE 112 Manual

c
2013
Oregon State University

5.4. OPERATION OF THE ANALOG CONTROL BOARD

Figure 5.4: The exponential curve of the voltage ramp


Figure 5.3: Schematic of Ramp Generator Behavior

See Figure 5.5 for a description of how the ramp and voltage decision points create the turning bumpbot behavior.

Figure 5.5: Voltage ramp creates bumpbot behavior

See Figure 5.6, for a schematic illustration of the left-sensor half.


c
2013
Oregon State University

ECE 112 Manual

65

CHAPTER 5. COMPARATORS

Figure 5.6: Schematic of the left sensor half

5.5

Building the Analog Control Board

This section describes the purpose, build and test processes for the various parts that make up the analog control
board. They are the Voltage Regulator, the Reference Voltage Potentiometers, the Ramp Generator, and the
Comparators and Pull-up Resistors.

5.5.1

Voltage Regulator

Purpose: This block sets the supply voltage for the board at approximately 4.7V.
Build: Build the VCC voltage regulator. Also put in J1, D2, and C4.
Test: Apply an input voltage from the charger board at J1. T11 is the input and should be close to 8V. T12 should be
about 4.7V. Note: No components should be warm.

5.5.2

Reference Voltage Potentiometers

Purpose: Potentiometers allow adjustment of the voltages at T3, T4, T7, and T8 so that the backup and turn times
can be adjusted.
Build and Test: Solder in the potentiometers. Apply voltage to the board again. Adjust each potentiometer and
observe that the voltages change at the respective comparator pin. Initially set T4 and T8 at 2V and T3 and T7 at 3V.

5.5.3

Ramp Generator

Purpose: A ramp generator provides timing for the backup and turn behavior. The capacitor is discharged to ground
when a sensor switch is grounded. After the switch is ungrounded, the voltage will slowly rise as the capacitor is
charged through the 100K resistor connected to the supply voltage. Use a voltmeter to see this ramping voltage.
Build: Solder in the parts for both the ramp generators. C1 and C2 have polarity and therefore, it should not be put
backwards. Align the line on the capacitor (the + terminal) with the + on the silk screen. Also, solder in J2, J3, J4
and J5.
Test: Apply power to the board. Connect the SIG pin of J2 to GND. Note: If T1 and the output pin DIR at connector
66

ECE 112 Manual

c
2013
Oregon State University

5.6. ASSEMBLE THE BUMPBOT


J3 become 0V disconnect SIG and GND. Then, make sure T1 slowly increases to VCC. Check the DIR pin on J3
again. It should read about 3.3V. Perform the same procedure for the other ramp generator.

5.5.4

Comparators and Pull-up Resistors

Purpose: The Comparators compare the voltages at T1, T4, T5, and T8.
The pull-up resistors allow the comparators to signal a logic true or 1 to the motor control board. Without the
resistor, the comparator can only instruct the motors to go backwards.
Build: Solder in the comparator making sure the chip is oriented correctly. The half circle of of the chip should match
the half circle on the board silk screen. Solder in R8 and R9.

5.6

Assemble the Bumpbot

The Bumpbot boards are mounted and wired, and the system is programmed for corresponding movements to the
left and right bumpers.

5.6.1

Mounting and Wiring

To implement the above, follow these steps:


1. Mount all of the boards and connect them together. Put the boards anywhere you would like to, but place the
sensor board in the front of the TekBot, so that it can bump its environment.
2. Assemble the system as shown in Figure 5.7. To connect power to the boards, and signals between the
boards, use pieces of CAT-5 cable available in the kits or at the front of the Lab. (This cable fits nicely into the
female headers).

Figure 5.7: The Complete System


3. The SIG wires connecting the sensor board and the analog control board should connect from the right and
left whisker connectors on the sensor board, to the right and left sensor connectors on the analog control board
respectively. One wire is a ground and the other is the signal wire. As always, be sure that signal connects to
signal, and ground connects to ground.
4. To allow the analog control board to control the motors, the direction (DIR) and enable (EN) signals need to be
connected between the analog board and the motor board. Make sure that the left has been connected to left,
and right to the right as well.
5. The final step is to connect the motors to the motor controller board. (This should already be done from earlier
sections, but if not, do it now.)
c
2013
Oregon State University

ECE 112 Manual

67

CHAPTER 5. COMPARATORS

5.7

Observing the Ramp Generator

The ramp generator uses a simple RC circuit to time how long each tekbot motor will move in reverse. The
comparators compare the voltage from the charging capacitor circuit to a reference voltage controlled by the
potentiometers. Using an oscilloscope you will observe the analog control board behavior.
To implement this exercise, follow these steps:
1. You will need to work in groups of two to observe how the ramp generator works.
2. Begin with all four potentiometeres turned all the way to the right.
3. Power the analog control board in the same way you power the motor control board.
4. Strip both ends of two wires and solder them into T4 and T1.
5. Plug in two oscilloscope probes into channel one and two. Be sure to set the probe setting to the proper value
of 10X.
6. Connect one probe to T4 and the other to T1.
7. Use the skills and knowledge gained from the previous lab about the oscilloscope to capture a waveform that
represents the ramp generator and direction change. Your waveform will look similar to figure 5.8

Figure 5.8: Voltage Ramp Example


8. When you have captured a similar image on your oscilloscope have a T.A. sign off on it.

TA Signature:
(Correct Oscilloscope waveform captured)
68

ECE 112 Manual

c
2013
Oregon State University

5.8. PROGRAMMING

5.8

Programming

In order to make the robot work correctly, tune the reference voltages on the analog board. If the right button is
pushed, the Bumpbot should back up, turn left, and then continue forward. However, if the left button is pushed, the
TekBot should backup, turn right, and then continue forward. See Figure 5.9 for a view of how the finished Bumpbot
looks like.

Figure 5.9: Completed Tekbot

c
2013
Oregon State University

ECE 112 Manual

69

CHAPTER 5. COMPARATORS

5.9

Study Questions

1. This is a troubleshooting question; so, use the block schematic for the analog control board. Heres the
scenario: An eager lab student did not want to test his board periodically as he was building it in phases. He
attempts to test his board at the end of the entire Lab. The power is plugged in and nothing works. After wasting
valuable time by trying to troubleshoot without a schematic, he becomes frustrated. He asks his neighbor or
help. The neighbor doesnt want to waste time, so he starts by making a table of test voltages. See table 5.1

Table 5.1: Test Table


Test Pad

10

11

12

13

Voltage

7.2

What could be wrong? Dont dismiss anything as too simple of a solution, because many problems in electrical
circuits are the simple ones. Describe and justify the steps you would take to find the source of the problem.
Suggest at least three possible causes of the problem and how you would check each of those.

2. Throughout the Lab, you have had some experience with troubleshooting. What are some general strategies
you would find useful for troubleshooting a circuit and when would each of those strategies be most useful?

3. When the robot is first turned on, the wheels are driven backwards. Why does that happen?

70

ECE 112 Manual

c
2013
Oregon State University

5.9. STUDY QUESTIONS

5.9.1

Challenge

1. In this Lab, we have constructed a simple system that uses comparators to compare voltages and makes the
TekBot move. Figure 5.10 shows a block diagram for a photovore controller for your TekBot. This circuit will
cause your TekBot to always steer using light intensity as a guide. Resistors that change their value in
response to light are called photoresistors.

Figure 5.10: Photovore Challenge


To build this circuit, use the comparator datasheet. You will use a LM339 Quad (4) Comparator chip. Part of the
challenge is to decide where to put Output 1 and Output 2. Will they go into the enable or the direction port of
the motor controller? What would be the difference in motor behavior, based on where these were plugged?
Write a summary of what you choose to do, and why you choose to do it.

c
2013
Oregon State University

ECE 112 Manual

71

CHAPTER 5. COMPARATORS
2. The Sensor Board that you have made uses two small buttons to detect objects. These do not work very well if
the object is low to the ground, or if you dont run directly into the object. Create your own whisker extensions
to expand the area of sensing that your robot has. Figure 5.11 shows two types of whisker extensions, but you
may use anything, and may even replace the switches on your TekBot with something different. Grading is
based on your TAs discretion.

Figure 5.11: Possible Extended Sensors


For this post-lab, please go through the steps of brainstorming, and adding requirements
and resources to reduce it down to five possible solutions. Turn in at least one typed paragraph explaining five possible designs. For your requirements/resources, you may not spend
more than $30.

72

ECE 112 Manual

c
2013
Oregon State University

Chapter 6

Appendix A: General Reference Material

73

CHAPTER 6. APPENDIX A: GENERAL REFERENCE MATERIAL

6.1

Digital Multimeter (DMM) Usage

In order to use the Digital Multimeter (DMM), follow these steps:

1. Turn the DMM on. Figure 6.1 shows a view of the DMM with the probes.
2. Plug the black probe into ground or into the common jack. Plug the red probe into the A jack for current
measurement or the V jack for voltage or resistance measurement.(Often times, the red probe will be in the
V jack).
3. Refer to Figure 6.2 shows a schematic for measuring the voltage and resistance.

Figure 6.1: An example DMM with probes

Figure 6.2: Schematic for measuring the voltage and resistance

4. Choose the correct measurement setting, keeping the following in mind:


(a) We will be taking DC measurements exclusively.
(b) There is a continuity-check setting. It will test electrical continuity. To see how this works, set it to the
speaker setting, and touch the two probes together.
(c) The setting reads the value of a resistor, if you are unable to read the color code or the color bands.
5. Take the Measurements.
6. When finished, turn off your DMM to save battery life.

Never probe a circuit for resistance with the circuit energized.

6.2

Schematic Symbols

The table contains some common schematic symbols you might encounter, when examining a schematic.
74

ECE 112 Manual

c
2013
Oregon State University

6.3. RESISTOR COLOR CODE CHART

6.3

Resistor Color Code Chart

The table below will assist you in identifying resistor color codes. Examples:

If a 180 resistor is needed, what are the color bands?

180 = 18 101 = [10 (1) + 1 (8)] 101 = [10 (brown) + 1 (gray)] 10Brown
= Brown Gray Brown = 180

If the bands on the resistor are gold red violet yellow, what is the resistance? First of all the resistor is
backwards. Gold is never the first color band: so, the real order is yellow violet red gold.

[10 (yellow) + 1 (violet)] 10red = [10 (4) + 1 (7)] 102 = 4, 700 = 4.7K
c
2013
Oregon State University

ECE 112 Manual

75

CHAPTER 6. APPENDIX A: GENERAL REFERENCE MATERIAL

6.4

Capacitor Code Chart

The table will assist you in identifying capacitor codes.


Use these units of reference:

1 milli Farad: 103


1 micro Farad: 106
1 nano Farad: 109
1 pico Farad: 1012

Examples:
If the capacitor says 104 on it, do the calculation as shown below:
1microF arad
10 104 = 105 picoF arad 10
6 picoF arad = .1microF arad
If the capacitor says 47 on it, then assume the multiplier is 0. The process is then the same as shown above.
76

ECE 112 Manual

c
2013
Oregon State University

6.4. CAPACITOR CODE CHART

c
2013
Oregon State University

ECE 112 Manual

77

CHAPTER 6. APPENDIX A: GENERAL REFERENCE MATERIAL

78

ECE 112 Manual

c
2013
Oregon State University

Chapter 7

Appendix B: Parts

79

CHAPTER 7. APPENDIX B: PARTS

7.1

Parts List for the Mechanical Base

The table has the list of parts for the mechanical base:

80

ECE 112 Manual

c
2013
Oregon State University

7.2. PARTS LIST FOR THE CHARGER BOARD

7.2

Parts List for the Charger Board

The table has the list of parts for the charger board:

c
2013
Oregon State University

ECE 112 Manual

81

CHAPTER 7. APPENDIX B: PARTS

82

ECE 112 Manual

c
2013
Oregon State University

7.3. PARTS LIST FOR THE SENSOR BOARD

7.3

Parts List for the Sensor Board

The table has the list of parts for the sensor board:

c
2013
Oregon State University

ECE 112 Manual

83

CHAPTER 7. APPENDIX B: PARTS

7.4

Parts List for the Analog Board

The table has the list of parts for the analog board.

84

ECE 112 Manual

c
2013
Oregon State University

7.5. MISCELLANEOUS PARTS

7.5

Miscellaneous Parts

Parts not falling in any of the previous parts lists will appear in the table.

c
2013
Oregon State University

ECE 112 Manual

85

CHAPTER 7. APPENDIX B: PARTS

86

ECE 112 Manual

c
2013
Oregon State University

Chapter 8

Appendix C: Schematics

87

CHAPTER 8. APPENDIX C: SCHEMATICS


This Appendix has the Schematics for the charger board, the sensor board, the motor controller board, and the
analog board.

8.1

Schematic of the Charger Board

This page has the schematic/block diagram of the charger board. (Refer to Figure 8.1).

Figure 8.1: Block Diagram/Schematic of the Charger Board

88

ECE 112 Manual

c
2013
Oregon State University

8.2. SCHEMATIC OF THE SENSOR BOARD

8.2

Schematic of the Sensor Board

This page has the schematic/block diagram of the sensor board. (Refer to Figure 8.2).

Figure 8.2: Schematic of the Sensor Board

c
2013
Oregon State University

ECE 112 Manual

89

CHAPTER 8. APPENDIX C: SCHEMATICS

8.3

Schematic of the Motor Controller Board

This page has the schematic/block diagram of the motor controller board. (Refer to Figure 8.3).

Figure 8.3: Block Diagram/Schematic of the Motor Controller Board

90

ECE 112 Manual

c
2013
Oregon State University

8.4. SCHEMATIC OF THE ANALOG BOARD

8.4

Schematic of the Analog Board

This page has the schematic/block diagram of the analog board. (Refer to Figure 8.4).

Figure 8.4: Block Diagram/Schematic of the Analog

c
2013
Oregon State University

ECE 112 Manual

91

CHAPTER 8. APPENDIX C: SCHEMATICS

92

ECE 112 Manual

c
2013
Oregon State University

Chapter 9

Appendix D: Silk Screens

93

CHAPTER 9. APPENDIX D: SILK SCREENS


This Appendix has the Silk Screen for the charger board, the sensor board, the motor controller board, and the
analog board.

9.1

Silk Screen of the Charger Board

This page has the Silk Screen of the charger board. (Refer to Figure 9.1).

Figure 9.1: Silk Screen of the Charger Board

94

ECE 112 Manual

c
2013
Oregon State University

9.2. SILK SCREEN OF THE SENSOR BOARD

9.2

Silk Screen of the Sensor Board

This page has the Silk Screen of the sensor board. (Refer to Figure 9.2).

Figure 9.2: Silk Screen of the Sensor Board

c
2013
Oregon State University

ECE 112 Manual

95

CHAPTER 9. APPENDIX D: SILK SCREENS

9.3

Silk Screen of the Motor Controller Board

This page has the Silk Screen of the motor controller board. (Refer to Figure 9.3).

Figure 9.3: Silk Screen of the Motor Controller Board

96

ECE 112 Manual

c
2013
Oregon State University

9.4. SILK SCREEN OF THE ANALOG BOARD

9.4

Silk Screen of the Analog Board

This page has the Silk Screen of the analog board. (Refer to Figure 9.4).

Figure 9.4: Silk Screen of the Analog

c
2013
Oregon State University

ECE 112 Manual

97

CHAPTER 9. APPENDIX D: SILK SCREENS

98

ECE 112 Manual

c
2013
Oregon State University

Chapter 10

Appendix E: Suppliers

99

CHAPTER 10. APPENDIX E: SUPPLIERS

10.1

Suppliers

This section has a list of our suppliers:

100

ECE 112 Manual

c
2013
Oregon State University

Você também pode gostar