I may have mentioned to you that I got a new phone a few weeks ago (or perhaps months ago, by now.) No, it’s not a Blackberry Storm, nor is it an Android or even an iPhone. It’s an AT&T Tilt, also known as the HTC Kaiser or P4550. It’s not so much a phone with lots of features as it is a pocket PC that you can talk on. It’s got practically everything: Bluetooth, 802.11, GPS, touch screen, a slide-out keyboard, Micro-SD, and a decent camera.

One thing I’ve been wanting to do with it is use it as an Internet gateway for my notebook when I’m in a Wi-Fi dead zone or a moving vehicle. One small complication, though: my notebook is an Inspiron 1525n running Ubuntu. Can it be done? Why, yes it can.

Fortunately, when I ordered my notebook, I ordered the pre-installed Linux option. The drivers for everything (including the DVD player) were pre-configured. So, Bluetooth was already working, and I was able to use the Gnome Bluetooth Applet to create an association between the Tilt and the notebook. But, when I tried to browse the phone from the Applet, there was a problem: "Couldn’t display obex://…." Fortunately, it turned out that this message isn’t important to using the phone as an Internet gateway, nor is the Bluetooth Applet itself.

The next step was to start Internet Sharing on the Kaiser. There’s a bit of a trick to this.

  1. Using the File Explorer, browse to the phone’s Windows directory.
  2. Locate and copy the file called "Internet Sharing"
  3. Browse into the Start Menu folder.
  4. Paste Shortcut.

And now, Internet Sharing can be launched conveniently from the Start menu. I configured the Internet Sharing application to connect via Bluetooth to the PC, and to connect to the MEdia Net network (since that’s what the phone chooses when I launch its own Web browser.) I clicked Connect and the phone began to wait for the PC to connect.

To get the PC to connect to the phone, many guides will tell you that you must patch your kernel, install a PPP client, create a bunch of config files, and a bunch of other bologna. I’ll tell you now that all of that is not necessary with this phone. What was necessary? One command. Seriously.

/usr/bin/pand --role PANU --search --persist --encrypt

This command creates an ad-hoc Bluetooth network between the PC and the phone. It also creates the bnep0 network interface device, which can be treated exactly the same as your typical eth0 device. This is fortunate, since when the device first appeared in my ifconfig listing, it had no IP address. DHCP to the rescue!

/sbin/dhclient bnep0

I did have to disable my 802.11 network interface before I could send traffic through the Bluetooth interface (obviously, it had preferential routing, as it well should have had.) Once I did that, it worked surprisingly well.

Additional Resources:

Today, I finished the Crackerbox amp. You may recall that I mentioned finding an orphaned stereo speaker. You can see it below, left. After thinking about it, I decided to salvage the case along with the speaker within. I cut out the warped part and replaced it with a piece of plexiglas I found, then after some more thought, declared that to be the bottom of the device.

After that, it was just a matter of drilling, wiring, and screwing. Then, voilĂ !

Someone Turned It Up To 11   Amped Up

The remaining bits for my WSG arrived today. A friend of mine is going to help me get the front panel markings printed as a vinyl decal, which we think will look pretty nice on the steel box I’m planning to mount everything in. I can hardly wait.

Since I’m still waiting for a few more parts to finish the WSG (they shipped today, at least) I decided to build something else in the meantime. Something that would be useful with or without the WSG. I decided to build the "Crackerbox" amplifier (aka the Little Gem) as seen in Make #9.

I have heard that others who have tried to build this circuit have failed. I found it to be quite simple. Amazingly, it worked the first time that I hooked up the battery. A pleasant surprise, to say the least. Sure, the sound was a little tinny, but I was using a speaker that I found in a fax machine. It sounded quite a bit better when I hooked it up to an orphaned stereo speaker.

Before   After

Other folks have said that the "$5" in the title of the article is misleading. I agree to a point. I couldn’t find the 25-ohm rheostat anywhere but Radio Shack, and that alone had to have cost around $3. I went to Fry’s for three other parts and spent about $5 .there also. If I had gone to a real electronics shop, I’m guessing that I probably could have got the pots for about $1.00 each, the chip for maybe $0.50, and the resistors and capacitors for something like $0.10 each. I don’t know if I could have got a battery, battery clip, and speaker for $2, but I suppose it’s possible. So yes, it’s not a $5 amp if you shop at a chain, and especially not if you shop at Radio Shack.

So, it appears that after all my lofty proclamations about posting more often, somebody, as they say, thought they had a better idea. And it wasn’t me, honest. Well, maybe it was me just a little bit. Okay, 100%. Whatever.

