Encoder Front Page
SRS Home | Front Page | Monthly Issue | Index
Google
Search WWW Search seattlerobotics.org

Robot: Merlin

Bill Ruehl and Chris Nocchi

Where's the fire???
Merlin, (the robot pictured above) was designed to navigate a maze of known layout and dimension, in search of a single candle flame, for the purpose of extinguishing that flame. Why would two people endeavor to invest the time, thought money, and effort into such a goal? To win of course. Well at least try like heck! The two people I am referring to are myself (Bill Ruehl) and Chris Nocchi. Merlin was designed to compete in the Trinity Home Firefighting Robot Competition held annually at Trinity College in Hartford, CT. The event is managed by Jake Mendelssohn at Trinity and is the largest true robotics competition in the US. (Jake does a great job with this event). This article will attempt to outline the chronology of our design and construction of Merlin. Here goes...

3:05 a.m. 01/03/98 - Chris and I are looking at an column written by Karl Lunt in Nuts & Volts entitled "Amateur Robotics" in which Karl was writing about his development of a robot for the Trinity Contest. Our interest piqued we turned to the WEB site (listed in the article) for the Trinity Contest. Well, after seeing how well thought out this event was we began throwing ideas at each other about hardware design, software flow etc. By 3:30 a.m. that same morning we were hooked. (the times you see are not a typo, we both work third shift for SVG Lithography Systems and our lunch break starts at 3:00 a.m.!).

