1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Servo magazine 10 2008

84 411 1
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Digital RF Datalink
Trường học SparkFun Electronics
Chuyên ngành Robotics
Thể loại Magazine Article
Năm xuất bản 2008
Thành phố Corona
Định dạng
Số trang 84
Dung lượng 12,63 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Tạp chí Servo

Trang 2

Let your geek shine.Meet Pete Lewis, lead vocalist for the band Storytyme Pete recently created the RS1000,

a new personal monitor system for performing musicians It was SparkFun’s tutorials, products and PCB service that enabled him to take his idea

to market in less than a year

The tools are out there Find the resources you need to let your geek shine too

Sharing Ingenuity

W W W S P A R K F U N C O M

Trang 3

email: sales@crustcrawler.com

Trang 4

Savage — Part 1

Combat Robot Drive Systems

SERVO Magazine (ISSN 1546-0592/CDN Pub Agree#40702530) is published

monthly for $24.95 per year by T & L Publications, Inc., 430 Princeland Court, Corona,

CA 92879 PERIODICALS POSTAGE PAID AT CORONA, CA AND AT

ADDITION-AL ENTRY MAILING OFFICES POSTMASTER: Send address changes to SERVO

Trang 5

Propeller: Part 2

by David Carrier

Controlling servos.

Runnin’ in Your Robot

True Schmitt Trigger

PAGE 56

Features & Projects

Due to extraterrestrial activity, the “Build the Ultimate

Trang 6

430 Princeland Ct., Corona, CA 92879-1300

(951) 371-8497

FAX (951) 371-3052 Webstore Only 1-800-783-4624

www.servomagazine.com

Subscriptions

Toll Free 1-877-525-2539 Outside US 1-818-487-4545

P.O Box 15277, N Hollywood, CA 91615

PUBLISHER

Larry Lemieux

publisher@servomagazine.com ASSOCIATE PUBLISHER/

Dan Danknick

dan@teamdelta.com CONTRIBUTING EDITORS

Jeff Eckert Tom Carroll Gordon McComb David Geer Dennis Clark R Steven Rainwater Fred Eady Kevin Berry Andrew Alter Dennis Bogden Sam Coniglio Margaret Toebes Steven Schmitt David Carrier James Baker Mike Jeffries Robert Wilburn Paul Reese William Smith Camp Peavy

CIRCULATION DIRECTOR

Tracy Kerley

subscribe@servomagazine.com MARKETING COORDINATOR

WEBSTORE

Brian Kirkpatrick

sales@servomagazine.com WEB CONTENT

Michael Kaudze

website@servomagazine.com PRODUCTION/GRAPHICS

Shannon Lemieux Joe Keungmanivong

ADMINISTRATIVE ASSISTANT

Debbie Stauffacher Copyright 2008 by

T & L Publications, Inc.

All Rights Reserved

All advertising is subject to publisher’s approval.

We are not responsible for mistakes, misprints,

or typographical errors SERVO Magazine assumes

no responsibility for the availability or condition of advertised items or for the honesty of the advertiser The publisher makes no claims for the

legality of any item advertised in SERVO.This is the

sole responsibility of the advertiser.Advertisers and their agencies agree to indemnify and protect the publisher from any and all claims, action, or expense

arising from advertising placed in SERVO Please

Size Matters

When Parallax announced their

new 12 VDC motors with

mount, wheels, and position

controller, I couldn’t resist picking up

a kit ($280) Finally, a ‘standard’ drive

system designed for medium-sized

mobile robots from the company

behind the BASIC Stamp and the

Boe-Bot

The verdict? In short, the kit is

first-class Not only are the aluminum

components beautifully machined

and professionally finished, but the

two 12 VDC motors are powerful

and the gearing is aggressive —

expect about 150 RPM at 1.5A and

no load Furthermore, assembly

instructions and example Stamp

source code are straightforward

and easy to follow It took me

all of 20 minutes for basic

assembly, including mounting

the quadrature encoder

assembly and inflating the

pneumatic tires

I paired my motor kit with a

pair of the recommended HB-25

controllers ($50 each) from

Parallax The controllers are

hefty, with built-in heatsinks andcooling fans, and at less than threeounces, add little to the overallweight of about six pounds for thepair of motors

Is the kit perfect for everyrobotics application? Of course not —

no general-purpose kit could be Forexample, the pneumatic 6” tires;

while well executed, are overkill for

my needs (an indoor balancing botplatform) given their relatively smalldiameter and inherent stiffness Ireplaced the inner tubes with zeromaintenance foam tubing It’s a trick

I picked up from working with Traxxwheels Want a stiffer, moresupportive ride? Simply use denserfoam inserts in the tires

Another consideration is groundclearance for the motor and motormount There’s only about an inch ofclearance from the rectangular motormount to the contact surface Thisshouldn’t be a problem if your robot

is going to be working on pavement,carpet, or even a mowed lawn

However, if you’re thinking ofrunning your robot down gravelroads and rough terrain, you mightwant to consider protecting the

Mind / Iron

by Bryan Bergeron, Editor Œ

Trang 7

motors from accidental impact with a sheet of plastic or

even a layer of electrical tape

If you’re thinking of moving from a Boe-Bot or other

small mobile robot platform to something based on the

Parallax wheel kit, take a moment to consider what’s

involved You’re not simply replacing small, inexpensive,

lightweight servos with a heftier, more powerful (and

more expensive) drive system; you’ll have to upgrade your

entire development infrastructure

For starters, you’ll have to stock up on heavy duty

aluminum stock — sheet metal, brackets, and fasteners I’m

not talking about the solid chassis designs used to create

heavy-duty battle bots, but stock that’s significantly more

substantial than the easily workable aluminum and plastic

used with a typical carpet roamer

Then there’s the issue of power Forget about using a

AA battery pack Instead, think 12V gell cell or — better

yet — a pair of six-cell, 7.2V NiMh battery packs sold for

R/C vehicles I’ve had great results with the Dura Trax

six-cell, 7.2V, 4.2 Ah pack ($43 each) available from Tower

Hobbies (www.towerhobbies.com) While you’re on the

Tower Hobbies website, pick up a few sets of two-pin Ultra

Plugs by W.S Deans ($3/set) Try these quick connect, low

resistance plugs for your battery connections and you’ll

never want to use a Molex connector again

Because of the mixed voltages required — 12 VDC for

the Parallax motors or HB-25 motor controllers and 5V/3V

for the microcontroller and sensors — you should consider

a high-efficiency DC-DC converter My favorite is the programmable, three-channel RGi Power Commander (($200), available from CrustCrawler

(www.crustcrawler.com) I use it to convert the 14.4

VDC from a pair of NiMh battery packs to 12V, 5V, and3V, to power the motors, sensors, and Parallax Propellerchip, respectively Alternatively, you can use separatebattery packs and dedicated voltage regulators for eachvoltage — but this wouldn’t be my first choice because ofthe additional weight and space requirements

You’ll also have to consider your tools As notedabove, you won’t be working exclusively with easilybendable aluminum, but you’ll have to learn to handleheavy-duty stock And this means you’ll probably have toupgrade to heavy-duty tools — no more bending thealuminum chassis with needle-nose pliers Think bench vise and rubber hammer

Given the added expense of a medium-sized robotover something that can fit in your hand, why make themove? For one, you can create something practical — arobot to fetch the paper, move a tray of food from oneroom to another, or bring your medicines when they’represcribed, for example You can also drop a laptop oreven a computer motherboard on a medium-sized platformand have carrying capacity to spare If you do decide tomake the move — with or without the Parallax motors —drop me a line and a photo to share with your fellowreaders SV

ISP programming connector push-on/push-off

power button

reset button

piezo buzzer

30:1 micro metal gearmotors

user pushbuttons

removable 8x2 character LCD

battery charger connector

optional power LED

5 reflectance sensors on underside

4 AAA batteries (not included)

* High-traction silicone tires

* Speeds exceeding 3 ft/sec using innovative constant- voltage motor supply

robot diameter is 3π cm (~3.7 inches)

Item #975

$99.95

The Pololu 3pi robot is a high-performance, compact

mobile platform featuring:

* Two metal gearmotors

* Five reflectance sensors

* 8×2 character LCD

* Three user pushbuttons

* Buzzer and LEDs

All peripherals are connected to an ATmega168

microcontroller running at 20 MHz, with free C-programming

tools, libraries, and support for the Arduino environment.

Trang 8

Fecundity Begets Rotundity

If you tip over the average robot,

all it can do is thrash around helplessly

until someone picks it up But being

round and without external appendages,

the Groundbot™ from Rotundus

(www.rotundus.se) is always upright.

It also can move through mud, snow,

and sand without getting stuck, and,

being hermetically sealed, is pretty

much impervious to environmental

threats It’s also tough enough to

survive drops of up to 10 ft (3 m)

Originally designed to explore the

surface of Mercury, Groundbot has

been modified for terrestrial chores

such as large-area patrol, explosive

gas monitoring, and remote

inspection It can be fitted with up

to four cameras (up to 360° field of

vision), various sensors, night-vision

systems, microphones, and speakers

Probably the most interesting

feature is the drive mechanism, which

basically relies on gravity A controlled

pendulum is held close to the ground

when the bot is motionless By lifting

the pendulum, it can be made to roll

in any direction This produces speeds

of up to 6 mph (10 kph) and the

ability to handle inclines up to 20°

In case you’re interested in the

details, Groundbot is 2 ft (0.6 m) in

diameter, weighs 55 lb (25 kg), and

normally runs six to eight hours on a

charge Its operating temperaturerange is -22° to 104°F (-30° to 40°C)

Bot Can Toot Your Flute

Proving that no idea is too silly toendure if it draws government fund-ing, the Anthromorphic Flutist Robot,created by Atsuo Takanishi at Japan’s

Waseda University (www.waseda.jp),

is now in its fourth incarnation and18th year of existence Model WF-4RIV(Waseda Flutist no 4 Refined IV), features 41 degrees of freedom thathave “enhanced its performance withmore natural notes and smoother transitions between notes.” Specifically,the lips and tonguing mechanismshave been redesigned to be more likethe corresponding human organs Oh,sure, there are the usual academicrationalizations: “Clarifying thehuman motor control while playingthe flute from an engineering point

of view Enabling the tion with humans at the emotionallevel of perception Proposing novelapplications of humanoid robots ”

communica-and so on But imagine spending 18years of your life on this thing For a

demonstration, see www.youtube.

visit www.asapackermansion.com/

orchestrion.html.

Saved by the Bear

At the other end of the utilityspectrum is the Battlefield Extraction-Assist Robot (BEAR), developed by

Vecna Technologies (www.vecna.com),

a self-funded company created in

1998 and operated by alumni fromMIT, Harvard, Stanford, Yale,Princeton, Berkeley, CMU, and otherassorted institutions

Still in the prototype stage, BEAR

is envisioned as a marriage of threeelements: a powerful hydraulic upperbody, an agile mobility platform withindependent sets of tracked “legs,” and

The Waseda Flutist No 4 vs the Welte Orchestrion.

by Jeff Eckert

The Groundbot mobile robot,

revamped for security duties.

Photo courtesy of Rotundus.

Trang 9

“dynamic balancing behavior” (DBB).

DBB is how the robot hopes to balance

itself on the balls of its “ankles.” In

fact, the production model should be

able to remain upright whether

bal-ancing on its ankles, knees, or hips

It has already demonstrated the

ability to pick up a realistically weighted

human dummy and carry it around for

50 minutes without a break According

to Vecna, the purpose of the bear head

is to comfort soldiers who might be

put off by the otherwise “grotesque”

appearance of the machine

New Robotics Conference

If you’re working on robotics at

the design level, you may be interested

in the upcoming IEEE InternationalConference on Technologies for PracticalRobot Applications (TePRA) It’s a newconference “aimed at catalyzing thedevelopment of enabling technologiesand encouraging their adoption by robotdesigners.” It’s intended to be a crossbetween a dry academic conferenceand an industrial trade show, so youget an emphasis on practicalapplications coupled with technicalpresentations aimed at future applications The stated goals are

“to expose robot designers to newenabling tools, techniques, and technologies” and “to expose tool,technique, and technology developers

to the needs of robot designers.”

The event is scheduled forNovember 10th and 11th at theHoliday Inn Select Hotel, Woburn,

MA For details, visit www.ieee

robot-tepra.org.

Dragonfly V 3

In July, the Delft University of

Technology (www.tudelft.nl)

intro-duced the third version of its artificialdragonfly, the DelFly Micro micro airvehicle (MAV) Weighing only 3 g and

with a wingspan of only 10 cm, itflies by flapping its wings like aninsect The remote-controlled device isintended to be used someday forobservation flights in dangerous ordifficult to reach areas, and it alreadycan be equipped with a tiny 0.5 gcamera that transmits TV-qualityimages to a ground station Giventhat it can fly continuously for onlyabout 3 min (at 5 m/s), it obviouslyisn’t ready for commercial production.But Micro is just a stepping stone tothe planned DelFly Nano (5 cm, 1 g),which will be able to move independ-ently using image recognition software, hover like a hummingbird,and even fly backwards SV

R o b y t e s

Vecna’s BEAR robot as employed on the

battlefield Photo courtesy of US Army. Photo courtesy of Delft U. The DelFly Micro MAV.

Heavy Metal Robot Kit

Announcing

the Gears

Designed for Students and Professionals

LHeavy Metal is engineered for rigors of daily use in classrooms,

summer camps, workshops, labs even combat robots!

L Assembles quickly using fasteners of same size/pitch and

threaded inserts 10" wheel base, heavy gauge aluminum,

4-wheel drive, 3" rubber wheels, 3/8" axles, flanged

bronze bearings, #25 pitch steel chain and sprockets

All drive components are keyed and broached.

L Competition all-metal gearhead motors, gearbox

rated at 500 oz-in of continuous torque Heavy Metal

accepts off-the-shelf engineering parts, plus

components and control systems from GEARS IDS,

FIRST* and VEX Robotics* kits.

Contact Mark Newby mnewby@gearseds.com



Lb for Lb the World's Toughest Robot Chassis

Supports 200 lbs of standing weight!

Heavy Metal 1 Kit includes chassis, motors, drive system, and wheels for $499.00.

Trang 10

You’re No 1 Really!

Ian Ingram, BigBot curator and

creator of the “You’re No 1” robotic

foam hand and finger interpretation

atop the Andy Warhol Museum spoke

about the BigBots, beginning with his

own work (at my request)

The nearly seven yards of

Pittsburgh black and yellow foam

hand and index finger spread the love

by reaching out to visitors to say they

were no 1 The hand moved,

posi-tioned itself, and pointed at various

visitor outposts miles away and

throughout the city using dual-axis

hydraulics One axis was a hydraulic

motor and one was a hydraulic actuator

The hydraulics gave the hand

two degrees of freedom (DOF) of

movement The first DOF held thehand straight up and twisted itaround while the second moved itdownward to point it at the outposts

or to wave at people All the actionwas automated by a small microcon-troller, though the original plan was tohave kiosks at the outposts withremote triggers to activate the handand point it in the specific direction ofthe kiosk that triggered the response

The robotic hand made use ofsensing and a limiting switch — agross encoder — which told the robot when to stop and start its movements The hand was fitted with a camera that lined up in varyingpositions equal to a straight line to thedifferent outposts

The PIC microcontroller was

brought to life using software created

in C programming The software looksfor limit switch hits, making plans for movement between where thehand is and where it needs to go toperform the pointing and waving,according to Ingram

The robot uses a motor to pumpfluid to create pressure to activate and manipulate the hydraulics Thehydraulic valves use solenoids and arepushed by external signals from themicrocontroller The structure of thehand is steel weldments withpolyurethane foam similar to thehands that people take to sportsgames

Semi-autonomous Percussive Devices Communicate Like Crickets

The Crickets installation uses anumber of interconnected roboticsculptures to imitate the action andreaction of group communicationamong packs of animals such as dogs

or insects The robots are equippedwith wooden knockers controlled bysolenoids to tap out their noises

Contact the author at geercom@alltel.net

by David Geer

Robot250 Features BigBots

Robotic Artwork that Interacts and Responds

Robot250 is a city-wide extravaganza of large scale interactive robot art projects, workshops, festivities, events, and film held July 11-27 in Pittsburgh, PA Sponsored by Carnegie Mellon University, the University of Pittsburgh, and a number of local community groups like the Heinz Endowments, the program features BigBots interactive robot displays with artistic themes.

The “You’re No 1” BigBots robotic installation by Ian Ingram

is a 20-foot tall robotic black and yellow foam hand and finger like the ones worn by fans of Pittsburgh’s most famous sports team The maneuvering hydraulic hand appeared on the roof of the Andy Warhol Museum in Pittsburgh as part of the Robot250 Festival, which ran July 11-27, 2008 Ingram, BigBot curator, senior research associate, and artist-in-residence

at Carnegie Mellon University, built the big hand, which pointed

Trang 11

Connected by thin wires,

each robot communicates to

its closest neighbor whether it

is silent or drumming up a

storm So, throughout the

group the robots set each

other off until the whole

colony is chirping away or they

turn each other off until they

are all quiet

Each cricket is controlled by a

BASIC Stamp microcontroller and has

its own unique sound Software

programming sets the action and

reaction in motion The programming

uses a specific set of rules called “The

Game of Life” that says when a robot

starts knocking, the signal to its

neighbor is to start knocking, but

when all robots are knocking, one

robot must become silent and then

the others react in kind one by one

until all are silent

Green Roof Roller

Coaster

Roof top plants and gardening

generally serve the building and

environment by providing an added

layer of insulation or contributing

oxygen Serving the plants themselves

is a matter left unaccounted for,

until now

The idea behind the Green Roof

Roller Coaster is to set the plants on a

continual ride up, around,

and down for their own

stimulation and

amuse-ment In an attempt to

measure their pleasure,

the installation uses

sensors near the plants

to gauge humidity, CO2,

vibration, and leaf

conduc-tance While these sensors

interpret the health of the small trees’

environment, this is only loosely andperhaps humorously translated to thedegree of entertainment the plantsfind from their constant motion

The Look-See Tree

A mobile installation that lookslike a fallen tree houses five groups ofvisible robotic animals that move andinteract with people as they sensethem coming near The robots areelectrically powered and animatedusing servo motors They are connect-

ed via frameworks of gears and linkage systems and are powered by

a hand-cranked electric generator

One robot simulates a fox thatpaws at the ground Another group

of robots are birds whose chirpingresembles cell phones ringing or caralarms sounding off Still anothergroup are animals collecting garbagefrom around the city to construct their nests

The Reach Robot Sculpture

The Reach robot senses people’smovements and gestures throughout

GEERHEAD

The “Green Roof Roller Coaster” BigBots installation is a roller coaster that takes a variety of grasses and other plants for a wild ride above the Children’s Museum

of Pittsburgh The installation uses

vibration, and leaf conductance in an attempt to determine how the plants respond to riding on a roller coaster.

These robotic wood blocks

called “Crickets” tap with

wooden knockers in response

to neighboring bots that are

doing likewise.

The “Look-See Tree” is a

mobile tree sculpture

haven for robotic animals

The “Reach” robotic installation in the PPG Place plaza interprets pedestrian movement with a musical response The creation of artists Grisha Coleman and Frank Broz, Reach consists of strands of fiberglass that create a web across the plaza, a plane in which a LIDAR (LIght Detection And Ranging) system senses movement and triggers musical compositions from famed area African

American Jazz composers.

Trang 12

the PPG Place plaza using two LIDAR

(LIght Detection And Ranging)

technology systems that scan and

find ranges or distances between the

place of emission of laser light and

the position of the person sweeping

through

One system aims its lasers across

the whole plaza and one scans down

from up high, creating a plane they

scan across to determine distance andmovement “It tracks objects (people)

as they move through that plane,”

says Ingram

The lasers determine people’spositions relative to strands of fiber-glass webbing strewn in criss crossfashion across the plaza and 10 feetabove it People who may be

“reaching” toward the strands to

stroke them as if they were strings on

an instrument will note an audibleresponse

When people’s positions relative

to the strings are tracked andcaptured by the lasers and pressuresensors, this sets off musicalcompositions reminiscent of famedPittsburgh area composers,particularly African American Jazzmusicians

While the installation and its purpose may be confusing to some,others will realize its purpose as theiractions set off the music Patrons maynot only start the music with theirgesturing, but also “conduct” themusic by interacting repeatedly with the webbing, and so with thelaser field

People in different locations in theplaza will activate different musicaleffects and interludes

Conclusion

Robots 250 and the BigBotsinstallations stir the curious soul toinvestigate It’s amazing how roboticshave become so much a part of ourlives and how closely they intertwinethemselves with the most expressive

of art forms It is interesting to seethe skill level in robotics assumed bythose whose primary endeavor ofstudy is the arts SV

Trang 13

Q.(In this case, not so much a question, but a

request It was worded so well and completely

I felt that it would be disingenuous to simply

paraphrase, so I’ll quote and add comments later I believe

in giving credit where credit is due.)

I enjoyed your column in the August issue of SERVO I

really like the AVR microcontrollers and the gcc-avr compiler

I wish you would mention a readily available and really

pretty simple IDE for the Atmel — Arduino They’re at

http://arduino.cc/.

I’ve used this environment in several Introductory

Programming classes and it’s been a big hit It meets

several of the criteria that your questioner brought up and

it has some cool features that, to me, contrast favorably

with the complexity of Eclipse

1) The Arduino software Integrated Development

Environment is portable, and is available for Mac, Linux,

and Win32 Basically, it’s a small Java application that

allows editing and compiling C/C++ programs and that

launches gcc-avr in the background to do the actual

cross-compilation

2) It’s simple — and while that means putting up with