Anyway, I have got the most delightfully tedious trivia for you. As I’ve mentioned, I’ve been tinkering with an old Mobile Armatron with the aim of putting it under autonomous computer control. I partially rewired the motors and built a small power supply for the eventual onboard logic, and then began on a motor controller that would fit in the Armatron’s "trunk space". I ordered a few L293 chips, since they seemed to be ideal for the purpose, and lots of people seemed to like them.

Unfortunately, I learned that setting up the circuit on a piece of protoboard would definitely not work. I ended up with a spaghetti nest of jumper wires that was so thick I couldn’t even fit them all in. Obviously, I’d have to design a board. I set that project aside for a while in order to do some reasearch on how to do that. I finally discovered three techniques which made it relatively easy.

One discovery is Eagle, a printed circuit design application, which makes designing boards easy (for limited values of easy.) You draw your schematic out in the schematic designer, choosing parts from a vast library and wiring them together. It is not a launch-it-and-go application. Eagle is quirky and odd and has a definite learning curve. I would definitely advise anybody to run through a few tutorials before trying to design a masterpiece. It took me a few hours, but I did get the hang of the basics.

The next discovery was of the toner-transfer resist method. Laser printer and copier toner can be transfered from paper to a copper-clad printed circuit board with the use of a simple clothes iron. Of course, using the correct sort of paper makes a big difference. It’s been said, and I must agree, that magazine paper works quite well.

The final piece of the puzzle was the cupric chloride etching method. A reusable etching fluid can be made by combing ingredients from both the drugstore and from the hardware store. And it works pretty well. I did notice that the etching process was pretty slow, but I eventually realized that was because it was a cold night. I had set my etching container in a Pyrex dish to catch any spills, so pouring hot water into the dish warmed the etchant and sped things along.

So, you may be wondering, what do I have to show for all that work? Well, it looks sort of like this:

A Work of Art

Here’s something we haven’t done for a while, but someone did submit a good question, and it deserves a good answer.

Q. Where do you find the best parts to scavenge for robotics?

A. Just as the best food for fish is fish, the best parts for robots are robot parts. However, finding a dead robot from which to scavenge parts can be difficult under normal circumstances. So I have prepared this list, based on my own experience, of things one is likely to find in normal circumstances, and of what useful things one might find inside those things.

Computers

Power Supply
Not worth scavenging parts from as it contains large capacitors whichcan be quite dangerous. However, AT/ATX power supplies are quiteuseful to the experimenter as they deliver a useful range of voltages:+12, +5, -5, -12, and 3.3 volts. If you’re using an AT power supply,ensure that the switch is adequately insulated to avoid anelectrocution hazard. You will also need to supply a load for thepower supply to work properly, such as a large resistor. Perhaps youmight consider building an enclosure for the switch, load, and powersupply with spring-loaded terminals for each voltage. Although I donot recommend opening the power supply, this page is still helpful. And here are some other ways to get power from a PC.
Motherboard
Very old motherboards are treasure troves of 7400-series chips,kilobytes of memory, and some specialty chips like UARTs andprocessors. However, unless the board is bad, first consider whetherit might serve you better as the brain of your robot.
Expansion cards
As with motherboards, very old expansion cards are even bigger trovesof 7400-series chips. People are usually happy enough to get rid oftheir old modem cards, and these usually have relays, which are usefulfor controlling motors, especially larger ones.
Floppy disk
I don’t get too excited about 3.5" floppy disk drives as the steppermotors are pretty small and haven’t proven that useful when removed.On the other hand, 5.25" drives, if you can still find them, have muchlarger steppers. You may find a stepper motor driver on the board ifyou’re extremely lucky, but in my experience, the steppers are drivenby the drive’s CPU either directly or via a transistor array. Youmight also, with some research, be able to get the pancake motor (thatspins the disk) to work. On the oldest 5.25" drives, the flashing ofan infrared beam shining through a hole punched in the disk was usedas a timing signal to keep the motor spinning at 300 RPM. Otherpancake motors use magnets instead of a beam of light to accomplishthis.
CD-ROM
You can usually find two to three DC motors in a CD-ROM drive: one tospin the disk, one to move the laser, and one to move the tray. You’llalso find some gearing assemblies in conjunction with the tray thatmay or may not be useful in making a linear actuator. If you look onthe board, you could find a few audio amplifiers, a DC motorcontroller, or a microcontroller.
Hard disk
Unless it’s very old, there won’t be a lot of useful parts except forthe neodymium magnets. These have all sorts of uses, particularly inattaching heavy objects (like bulletin boards) to metal objects (likeyour refrigerator.)
Mouse
You’ll find a few microswitches, and either a pair of rotary encoderswith infrared emitters and phototransistors, or a tiny camera.
Printers, fax machines, copiers*
Here’s where you’ll find a few motors and loads of gears, cams, rods,springs, and pulleys. In inkjet and dot-matrix printers, you’ll alsofind a screw or belt that drives the print head back and forth. Therewill probably also be an encoder disc or even a strip that theprinter’s CPU uses to ensure that the print head is in the righthorizontal position.

