30 July 2011

Thanks to Grant for helping me machine the shaft coupling for drive wheel and motor:

Baby steps, I know, but looking good so far… Next step, finish off the wheel bracket and start motor mount.

Homebrew Shaft Encoder

24 July 2011

This is something I did many moons ago but just recently found the photos, which appear to be of reasonable quality, so I thought I’d share…

We’ve probably all seen an article or two on how to construct your own optical encoder discs for a rotary motor, well, here’s an approach which doesn’t require printing out your own disc. All you need is an old computer mouse!

Step one: Salvage an encoder wheel and optical transmitter/receiver pair from an old computer mouse.

Step two: Cut the shaft of the encoder wheel and drill a hole to fit to the motor shaft. You’ll probably want to use a motor with the shaft protruding at the back end so a light-proof cap can easily be fitted if need be (some decoders are just dual photodiodes and don’t employ conditioning circuitry to attenuate ambient light).

Step three: Construct a simple PCB to mount the components and provide convenient access to the motor terminals. Why not include a snubber, inrush current limiting, or even an entire driver circuit!

Step four: Marvel at your creation!

The pictured wheels have 36 slots which give 144 counts per revolution if clocking on both edges of both channels (36×4). So while a resolution of 2.5° might not suit an application requiring precise position stepping, it does provide a relatively high level of precision when it comes to most low or moderate speed control applications.

You may want to shop around for the ideal mouse (not literally / good luck finding a ball mouse for sale) as you may prefer optical decoders with a fully conditioned, clean, square, push-pull output. The ones pictured are just photodiodes. I had to use a toilet paper roll and some tinfoil to block out interfering ambient light.

I have finally made a decent start on my robotic unicycle after losing focus for a couple years. I’ve started with the construction of an aluminium wheel hub for a cheap polyurethane RC aircraft wheel:

The wheel hub is actually two symmetrical half-hubs that pinch the pneumatic tire. Grub screws act to grip the tire as well as the shaft.

Also on the list of items completed is the design of the control board which includes a dsPIC33F micro, two VNH2SP30 H-Bridge drivers, a MEMS accelerometer and gyros, and a Bluetooth module:

Needless to say, I’m pretty eager to assemble this and start some coding!