## Saturday, December 13, 2008

### FIRST Lego League

I'm sitting here at the SHARC table for the FIRST Lego League Championship here in Denver, CO.

Really cool to see all the interest and enthusiasm in robotics amongst the kids! We've had a lot of visitors here.

The Wall-E robot is by far the most popular of course.

But the firefighting robots, ol' Pokey and Physignathus, are getting a fair share of attention, too.

## Wednesday, December 3, 2008

### Logic Analyzer

I went to my first SHARC meeting in months. Was good to meet some new folks and say hi to the regulars.

FIRST has started up so am thinking about attending their next meeting on Sunday. I've wanted to get involved in this kind of thing so now is a good opportunity.

Aside from a good time, one of the guys gave me a Hewlett Packard (HP) 1650A logic analyzer (see photo). Could be interesting and even useful, who knows. The machine didn't come with probes (they are called "pods") or the operating system disk. I wondered if I could get this thing working.

If you've never resurrected obsolete equipment you should at least try it once. It's a hoot. Technoarcheology. (Remind me to tell you about the computer club we formed in college...)

## Saturday, September 6, 2008

### Squeaky: Power Supply and Motor Demo

Squeaky: < prev | next >

Squeaky's 24V motor power supply is operational. Eureka!

I blew up the bridge rectifier that came with the bread maker so I used four 1N1004 rectifier diodes that were in the parts bin to make a diode bridge with a 1000µF cap in the middle to smooth out ripple and provide a little reserve current. My very first AC-DC power supply!

I reused the bread maker transformer which is a 24VAC with center tap. I noticed Radio Shack had a number of these for sale. I am hoping to figure out a way to do a dual output supply but for now I have the ~32VDC that I need.

The only downside is that the motor spins a bit slow, so with the additional reduction of the small rubber drive puck, the platter is spinning quite slow. That may need correcting.

Squeaky: < prev | next >

## Thursday, September 4, 2008

### Squeaky: Why Vinyl?

Squeaky: < prev | next >

You may be wondering why a guy that's into robotics would want anything to do with records. They're so last millenium! I've always enjoyed the experience of playing records and I recently discovered that LPs can rival CD sound quality. Provided the records are well cleaned and played on a good turntable.

As we all know, the word robot comes from the Czech robota, figuratively meaning drudgery, or hard work. Nothing could better describe the process of cleaning LPs. It really sucks. And that's where Squeaky comes in.

In case you still don't believe LPs can sound good, here's an audio clip comparing the CD and LP versions of the same recording of Mozart's Oboe Concerto. Have a listen.

Squeaky: < prev | next >

### Squeaky: Drive Mockup

Squeaky: < prev | next >

Squeaky the Record Cleaning Machine is coming along nicely. Last night I spent a few minutes mocking up the drive mechanism (left) after a short trip to the hardware store.

If you look closely, there is a nut between the white plastic driven sprocket and the motor sprocket, slightly off-center. That is the pivot point for the drive chassis. With a spring forcing the idler wheel against the platter as shown, precision mounting isn't necessary, the amount of force can be made adjustable, and the device is wear tolerant.

The pivot itself is super simple as the series of pictures below demonstrate. A bronze bushing is press fit into a block of wood (below left) and a 3/8"x2" bolt slides through the bronze bushing acting as the axle.

The non-threaded portion of the bolt rides in the bushing. The two serrated lock nuts (below center) clamp onto the drive chassis which required one of the existing holes to be enlarged. Note the washer pictured below. It's probably unnecessary and will just wear out; it would be better for the nut to ride against the bushing directly.

The block was a bit thicker than the bushing so for the mock up, a hole in the block on the bottom side (above right) allows the bolt to slide up against the bottom of the bushing and also allows the entire assembly to be mounted to a flat surface without interference.

I realize none of this is very pretty. It is a mock up after all. Now that I have a sense of how it goes together, I'll revise the mounting blocks for the platter and drive chassis, making them one block, and more compact. If you can't tell I am pretty much making this up as I go, rather than trying to draw / draft it all out ahead of time.

Meanwhile I'm in the process of procuring some inkjet printers that will donate their stepper motors for controlling the motion of the cleaning, scrubbing, vacuuming arm(s). My only concern with using stepper motors is the expense of a controller. Other alternative: a cheap servo, if it is strong enough to do the work.

Squeaky: < prev | next >

## Thursday, August 28, 2008

### Squeaky: Platter Drive

Squeaky: < prev | next >

One of the key features of a record cleaning machine is the ability to spin the record without manual intervention. I'm getting really sick of cleaning records by manually spinning them on my turntable while I scrub.