Entertainment

Stereo*
Loads of analog components. If it’s got a CD player, see CD-ROM. Ifit’s got a tape player, there will be at least one DC motor andperhaps a belt system. You may also find a DC motor controller.
VCR*
You’ll probably find at least one DC motor and motor driver. You’llalso find a few gears and belts, and an infrared detector.
Televisions (and monitors)*
Not much besides a few analog components such as resistors andcapacitors. In fact, old televisions often have especially largecapacitors inside, which can be dangerous if not properly discharged.I would avoid these entirely.

* Take care when opening such devices. Unlike your friendly neighborhood PC, the power supply in one of these devices is unlikely to be shielded, and even if the device has been turned off and unplugged, large capacitors can store a hazardous amount of voltage for a surprising amount of time.

Q. I’ve asked my friends to give me their broken appliances so that I could scavenge parts from them. Now I have so many circuit boards lying around that it takes me longer to look for a chip than it does to remove it from the board. How can I get more organized?

A. I had this same problem. The answer is to create a database. With the work of an hour or two, you’ll soon have all your parts at your fingertips. And if you’re a Windows user, chances are you may already have all the tools you need on your computer. I’m talking about MS Access. Sure, professional DBAs may scoff at this program, but it will be sufficient for cataloging a few hundred components. On the other hand, if you’re an ambitious Linux user, you might be well-served to look into a Linux-Apache-MySQL-PHP (LAMP) solution. Whichever route you take, plenty of books and Web tutorials are available.

When I set up my database, I created tables for each sort of component I wished to track. For example, the IC table looks something like this:

ID Part_Number Description Style Container Datasheet
1 L272M Dual Op-Amp 8 Pin DIP 1 L272M.PDF

The Container field points to a record in the Container table, which represents either a circuit board or other container (such as a drawer of loose components):

ID Description Location
1 Brownish board marked LP1-CD MBD 1

The Location field points to a record in the Location table, which represents the various boxes and drawers used for storing Containers:

ID Description
1 Cardboard box #1

Now if I ever need an L272M, or an Op-Amp in general, I can query the database, which will tell me that there’s one on Brownish board marked LP1-CD MBD in Cardboard Box #1 .

Welcome to the second installment of q+=a, The Electronic Replicant’s new question-and-answer feature. As nobody has actually submitted a question yet, I’m going to consult my referral logs again.

Q. How can I control a 120VAC motor with a BASIC stamp?

A . This should not be too difficult if all you need to do is turn the motor on and off. Now, it is important to remember that I am not an electronic engineer, nor do I play one on television. I am also not an electrician, with which one really ought to consider consulting before trying to build anything that interfaces directly with wall current. The following ought to work, but it could just as easily electrocute you, catch fire, or otherwise malfunction. You’re probably better off buying an X-10 module.

Still there? You are obviously an individual of unswayable fortitude, or perhaps you have simply fallen asleep at the keyboard. In either case, what you’ll need is something along these lines:

This is quite similar to the motor controllers I mentioned last time. A pulse from the BASIC Stamp (or other microcontroller, or your PC, or whatever else) causes the LED side of the optocoupler to emit light and thus trigger the phototransistor side of the optocoupler. The transistor energizes the relay coil, creating a magnetic field which closes the contacts, allowing AC to flow from the plug to the socket, thus powering your motor, Christmas lights, fan, pump, or whatever.

A nice thing about this circuit is that the optocoupler will protect the Stamp or PC from destruction by high voltage if the relay happens to short, which is not likely, but it could happen if the current flowing through the contacts is much higher than what the relay is rated for. That could also lead to the relay melting and/or bursting into flame, which is just not a good thing. Of course, the optocoupler is really effective only if the PC and relay are on separate power supplies.

That concludes this installment of q+=a. If you’ve got a question you’d like answered, or if you think my answers are utterly and completely useless, or both, or neither, please leave a comment at the prompt.

Rather than posting another Robot Update that says nothing of importance except that it’s been a while since the last Robot Update, we’re going to try a something new, a question-and-answer column! Now, since nobody’s actually asked me anything directly yet, I’ll instead respond to a hot(ish) search topic.

Q. Control cordless drill motor with basic stamp