some limitations, such as no real debugging — a lack of

complexity is also a big plus for beginners Source code files

are easily assembled into “sketches,” which are held in

folders on your system The look is very simple and clean,

with no makefiles or projects needed, and without the

cascade of panes, options, menus, and buttons that are an

unfortunate side effect of Eclipse’s power

3) There’s a nice library built in It has functions for easy

digital and analog I/O, along with most of the standard

C library It’s all documented on the site

4) You don’t need a programmer because it can directly

pre-installed So when you press the appropriate button inthe Arduino IDE, a serial or USB to serial cable carries thegenerated code into the chip Then you just press reset and

go Very easy, and this is a feature I appreciate as someonewho works a lot with beginning programming students

5) A number of inexpensive boards are available Some

examples can be found at http://moderndevice.com/ and http://wulfden.org/TheShoppe.shtml.

6) There’s a ton of software and hardware already available

for the basic hardware As an example, www.freeduino.

org/ lists hundreds of projects and reusable hardware and

software ideas

Anyway, sorry for the long mail, and keep up the goodwork, I enjoy your column

— Jerry Reed Adjunct Professor of Computer Programming and Applications, Valencia Community College

A.Thanks Jerry for the kudos and the lead I had heard

of Arduino but thought of it (initially) as only anotherinterpreter chip for a token-based compiler Little did