Some folks on AudioKarma.org had suggested use of a bread machine, presumably because it uses a fairly high torque motor and some kind of gear reduction.

Upon dissecting the $2 bread maker I got from Goodwill, I found a metal plate onto which a motor and drive mechanism are mounted. As shown in the pic to the right, the motor drives the stirring mechanism on the opposite side of the plate via a tooth belt. The white cog wheel is attached to a stainless steel drive shaft riding in a bronze bearing by way of a 6mm nut. The drive mechanism is attached to the drive shaft and engages the stirring gizmo in the bread bucket to stir and knead the bread, similar to how the blades of a blender are coupled to the blender motor. But how to drive a turntable platter? The two I had on hand spin on greased bearings attached to a mounting plate to affix them to a horizontal surface (see pic to the left). They are both from belt drive turntables. Should I try to use a turntable belt? These are usually low tension belts and will slip with the slightest drag on the platter. I needed a higher torque, higher traction solution. I want to keep this simple, cheap, and practical with minimum fabrication involved; I don't have a machine shop and I don't want to spend a fortune on this project. Those constraints eliminate a lot of design options. Direct drive would've required fabrication of some type and possibly re-engineering the drivetrain making this an unnecessarily hard problem to solve. Why not drive the platter rim with a rubber idler wheel attached directly to the 6mm threaded end of the drive shaft? A trip to the hardware store and$18 later I had a pile of options. What ended up working best was a rubber hole plug mounted to a shaft extension. You can see the black idler wheel in the top pic.

To extend the shaft, I used a 5/16" x 1.5" aluminum spacer, basically a hollow aluminum tube, which I threaded with my new 6mm x 1.0mm tap. (Aluminum being a softer metal is easier to tap especially with an incorrectly sized hole).

I disassembled a 1-3/4" hole plug (a rubber puck sandwiched between two plates, compressed by a nut and bolt to squish out and fill a hole). The hole plug rubber piece slid over the aluminum spacer shaft, and with washers on top and bottom and a 6mm cap end bolt on top to cinch it down, et voila, rubber idler wheel.

As a bonus, the gear reduction afforded by this small wheel driving the large platter means the record will spin at a goldilocks speed: not too fast, not too slow, but just right.

Next step is mounting the drivetrain and platter on a chassis. I want the idler wheel to apply user-adjustable pressure to the platter. It adds complexity to the design but it makes up for imprecise mounting, lack of trueness of the drive shaft and more importantly, accomodates wear of the rubber wheel.

Eventually, the motor is to be computer controlled. Before that is possible, I'll need to break out my copy of DC Power Supplies: A Technician's Guide and build a dual voltage supply for the electronics and motor of the robot. I've never built an wall-powered DC supply before... fortunately I can reverse engineer the bread maker supply to help.

Squeaky: < prev | next >

## Monday, August 25, 2008

### Squeaky the Vinyl Cleaner Robot

Squeaky: | next >

I have a new robotics project! Well, sort of robotics. It's a DIY Record Cleaning Machine (Robot). A couple months ago, while searching for electronics to scavenge parts from, a very generous individual gave me a couple of vintage stereo receivers.

This started a fast plunge down the slippery slope into a new hobby of vintage audio. With a new-to-me Dual 622 turntable, out came all my old records. Old, filthy records, that is.

It's dirt and other build up in the grooves that causes pops and crackles and surface noise that made CDs such a hit when they were introduced. LPs have a lot more potential than many folks these days are aware of. But realizing that potential hinges heavily on meticulous, thorough cleaning, stylus care and other tedium.

While one can use various methods to clean the crud out of vinyl grooves, the best way is to scrub it with a liquid cleaner and then vacuum it away using a purpose-built Record Cleaning Machine (RCM).

Several great folks at AudioKarma.org described building their own RCM at a fraction of the 3 and 4 digit price tags of new machines. These do it yourself machines are usually manually operated. So I figured, hey, why not build a record cleaning robot, fully automatic, computer controlled, etc? And why not name this robot Squeaky (as in squeaky clean).

The end goal is a machine that, after placing your record on the platter, will apply record cleaning fluid, gently scrub the grooves, vacuum off the liquid and crud, then apply a rinse solution, and vacuum that off as well. The result is a record nearly free from pops and crackles, with minimal surface noise and a very enjoyable listening experience.