A. Although your query was phrased less than elegantly, I’ll attempt to answer what I assume is a question. A pair of cordless drills or electric screwdrivers may be the ideal propulsion system for a combat robot. Consider the advantages: built-in gearbox, adjustable speed and torque, and modular, self-contained rechargeable battery packs. They can also be obtained for a relatively low cost, especially when compared to buying and/or fabricating the components separately. They can also be considered to be easily replaceable, another advantage to a combat robot.

Before we begin the interesting part of this article, I’d like to point out that I am not a professional electronic engineer, nor do I play one on television. This is also not a step-by-step tutorial on hacking your rechargeable drill. This is just me telling you very generally how I would go about doing it. It could work, but then again, it could explode in your face, set your house on fire, frighten your children, or just plain not work. I haven’t actually tried it, so I don’t know.

Still there? Good. Let’s take a look at the guts of a cordless drill.

Drill Motor

You’ll notice that the on/off switch and the speed-controlling rheostat have been removed. That’s fine, as I wouldn’t be using them. You’ll also notice that the battery jack and the case are missing. This is so that I can make a point. Below, you’ll see the equivalent assembly from a remote-controlled dune buggy.

Car Motor

Notice anything? That’s right, they’re not all that different. So at least one way of controlling these motors should have just occurred to you. If you’re building a remote-controlled combat robot, off-the-shelf RC controllers will probably fit the bill.

But since you also asked about BASIC Stamps, I assume you’re going to want to program your robot, rather than just puppeteer it by remote control. That’s fine, too. In that case, I’d build my favorite motor controller, the old-fashioned electromechanical H-bridge. I’d choose this over a transistorized or solid-state controller mainly because I don’t know what voltage the drills will be using. Relays can typically handle 120V AC, so handling 12V-36V DC shouldn’t be a problem. Also, the brushes of the motors can introduce a lot of noise into the power supply, and this method will physically isolate this noise from the control circuitry. And finally, listening for the clicking of the relays can be a valuable troubleshooting tool.

Here’s the schematic.

Typical parts are 1K resistors, 2N2222 transistors, and 1N4003 diodes. I try to use 5V relays in order to avoid the need for a 6V or 12V power supply. However, if the design of your bot means that you already have a 6V or 12V bus, then by all means use it.

The finished product might look something like this.

Relay Board

There are, of course, some drawbacks to this circuit. The main drawback is that the motors will always run at a constant speed, as determined by the supply voltage. This may be what you want. However, a robot that can only go full speed ahead could be difficult to maneuver. I would suggest the following modification if you want speed control.

 

This version will use a big fat power transistor in place of the SPST relay. You could then feed a PWM signal from the BASIC Stamp to the transistor to control the motor’s speed. I’m told the diode across the pins of the transistor is necessary to protect it from backlash voltage when the motor shuts off. Hopefully I’ve got it in the right place. Values of these parts depend on your motor.

The finished product might look something like this:

Rover

This concludes our first installment of q+=a. If you have a question you’d like answered, go ahead and leave it as a comment. Also, if you don’t like my answer, go ahead and leave that as a comment. See you next time!

It appears my humble abode on the Web is finally getting visitors. Good, good! (cackle cackle).

Upon analysis, it would appear that most of the visitors are new and are arriving from the NaBloPoMo list at fussy.org and also the randomizer at pinkelephants.org. But, a few visitors have arrived via search engine, seeking a "Ballbot VCR" and "UCN5804B Scrounging"

Well, I can’t tell you how to build a Ballbot from an old VCR, but I can tell you what I know about the UCN5804B. This discontinued chip is apparently rather elusive. Unfortunately, I have no idea what devices these stepper motor controllers were ever used in. I got the few I had from Newark Electronics quite some time ago. Now, if one wants only to drive a few stepper motors, might I point out that most of the floppy drives I’ve dissected so far use Darlington array chips to drive their stepper motors. One might be able to use one of those, a latch and a shift register to mock the functionality of a stepper driver. It’s just a thought. But if you’re trying to repair a particular device, ough. Best of luck to you.

In other news, on Monday, I got yet another electronics book from paperbackswap.com . If you haven’t heard of this site, (and you’d like to swap your boring old books for some interesting new ones) do check them out. It’s rather like netflix for books, and your only cost is postage.

The only problem with this particular book is that its last owner was apparently a smoker, so it was a bit smelly. I thought maybe slipping some dryer sheets between a few of the pages might help. It did. Now the book smells like a motel, rather than an ashray, which is a slight improvement..

Following a link from RootPrompt about a proposed Heath Robinson Rube Goldberg Computer , I learned of this relay-based computer constructed by Harry Porter of Portland State University. The picture gallery tells most of the story, but on the second page are a video, sounds of the computer in operation, and even a PowerPoint presentation explaining how it operates.