http://www.amazon.com/OWI-OWI-535-Robotic-Arm-Edge/dp/B0017OFRCY
We'd bought the arm for a teardown project because of its low price ($40) but we were disappointed to find that it really contained no electronics whatsoever. The motors and wires are all rigged up to metal contact switches controlled manually, and there isn't even so much as a resistor in the whole thing. This means that not only is the arm very physically weak, can't be programmed, and quickly drains the batteries if used for too long, it'll also tear apart its own gearing if you run it too far in one direction.
But hey, that's what Arduinos are for!
The first objective was to get the arm off of the manual control and into something we could configure. For the first session we didn't have any appropriate drivers on hand and couldn't figure out some of the more obscure ones lying around the robot lab, so rather than give up entirely and wait a week I figured I'd throw together my own H bridge for demonstration purposes. I found a pretty good demonstration here for building one out of power mosfets, which we happened to have a good pile of on hand (IRF9Z34 PMOS and 1D22AB NMOS to be specific, and 2N4401 NPN BJTs).
The critical thing to remember about H bridges is that they're essentially a pair of CMOS inverters, but controlled in opposite polarity from each other. Thus, when you turn one side positive, the other turns negative, and vice versa. There's a pretty good overview here if the concept seems tricky. However, this whole loopy thing only controlled one motor, which is nice to show off a concept but not so much for being actually able to program the arm.
It could waggle up and down, though!
It was pretty evident at this point that we were going to need a more capable motor driver. I ended up going with a set of Arduino motor shields off of Adafruit that had some impressive current driving capability and could also be stacked, an important feature for getting all 5 of the motors on the arm powered.
Once we got these going it was a piece of cake to rig it up to my Uno and give the arm a fair bit of individual articulation. The code is still pretty simple but can be located here:
https://github.com/URRoboticsClub/OWIArmControl
The real issue now is that the arm still has no feedback control. I'll be tackling that next time with some glued on potentiometers and maybe even a force sensor or two. After that, who knows? Chess?
Whatever. Until the next project!
No comments:
Post a Comment