01/04/98 - The firestorm of questions let loose by the design issues we faced had begun. Where do we start? What do we use for a controller (Merlin's brain). How would Merlin be constructed? How does he know where he is? How does he know where the fire is? What are our wives going to think? We decided to focus on what we believed to be the fundamental foundation of Merlin's design - The chassis and the controller. Over the next week we surfed the WEB feverishly in search of the "ideal" controller. Each of us pursuing this goal independently yielded tons of possibilities. Each night during lunch we would present our findings to one another and critique the pros and cons of a given controller and then weigh this criteria against the controllers we had previously reviewed. This process allowed us to comb large amounts of data in "parallel" and distill the optimum selection against our design goals. Our design goals, for a controller, appeared simple enough.

1. Cost - Less than $150.00

2. Minimum of 4 A/D channels.

3. Multiple programming languages. (BASIC, C, Assembly, etc.)

4. Size - 3''x 5'' Max.

5. Source code availability (neither one of us had written any code in a while so source code would help us through the learning curve a bit. (Forgive the pun)

6. Background PWM. Two channel Min. (we needed a differential drive for steering and we wanted the navigation code to be active full time so we could pass motor commands and corrections to a background PWM routine.)

7. 16 Channels of I/O in a flexible configuration.

8. Basic serial communications provisions.

9. Low current draw 100 mA or less.

10. At least 8k of program space.

The Motorola 68HC11 kept showing up again and again in our late night discussions, it was a near perfect match. We chose the Adapt11C75DXE from Technological Arts in Canada to house our chip of choice. We found their offering to be very compact and extremely well made. We made our purchase and Chris began work on the navigation code. Meanwhile we still needed a chassis....

01/12/98 - With Chris now locked in a hypnotic stare with his PC monitor, his fingers blurred by speed that would put Mavis Bacon to shame, I began to work on the frame design. We had looked at many robot designs and noticed a tendency towards the basic "flat pan" chassis. Merlin had to be different. In my project note book I had sketched a tubular frame which integrated two motor mounts for NEMA 23 frame steppers, a generous area for P.C. board mounting, an enclosed caster mounting up front, and integral bearing mounts for the drive wheels. We needed a tubing which was easy to work with and had a good strength to weight ratio. We used a ridged brass tubing from K & S Engineering which is 3/16" by 3/8" rectangular box tubing with a wall thickness of .014" and comes in one foot lengths. This material proved a dream to work with, it cuts well, and assembly is accomplished with a silver solder and flux combination that Harris offers for use with this material that yields very high strength joints. With our material selected and a rough idea of the size and configuration we drew the frame with AutoCad. Autocad allowed us to layout the frame components with precision and provided critical data on clearances as well as yielding very accurate patterns and dimensions for the machining of the individual frame elements. (See fig. 2). The overall frame dimensions are 10" x 12" which proved a little large for easy navigation of a maze with 18" corridors, but not impossible. We did end up with a frame which would provide a stable, strong, and efficient platform that could be used for many different uses. We are currently testing Merlin with a CCD camera in place of his Fire Scanner for use as a roving "security guard" by transmitting his images back to a central "manned" guard station. But more on this at a later date.

02/01/98 - With the basic frame assembly done (see fig. 3) we began to realize how much this project could cost us. We needed some financial support fast! Armed with nice detailed drawings of Merlin we sought counsel with area Businesses and manufactures of the components we needed. We approached this NASCAR style, offering our potential sponsors advertising exposure in return for free or reduced cost on the parts we needed. This avenue required a little leg and phone work but it paid off handsomely for our sponsors and us. Soon "Team Merlin" was flooded with A/D converters, stepper motor control chips, precision mechanical components, surplus optics, etc. (not to mention help from some of the industry's best application engineers). Dan Aegis from Nordex Inc. provided us with a tour of his facility and provided us with all of our precision mechanical components. John Pyle helped us with both components and technical support from Allegro Microsystem's line of motor control IC's. Calvin Ruehl provided some great surplus optics and technical assistance from Laser Optics in Danbury, CT. Day in and day out Chris and I bounced ideas and designs off each other with a high speed technical banter that often left the casual passerby mystified. Each offering to point out strengths and weaknesses in the others plan which resulted in rapid refinement of our overall design.

02/15/98 - It's now mid February and the code development is beginning to gel, the frame is completed. But all is not well in the "Team Merlin" camp. We had seen problems with our original I/R ranging design, it would not work on the simulator. We spent the next three weeks mired in a circuit design, which refused to work. We were loosing precious time. A breakthrough was needed, and lo and behold it came in the form of a peak hold op amp configuration presented in one of the little booklets put out by Radio Shack entitled "Engineer's Mini-Notebook: OP Amp Circuits" by the infamous Forrest Mims III. We now had a very simple solution with a very small component count but its now almost mid March....

03/15/98 - With some "massaging" our I/R ranging system is giving predictable ranging information on the simulator (we used CircuitMaker version 5 from MicroCode Engineering Inc.) but this effort had tied both of us up for way too long. We still needed motor controllers, optical designs for the I/R emitters & detectors, a fire finder, and a DC supply capable of high current for the motors and tight regulation for the analog and digital controls. With only a month left the pace quickened. Our current focus was getting Merlin mobile so we could evaluate his movement geometry, armed with this, Chris could integrate our findings into the navigation code. Our first stepper driver board failed the "smoke test". The next one wasted way too much power in the form of heat across the power resistors. We needed a "chopper design" and we needed it fast. Bill Bailey of the Seattle Robotics Society to the rescue! Using Mr. Bailey's "Chopper" board we could dial in exactly the current we needed with big improvements in efficiency. Supplying Merlin with the needed voltages proved pretty straightforward. The power system consisted of two 12v 2400 mA gel cells in series for a combined output of 24v which gave our stepper motors plenty of high speed torque. 12 volts was picked off and fed to a tiny laptop switching power supply. These supplies are dirt cheep on the surplus market and their efficiency is unmatched. Team Merlin paid less than $7.00 for the 21-Watt unit seen in fig. 3. This gave us outputs of 5v, 12v, -12v with solid noise immunity from the motors. Merlin is beginning to look and act like a robot...

04/01/98 - With a little over two weeks until the competition Team Merlin is working at a pace which consumes every single available minute. We began working on the fire detection and extinguishing equipment that Merlin would carry. A Basic Stamp 2 from Parallax Inc would handle both functions. The Basic Stamp's job is to find the flame, determine its bearing and send that angle to the 68HC11. The 68HC11 would then navigate on that path until he "sees" the white circle on the floor around the candle flame via a floor sensor. (Which is part of the contest rules) At which time the navigation code sends confirmation of his completion of the move, and the Stamp goes to work on the fire. The Firefighting apparatus on Merlin consists of an automotive windshield washer pump, a small plastic water tank and a custom fan spray nozzle fitted to the fire locating optical assembly. This arrangement proved very reliable at putting out a candle. Also important to note here is that in our design phase we wanted to use techniques that could be scaled up easily for use in a real fire-fighting situation. Many competitors used a large fan on the front of their designs to blow out the candle, which for the contest proved reliable, however approaching a real fire in this fashion would prove disastrous at best. Code development for the Stamp took about a day and worked well. Remember the I/R ranging we were working on? This had been put on the back burner until 4 days before the event because of all the other work we had been doing (not to mention full time jobs, kids athletic events, Scout meetings, etc.). In about 10 hours our circuit went from a CircuitMaker schematic to a 4 channel fully operational I/R ranger with a measurement range of 1" to 2 feet, all mounted on a small single layer board. The emitter/receiver modules were mounted to the four sides of Merlin's frame and the 0 to 5v outputs of each channel were patched into the A/D system on the 68HC11. Viola! Merlin has eyes! Now we needed a maze, a place to set it up, and time to test. Reluctantly my wife agreed to let us have the dinning room to build the maze in and the Living room to perform the repairs and modifications to Merlin. My Dad painted and cut the plywood for our maze and with 3 days to go we were able to begin our first "real testing"...

04/17/98 - The all nighters are in full swing now - no turning back. Chris is pulling his hair out, Merlin is smacking the walls with unexplained premature turns, my fingers are blistered from frequent "close calls" with the soldering iron, and my wife is ready to kill us both because here house is littered with robot related paraphernalia. Maybe there's just a little tension here... Finally, at 4:38 a.m. 04/18/98, Merlin had negotiated the first part of the maze and put out his first candle! We had to subdue our high fives and exuberant screams due to a less than compassionate reaction from our neighbors upstairs. (OOPS...sorry). By the time we had packed up it was 6:00 a.m. and qualifying was at noon. Chris and I grabbed three or four hours sleep and then dragged ourselves to Hartford (about an hour away). We qualified right away and went to the lecture hall to hear the speakers, which had already begun. The lack of sleep was taking its toll on my partner, his digestive tract was lodging a formal complaint with his central nervous system and he was fading fast. We had planned to stay at Trinity till they threw us out, to make use of their maze to iron out the rest of the navigation code, but this was not going to happen. We both arrived at 8:00 a.m. at Trinity the next day and started testing. We could get the first two rooms OK but the balance of journey was not working well at all. We were in full debug mode, enlisting neighboring assembly code gurus and re-testing, then cursing, and re-testing (well you get the picture). Before we knew it we were up next! Lady Luck threw us a bone. The Judges rolled the dice and the candle was placed in the first room of our search pattern. Merlin was placed on the starting position and the judges sent him on his way...Merlin executed his first turn and faulted when he tried to turn into the first room. He had never had a problem with this maneuver. Later analysis indicated that a change in a branch command had caused the fault, a change we made when trying to get the communication routine between the Stamp and 68HC11 working. We still had two more runs and the best two counted so we were still in contention. The debug continued, frantic at this point. We were up again. The judges rolled the dice and Lady Luck stuck her neck out for us again, the candle would be placed in the second room of the maze. We knew we could do that room. Merlin was placed on his mark and the judge flipped his power switch. Merlin sped off on his appointed rounds, made the first turn and ducked into the first room scanned for the flame and although he didn't detect anything Merlin charged into the room, as if had seen a candle, then promptly smacked into the opposing wall. The navigation code worked but the number the Stamp sent to indicate "no candle" was not recognized. Our second chance was gone. We went back to the bench with our heads hanging low and jumped back into the code. We were up again with no idea what was causing these anomalies. The judges were kind and put the candle in the first room again and Merlin raced through flawlessly and put the candle out. The crowd cheered and Merlin's time was on par with the leaders. Due to the first two failed attempts we were knocked out of competition but we at least had a moral victory.

 

Later analysis of the communication code reveled that the Basic Stamp was configured incorrectly and was sending a ASCII string instead of a raw number to the 68HC11's math routine. One small three letter BASIC variable modifier brought three months of hardware development crashing to it's knees. We had a ball with this project and fully intend to be back in Hartford next year. The lessons we learned over the past three months will serve us for the rest of our professional lives. To sum it up the real fire Team Merlin found was deep inside, so even if you've suffered a setback or two keep designing, dreaming, and trying - who knows, you maybe one three letter BASIC command away from glory! Having been involved with the hardware end of engineering for most of my career I have occasionally slighted the software guys. Now I have a very different perspective. To all the Software guys out there, my hats off to you.

 

Sources:
Technological Arts
http://www.interlog.com/~techart/
 
MicroCode Engineering Inc.
http://www.microcode.com
 
Nordex Inc.
http://www.nordex-inc.com
 
Allegro MicroSystems Inc.
http://www.allegromicro.com
 
Laser Optics Inc.
203-744-4160
 
Parallax Inc.
http://www.parallaxinc.com
 
Written by:

William K. Ruehl

http://robotdude.com

Email at  wruehl@hotmail.com