I realize just how WRONG I was! The Arduino is an opensource language built on top of C++ that simplifies the task

of writing code for an embedded processor The Arduinoproject abstracts the embedded processor to make it ahardware object that can be run on its own or interfaced

to the computer to talk to other programs The obviouscomputer interface is the Processing language upon whichthe Arduino language is built This hardware-oriented language is called Wiring; it simplifies many of the tasksthat a beginner would like to do with an embedded processor Of course, this act of simplifying that programming means that some of the capability of the

Tap into the sum of all human knowledge and get your questions answered here! From software algorithms to material selection, Mr Roboto strives to meet you where you are — and what more would you expect from a complex service droid?

Trang 14

just looking for learning embedded programming this is a

VERY painless way to learn Arduino boards (or other

independent offshoots) are fairly cheap and capable, so the

introductory price is also low Because Arduino is open

sourced, you aren’t locked into anyone’s boards at all Part

of the Wiring environment’s IDE includes the ability to turn

any ATMEGA8 or ATMEGA168 into an Arduino target; as

long as you have a programmer and downloader software

that can directly program the ATMEGA part After you

have the bootloader installed, all you need is a serial port

connection (Bluetooth, ZigBee, or any other wireless

connection will work, as well!) and you’re off and running

The Arduino site mentioned above is a good start

to learn this environment — which is Java basedand runs on any platform that has Java installed.There is even a little interface driver/programnamed serproxy that comes with the install onthe Mac OS X operating system to simplify theinterface to another computer program to talk tothe Arduino board over a serial port For moreinformation on the Processing language and

Wiring language, see the links http://processing

.org/ and http://wiring.org.co/ I’m going to

be looking into these resources in the future!

Q.I have inherited a pile of parts Among

these are five pairs of ultrasonic sensors

At least, that is what I think they are.One is marked on the back with a 40R and theother with a T I am assuming these are transmitters(T) and receivers (R) There was a slip of paper

in the container with 40TR12B written on it

I notice that ultrasonics are usually purchased

on circuit boards Can you help me with a circuit design andsome software tips for making these work? Thanks

— Anonymous

A.The ultrasonic transducers that you have are from

Jameco, part number 139492 They are 40 kHz ducers which means that they resonate at 40 kHz,and require a 40 kHz signal to make them work There aremany, MANY sites on the Internet that detail various folks’circuits to drive these devices Here are a couple that I like

trans-The one shown in Figure 1 is located at www.e-arsenal.

net/robotics/sonar.html and seems a custom fit to your

transducers It uses aMAX232 serial portdriver to deliver a highervoltage to the transducer

to increase the power

of the output signal and a common op-amp

to sense the returningecho This circuit, however, requires thatyou send a 40 kHz signal to the circuit; typically you would use

a PWM output to dothis and wait for areturn echo on the pongline This circuit detailsusing a PIC16F628 tohandle all of the SONARdetails and uses a similar but simpler circuit to send and

Figure 2 A PIC controlled SONAR circuit Used with permission by GenerExe IT.

Figure 1 SONAR circuit 1.

Trang 15

design comes from application note AN101 on the www.

generexe.com/id129.htm site and includes a very good

description of how to write the code that gets the range

data from a SONAR module You can use their tools (they

have a free download trial) and their PIC compiler IDE is

shareware, free for personal use; or get your hints from

the state machine graphic in the app note document

The key to getting a good SONAR reading — which

comes up again and again in these discussions — is to wait

until the transmitter stops sending pulses and stops ringing,

which the transducer will for some

certain period of time after the

transmission signal has stopped

being sent to the transducer If

you don’t have an oscilloscope

to see when the transducer has

stopped ringing, then you will have

to experiment with your read delay

until you get correct data back

There are lots of examples on

the web of SONAR circuits, and

some of them are really simple

Experiment and have fun!

Q.I would like to control an

H-bridge using the PWM

signal from an R/C receiver

Can you give me any info about this?

— Anonymous

A.The R/C receiver used in

radio controlled aircraft, cars,

and such is not really a PWM

signal since the duty cycle of the

signal isn’t important; the pulse

width is, so it is more of a pulse

width encoded signal Regardless,

each channel of the receiver will

output a pulse of between (about)

1 ms and 2 ms every 20 ms You

can’t use this to directly control your

H-bridge, but you can use the width

to determine your H-bridge PWM

percentage with a little math

The 1.5 ms spot is the neutral

or motor off position typically if

you have both forward and reverse

directions on your motor You can

choose if less than 1.5 ms is forward

or backwards You would then read

the pulse width and convert that

width to a (let’s say) plus or minus

number from 0 to 255 Then you

would feed this value to your

H-bridge driver code to set the PWM

Listing 1, I used a PIC18F252 processor to read two R/Cchannels and convert them into direction and speed values fortwo motors I used “tank” steering so that one channel controlled one motor and the other channel controlled the second motor Rather than use the Input Capture hardware —which I didn’t have available to me — I used a 10 μs interrupt

to look at the signal lines and record the most recent R/Cchannel pulse width Then, a little math was done to convert this value to a direction and PWM speed value foreach motor This 10 μs interrupt gave me a resolution of

void ISR_High() /*

The generic high priority fast interrupt, first we have to set registers to get high priority; CCS does not handle this well (See Init code) This operates as a state machine that will ONLY look at one edge of one signal each Time the interrupt occurs This keeps things moving along fast, and since each Interrupt is 10us later; it takes a total of 40us to read both channels.

*/

