.comment-link {margin-left:.6em;}
Moriash Moreau: My Second Life
Saturday, August 19, 2006
 
Going for a Walk
Well, since my external controller interface box got a mention in Make blog (does that mean I'm "made?"), I figured I'd better do something with it. So, I went ahead and wired up my treadmill.


There are two basic parts to the project: movement and steering. Movement is detected by a simple magnetic reed switch mounted next to the belt drive pulley. As it turns out, this is similar to what the manufacturer did to interface with the treadmill's speedometer. The image above shows a closeup of the drive pulley (the whole drive system is shown at upper left). As you can see at upper middle, the pulley already has a built-in magnet. At middle left is a Hall effect sensor. It sends a signal every time the magnet passes. If I was up on my electronics, I probably would have worked with a Hall effect sensor, as well.

But, since I barely know one end of a soldering iron from the other (and I have the burns to prove it), I settled for using the reed switch. That's the small white plastic box at middle right. I ended up using an old wooden domino as a spacer, and holding it all in place with double-sided foam tape. (Great stuff. No toolbox should be without it.) Every time the magnet passes, the metal leaves inside the reed switch are drawn together, closing the circuit. This is wired to the forward contacts on the controller box.

On the plus side, a reed switch requires no additional electronics to run. On the minus side, it has moving parts. (Well, flexing parts, anyway.) I'm not certain how long it'll operate before the reeds succumb to metal fatigue. I guess I'll find out! If it turns out to be failure prone, I'll have to look into alternate encoders.


The steering system is pretty simple, as well. Electronically, it's just two momentary-connect switches tied into the left and right contacts on the controller box. No biggie there. The mechanics required a bit of thought, however.

I decided to go ahead and make a universal control switch that could be used for multiple future projects. It's always nice to have interchangeable parts, if for no other reason than it helps me defeat my inertia, by reducing the amount of work required later on.

In order to make a reusable device, I needed to rig up some kind of sturdy casing for the switches. Fortunately, I had plenty of office supplies left over from previous projects. The body of a permanent marker worked rather well.

To mount the switches on the handlebars of the treadmill, I ended up making some simple scabbard-like brackets out of some scraps of 3/4" PVC piping. There is a metal washer wedged between the ends of the pipes, inside the connector fitting, to keep the switch from falling out the bottom while allowing a path for the wire. The PVC switch brackets were bound to the handlebars with zip ties. This lets me steer with my thumbs while still maintaining a firm grip on the handles.

The push-up frames attached to the handlebars were from an earlier improvement: they increase the height of the handlebars, so I don't have hunch over when I walk. (Evidently, I'm a few inches taller than the design treadmill user.) They were also attached using zip ties. For me, zip ties are rapidly supplanting duct tape as the handyman's secret weapon.

Once I finished putting it all together, I took a short walk in Second Life. Initial results were highly encouraging. When I first thought about this project, I considered making some kind of vehicle or attachment designed to take occasional keypresses and translate them into constant movement. However, this proved not to be necessary for normal walking. Since the drive pulley turns several times for each step on the treadmill belt, the reed switch provides a constant, rapid string of signals when in use. The keypresses effectively come so rapidly that the avatar doesn't slow significantly between signals. I was able to take a normal walk, apparently indistinguishable from a normal, keyboard driven journey.

All told, I'm quite pleased with this first attempt. There are still a few bugs to work out. First, I can't easily stop the treadmill. It takes a moment to wind down, and a few seconds to start up again. In both cases, I must stop what I'm doing and manipulate the treadmill controls. Effectively, the treadmill is driving me, not the other way around. Heck, I could just turn it on and go grab a Coke, and my av would still blithely walk along in a straight line. There's also a minor issue with the reed switch hanging in the "on" position, if I happen to stop the treadmill with the pulley magnet near the reeds. I believe both of these problems can be helped with a kill switch to stop signals from the reed switch. I'd still not be able to start walking without minor inconvenience, but at least I'll be able to put on the brakes quickly. In the meantime, I'm still looking for a stationary exercise bicycle. It's a shame that non-motorized treadmills work so poorly, because otherwise they'd be the ideal solution.

There are also problems with difficult terrain. Since the avatar is being moved with a rapid series of keypress signals, instead of a continuously held forward key, it sometimes has problems climbing steep inclines (try climbing a cliff by tapping the forward key, and you'll see what I mean). I probably need a jump key for such situations. Similarly, flight is somewhat jerky, for the same reasons. I expect that I will someday make some kind of vehicle to smooth out the motion somewhat.

Finally, there's the simple problem of access. If I end up using this contraption often enough, I'll need to find a way to get a full keyboard, mouse (or similar), and monitor mounted in some usable fashion on or around the treadmill.

But, in spite of the minor kinks, I'm still getting a kick out of all this. I think I'll go take another walk. More to come.
Comments:
If you're looking for junk, it's hard to beat eBay:

http://search.ebay.com/search/search.dll?sofocus=so&sbrftog=1&from=R10&satitle=stationary+bike&sacat=-1%26catref%3DC6&sargn=-1%26saslc%3D2&fspt=1&sadis=100&fpos=77080&ftrt=1&ftrv=1&saprclo=&saprchi=&fsop=1%26fsoo%3D1&coaction=compare&copagenum=1&coentrypage=search&fgtp=

But you have a much greater likelihood of getting one for $5 if you just troll garage sales for a while. Also the Greensheet.
 
Well, I've been hitting garage sales every weekend for the last month, and I've hit all the resale shops I know about.

Thought about the Greensheet, but never actually got around to it. I guess I should, but I am not overly enthused by the prospect. Every time I've used Greensheet, and was able to actually converse with the seller in a language I understood, I ended up driving across town to some sketchy neighborhood and wandering the poorly lit sidewalks, only to find out that said person I was supposed to meet either a) wasn't home when they said they would be, or b) lied about some basic and obvious fact or defect I specifically asked about over the phone. I will never understand the latter. Like I'm going to say "Well, it's broken crap, and completely unsuitable for my purposes... But I've come all this way. Here, take my money." As such, I've never actually gone as far as buying anything from Greensheet.

At this point, maybe I should do E-Bay. It'd be cheaper than the cost of gas and inevitable garage-sale impulse buys, anyway.
 
Post a Comment



Return to Main Page