' {$PBASIC 2.5} ' SP0256-AL2 Speech Chip ' Control Code ' Text: HELLO WORLD. ' Phoneme: HH EH LL AX OW (PAUSE) WW ER1 LL PA2 DD1 (PAUSE) ' Octal: 033 007 055 017 065 003 056 063 055 001 025 004 ' Dec: 27 7 45 15 53 3 46 51 45 1 21 4 text DATA 27,7,45,15,53,3,46,51,45,1,21,4,0 ptr VAR WORD char VAR BYTE setup: ' P7 <- SBY ' P6 -> 'ADL ' P0-P5 -> Data DIRL = %01111111 HIGH 6 ptr = text PAUSE 2000 go: ' Set char to the next phoneme ' Send it READ ptr,char DEBUG DEC char, CR IF char <> 0 THEN cont END cont: GOSUB pout ptr = ptr + 1 GOTO go ' Phoneme Output pout: ' Now just set OUTL P6='ADL=1, (P0-P5) = phoneme byte OUTL = char | %10000000 DEBUG BIN ? OUTL ' And set P6='ADL=0 for 2usec to tell the chip to read PULSOUT 6,1 ' Wait for P7=SBY (standby) to indicate chip is done speaking notdone: IF IN7 = 0 THEN notdone RETURN Quick Code Explanation: The data sheet goes into this in detail, but in short: the program puts the 6-bit phoneme data on data lines A1-A6, then pulses ^ALD low for a short time to let the chip know data is ready, then polls SBY until it goes high, then repeats until it runs out of phonemes. That's it. This is just a prototype so there's lots more to do before this becomes useful. For example, wouldn't it be nice if a handy dandy AVR of some flavor could front end this chip and accept data over serial and/or I2C? Maybe even do true TTS? ## Sunday, March 23, 2008 ### Circuit Design on Mac OS X Circuit design is fine to do on paper for the simplest stuff but a CAD program is nice for everything else. I'd been using TinyCAD on my P3 400MHz, 128M desktop but am trying to move away from this glacially slow system, not to mention minimizing my exposure to Windows. :) One good answer for Mac users is the free version of CadSoft Eagle running under the X11 windowing environment (follow the link to install X11). While it's not a seamless Aqua interface, it is actually a heck of a nice program once you get use to using it and it has an integrated PCB designer that works quite well. The user interface is a little bizzare, but with some practice I'm getting faster at drafting circuits. So far, the parts library seems to be pretty comprehensive, too. If you want the app to show up in your Dock, you can write a shell script and use Platypus to create a wrapper application (may take several tries to figure it out) or try mine below which includes the shell script. Click on the link, save to disk, unzip, and copy the Eagle.app to /Applications. This app assumes the EAGLE-X11 folder is already installed in /Applications. ### Basic Stamp Programming on Mac With a pause between school "semesters," I've been neck deep in several projects. One of the smaller ones was assembling a Basic Stamp 2 prototype board that came with the book, 123 Robotics Experiments for the Evil Genius (TAB Robotics). This board features a spot for a solderless breadboard making prototyping 10x easier than the Parallax BS2 board I'd been using (let's just say that wire wrapping sucks). In a never-ending quest to unshackle myself from Winderz, a Google search followed by a quick experiment revealed that one can program BS2 using my favorite operating system. How? Easy. 1. MacBS2: This is the IDE. Not fancy but who cares? Download it here. 2. Keyspan Serial Adapter or equivalent (e.g., Keyspan High Speed USB Serial Adapter ( USA-19HS ) from Amazon -- check to make sure this will work on the MacBS2 website). After downloading MacBS2 read and follow the install instructions. You'll copy the application to the Applications folder. Using an administrator account, launch the application and when prompted, click to download & install the tokenizer library. Install your Keyspan (or whatever) software, and plug it into the computer & proto board. Write a program. Click run. Et voilà! Enjoy the magic of BS2 on Mac OS X. :) (To those who celebrate it with me, Happy Easter! Otherwise I wish you a Happy Sunday :)) ## Thursday, March 20, 2008 ### Firefighting: Video Clips I'm hoping to get some more clips and different angles from those present, but for now here's some of the robots (including Pokey :)) from the Ft. Collins Robot Firefighting Competition: ## Tuesday, March 18, 2008 ### Fan Motor Circuit Thanks to Brij who pointed out some problems with Pokey's fan motor driver circuit that I threw together at the last minute. I stand corrected :) Going to go back to the drawing board and pull out the old school textbooks. I pulled the original post for now. UPDATE! I started a new series of articles on revising this fan motor driver using SPICE modeling. ## Monday, March 17, 2008 ### Flame Sensor Quite a few people have asked questions about Pokey's flame sensor (the big, cylindrical yellow and black thing in the picture). Here's the rundown. First and foremost, the design uses infrared LEDs for sensing infrared radiation. Yes, that's right, LEDs. Of course LEDs emit radiation when voltage is applied, but a little known fact is that they also generate a voltage in the presence of radiation -- and specifically radiation in the frequency range that they emit. I tried UV LEDs but they weren't sensitive enough to detect UV output of a candle. The pile of IR LEDs I ordered happened to generate about 0.5V max when pointed at incandescent lamps, candles, etc. The only problem? Range. By themselves IR LEDs are a bit too limited in range to provide a strong signal from across the largest of firefighting rooms. I had the idea of using some kind of optics to increase range and after some experimentation the solution was to use the reflector off of a$3.50 Eveready lantern flashlight with the LED replacing the bulb. Range was increased to at least 8' -- plenty.