{ switch (chanState) {

if (input(PIN_A2) == 1) {

TMR0L = 0;

chanState++;

} break;

case READ_C1:

if (input(PIN_A2) == 0) {

ChanA = TMR0L;

chanState++;

} break;

if (input(PIN_A3) == 1) {

TMR0L = 0;

chanState++;

} break;

case READ_C2:

if (input(PIN_A3) == 0) {

ChanB = TMR0L;;

chanState = SET_C1;;

} break;

} //What follows here is just a background clock that I use to handle delays PIR1bits.TMR1IF = 0; //clear interrupt bit

set_timer1(S_10us); //reset timer clock for next interrupt

if(PIR2bits.TMR3IF) //This is a simple 52ms clock fo

LISTING 1

Trang 16

1 ms/10 μs = 100 counts, which is 50 counts in each

direction I use 1 ms and not 2 ms because the pulse width

is actually from 1 ms to 2 ms, which is only a 1 ms pulse

range The actual range is somewhat less because I have a

dead zone around the center point so that I can have a stable

“off” point event though the pulse width may wander a

little when nothing is being moved at the transmitter This

program is written in CCS PCH, for the PIC 16 bit cores

like the PIC18F252 micro Listing 1 is one suggestion for

reading R/C receiver pulses accurately even when you aren’t

using the pulse capture hardware on your microcontroller

Some explanation may be in order here For those of

you that use the CCS compilers, you may find my interrupt

routines unique I like my interrupt service routines (ISR) to

be lean with no baggage For that reason, I did not use CCS’s

interrupt defaults and I set bits and defined ISR locations

manually This is why there is the assembly retfie at the

end of the ISR function Look in the source code files which

can be found on the SERVO website at www.servo

magazine.com named zombie.zip The essential

information is that the ISR is called every 10 μs and looksfor the start of an R/C servo pulse If it sees one, then itturns on TMR0 to time the width of the pulse and then thenext pass through the ISR looks for the fall of that pulseand records the pulse width Then, the next pulse is timed

Of course, there is a 10 μs uncertainty about the value, but

in practice I’ve found this works just fine If you look closely

at the code, you will see that what I have implemented is astate machine that handles only one pulse at a time — this

is the most efficient way to handle arbitrary timing issues ifyou don’t have hardware that will do it for you

Okay, so how do we translate these newly acquired pulsesinto PWM and direction values for an H-bridge? Listing 2 showshow it is done for a single motor The source code has bothmotors handled, of course, but since both sides are donethe same there is no reason to show both as examples Thecode in Listing 2 will translate the pulse width from the RCreceiver into a PWM and direction for the H-bridge Thereare some things you should look for, however I limit theendpoints of the pulse to eliminate the inherent inequality

of the potentiometers in mytransmitter where the centermay not be the same for eachstick and the endpoints alsomay not be the same Thiskeeps my motors going straight.Also, I set a dead band at thecenter of the joystick so thatsome drift in the sticks won’tcause motors to creep on Thisguarantees that the vehicle willstop when you tell it to! Thevalues 112 to 116 represent thecenter, or 1.5 ms pulse width —more or less One last bit ofcoding trivia: My H-bridgeneeds only one bit to set thedirection, yours may need twobits Just add the other bit intothe part of the code that setsthe direction based upon thesign of the speed value

I hope that you’ve learnedsomething here or at leastenjoyed what you have read

I, too, have learned somethingthis month, and because ofthat I’m going to be checkingout a couple of new program-ming environments — the onesI’ve mentioned above, ofcourse As usual, if you haveany questions about thingsrobotic, please drop me a line

at roboto@servomagazine.comand I’ll be happy to work on

void MotorA(int chanA)

else if (chan < 74)

chan = 74;

if (chan == lastChanA)

return;

speed = 114 - chan; // positive for forward, negative for reverse

if (chan > 112 && chan < 116) // create our deadband

Trang 18

Mov’n Up

Mov’n Up —

a newbook from Square

from Microchip’s 16 series eight-bit microcontrollers to

the 18 series devices

The 18 series devices have some features that make

them easier to use Program memory paging is gone,

so tables may be of any length and may be located

anywhere Data memory bank selection is simplified

Compare, bit toggle, and set file instructions make

writing programs easier Context saving on interrupt is

automatic (sometimes)

The newer application peripherals (CAN bus, etc.) are

included in the 18 series devices

Mov’n Up will save readers time by providing an

explanation of the fundamental differences (vs 16 series)

along with programming examples to make the transition

easier

Mov’n Up is available from the publisher ($24.95 plus

s&h)

For further information, please contact:

Power ful, Popular Servo

now uses the Atmel

includes a 24LC256 EEPROM chip This new processormakes several new features possible, however, the pricehas remained at $39.95!

Anyone who has used hobby servos in a robot project knows no two servos have the exact same centered position The V2 has the ability to store servooffsets in its EEPROM This means after the offsets areentered, the servos will be perfectly aligned when commanded to center Because the offsets are stored inEEPROM, they will not be lost when power is removed.This standardization makes it easy to share programswith others who have built similar robots

The servo controller now has the ability to storeinitial startup positions Whenever the SSC-32 ispowered up, the affected servos will be commanded

to their own unique initial startup position Think of this as a Home Position for the robot A special startupcommand string (up to 255 characters) can also bestored The servo controller will execute the storedcommand on power-up, just as if it had received it fromthe serial port

The SSC-32 still retains all of the powerful features

as before: 32 rock solid servo outputs with 1 μS resolution and 500 μS to 2,500 μS range servo pulses;speed, time, and coordinated (group) servo moves; theability to read four analog or digital inputs; real timeservo position feedback; an ultra slick built-in 12 servohexapod sequencer; and the ability to utilize spare outputs as high or low drivers

In addition to the new features which are stored onthe processor’s EEPROM, the SSC-32 V2 can store 32Kbytes of Project Sequences on the 24LC256 EEPROMchip This does require a free firmware update with thegeneral-purpose (GP) firmware The GP firmware replacesthe 12 servo hexapod sequencer with two general-purpose sequencer engines Each one can play storedsequences with different speeds and directions The easiest way to populate the EEPROM chip is to use theLynxmotion Visual Sequencer program After the robot istaught its movement sequences, they are exported intothe EEPROM chip

As the number of servos grows in a robotproject, it only makes sense to offload all of theprecise timing and complex algorithms to adedicated servo controller The SSC-32 can beinstrumental with that

For further information, please contact:

Trang 19

Prototype Tool for

Double-Sided Sur

face-Mount Assemblies

Integrated Ideas & Technologies,

Inc., has announced a new

prototype assembly tool that allows

manufacturers to assemble

double-sided surface-mount assemblies right

at their desks Recognizing the need

for a complete solution for prototype

assembly of these types of boards,

IIT has developed the AssemblyPro

Fixture

Designed as a tool to

comple-ment the IIT Desktop® stencil, the

AssemblyPro Fixture enables the user

to assemble double-sided

surface-mount boards without a screen

printer Machined from durable, high

density polyethelyne, the AssemblyPro

Fixture features a nested area that

holds the board and cutouts in the

fixture to accommodate the parts that

have been placed on the bottom side

For further information, please

contact:

Is your product innovative, less

expensive, more functional, or just plain

cool? If you have a new product that

you would like us to run in our

New Products section, please email

a short description (300-500 words)

and a photo of your product to:

UHTXLUHG

Integrated Ideas

& Technology, Inc

Trang 20

Know of any robot competitions I’ve missed? Is your

local school or robot group planning a contest? Send an

email to steve@ncc.com and tell me about it Be sure to

include the date and location of your contest If you have a

website with contest info, send along the URL as well, so we

can tell everyone else about it

For last-minute updates and changes, you can always

find the most recent version of the Robot Competition FAQ

at Robots.net: http://robots.net/rcfaq.html

— R Steven Rainwater

O c t ob er

2-4 MindSpark

College of Engineering, Pune, India

MindSpark includes a standard Micromouse eventand a competitive pick-and-place event calledDogfight There’s also a Photoroller event for solarpowered bots

www.robotics.mind-spark.org11-12 The Franklin Cup

The Franklin Institute, Philadelphia, PA

Remote-control vehicles destroy each other

in Philly

www.nerc.us/events/events.html18-19 Chibotica

iHobby Expo, Rosemont, IL

Includes a variety of events for autonomousrobots such as line following, maze solving, miniSumo, and more

http://intronics.bogorodsk.ru/

24-26 Critter Crunch

Hyatt Regency Tech Center, Denver, CO

Autonomous and remote control Starting size of12” x 12” x 12” Expansion during event okay.Weight limit of 20 lbs Power source must meetOSHA requirements for indoor use Awards for1st, 2nd, and 3rd place, as well as “amusing andarbitrary accomplishments.”

www.milehicon.org/critrule.htmTBA Cal Games

Woodside High School, Woodside, CA

Rack and Roll (same as 2007 FIRST event)

www.wrr f.org/Events/index.phpTBA ROBOMO Maze Solving Competition

24 Hawaii Underwater Robot Challenge

Kahanamoku Pool, UoH at Manoa, Honolulu, HI

Timed, multitasking tethered mission

www.marinetech.org/rov_competitionTBA ROBOEXOTICA

Museumsquartier, Vienna, Austria

Robots are tested on serving cocktails, mixingcocktails, bartending conversation, lightingcigarettes/cigars, and other achievements inelectronic cocktail culture

www.roboexotica.org/en/acra.htmTBA Canadian National Robot Games

Ontario Science Centre, Toronto, Ontario, Canada

Mini Sumo (novice, advanced, master), full-sizeSumo (autonomous and RC), fire fighting, linefollowing, walker race, photovore, search andrescue, art and innovation

Send updates, new listings, corrections, complaints, and suggestions to: steve@ncc.com or FAX 972-404-0269

Trang 22

Featured This Month:

Combat Robot Drive

Systems by Mike Jeffries

27 Building Battery Packs

Fit For Combat

by Robert Wilburn and Paul Reese

Roaming Robots Goes to

Qatar as told by Kevin Berry

ROBOT PROFILE – Top

Ranked Robot This Month:

30 K2 by Kevin Berry

Over the last five years or so,

I have built more robots forother people than for myself,which is really saying something

as I have a sizable fleet Whenbuilding a robot for someoneelse, I always listen to theirdesign brief, put together a concept, and build to that design

The robot was never mine in anysense, but a realization of somebody else’s plans So, oftentimes things fall short of

my own engineering ambitions

I am currently building a robotthat is very different

Some time ago, I was contacted by a young mannamed Tom Armitage He wasbuilding his own 30 lb robot anddoing really well, but wanted myhelp with his flipping mechanism

It was not long after our firstconversation that he

commissioned me to build him

a bolt-in, four bar linkage flipperdevice I had not gotten muchfurther than the proof of concepttest rig when we again discussed

the design, and before I knew it

I was providing the pneumaticssolution, as well A few weekslater, Tom bought a speed controller from me and was talking about chassis design.Several more conversation later,and I am now building a complete robot — minus the drivesystem — on quite a reasonablebudget Time passed quickly, and

● by James Baker

Savage — Part 1

BUILD REP RT

All main pneumatic components weigh in at just 2.2 lbs.

Trang 23

the development of the

robot concept was

refined over and over

Upgrades and

improve-ments were undertaken,

often pre-emptively The

original concept of a

simple, low cost robot

was all but gone, and the

highly advanced design

was starting to look like a

30 lb version of a very

successful larger robot

Hmmm this got us thinking More

upgrades and design changes were

authorized, and the four cheap drill

motors originally planned for the

drive system were replaced with six

Team Whyachi TWR15 gear motors

and wheels

This, of course, resulted in a

controller upgrade and new

batteries as we planned to over-volt

the motors Since this well known,

heavier robot was now the basis

for my robot (named Savage), the

owner was contacted and he was

kind enough to offer his blessing

Now the project continues with

renewed enthusiasm to do

everybody proud A number of

features in this robot were inspired

by other awesome machines The

pneumatics system, for example, is

based on a liquid draw CO2system

as used successfully in many robots

on the British Robot Wars TV show.

My own heavyweight robot ‘Wheely

Big Cheese’ uses an almost identical

concept on a larger scale I was also

inspired by the old British warship,

HMS Warrior This ship made

everything else on the water

obsolete when it entered service

in the 1860s

The ship’s design feature I wasmost interested in using for therobot was its armored citadel principle On HMS Warrior, the center of the ship — including gundeck and steam engines — wereenclosed in a thick iron box ofarmor — an internal chassis thatformed the core strength of theentire ship’s structure The rest

of the ship basically bolted to thisinner box For Savage, I wanted totry out this same idea, so I used achassis milled from a solid billet of2L97 aluminium alloy from whicheverything would be mounted Tocompliment this high core strength,the armor covering the robot is 8

mm titanium, with some 4 mm titanium and 4 mm Hardox 400wear plate in strategic places Allthe aluminium used for supports,flipping arm, etc., is the same 2L97alloy used in the main citadel

If we think of Savage as a ship,the upper deck is fully enclosedwithin the chassis citadel and housesthe pneumatic system, flipping arm,batteries, speed controller, and radiosystem Below this (beneath thewaterline, if you will), sit the sixWhyachi gear motors upon which

the robot runs The titanium armorextends downwards from the chassis to the floor, protecting themotors and wheels

When designing the flipper,

I wanted to ensure that themechanism was mechanicallystrong, effective, and an integratedpart of the armor of the robot Thepneumatic system that powers it

is also very powerful, but I felt Ineeded to leave options to upgradelater I built a test rig system with acustom made, aluminium manifold

to allow me to experiment withdifferent configurations andcomponents The ram currently used

is a custom design that was of asize specifically chosen to allow thebody to be tapped at its base to1/2” BSP thread This can then

be screwed directly into thesolenoid valve, negating the needfor fittings

I tested an identical designtapped to 3/4” BSP (as the manifoldwas made to accept either size)which was significantly more

600 g CO 2 bottle, pressure relief valve, dump valve, 1/2” solenoid valve, and custom-made ram for liquid CO Custom-made ram 2 use.

The test rig with

the planned parts.

Lots of machine work has gone into every part.

Aluminium flipper arm components.

Trang 24

powerful, but heavier I also

experimented with and without

buffer tanks and with gaseous CO2,but saw no real increase in

performance over the simpler directliquid injection This may prove to

be different in the arena, but therobot will be completed with thelighter, smaller ram and no buffertank for now It will be up to Tom

as to how it develops

See if you can guess what robot

inspired us so much with this nearreplica You may be able to tell from the photos, or maybe you seepossible inspiration from severalmachines You will have to wait until Part 2 for the reveal, and a fullreview and performance assessment

of the finished machine I truly hope

it does justice to the robot thatinspired it SV

There are many ways to move

your robot around the arena

floor From the simplistic two wheel

drive robot to the precision crafted

complexity of a true walking robot,

there are always different methods

of movement to consider When

you are choosing a drive system,

you have to consider the pros and

cons of each system that makessense for your design and determinewhich one is the best fit

Remember, with proper planning there is no wrong answer

Two Wheel Drive

Two wheel drive robots are assimple as it gets You’ve got onepower source attached to one wheelper side With only twowheels, there is very littleturning resistance whichresults in a very responsiverobot One problem withtwo wheel drive robots isthat if you don’t have thetwo sides of the drive systemwell balanced, it will havesome difficulty driving in astraight line at high speeds

Another issue with twowheel drive is that moreoften than not, part of the

weight of the robot will be balancedover a non-powered component,reducing the robot’s ability to pushand accelerate Two wheel driverobots risk being hung up onuneven floors or arena debris due

to the low number of powered contact points

Many two wheel drive robotswill have more than two wheels,using the extra wheel or wheels likecasters to keep the chassis fromdragging on the ground and to helpwith driving in a straight line Youshould choose two wheel drive if:your design needs to have minimalweight in the drive system; it needsone part of the chassis dragging onthe ground; or it doesn’t need a lot

of pushing power

Four Wheel Drive

Four wheel drive systems arevery common in robot combat All

MANUFACTURING:

● by Mike Jeffries

Apollyon is the classic two wheeled wedge

design It uses the dragging front wedge to

get under opponents.

Aluminium flipper

arm components.

The rear armor plate

is missing, showing off the thick titanium armor on top and on the flipper arm.

An inspirational ship.

Some of the design features are used in this robot.

Trang 25

the robot Four wheel

drive robots will have

a bit more trouble

turning than two

wheel drive robots

due to the wheels

skidding sideways

while the body of the robot turns A

wider wheelbase reduces the effect

and makes it behave more like a

two wheel drive robot The difficulty

turning, however, is balanced by it’s

increased ablity to drive in a straight

line You should choose four wheel

drive if: your design needs to use

the entire weight of your robot for

traction; needs to have powered

ground contact at all corners; or

doesn’t need to be as light as

possible

Six Plus Wheel Drive

Robots with six or more wheels

behave much like four wheel drive

robots They have the same issues

with turning and the same benefit

to driving in straight lines One

common variation is to have the

central wheels lower than the front

or rear wheels by 1/8”-1/4” which

causes the body to rock back and

forth, essentially becoming a four

wheel drive robot with a relatively

wide wheelbase Six wheel drive

increases the number of contact

points with the arena floor, making

it even harder to be high centered in

a match The increased number of

wheels also allows the use of

wheels with softer treads as each

wheel will not wear as fast due to

the reduced forces on the tread

You should choose six or more

wheel drive if your design needs

more ground contact than a four

wheel drive robot or if you need

more than four wheels to

properly transmit the power from

your motors to the ground

Tracked Drive

Tracked drives are not very common in robot combat due tothe increased weight and fragility ofthe system Tracks are a large target

on any robot with them They eitherhave to be well protected or built tohandle direct weapon blows to sur-vive well Track systems have a hugecontact patch and are much lesslikely to get hung up on anything inthe arena Well-built tracks can bevery effective, but are difficult tomake and often very complex com-pared to wheeled drive systems Youshould choose tracked drive if yourdesign needs maximum ground con-tact or if you are placing style overefficiency in your drive train design

Omni Drive

Omni drives are a simple way

to allow your robot to strafe

Strafing is when the robot is able

to move to the left or the right,essentially driving sideways

Depending on the number ofwheels — typically either three orfour — they are normally placed 90

or 120 degrees apart to keep

the spacing between them even

The wheels themselves have rollersbuilt into them This provides friction

in the direction the wheel spinswhile having almost no frictionwhen moving side to side Different combinations of speed controllercommands will allow the robot tomove in all the normal directions,

as well as side to side and at oddangles The main disadvantage ofthis is that the robot will not be able

to push as well as if it had solidwheels and that the movementspeed is reduced due to wheelsbeing so heavily angled You willlikely need a specialized electricalcontrol mixer or to learn how to program the mixing into your transmitter to drive an omni wheeledrobot effectively You should chooseomni drive if your design needs tostrafe but you don’t want to pay for

or make mecanum wheels

Mecanum Drive

Mecanum drive is a variant onthe standard omni wheel Instead ofthe wheels being at angles, therollers inside the wheel are angled

Doom On You uses its four driven wheels to put a lot

of power on the ground and allow it to move around the arena quickly, choosing when and where it hits its opponents.

Shovelhead uses all six wheels to get the incredible drive power it has on the ground, allowing it to use both its bulk and wedge as weapons.

Jawbreaker Jr uses the tracks to put as much pushing power behind its low wedge as possible.

Phantasm uses the strafing ability its wheels provide to maneuver quickly in any direction while still being able to keep the flipping arm pointed at its opponent.

Trang 26

at 45 degrees The pushing power

losses are similar, and the system

works best with four wheels

Beyond the wheels — which are

often custom made — this system is

a very simple way to take a normal

four wheel drive robot and give it

the ability to strafe

Strafing with mecanum wheelscan either be done on the

transmitter or with a custom

mixing circuit which will need at

least three channels to function

You should choose mecanum drive

if you want strafing ability while still

having your wheels mounted inline

Cam Walker

Cam walkers have their contact

surfaces mounted to cams, whichresult in the contact surfaces risingand falling as the shaft rotates

Early in the history of robotcombat, this system was allowed tohave the full weight bonus given towalking robots, but after a fewrobots exploited the low weightand high efficiency possible in asystem like this, they were ruled to

be essentially wheels making them

an unpopular choice for drivesystems as they are heavier andless efficient than wheels in mostapplications

You should choose a cam walker if you want form over function, or if the event you areattending gives a weight bonus

for cam walkers

True Walker

True walking robots are notallowed to have a part in continuousrotation resulting in the movement

of the robot With the way the rulesare written, walking robots need tohave the components starting andstopping during movement to begiven the weight bonus

The high complexity of a systemlike this at the scale of most fightingrobots makes them very difficult tobuild, let alone win with

You should choose a truewalker if you care more aboutmaking something cool than you

do about making somethingcompetitive

Driving the Points Home

Each drive system has a goodand bad side In the end, you’rebest off choosing the drive systemyou want and working to minimizethe negatives that come with it Efficiency and power are wonderful things, but the best drive system always has been andalways will be the one you want

to build SV

Photos courtesy of BuildersDB

(www.buildersdb.com) and the Robot Marketplace (www.robotcombat.com).

on July 18th

and 19th at

Reading and Farnborough, UK

House of Benson – BarnyardBrawl was held by North East Robotics Club on July 26th

Twenty-eight bots were registered

Pennsylvania BotBlast 2008 washeld by D.W Robots on July 12th.Thirty-six bots were registered

Upcoming: Oct-Nov 2008

Roaming Robots will hold events atPortsmouth on October 4th, and

Alcoholic Stepfather uses its strafing ability

to keep both the flamethrower and thick

steel wedge pointed at its opponents.

Kung Fu Cow took advantage of the cam

walker bonus weight at some events to put a

much heavier and more powerful weapon into

the arena than would otherwise be possible.

Mechadon was more a piece of art than a fighting robot, but still was able to use its massive weight and sharp feet to crash down on opponents back in the early days of BattleBots.

Trang 27

ots.co.uk for more details.

Franklin Institute Robot Weekend

will be held on October 11th

in Philadelphia, PA Go to

www.nerc.us for more details.

Mecha-Mayhem 2008 will be

held on October 16th in

Rosemont, IL Go to www.the

crca.org for more details.

2008 Halloween Robot Terror will be held on October 25th in

Gilroy, CA Go to www.calbugs.

com for more details.

Robots Live will hold events atReading on October 11th,

London on October 25th,Chester on November 15, andBirmingham on November 22nd

Go to www.robotslive.co.uk for

more details

AntweightBeneluxChampionshipwill be held

by DutchRobot Games

in the Netherlands on November1st SV

In the early days of combat

robot-ics, builders were often forced to

assemble their own battery packs if

they wanted something robust that

would tolerate conditions filled with

shock, vibration, heavy G-loads, and

constant flexing all while operating

at very high temperatures This is no

longer the case with numerous

venders offering proven off-the-shelf

solutions As vender packs became

the norm, we continued to build our

own packs using techniques we had

learned through trial and error

These techniques can be applied to

pack assembly for many uses

outside of combat robotics This

guide will cover some of the

advantages and disadvantages of

existing battery chemistries, as well

as describe the step-by-step process

we used for pack construction

Following these simple techniques

will ensure you make battery packs

that are fit for combat!

Before we get started, let’s talk

about SAFETY First, realize that a

battery is a form of stored energy

Typically, this energy is used in small

quantities over long periods of time

However, if this energy is consumed

in a very short period of time — say

from a short circuit — conditionsmay occur that pose a serious safety hazard

A shorted battery may produceenough heat to cause severe burns,may explode, or possibly combust

Before attempting any steps in thisprocess, take the time to familiarizeyourself with your tools, work surface,environment, and the fundamentals

of battery operation Extreme careshould be taken to never short thecells This is a fairly simple processand one that just about anyonewith the required materials canaccomplish (see Parts List)

Nickel-metal Hydride (NiMH) and

Nickel-cadmium (NiCd) Chemistries

The debate over which of thesechemistries is better has enduredmore than a decade, but suffice it

to say each has its advantages anddisadvantages The choice should bebased on your application and yourresearch Factors such as maximumdischarge current, series resistance,cycle life, and self discharge arespecifications to consider Generally

speaking, NiMH are the better choicethese days The high current drainadvantage NiCds once had has beendiminished with advances in NiMHdesign Both chemistries have anominal 1.2V/cell under load Eitherchemistry could be used in the following guide The key here is to

do your research before choosing!

Lithium-ion and Lithium Polymer Chemistries

Lithium-ion and lithium polymerare much newer and superior battery technologies in terms of

● by Robert Wilburn and Paul Reese (Team O-Town Robotics; teamotown.com)

BUILDING BATTERY PACKS FIT FOR C MBAT!

• Shrink tube — high temp variety

• A tube of Shoe Goo™

• Stranded copper wire — black and red

• Dremel type tool with a smallcarbide grinding tip

• Shrink wrap

• Heat gun

Trang 28

their density, volume, and capacity

when compared to NiMH and NiCds

However, neither are readily available

in “cell form” making building your

own packs a greater challenge and

one this article will not touch on

Selecting Your Cells

Once you have selected yourchemistry (NiMH or NiCd), you will

need to choose a specific cell size

(AA, Sub-C, C, etc.) based on your

application As a rule of thumb, you

will want to get the highest (mAh)

capacity cells you can afford

The terms mAh and Ah stand for

“milliamp hour” and “amp hour,”

respectively A higher mAh rating

means more capacity and longer

runtime The number preceding

mAh indicates how much DC

current a charged cell will source

for one hour

For example, the cells depicted

in this article are Sanyo 3600 mAh

NiCd C cells This means that when

fully charged, they will source 3,600

milliamps or 3.6 amps for onehour before dropping below1.0 VDC per cell They will produce much higher currentfor shorter periods based ontheir discharge curve specs

Cells vary greatly so dischargecurves, as well as other specifi-cations, should be consulted inthe manufacturer’s datasheet

Note: The desired pack voltagedivided by 1.2 will determinethe number of cells needed inyour pack For example, a 12VDC pack would require 10 cells

Pack Construction — Let’s Begin!

Roughing Up the Cell Terminals

The first step is a light

“roughing up” of the cell terminalswhich allows for a better solder connection when the bus bars areinstalled While this step is optional,

it is recommended if your pack(s)will be subject to rough conditions

A Dremel tool with a small carbidebit (see Figure 1) makes quick work

of this task A second option forthose without a Dremel is to score

a series of crisscrosses into the terminals with the tip of a razor

Installing Cell Isolation Rings

Next, remove the factory cellcovers with a razor blade Factorycovers cannot withstand high temperatures and will shrink andsplit exposing the cells in a pack

to possible short circuit To preventshort circuiting, we will install shrink

tube isolation rings which act asphysical separators preventing thecells from touching even underrough flexing conditions Note: Thetemperature ratings of shrink tubevary, so be sure to investigatebefore you purchase You can cutindividual rings and shrink themwith a heat gun or install a singlepiece the length of the cell and use

a razor to remove the center leavingthe two rings (see Figures 2 and 3)

Cell Layout

The cells need to be arranged

in a manner that allows one cell’s(+) terminal to be connected to the next cell’s (-) terminal These connections are made with bus barsand create a continuous series pathfrom one cell to the next Each cell

in the series string will add 1.2V.The most common shape for packs

is two rows with an equal number

of cells in each row Take your timefiguring this out before continuing.Highly customized cell layouts can

be another advantage of buildingpacks yourself!

Bonding the Cells Together

Once the cell layout is determined, we are ready to bondthe cells together Bonding addsneeded mechanical stability to thepack A flexible adhesive that is able

to withstand high temperatures isneeded here After experimentingwith various types, we felt ShoeGoo had the best properties followed by silicone caulk Shoe-Goohas simply incredible adhesion

properties You willneed a fixture to holdthe cells We use asimple jig that clampsthe cells betweenwooden 1x1s screwed

to a workbench (seeFigure 3) Apply adhesive between thecells and allow to dry,flip the cells andrepeat Now applyadhesive to the twohalves to form the

FIGURE 1

FIGURE 2

FIGURE 3

Trang 29

pack’s final shape and allow to dry.

Bus Bar Installation

Now that we have our pack

shape, we are ready to solder on

the bus bars to form a series path

from one cell to the next (see Figure

4) Solder flux can help here Care

must be taken to avoid applying

heat for too long or else the cell(s)

may be damaged The battery will

act as a heatsink drawing heat out

of the iron once the solder starts to

flow, so use an iron with a large tip

The key is to get the solder flowing

and remove the iron as quickly as

possible Lay the bus bar across the

terminals and secure it as required

to prevent movement Again,

solder quickly!

Stranded Wire Basics and

Lead Attachment

With the bus bars installed,

solder the (+) and (-) leads Consult

an American Wire Gauge (AWG)

table for the correct size wire based

on your system current Choose

black for negative (-) and red for

positive (+) connections (Note that

these images show white for

positive which is not recommended

At the time of assembly, we ran out

of red so the white was later made

red with a large sharpie!)

Wire types vary but generally

speaking the more strands, the

more flexible the wire Deans Wet

Noodle™ and Astroflight™ wire are

favorites among robot builders

Flexible wire can be important if

routing through tightspots Wire usuallycomes jacketed in PVC

or silicone PVC istougher and resists cuts and abrasions better while siliconewithstands heat andharsh environmentsbetter To install theleads, strip approx0.25” of insulation backand unwind the exposed strands

Flatten the exposed strands out toform a V-shape as this will increasethe surface area allowing for astronger solder connection

Pre-tinning the wire is a good idea

Solder leads using the same method

as the bus bars

Shrink Wrapping the Pack

Once the leads are attached,the pack is ready to be shrink-wrapped Before this is accomplished, secondary insulationsuch as thin sheets of

Teflon (see Figure 5)

or high temperaturefiberglass tape may

be added for extrainsulation, if desired

Shrink wrap has aneat ability in that itshrinks radially but notaxially Cut a piece ofheat shrink just longenough that it can befolded to cover theends of the pack Cuttwo holes for the leads

to pass through Slide the packinside and leads through the holes.Using the heat gun, carefully beginpassing the heat over the wrap

Don’t allow the heat to remain inone area too long or you may melt ahole in the wrap (Figure 6) Once thewrap is finished shrinking, you canreheat the ends to soften them andcarefully fold them over the ends ofthe pack with a small block of wood

or a plastic spatula Crimp on yourdesired connectors and your pack isfit for combat! SV

FIGURE 4 FIGURE 6

FIGURE 5

Some assembly required!

Trang 30

K2 has competed at RoboGames

2007 and 2008 Details are:

● Overall configuration: Dual

vertical disc spinner

● Drive: Two Team Delta 18V

DeWalt motors in low gear;

rear wheels are driven and

front wheels are slaved via

timing belts

● Wheels: 4” Colsons.

● Drive ESC: Two Victor 883s.

● Drive batteries: Two 5,000 mAh,

6S lithium-polymer

● Weapon type: 8” dual spinning

discs, with 33” thick titanium

● Armor: 1/8” polycarbonate top

and 1/8” aluminum base

● Radio system: Spektrum DX6i.

● Future plans: Not many upgrades are

necessary after RoboGames; the botfunctioned quite well I am working

on a solution to keep the brushesfrom falling out of the drive motors

● Design philosophy: Wedge scoops

under opponents and lines them

up to be launched by the discs

● Builder’s bragging opportunity:

I installed a unique data collection system that I used

at the last competition TheEagleTree eLogger and assortedsensors allowed me to monitorthe bot’s battery current, voltage,rpm of the spinner, and severaltemperature sources This datacan help diagnose how the bot

is performing, for instance, Inoticed the current spikesdropped significantly later in thecompetition due to the weaponbelt being stretched out SV

Photos and information are courtesy of Team

Velocity (www.teamvelocityrobotics.com).

All fight statistics are courtesy of BotRank

(www.botrank.com) as of August 10, 2008.

Event attendance data is courtesy of BotRank

and The Builder’s Database (www.builders

150 grams VD 26/7 150 grams Micro Drive 10/3

1 pound Dark Pounder 44/5 1 pound Dark Pounder 23/3

1 kg Roadbug 27/10 1 kg Roadbug 11/4

3 pounds 3pd 48/21 3 pounds Limblifter 12/1

6 pounds G.I.R 17/2 6 pounds G.I.R 11/2

12 pounds Solaris 42/12 12 pounds Surgical Strike 19/7

15 pounds Humdinger 2 29/2 15 pounds Humdinger 2 29/2

30 pounds Helios 31/6 30 pounds Billy Bob 12/4

30 (sport) Bounty Hunter 9/1 30 (sport) Bounty Hunter 9/1

60 pounds Wedge ofDoom 43/5 60 pounds K2 14/2

120 pounds Devil's Plunger 53/15 120 pounds Touro 14/2

220 pounds Sewer Snake 46/13 220 pounds Original Sin 12/5

340 pounds SHOVELHEAD 39/15 340 pounds Ziggy 6/0

390 pounds MidEvil 28/9 390 pounds MidEvil 3/0

Top Ranked Combat Bots

History Score Ranking

K2 – Currently Ranked #1

Historical Ranking: #5 Team: Team Velocity Builder(s): Kevin Barker Location: Enumclaw, WA BotRank Data Total Fights Wins Losses

Trang 31

When first venturing into

combat robot building, I, like

most, began with RC car speed

controllers It quickly became

apparent that even the most highly

rated controllers were not robust

enough to handle the power

demands of the 30 lb class Several

240 amp race controllers billowed

smoke before I finally gave up on

RC car technology, and tried out RC

boat controllers Available then in

several versions, I took the kit forms

and the ready-built forms of several

products and began experimenting

Before long, I had a winner The

Electronize brand of speed

controllers was by far the most

reliable and capable of those tested,

and thus began my seven-year

relationship with the company

Based in Tamworth, Great

Britain, Electronize produces a

range of speed controllers for radio

controlled use, as well as electronic

switchers

I have used several versions of

the Electronize speed controller;

from the 10 amp self builds, to the

40 amp CPU controlled type My

most common purchase was the

FR15 unit I have bought

almost 50 of these in the last

five years, and had only two

fail under unusually heavy

load which was way over the

rated specification

Most electronic speed

controllers work in basically

the same way, with a pulse

wave modulation output

controlling motors via

MOSFET chips The

Electronize is the same,

but does have some features I havenot found on other controllers

Firstly, it has a variable frequencyselector that allows pulsing of output from 100 Hz to 2,000 Hz,giving the user a choice of runningmore torque at low speed orgreater efficiency a high speed Imake a lot of use of this feature on

my corporate robots to aid batterylongevity

Secondly, the Electronize controller has a variable outputspeed selector, which is a fantasti-cally useful tool For my corporaterobots, I often carry 24-volt batteries

on board, but set the controller output to seven volts Using 9.6 voltdrill motors for drive, they are stillquite impressive in terms of speedand power, but the run time of myrobots can be as much as fourhours Should I wish to speed up myrobots, a precision screwdriver is allthat is needed, and 10 seconds later

I can have my bots zooming around

at close to 30 mph, easily copingwith 40 amp peak currents Noother controller I have found allows

me to do this so easily

Seven years after buying my

first Electronize speed controller (in2001), I still use them extensively.Despite most of my combat bots nowrunning the latest in speed controllertechnology from other manufacturers,

my corporate robots will always runthe Electronize FR15, as they offereverything I need in terms of voltageand efficiency management, reliabili-

ty, and value for money I have runthese controllers reliably at up to

90 amps with minimal modification,and have over 800 hours runtime onone corporate robot in particular,having changed out the motorstwice, batteries twice, and receiveronce, the speed controllers are stillthe original ones from 2002 SV

Visit www.electronize.co.uk for more

30 lb bar spinner

‘tantrum’ used the FR15 until 2007.

Radio-controlled, full size R2-D2 performed really well on FR15 controllers.

Trang 32

John Findlay — head honcho of

the United Kingdom’s Roaming

Robots — was commissioned to do a

show in the Middle Eastern country

of Qatar He graciously provided

details and photos to Combat Zone

for this article

Roaming Robots — after twoyears of preparation — hauled a

planeload of bots to Doha, the

capital of Qatar Besides their

biological support staff,

heavy-weights Ripper, Envy, Tilly Ewe2,

Scorpion, DTK, Mighty Mouse,

Velocirippa, and Hammertime went

on this jaunt, along with

feather-weights Pain in the Asp, Pillow

Torque, Mini Mighty Mouse, Iron

Side, and Rip

The venue was a major shopping center, basically one of

the ubiquitous malls similar to those

in any country, world-wide

After two continuous days ofsetup, the arena and display area

was ready Over the next sevennights, between 5 pm and 10 pmthe shopping center was echoingwith the sound of robots battling!

The first night was a bit hectic,John explained The unrehearsedformat not only had featherweightsand heavyweights, but there were

12 roboteers to drive robots andrun two robot building workshopsduring each night As the weekcontinued — with slight changes

to the format — it was clear thatthe robots were a hit with the

locals They hadn’t seen anythinglike it before, and were blownaway with the excitement of theevent Despite being in a touristmecca, it was a typical life for anevent organizer Apart from a quickmorning swim, most time wasspent in the shopping centerpreparing for the show each night.After the event, the workers didfind time for some R & R when theyheaded to a lovely resort by thesea for swimming, jet skis, andquad biking!

John specificallymentioned Fahad andRabi, their two driversand helpers who werefantastic throughoutthe week Whetherobtaining more CO2

or taking the crew to

a bar for a few drinks,they were alwaysavailable John alsoraved about Marwan,their host andsponsor RoamingRobots just signed afive year deal for educational work inSingapore, and is infinal negotiations for

a five-day event early next year inKuwait SV

● as told by Kevin Berry

ROAMING ROB TS GOES TO QATAR

The Doha arena.

The Doha pits.

Trang 33

CONFERENCE & EXPO ,08

NOV 18-19, 2008

Join the International Technical Design and Development

Event for the Personal, Service, & Mobile Robotics Industry

JOIN THESE LEADING COMPANIES AT 2008 ROBODEVELOPMENT

Analyst, Association & Academic Co-Sponsors Silver Sponsors

Media Co-Sponsors

Gold Sponsor

BOSTON ENGINEERING ™

BOSTON

ENGINEERING ™ Founding Sponsor

Corporate Sponsors

Q The industry’s most comprehensive

conference program covering these

critical topics:

- Systems & Systems Engineering

- Tools & Platforms

- Enabling Technology

- Achieving Autonomy

- Design & Development

Q Valuable networking opportunities

that put you in touch with peers,

industry experts and up-and-coming

talent:

- Evening Welcome Reception

- Speaker Meet & Greet

- Birds-of-a-Feather Discussions

Q Exposition fl oor featuring what’s

new and what’s next in robotics

design and development

USE PRIORITY CODE RDSRV AND

SAVE $300 ON A CONFERENCE PASS

EXCLUSIVE OFFER:

Q Learn from exclusive keynote

presentations delivered by world-renowned robotics industry experts:

Sebastian Thrun, Winner of the DARPA Grand Challenge; Director, Artifi cial Intelligence Laboratory, Stanford University

Maja J Mataric, Founding Director, USC Center for Robotics and

Embedded Systems; Director, USC Robotics Research Lab

Jeanne Dietsch, CEO, MobileRobots Inc Michael Bruch, Section Head, Space and Naval Warfare (SPAWAR) Systems Center

FOR COMPLETE EVENT DETAILS VISIT WWW.ROBODEVELOPMENT.COM

Trang 34

Wire is a wonderful thing There’s not much that

is more reliable than a short piece of stranded

or solid copper wire between the ends of anelectrical connection However, there are situations where

electrically tying devices together with long runs of wire is

impractical Light does a good job of replacing copper

when the conditions are right, but if one needs to move

electrons reliably over a relatively long distance there’s no

better conductor than the Earth’s magnetic field

Odds are that if you’re not using copper wire to

supply power to a device, you’re using that wire to

convey a signal If your signaling environment allows the

communicating devices to place their sensors in plain sight

of each other and if the signaling environment can bounce

light around between the sensors with a minimum of

spectral loss, a beam of modulated light is as good as a

signal-carrying piece of copper wire

On the other hand, if the devices that wish to

communicate can’t visibly see each other or the distance

between the devices is large, light may not be the most

reliable means of carrying a signal from one device to

the other In this case, short-distance signaling using

low-power RF is a better bet

A Smart Data Radio

What do you get when you mix a Microchip

PIC16F690 microcontroller with a Texas Instruments

CC1100 1 GHz transceiver IC and a fingertip full of 0402

SMT components? The itty-bitty EmbedRF data radio yousee in Photo 1 The EmbedRF can replace up to 80 50-footcopper signal wires as it is pinned for four 16-bit analog-to-digital (A-to-D) inputs, a digital output, and a digital input.Alternately, you can program the EmbedRF to present twoA-to-D inputs, one digital input, and two digital outputs.The EmbedRF’s A-to-D input voltage levels and digital I/Ologic levels can be included in the RF transmit stream orcompletely ignored and replaced with user-defined data.The digital input and one of the digital outputs can beoptionally configured as part of a three-wire EUSART-basedserial interface (RXD, TXD, and GND)

The EmbedRF’s CC1100 transceiver IC dominating theview in Photo 2 is hard-coded to run at 915 MHz in point-to-point or point-to-multipoint modes All of the A-to-Dinputs and the serial interface (RXD and TXD) are tied tothe on-board PIC Data communications between the PICand the CC1100 is performed using a SPI (Serial PeripheralInterface) data link

The EmbedRF has the ability to transmit a 17-bytepacket in intervals of 0.25 to 12.75 seconds The intervalgranularity is 50 milliseconds per interval bit Only 11 ofthe 17 bytes in the packet are loaded with data that theuser can access as the first six bytes of the packet containthe network ID and transmitting device ID The network ID

is hidden during transmission to provide network security

Of the 11 transmitted data bytes, only 10 of the 11 databytes are user customizable via the EmbedRF’s EUSART-based serial interface The last byte in the 17-byte packet

is a packet counter byte that is incremented each time anew RF packet is transmitted by a transmit-enabledEmbedRF device

A minimum of two EmbedRF devices are required

to form a network Each EmbedRF network node has the capability of transmitting only, receiving only, ortransmitting and receiving A set of unique device andnetwork IDs allows EmbedRF nodes to selectivelycommunicate with each other An EmbedRF network nodecan have a unique transmit device ID and a separateunique receive device ID Device IDs can range from zero(0x000000) to 16,777,215 (0xFFFFFF) The same 24-bit ID

PHOTO 1 R3 and R4 are SMT jumpers that determine the baud

rate which is set for 19200 bps in this shot From what I can

match up with the PIC’s pinout, R2 and C14 are the MCLR reset

circuit, while R5, C11, C12, and X1 form the PIC’s system clock

oscillator Bulk capacitor C1 is guarding the input voltage.

PHOTO 2 The unmarked termination to the right of VDD

is the RSET pin, which is tied to the junction of MCLR

by Fred Eady

Trang 35

range that applies to the device ID also applies to the

network ID

To make establishing communications between

nodes easier, the EmbedRF firmware can be

commanded to perform an intelligent search A

receiving EmbedRF node can establish a session with

the nearest transmitting node or the first transmitting

node it hears The concept of the first transmitting

node session is obvious The EmbedRF nearest

transmitting node function is made possible by use

of the receiving EmbedRF node’s RSSI (Receive Signal

Strength Indicator) value The larger the RSSI value,

the closer the transmitter The RSSI is presented to the

EmbedRF programmer as a byte-wide digital value

Since the PIC16F690 is in charge of the EmbedRF’s

operating logic and the data packets are relatively small,

it’s only natural that the EmbedRF designers would take

advantage of the PIC’s SRAM to buffer data traversing

between the PIC and the CC1100 By buffering the

transmit and receive packet data, a very useful notification

feature is added to the EmbedRF The EmbedRF can be

commanded to notify the external microcontroller when a

packet is received into its receive data buffer Conversely,

the EmbedRF provides positive notification feedback to the

external microcontroller when a packet is transmitted from

its transmit buffer If receive notification is not required,

the EmbedRF can be polled for received packet

information The transmit packet notification is always

presented to the external microcontroller It’s up to the

external microcontroller’s firmware to sense and use the

transmit notification When the EmbedRF notify mode is

active, received data in the EmbedRF’s receive buffer is

immediately transferred to the PIC’s EUSART and

transmitted over the EmbedRF’s serial interface

A very nice Windows application called EmbedRF

DesktopPro is available from the EmbedRF website This

program is designed to interface an EmbedRF to a PC

using an optional USB interface module This USB interface

module captured in Photo 3 is part of the development kit

The EmbedRF is designed to be programmed via its

serial interface and put to work as a stand-alone data

radio To that end, the kit also comes with a battery board

that plugs into and powers a stand-alone radio module I

just happened to have one of the battery boards and I put

the macro lens to it in Photo 4

Unless your mechanical animal has the ability to run

Windows and manipulate a PC keyboard, or you simply

want to program an EmbedRF module, stick it out there

somewhere and never change the configuration You’ll

want to forego the DesktopPro application in favor of a

PIC running the home-brewed EmbedRF API (Application

Programming Interface) we’re about to code up

We’ll compile our API source code using the HI-TECH

PICC C compiler This compiler allows you to port the

EmbedRF API source code to any PIC that you desire The

EmbedRF API Lab Layout

The hardware setup is very simple All you need to

do is connect the EmbedRF’s TXD line to your PIC’sUSART/EUSART RX pin The PIC’s TX pin should be tied

to the EmbedRF’s RXD line Since the EmbedRF modulecomes jumpered for a 19200 bps serial interface, you mustset the same baud rate on the PIC If you must, you canmove the EmbedRF’s baud rate jumpers to obtain adifferent baud rate The serial interface can alternately bejumpered for 9600, 2400, and 1200 bps Power your PICand the EmbedRF with a power supply voltage between2.0 and 3.6 volts I powered mine with 3.3 volts

For the purposes of demonstration, I’ll use a secondEmbedRF and an EmbedRF USB interface board that aretied to my laptop as the second node in a two-nodenetwork A Microchip REAL ICE (In-Circuit Emulator) will beattached to the PIC18LF2620-controlled EmbedRF module.Using the DesktopPro application on one node and theMicrochip REAL ICE on the other node allows for easy, on-the-fly reconfiguration of each of the EmbedRF network nodes

So that you’ll know if I’m talking about the EmbedRFmodule or the PIC18LF2620, I will always refer to theEmbedRF module and its on-board PIC16F690 as theEmbedRF Thus, we have one EmbedRF tied to my laptopvia the USB interface board and a second EmbedRF tied tothe PIC18LF2620 via a EUSART-to-EUSART three-wire serialinterface In the text that follows, the PIC18LF2620 and itsassociated circuitry will be referred to simply as the PIC.The API code we are about to write runs on the PIC Wewill not write any code that “runs” on the EmbedRF’sPIC16F690 microcontroller

Coding the EmbedRF API

The EmbedRF API code package that you will have

access to via the SERVO website (www.servomagazine

.com) includes all of the functionality that is necessary to

support the EmbedRF API function calls For instance, an

PHOTO 3 This EmbedRF USB interface supplies power to the EmbedRF module and provides a virtual serial interface

to the EmbedRF DesktopPro application.

Trang 36

this in mind as we will only cover the EmbedRF API

functionality in this discussion

There are certain supporting functions that are

common to each API call Each EmbedRF command

consists of a single byte that may be followed by any

number of command arguments Commands and their

associated arguments are all transmitted to the EmbedRF

module using the API sendchar function, which is part of

the API’s interrupt-driven EUSART support code When a

command is transmitted via the EUSART serial interface

from the PIC to the EmbedRF, the EmbedRF will process

the incoming command byte and its arguments, and

return a reply message to the originator of the command

The command originator in our network can be the PIC or

the laptop The EmbedRF command reply will always begin

with a byte which has the value of the original command

byte value plus 0x20 For instance, to query the EmbedRF

firmware version we would issue a command byte of 0x56

over the EUSART serial interface to the EmbedRF It will

reply with 0x76 followed by two bytes of firmware

version data

Each API function checks for a valid command reply

If the EmbedRF command reply must be validated by the

application, a function return code (frc) is returned to the

API function caller An frc return value of zero indicates

that all is well If an internal API call validation fails, the

API function will return a one to the caller

The EmbedRF’s command reply is picked up by the API

support code’s interrupt-driven EUSART receive routines

Well-placed calls to the API’s CharInQueue function allows

us to determine when valid data is in the API’s receive

queue When the CharInQueue function returns a Boolean

TRUE, the recvchar support function is used to retrieve the

data from the API receive queue Each EmbedRF API call

takes advantage of the CharInQueue and recvchar API

support functions

The EmbedRF API code package contains a packet_rx

array to hold the received packet data and a packet_tx array

#define rx_rssi 0x0D //received signal strength indicator

#define rx_ctr 0x0E //packet counter

#define rx_end 0x0F

The ID of the device that sent the packet is contained

in the first three bytes of the receive packet array The

rx_end byte is not part of the receive packet array and is

used to indicate the end of the array’s extent The best

way to explain the use of the rx_end definition is to

examine the EmbedRF API call that retrieves a packet fromthe EmbedRF’s receive buffer:

//****************************************************** //* GET RECEIVED DATA FROM EmbedRF

//*

//* ENTRY - NONE //*

//* RETURN - 15 BYTES - RECEIVED DATA IN packet_rx //****************************************************** void get_embedrf_data(void)

{ char i,embedrf_reply;

sendchar(0x47);

while(!(CharInQueue()));

if(CharInQueue()) embedrf_reply = recvchar();

if(embedrf_reply == 0x67) {

for(i=0;i<rx_end;++i) {

while(!(CharInQueue()));

if(CharInQueue()) packet_rx[i] = recvchar(); }

} delay_ms(10);

}

The get_embedrf_data API call is issued in a polling

sequence when the notify feature is disabled Note thecommand byte (0x47) and the command reply byte (0x67).Once the command reply is validated, data is transferred

from the API receive buffer into the packet_rx array

as long as the if statement counter variable i is less than rx_end and the CharInQueue function returns a

Boolean TRUE

During the course of testing the API code, I found that

I had to pace the issuance of commands to the EmbedRF

PHOTO 4 When depressed, the pushbutton allows three

volts to flow to the AN1 analog-to-digital input The idea is to

provide some instant gratification when using the EmbedRF

DesktopPro application to manipulate an EmbedRF network.

Trang 37

millisecond delay_ms pacing call at the end of every API

function call

Since transmitting and receiving data is the main

objective, let’s look at the API’s transmit buffer array:

Note that I’ve defined both the user data bytes and

the EmbedRF’s native A-to-D inputs in the API transmit

packet array The value of the tx_cmd byte determines

if the buffered transmit data should be transmitted

immediately by the EmbedRF, buffered for scheduled

transmission, or transmitted before receiving The tx_end

serves the same purpose as the rx_end definition Like

rx_end, tx_end is not part of the array data.

I found it very helpful to be able to see the device IDs,

network ID, version information, intervals, modes, and

A-to-D settings while writing and testing the EmbedRF API

code Here’s the data structure I used to get an overall

view of the operational parameters:

typedef struct {

char ver_maj:8; //firmware version

char ver_min:8;

char tx_interval:8; //transmit interval

char tx_mode:8; //transmit-receive mode

char tx_pwr_lvl:8; //transmit power level

char device_id_aa:8; //device id - transmit

//or receive char device_id_bb:8;

char device_id_cc:8;

char ad_setting_ww:8; //analog-to-digital port

//settings char ad_setting_xx:8;

#define tr_off 0x00 //off - no transmit or

//receive

#define tr_rcv 0x01 //receive only

#define tr_xmit 0x02 //transmit only

#define tr_rx 0x03 //receive then transmit

#define tr_xr 0x04 //transmit then receive //Network Mode Options

#define p_to_p 0x00 //point to point

#define p_to_m 0x01 //point to multipoint //Transmit Power Level Configuration Options

#define dbm_minus10 0x00 //-10 dbm

#define dbm_minus5 0x01 //-5 dbm

#define dbm_plus5 0x03 //5 dbm //Analog/Digital Options

#define ad_disabled 0x00 //disabled

#define ad_enabled 0x01 //analog active

#define dig_1 0x02 //digital active logic 1

#define dig_0 0x03 //digital active logic 0 //this code located in main function

err_led = OFF;

if(rc = set_notify_mode(notify_on)) err_led = ON;

if(rc = set_tx_interval(0x28)) err_led = ON;

if(rc = set_tx_rx_mode(tr_rcv)) err_led = ON;

if(rc = set_device_id(0x00, 0x00, 0x01, id_rcv)) err_led = ON;

if(rc = set_network_id(0x00,0x01,0x02)) err_led = ON;

if(rc = set_ad_settings(0x00,0x01,0x02,0x03)) err_led = ON;

if(rc = set_network_mode(p_to_p)) err_led = ON;

if(rc = set_tx_pwr_lvl(dbm_plus5)) err_led = ON;

The reply structure byte-filling code is typical of what

your EmbedRF control application will look like I attached

Trang 38

variable that is defined within the API support code Each

if statement in the code snippet is an API function call If

the return code (rc) is equal to zero, there are no detected

command entry or reply errors and the err_led = ON

statements don’t get executed The “get” API calls retrieve

the results of the if statement API calls and stuff them into

the reply data structure The tasks performed by the API

function calls are pretty obvious as they are named for the

EmbedRF commands they represent The only thing you

can’t really figure out with what you see in the code

snippet is the transmit interval (tx_interval) delay window.

However, I did tell you earlier how the transmit interval

argument works Recall that each transmit interval bit

represents 50 milliseconds of delay So, 0x28 equates to

40 decimal, which results in 40 * 50 milliseconds or a two

second delay window between transmissions The MPLAB

IDE Watch window shown in Screenshot 1 reveals the

results of the EmbedRF API code snippet “get” calls

Receiving Data Using the

EmbedRF API

I’ve taken the liberty to use the EmbedRF DesktopPro

application to put the EmbedRF attached to the laptop

USB interface into transmit-only mode with a transmit

device ID of 0xAABBCC (11,189,196 decimal) The

network mode is point-to-point and the network ID is

0x000000 Consider this EmbedRF API application receive

code snippet:

//Find Transmitter Options

#define find first 0x00 //find first

#define prox_find 0x01 //proximity find

while(!(CharInQueue()));

if(CharInQueue()) packet_rx[i] = recvchar();

}

After matching up the PIC’s EmbedRF module receiveparameters with those of the laptop’s transmit parameters,

the find transmitter API call is invoked The find transmitter

API call will establish a receiving session with the firsttransmitter it can hear In our case, that will be thelaptop’s EmbedRF With the notify option active in thePIC’s EmbedRF, as soon as the PIC’s receive buffer isloaded with a valid packet, the EmbedRF will dump thereceived packet onto the PIC-to-EmbedRF serial interface.The API code’s interrupt-driven EUSART support code willsee the incoming data and load it into the API receivebuffer We then transfer the data packet from the API

receive buffer to the packet_rx array using the

CharInQueue function as a buffer-to-array regulator

Let’s see if the data we received from the laptop’sEmbedRF in Screenshot 2 makes any sense

Recall that the laptop’s EmbedRF was programmedwith a device transmit ID of 0xAABBCC According toScreenshot 2, we captured the transmit device’s IDcorrectly in the first three bytes of the received datapacket The EmbedRF DesktopPRO application has anoption that allows the first data byte to be incrementedover time In our case, I commanded it to increment thefirst data byte of the packet every four seconds Thus, thelaptop EmbedRF had been transmitting 4 * 0x4D (308)seconds when this data packet was captured by the PIC’sEmbedRF module The remaining data bytes in the packetare set in sequential fashion as shown in Screenshot 2 Thesignal strength is represented in byte 13 and the laptop’sEmbedRF packet counter is set for 246 decimal (0xF6) Thepacket counter value can be used by the application todetect a dropped packet at the receiving end

Transmitting Data Using the EmbedRF API

After using the EmbedRF DesktopPRO application to

SCREENSHOT 1 Let’s see if things match up here The firmware

version is 2.0, which is backed up by the silkscreen legend in

Photo 1 The tx_interval value of 0x28 matches our set_tx_interval

API call argument You’ll find every entry in the Watch window

to be accurate Wondering why the network ID value is

missing? Two reasons: there is no command to read the

network ID and the network ID is hidden for security reasons.

SCREENSHOT 2 You can convey plenty of control and monitor information with 10 bytes And, you can count on the data you see in this shot as being accurate as the EmbedRF performs an automatic CRC check on each data packet.

Trang 39

application code snippet:

for(i=0;i<tx_end;++i) //load the transmit packet array

Before running the API transmit application, I

commanded the laptop EmbedRF to search for the first

transmitter it could hear Kicking off the API transmit

application resulted in the EmbedRF DesktopPRO “hearing”

the PIC’s EmbedRF and establishing a session with it The

results of the communications session can be picked

out of the EmbedRF DesktopPRO window you see in

Screenshot 3

According to the API transmit application code

snippet, the PIC’s EmbedRF transmit device ID is 0x112233

or 1,122,867 decimal The PIC’s transmit device ID is

verified in Screenshot 3 The 10-byte data packet

transmitted by the PIC’s EmbedRF begins with 2 and ends

with 11 This is also backed up by the Raw Data Received

view in Screenshot 3 We disabled all of the EmbedRF’s

A-to-D inputs, so you can ignore the

Analog Data Received numbers as

they are just the hex values of the

data we entered into the data

packet For instance, A/D 0 says it

sees 515 counts That’s because it’s

calculating 0x0203 (515 decimal) as

an A-to-D reading The same goes

for A/D 1, which is a result of

0x0405 or 1029 decimal

The Hard Work is Done

Take a look at the EmbedRF datasheet and you’ll seethat there are many more commands than we havediscussed here The good news is that every EmbedRFcommand has a corresponding API function call; I’vetested all of them So, all you have to do is put themtogether to form your own unique EmbedRF application

To ease your learning curve, I went to great lengths tomake sure that the API call arguments closely matched the EmbedRF command descriptions in the EmbedRFdatasheet Integrating the EmbedRF hardware is a no-brainer and with the availability of our home-brewedEmbedRF API, bringing an EmbedRF network online is awalk in the park I’m sure that you won’t have any troublecoming up with an application for the EmbedRF dataradios See you next time! SV

PIC18LF2620; MPLAB IDE;

Make your product wireless - quickly, conveniently, and affordably EmbedRF is

a rapidly-deployed, turn-key, networkable wireless solution for low data rate,ultra low-power analog or digital applications Avoid lengthy RF developmenttime by using EmbedRF short-range low-power wireless modules in your productdesign Notable features: RSSI output – ideal for finding nearest module or positiontracking; current levels are CR2032 coin-cell friendly (average current to <12uATx/Rx); >0.25s periodicity; unique IDs avoids cross-talk; < 6mS link latency;buffered receive data allows for other system priorities

Full details at www.EmbedRF.com Available from Saelig Company

www.saelig.com

SCREENSHOT 3.

Trang 40

When designing a product that will sell millions of

units, every cent counts, so engineers will oftenuse very creative methods to program a singlemicrocontroller to handle multiple tasks These tricks can be

difficult to comprehend, let alone implement For one-time

projects — especially for hobbyists — programming a second

inexpensive microcontroller to perform the task achieves the

same results but requires significantly less time To simplify

programming even more, many manufacturers sell

controller boards based on

micro-controllers that are preprogrammed

to perform a single task Even

though the cost of creating an

entire circuit board is much higher

than the cost of an extra

micro-controller, these boards are quicker

to set up, are reusable for other

projects, and more than pay for

themselves in saved time If

multi-costs really do add up, so the best option would be to haveone board that performs multiple functions

Controlling a Servo

In last month’s article, Chris Savage discussed the hardware design for the multipurpose controller boardshown in Figure 1 The board, based on the ParallaxPropeller™ chip, will perform the functions of an R/C

servo controller, a stepper motorcontroller, and a PWM controller All three motor control signals havespecific timing needs, so with a traditional interrupt-based micro-controller it would be difficult to getthe timing correct Because thereare eight processors — or cogs — inthe Propeller, these tasks can easily

Ngày đăng: 02/01/2014, 02:37

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN