Pages

21 July 2012

Meet TinyArm and SingleStepperTroller!

Skip to the bottom of a video of it working!

I've recently acquired a robot arm that I hope to learn to control this summer.



This is a manipulator that has been hanging out at MITERS for ages, and I've decided to adopt it as a platform for some personal summer projects. I've christened it TinyArm, because it's smaller and generally more friendly than the Mega-Heavy-Ass-200lb-Arm I got a month or so ago at Swapfest (which I am going to scrap for parts or donate to a friend because its 2 degrees of freedom are not very interesting).

The robot is a Microbot Teachmover, a manipulator for educating engineers in the brand-spanking-new (as of the 1980s) field of robotic manufacturing and assembly. Back in its prime it cost a whopping $5000.00 including the drive electronics and controls. I was able to pull up some these dimensions and specifications from the Microbot website,  but I could not find any information on the stepper motors or the rest of the drivetrain. 

Characterizing The Stepper Motors

A stepper motor has the following characteristics: number of steps per revolution, the configuration of the seperate channels (bipolar, unipolar, etc), the  torque constant [Nm / A] and recommended driving power. 

Using the power of Google, I determined most unipolar stepper motors are designed to move 1.8 Degrees per step, (200 steps per revolution). Most online guides suggest to simply assume 200 steps/rev unless the motor states otherwise or if it is empirically determined to be otherwise, so I'll go ahead and do that. 

The Microbot website states that it can take a 12V - 14V power supply at 4.5 Amps. Dividing among the 6 motors and not taking into account the logic power, that's 0.75 Amps allotted per motor. The steppers on TinyArm are unipolar because there are 6 wires emerging from each motor: 2 power lines and 4 drive channels. 



A Unipolar Stepper Motor is driven by powering all the lines and iterating which of the four drive channels is grounded. The motor will align itself towards the grounded channel statically until it is switched high and the next channel is grounded. 5-lead stepper motors are also unipolar, they just have one power line instead of two. I won't go into bipolar motors, just get yourself Practical Electronics for Inventors. 

Drivetrain and DOF Analysis

In order to properly control TinyArm, I need to determine its degrees of freedom (DOFs) and other constraints. It is actuated by 6 motors and, through an intricate gear and cable system, has 5 degrees of freedom and can close a gripper. 



There is also a switch which triggers as soon as the gripper encounters resistance, supposedly letting the now-nonexistent microcontroller know that it has successfully grasped an object. Theoretically, you can also determine the size of the object you are picking up by counting the number of steps it takes to hit the clicker switch. 


TinyArm's degrees of freedom are completely uncoupled, which is an uncommon design when it comes to robot arms. 


The standard manipulator is configured like this one, where each degree of freedom is an extension of the previous linkage's position. If I move the bottom joint 45 degrees, every joint up the chain to the gripper will move 45 degrees. This is because the actuator exists on the linkage and moves with respect to the origin. The end linkage's angle with respect to the origin is the sum of the angles of all the other previous linkages + the servo's commanded angle. 

Theta_C (with respect to Origin) = Theta A(with respect to origin) + Theta B(with respect to A) + Theta C (with respect to B)



The Teachmover has all six actuators fixed with respect to each other, meaning if one motor actuates one DOF, all the others remain the same (unless one reaches the physical limit of rotation, but more on that later). Comparing the picture above with the picture below, you can see that I only moved the shoulder down 45 Degrees, and the orientation of every other linkage stays the same. 



Going back to the kinematics, every angle (except for the axial wrist roll) is independent of every other angle, except the base's rotation. 


But just how is power transmitted from the stepper motor to each DOF? Looking closer at the gear-and-pulley system, there's a small 10-tooth metal gear on the stepper motor's shaft driving a 30-tooth gear. Then there's a 12-tooth gear on the same axle as the 30, which drives an 84 tooth gear and the drive cables. A 21:1 gear ratio total, meaning, for every 21 rotations of the motor, the DOF will rotate once.



Knowing the dimensions and degree limits from the website yeilds the following properties:
*TO BE UPDATED AS I EMPIRICALLY TEST THEM*
  • DOF 1: o_theta_y_a (Base Platform planar rotation)
    • Controlled by Stepper Motor 1
    • Min Angle: -90 Degrees
    • Max Angle: 90 Degrees
    • Max Steps: (180 Degrees * 21 * 200 steps)/360Degrees = 2100 Steps
    • Dependencies: None
  • DOF 2: a_theta_z_b (Shoulder planar rotation)
    • Controlled by Stepper Motor 2
    • Min Angle: TBD (With Respect to A)
    • Max Angle: 145 Degrees (With Respect to A)
    • Max Steps: TBD
    • Dependencies: None
  • DOF 3: a_theta_z_c (Elbow planar rotation)
    • Controlled by Stepper Motor 3
    • Min Angle: TBD (With Respect to B)
    • Max Angle: TBD (With Respect to B)
    • Max Steps: TBD
    • Dependencies: B
  • DOF 4: a_theta_z_d (Wrist planar rotation)
    • Controlled by Stepper Motors 4 and 5 in opposite directions
    • Min Angle: TBD (With Respect to C)
    • Max Angle: TBD (With Respect to C)
    • Max Steps: TBD
    • Dependencies:C
  • DOF 5: d_theta_x_e (Wrist axial rotation)
    • Controlled by Stepper Motors 4 and 5 in the same direction
    • Min Angle:  TBD (With Respect to D)
    • Max Angle: TBD (With Respect to D)
    • Max Steps: TBD
    • Dependencies: None
  • DOF 6: e_grip (Gripper)
    • Controlled by Stepper Motor 6
    • Max Steps: TBD
    • Dependencies: The only exception in uncoupling, the gripper must be driven as the elbow is driven to maintain the same pose. 

Driving a Unipolar Stepper Motor


While my final goal for TinyArm is graceful manipulation with ROS and a Kinect for a benchtop assistant, I first need to learn how to control a stepper motor.

Stepper motors are motors that hold a position rather than continuously rotate. Unlike servomotors, there is no microcontroller feedback loop for position control, but rather the position is determined by keeping track of how many steps you have commanded the motor to run. Precautions need to be taken, especially when commanding the steppers at high velocities and under large loads, to ensure the motors do not slip (leading to error). 

So I made my first custom circuit board, a 1-channel unipolar stepper motor driver. The goal of this project was to learn how to drive stepper motors, how to use EAGLE to design electronic circuitry, and how to manufacture my own PCBs. 





I designed the board and schematic in EAGLE, a program for PCB (printed circuit board) design. Using one N-channel MOSFET per stepper grounding channel I can switch rapidly between grounds to drive the motor forward or backward. The flyback diodes allow for the stepper's inductance to release its energy back to the system.




Here is the (auto)routed board, with a fancy ground plane. While some consider it a sin to use autoroute, I feel if you place the components correctly you can get the software to do its job well. For more complicated board I will opt to manually route, but for tiny boards like this one, the autorouter is sufficient.  I choose to only route on one side of the board because a one-sided board is easier to make.

Once the board is routed, you display only the side you routed (Top in this case), Pads, and Vias (If you used them) to show only the copper traces, and export it as a monochrome (all-black) image file.

You then print it our with a laser printer on glossy paper, cut out a piece of copper-silicon board to size, sand the surface you are etching to ensure the toner adheres correctly, and iron, laminate, or otherwise transfer the image onto the copper side of the board. After the transfer, I used water to gently dissolve the paper and leave behind only copper, rubbing (NOT PEELING) with my fingers until the board was free of paper. You then put the board in a Ferric Chloride bath to dissolve the copper, leaving behind this!:



Here you can see a printout and the resulting board after the Ferric Chloride bath. All the copper that is not protected by the toner is dissolved away, leaving behind the traces you want! Because I made all my leads the top of the board and did not flip the image before printing it, it printed out backwards. Oh well, noob mistake! ^_^


After a quick acetone cleaning to remove the toner, a wild board appears!



After drilling the holes, populating, and soldering the components to my board, I connect some pins from an Arduino Uno to drive the FETs, load an example Stepper sketch, connect the stepper to a bench power supply, and...



My next one will be TinyArmTroller, which will control all six stepper motors in TinyArm. It will also have an input for TinyArm's grip sensor, and will communicate to a computer via USB. A python program using ROS packages for kinematics and motion planning will send signals to the board for its microcontroller to interpret as motion commands.

On the software side, I need to design a system that will take planned motion waypoints from my laptop over usb or serial, and translate it to smooth motion, without jerking to a stop once a waypoint is reached. 

Let's see if it happens before the summer ends...

4 comments:

  1. Great project!Thanks for taking time to share your great creative and inspiring work..Great job done keep it up..

    ReplyDelete
  2. Thanks! My latest hurdle is getting my atXMega16a4u talking with a computer via USB. Updates coming soon!
    And uh oh, the text got formatted incorrectly...

    ReplyDelete
  3. Hello. I have a question for you, for move just one motor, do you use a totally of 4.5A like we can read on the microbot site?

    ReplyDelete