This device has the added benefit of limiting field of view, making the sensor less sensitive to IR sources outside the arena, but very sensitive to candles within the regulation height range. I installed dual IR LEDs in the housing hoping to give the sensor directionality but this didn't work out. A single LED works just as well.

Finally, to give the MCU's Analog to Digital Converter (ADC) a little more voltage range to work with, the signal from each LED runs through half of a simple, single-source op amp amplifier (LM258 or equiv) as pictured above. The resistor and capacitor in parallel seemed to help stabilize the LED signal when I was experimenting, taking ADC readings directly from the LED.

I used aluminum tape to block off the sensor's view to the side, essentially improving the "peakiness" of the sensor's response when scanning a room, making it easier to pinpoint the direction of the candle.

Edit: Brij asked why not use an IR phototransistor or photodiode (see comments). At the start, I tried several different sensors, actually. The phototransistor was too sensitive; pegged out too easily. Didn't think to try a photodiode. The LEDs showed a fairly linear response, just enough sensitivity. In short, they work great!

## Sunday, March 9, 2008

### The Competition

Ended up leaving around 8:40 having just tested scanning for and extinguishing a candle in the living room. Arrived up in Ft. Collins by 10:10, with plenty of time to adjust floor sensors, test the robot in the arena and tweak code.

SHARC and FRR made a great showing with lots of competitors and spectators. The room began filling up with kids to watch the event. While all this was going on, my robot kept misbehaving right at the starting circle, making a left turn into the wall about 75% of the time. I couldn't figure it out.

Then my batteries died. While I swapped them out, the wires to my battery tray broke loose again! I had to jerry rig a solution: strip the wires and manually wrap them around the end terminals. Stressed out, fumbling around, trying to block out the noise and chatter of the crowd, I got that fixed and it held together for the rest of the competition. By now there was a good sized crowd of small spectators and quite a few adults as well.

My first run was a disaster. Even though the candle was in the first room in Pokey's list to visit, the robot careened off to the left again directly into a wall. Others in the competition had problems with navigation at first, too. Pokey went back to the bench for diagnosis. For some reason the IR rangers, which had been dead solid in every condition I'd tested, were giving jittery readings and popping above and below the threshold for detecting the presence of a wall. This tricked Pokey into thinking he was farther along on the course than he actually was. With new threshold values Pokey was ready for the 2nd run.

This time around the odds were seriously stacked against the little red robot. The candle was in one room he'd never made it to before was the one directly adjacent to the start position, the last one on the search path. Though Pokey got to both the first and second rooms, his poor wall following set him off in the wrong direction for room 3.

By this point, George had put out a candle with water, and Anthony did as well! Very awesome to see these robots working so well!

Back on the bench, I did some additional minor code tweaks and put Pokey on the home circle for the third and final trial. The candle was in the 2nd room on his itinerary so there was a good chance for success.

The timer started, Pokey was off. He made it into the first room flawlessly, scanned, then exited and made his turns into the second room, stopping a bit short, then he scanned... but missed the candle and left the room! My last minute coding of the scanning routine just wasn't solid enough yet. So close...

In the end, George took 1st and Anthony 2nd. Congrats to them and to all the competitors. It's not easy building a robot for a competition and everyone who fielded a machine can be proud of that accomplishment.

Heck even those who didn't field a machine but have a start on one ought to feel pretty good. And since SHARC is going to host a firefighting challenge in April we all get another shot at this. (Well, unless it happens on the same weekend as my trip to Moab for four-wheeling).

In the meanwhile, I'll share what I've learned, post up code and circuit diagrams and other fun stuff. Once I get all the video and pictures from folks I'll edit together a video and post that too.

Thanks to everyone who has been reading this saga, your support is much appreciated!