Download Document

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Electric machine wikipedia , lookup

Switched-mode power supply wikipedia , lookup

History of electric power transmission wikipedia , lookup

Three-phase electric power wikipedia , lookup

Electrification wikipedia , lookup

Alternating current wikipedia , lookup

Mains electricity wikipedia , lookup

Pulse-width modulation wikipedia , lookup

Voltage optimisation wikipedia , lookup

Rectiverter wikipedia , lookup

Electric motor wikipedia , lookup

AC motor wikipedia , lookup

Brushed DC electric motor wikipedia , lookup

Induction motor wikipedia , lookup

Brushless DC electric motor wikipedia , lookup

Variable-frequency drive wikipedia , lookup

Stepper motor wikipedia , lookup

Transcript
3. Mobile Robot Overview
Mobile robots are made up of a number of functional components as
illustrated in the diagram below. These include, a control system,
sensors, a power system, usually some type of communications and a
drive systems for platform movement and object manipulation.
The specific design of these components is affected by the intended use
of the robot. In our case we will be working with a small general-purpose
robot supporting a basic set of operations, which we will modify for
specific applications. One of the first issues to be resolved in the
design/selection of a robot is the choice of platform.
3.1 Platform Configurations
There are a wide variety of mobile robot platform confiurations available,
depending on the intended purpose, functional requirements and cost
limitations. Engineering decisions are also affected by the availability
and current state of the art of various technologies. Scienfiic or technical
breakthroughs in any pertinent area can have a dramatic effect on the
overall design. For example consider the emergence of solar powered
unmanned arial vechcles (UAVs) such as NASA's Helios (part of the
Pathfinder Program) as a result of improvements in the efficiency of
solar-voltaic cell technology.
Tracked
Wheeled
Legged
Winged
The simplest mobile robot platform for smooth terrain is the wheeled
vehicle and the simplest (and most maneuverable) wheeled platform is
the differential-drive. In addition, this configuration expends less energy
for turning than a tracked vechicle.
SPaRC-1
Differential Drive
Pivot Steering - A simple version of pivot steering is shown below. The
red spots indicate fixed pivot points fastened to the platform body or
frame. When the darker gray rod is moved from side to side the wheels
are turned about the fixed pivots.
This steering produces a situation in which one or both of the wheels
must slip against the ground as the platform turns. This is because both
wheels are turned through the same angle but the radius of curvature for
the wheel on the inside of the turn should be less than the radius of
curvature for the outer wheel.
A more sophisticated pivot steering that provides the proper
compenstion for the two wheels is called Ackerman steering. This is
rather complicated to implement and is not typically used on toy cars or
small robot platforms. In any case the rear drive wheels will also have to
slip unless a rear-end differenetial gear is provided.
Servo Steering - A Third alternative for
wheeled platforms is to separate the drive
and steering functions by using a drive
wheel as in pivot steering and a servo
steering mechanism as shown on the right.
In this case, the steering wheel is a caster
whose direction is controlled with a servo.
This servo steering wheel could be placed
in the front of or the back of a threewheeled configuration.
Legged Robots - A more complex but popular means of locomotion is
walking. There are two categories of walking platforms: static walking
and dynamic walking. In static walking the platform is stable at all times.
(That is, the center of gravity is always inside the region defined by the
points of contact with the ground.) In dynamic walking the balance of the
robot depends on the timing and placement of the legs and feet. If the
robot were to stop a some point in the walking it would tip over. (This is
because the center of gravity falls outside the region defined by the
points of contact with the ground). We will limit our designs to static
walking for now.
A typical leg must provide for two different directions of movement. The
leg must be able to lift the foot and it must be able to propel the platform
in some direction. A simple two-servo implementation of a leg is shown
below.
Side View
Top View
A common walking robot design uses six legs and therefore12 servos.
Although there are applications that benefit from insect-like walking
robots, there is an issue of power consuption when using so many
servos. Keep in mind that servos under load consume power even when
they are stationary.
3.2 Drive Motors and Actuators
The choice of drive motors is one of the most important decisions in the
design of a mobile robot. For hobby robots we typically take what we
can get by scavanging motors from surplus equipment such as floppy
drives, computer printers or discarded VCRs. When we use surplus
motors we usually do not have access to the motor specifications so we
must guestimate the torque generated by the motor and its power
requirements. Hopefully we will at least know the voltage required.
There are three common types of motors available: standard DC
motors, servos, and stepper motors.
DC Motors - Small DC motors can be obtained from hobby shops,
scavanged from motorized toys or purchased from surplus electronics
stores. Many of the motors found in discarded computer equipment are
stepper motors. You can distinguish a stepper motor from a regular DC
motor by the number of wires. Stepper motors have between four and
eight wires while DC motor have only two. Also stepper motor shafts do
not turn smoothly but have a "bumpy" feel as they are rotated by hand.
We will discuss stepper motors in detail in a later section.
Assuming you know the proper voltage for your DC motor you can test it
by applying the source voltage to the two wires. Note the direction of
rotation and speed, then reverse the polarity of the applied voltage.
Verify that the motor turns in the opposite direction. Most DC motors
turn much too fast to be useful in robotics applications. You will probably
need to slow down the rate of rotation through a reducing gear box. You
will save much time and trouble by finding DC motors with reducing gear
boxes already attached. You will probably want a shaft rotation rate
between 60 and 180 RPM.
The primary problem to be solved is how to control the motors with a
computer or other digital interface. You cannot simply connect your
motor to the output pins of your processor since most motor voltage and
current requirements exceed the limits of the standard digital output.
One common method for controlling DC motors is through the use of an
H-bridge circuit.
In the circuit shown above, the motor can be powered with either
polarity. Setting one of the control lines to high activates two of the
transistors allowing +V to be applied to one side of the motor while
grounding the other side. The polarity reverses when the other control
line is brought high. The diodes are included to limit any noise spikes
from the motor reaching the processor connected to the control lines. By
circuit design or by careful programming you must be sure not to let both
control lines be set high at the same time.
To make the motor turn more slowly, you can send a pulsed signal to
one of the control lines. The percentage of time that the signal is high
sets the speed of the motor. The greater the percentage of time the
signal is high the faster the speed of the motor.
It is important to realize that you should not attempt to control the speed
of a DC motor by reducing the supply voltage. This will result in a larger
percentage of the power being dissipated as heat in the motor windings.
Servos - Another common drive mechanism for robots is the servo motor
or just servo. This device is made up of a small electric motor, gear box,
and associated circuitry to control the motor. A servo has three lines:
power, ground and signal. Some external source is used to apply a
PWM (pulse width modulated) voltage to the signal line.
To control the servo a square
wave pulse must be applied to the
signal line at least every 20 mS
(up to 5mS period is OK). The
width of the pulse should be
between 1.0 mS and 2.0 mS.
The output shaft of the servo
(usually connected to a lever arm
or wheel) will move to some
position between -90 degrees and
+90 degrees from the center
point. As long as a particular
PWM signal is applied the servo
will hold at a specific location.
Servos can be hacked to turn continuously in either direction. The
necessary modifications vary with servo manufacturer and some servos
are much easier to hack than others. You should understand that
hacking a servo precludes your returning it in case it quits working. In
addition, servos (especially inexpensive ones) are not designed for long
term continuous use.
Many use plastic gear boxes with no bearings and the electronics may
overheat if run for long periods. Servos can be upgraded with bearing
kits but the cost quickly exceeds that of standard DC motors with gear
boxes and the necessary circuitry (H-bridge) for driving them.
Stepper Motors - Stepper motors can be found in computer floppy disks
(the seek head motor) and computer printers. These motors differ from
regular motors in the manner in which they are powered. In order to
make a stepper motor rotate you must apply a sequence of volatages to
its input coils. A bipolar stepper motor has two drive coils and therefore
four wires.
The diagram below shows the order in which the supply voltage must be
applied to create rotation. For clockwise rotation you must apply the
voltage levels (white low, blue high) in the order phase 1,2,3,4. For
counterclockwise rotation apply the voltages in reverse order.
Most of the stepper motors found in surplus computer equipment are
unipolar stepper motors. Unipolar stepper motors have four drive coils
(essentially two bipolar stepper motors combined).
Sometimes the common wires connected to the supply +V are brought
out of the motor case as separate wires. In other designs they come out
in common pairs. For this reason unipolar steper motors can have
between five and eight wires.
Although the process is somewhat complicated you can determine which
wires are which by measuring the resistance between pair of wires and
applying the supply voltage to test the relative positions of the drive
shaft. Once the coils have been identified you will be able to drive the
stepper motor by applying the supply voltage as shown in the diagram
below.
As shown in the circuit above we can control the application of the
supply voltage using TTL compatible signals at Phase 1 through Phase
4 control lines. The NPN transistors (2N3055) can be used to drive the
stepper motors used in floppy disks. There is a limit to the speed of a
stepper motor. You will need to experiment to find this limit. An
interesting difference between DC motors and stepper motors is that the
torque of a stepper motor is highest at slower speeds while the torque of
DC motors increases with speed.
3.3 Control System
The computational aspects of robotics are emphasized in this course.
For this reason we have selected a microprocessor that provides a
memory space large enough to hold significant programs while
supporting a large number of I/O control lines. The BasicX-24 includes
32K Bytes of memory for BASIC source code while providing 16 I/O
lines. The BasicX-24 also supports a serial communications port
(COM1) with speeds from 2400 baud to 460.8K baud and 300 baud to
19,200 baud on any of its 16 I/O pins (COM3).
The processor includes floating point math, an on-chip clock/calendar,
and on-chip multitasking. The developer board provided in the BasicX24 Kit provides connections and cabling for serial or parallel PC
interfacing. The EEPROM is programmed/reprogrammed directly from a
PC without the need for an addtional PROM Programmer.
Introduction to BasicX-24 - In order to become familiar with the BasicX24 processor and its version of the BASIC language we will write and
complile a few simple programs on the host PC, then transfer and run
them on the BX-24. Assuming you are starting with the BX-24 Kit you
will first need to install the BX-24 IDE on a host PC. Please refer to the
BX-24 Application Note titled, Getting Started for more details.
In order to write BX-24 programs you will need a PC with the following
characteristics and supporting OS, Although BasicX is a stand-alone
processor, software development requires a PC that meets the following
minimum requirements:
1) MS Windows 95/98/NT
2) Pentium or higher processor
3) 16MB RAM, 32MB recommended
4) 10MB free hard disk space
5) CD-ROM drive
6) Available COM port (You must connect to COM 2 on Gateway
Machines, since their COM 1 port is too noisy).
As stated in the Application Note the BX-24 defaults to COM 1. If you
are using a Gateway machine as your host PC you will need to select
another COM port such as COM 2 and hope for the best. For several
years, Gateway has produced PCs with COM ports so noisy as to be
essentially useless. Their official response is that the problem that the
peripheral device must be causing the problem, however serial port
devices that work fine on every other type of PC do not work on
Gateways. The COM 2 port is marginally usable on the Gateways we
have tested with the BX-24 so good luck. The steps for connecting the
BX-24 to the PC are listed in the Application Note as,
1) Connect DB-9 cable to unused PC COM port
2) Connect DB-9 cable to BX-24 COM port
3) Connect the wall transformer to the BX-24
4) The factory-loaded program starts blinking LEDs on BX-24
Please note that the factory-load program may no longer be in the BX-24
memory so step 4 may vary according to what has been previously
loaded on your BX-24.
This step installs the BasicX Downloader and Editor/Compiler on your
computer. It is important to close all open programs before running
Setup. If sharing violations still occur, press Ignore and continue Setup.
Setup will prompt you to replace system files before continuing the
installation. Examples assume D: as CD-ROM drive -- substitute
appropriate drive letter for your system.
1) Close all running Windows programs
2) Remove any previous BasicX Installations (Start, Settings, Control
Panel, Add/Remove Programs, BasicX, Add/Remove)
3) Insert BasicX CD into CD-ROM Drive (D: for example)
4) BasicX CD_SETUP screen automatically appears if autorun enabled
If not, Run CD_SETUP.EXE: Start, Run, D:\CD_SETUP.EXE, OK
5) Choose "Install BasicX Development Software" from menu
6) Choose "Install BasicX"
7) Follow prompts for Installing BasicX to computer
a) If prompted, replace some system files and restart
Windows After restart, proceed from Step 1 again
b) If prompted, keep newer files and replace older files
c) If prompted, Ignore sharing violations and continue
setup
Hello World Program - HelloWorld is a simple BasicX program that uses
built-in queue and serial port functions to write to the BasicX Status
Window. The program first opens two queues to be used as data buffers
for the serial port. Then it opens the port and attaches the two queues to
the port. Finally, it enters a loop in which the string "Hello, world" is
transmitted repeatedly, followed by carriage return/linefeed. A call to the
built-in Delay procedure inserts a one second delay after each string.
Follow the steps below as provided by the Application Note to build and
implement your first BX-24 BASIC program:
1) Start BasicX Program: Start, Programs, BasicX, BasicX Express...
2) Options menu -- verify that BX-24 is checked.
3) Download Port -- open the COM port.
4) Monitor Port -- open the same port as in step (3) above.
5) Editor button -- press.
6) The Open - Project File dialog box will pop up. Type HelloWorld as a
filename. Program will ask if you want to create a new file -- hit Yes.
This boilerplate code is automatically created in the editor window:
Sub Main()
End Sub
7) Project - Chip menu. Verify all boxes in the "IN" columns are checked
(this means all input pins are initialized as input-tristate). Click on OK.
8) Enter the following code into the Edit Window (or cut and paste):
Sub Main()
Do
Debug.Print "Hello, world"
Call Delay(1.0)
Loop
End Sub
9) Hit F5 to compile and run. Say "Yes" when compiler asks to save
changes.
10) "Hello, world" will print on screen until stopped by reset button
a) If not working, verify connections and port addresses and retry.
b) If still not working, supply 5 VDC to 12 VDC power directly to
BasicX power terminals and retry.
c) Try the Download Port - Rescue menu choice, then download
the program again.
The output of the BX-24 statement Debug.Print "Hello, world" is sent
back to the host PC and will be displayed in the IDE window. Once you
have successfully executed this HelloWorld program, write another
program of your own and test it on the BX-24.
Once you have become familiar with the BX-24 IDE begin reviewing the
BX-24 Language Reference Manual and the System Library to learn the
features of the BX-24 BASIC langauge.