Introduction: Remote Controlled Robotic Arm (MeArm) Using PfodApp

Update: 27th August 2015

This project has been updated with the fixes required to make the MeArm work reliably. These fixes consist of
a) using a 3A 5V supply and removing the Uno polyfuse and
b) adding a spacer on the base servo. Later (and earlier) versions of the MeArm should not need this spacer.
c) adding an extension to the gripper servo cable to allow for full rotation of the arm.
d) file the side of the prototype sheild to clear the rotating arm

A following project will cover how to use your mobile to program an arbitrary path for the arm to follow and then have it run through that path.

Using a 3A 5V supply

Previously the robot arm would reset and drop the BT connection intermittently. This was because the USB supply via the UNO input could not provide the >1A current needed by the servos. There is a re-settable polyfuse on the Uno board which is rated at 1A. To fix this, the Polyfuse was removed from the Uno board (see photo above) and a 5V 3A power pack connected directly to the Uno 5V – GND header pins, via the prototype board. To program the Uno, you need to connect the USB cable AND also connect the power pack. Removing the polyfuse isolates the UNO from the USB power supply.

Adding a Spacer to the Base Servo

The digital servos supplied with the MeArm for a short time are to powerful and tend to go into oscillation around the commanded position. This oscillation is most prononced in the base servo. That problem was solved in this project my adding a custom plastic space, milled to fit over the base servo between the base and the rotating arm. The recommended solution is to use analog servos instead, which phenoptix are now shipping with the latest MeArms. If you received digital servos with your MeArm contact phenoptix for analog replacements.

Extension to Gripper Servo cable

As shown in the photo above, the gripper servo cable was extended with a plug and socket to allow the arm to rotate fully and to fully extend. The gripper servo cable was tied off to the arm at a couple of points with fishing line to prevent it becoming tangled as the arm moved in and out.

File the side of the Prototype Shield to clear the Arm

The photo above shows the section of the prototype shield I needed to file to that the arm could rotate freely.

Introduction

This project shows you how to control your MeArm from your Android mobile, using pfodApp. Using sliders on your mobile you can control each of the four servo motors for rotation, up/down, in/out and gripper open/close.

Note: There is a problem with the control of this robotic arm which is discussed below, with comments from phenoptix. Update 27th August, see fixes above for these problems.

The sketch used here needs to be run with pfodApp V1.2.57+ so update your pfodApp if you are using an earlier version.

These instructions are also on www.pfod.com.au under Remote Controlled Robotic Arm

Step 1: Construction

Here is the parts list.

First wire up the prototype board as shown above

On the servo connectors, the brown wire is GND and the middle red wire is +5V and the yellow wire is the control wire. The control wires are wired to outputs D6 (rotation), D9 (in/out), D10(up/down), D11(gripper).

The 1000uF capacitor is wired across the +5V and Gnd. The -ve marking is wired to GND (see photo above) (Also see issues discussed below)

Download and install the pfodParser library and then program your Arduino Uno with this sketch (RoboticArmRemoteControl.ino). This sketch needs to be run with pfodApp V1.2.57+ so update your pfodApp if you are using an earlier version.

Plug the bluetooth shield into the Uno and plug the prototype board on top and connect the USB supply. Note: You need to have the bluetooth shield unplugged while you program your Uno or the programming will fail.

Install pfodApp on your Android mobile and set up a connection to the bluetooth shield as described in the pfodAppforAndroidGettingStarted.pdf guide.

You can now use your mobile to position the servos from 0 to 180 degrees as you construct the MeArm. The sketch has slew rate limiting built into it so when you move the slider the servos slowly move to their new position.

My MeArm was V0.4 and I followed these instructions, Pocket-Sized-Robot-Arm-meArm-V04.pdf. Although when I had finished I found my gripper servo arm was 90degs different from their picture, but it worked so I left it. I needed to add two of the plastic space washers in the gripper linkage to make up the level differences.

Bolt the Uno stack to the MeArm base plate (you will need some extra 3mm screws and nuts for this, I used plastic ones)..

Step 2: ​Calibrating the Gripper

The range of movement for the gripper is very small about 19degs in my robotic arm. You will need to adjust the sketch to match your grippers' movement. This line of code at the bottom of the send_menuContents() method sets the range of the gripper movement.

parser.print(F("`2080`1884~% Closed~0.510204~-1884")); // adjust this for your gripper settings

The 2080 is the max uS for this slider. The 1884 is the min uS for this slider (0 to 180 degs is 544 to 2040uS) The 0.510204 is the scale and the -1884 the offset so that the pfodApp displays 0 to 100% for the slider. See the pfodSpecification.pdf for the details.

For your arm you need to determine the max and min value that open and close the gripper. To do this, temporally disconnect the servo arm from the gripper and connect the gripper servo lead to one of the other servo outputs. The carefully move the servo, using the pfodApp slider, and determine the range of movement for fully open and fully closed.

Now open the Debug screen on pfodApp from your mobile's menu and you will see the commands that are being sent to your arm. For example {B`2080}

In the screen shot I have temporally connected the gripper to the In/Out drive (D9) and 2045 is the max value for gripper fully close so that becomes the first number. Adjusting the gripper open and checking the debug screen gives, say 1900. That becomes the second number and also the last number (the offset).

parser.print(F("`2045`1900~% Closed~????~-1900"));

These first two numbers limit the range of the slider on pfodApp so you never try and over close or over open the gripper. The last two numbers are the scale and offset that are used by pfodApp to calculate what is shown to you on the screen. If you set 1.0 and 0.0, then the screen will show a slider from 1900 to 2045. The formula used is display value = (slider setting + offset) * scale

So to get 1900 to 2045 to display as 0 to 100% we set the offset to -1900 and the scale to 100 / (2045-1900) = 0.68966 so the code becomes

parser.print(F("`2045`1900~% Closed~0.69866~-1900"));

Step 3: Problems With the MeArm

There are a number of issues with remote control of the MeArm V0.4 The most serious of which is the instability in the rotational position.

Instability of the Rotational Servo -- FIXEX 16th August 2015

First a bit information on the servos. The Arduino Servo library sends the servos a commanded position by means of variable pulse width. A pulse 544uS long means 0 degrees and a 2400uS pulse means 180 degrees. The servo measures the pulse to determine where is should be and then rotates until its internal position sensor matches the commanded position.

Now the problem is that when the arm is being rotated its weight and flexibility means that when the servo stops rotating the arm keeps moving and pushes the servo past where it should be. The servo sees that its internal position sensor is wrong and starts to drive back in the opposite direction. But when the servo stops again the same thing happens and the arm again pushes the servo further.

The servos very powerful and the movements are vicious and so an oscillation is set up. In my case the arm just shook backwards and forwards. I could damp it out with my hand, but any slight moment or bump of the arm could set it off again.

This only affected the rotation servo, the In/Out, Up/Down and gripper where OK. A re-design of the main rotational bearing may improve the situation but I am not sure. Extra resistance in the rotation would help to damp these oscillations out. Hopefully V1.0 of MeArm will be better.

Update from phenoptix.com 26th January 2015: “Looking at your build and the one on my desk, which I built on Friday and ran into problems with jitters, I think the problem might be our new, stronger, digital servos. I'm looking into the problem and will let you know when I come up with a cure.”

Update 16th August 2015: I fixed my problem with a plastic spacer between the base and the bottom of the arm. Phenoptix says they fixed the problem by reverting to using Analog servos instead of the digital ones. They only shipped digital servos for a short time and ben says he is happy to swap them for analog ones if needed.

Interdependence of the In/Out, Up/Down ranges.

Another issue is that the allowable range of movement on In/Out and Up/Down depend on each other. It is left as an exercise for the reader to determine and code these interdependent limits.

Servo Power Supply Interference -- FIXED 16th August 2015

Another issue is that the servos draw a lot of power as they operate. Without the 1000uF capacitor the Uno resets and/or the Bluetooth shield looses connection regularly. With the 1000uF capacitor it happens infrequently but still occasionally. An external supply is needed. The USB via the Arduino is not enough. See below.

Update from phenoptix.com 26th January 2015:“If you put the servos onto your Vin rather than 5V and power from a 6V (ideally 3A) power supply you'll get less brown outs from lack of power and resets from back emf. USB is only good for 1A before the polyfuse on the ardunio resets!”

I don't completely agree with this advice for a number of reasons:-

a) 6V 3A supplies are not a commodity item as opposed to 5V USB supplies and

b) the servos are rated at 4.8V so a 6V supply is 20% over rated voltage and

c) 6V Vin is less then the recommended supply for Arudino due to the voltage drop in the on board regulator.

So my suggestion is to use a well regulated 5V 3A or higher supply connected directly to the Uno 5V rail (via the prototype board +5V rail). Note: The supply must be well regulated (i.e. smooth voltage output) as it powers the micro-processor directly.

Update 16th August 2015: Removed (unsoldered) the polyfuse from the Uno board and connected a 3A 5V supply directly to the 5V rail. No more problems. Removing the polyfuse prevents the USB supply fighting with the external 5V supply

Conclusion

While it was great making the arm and remotely controlling it from my Android. . A spacer solved the oscillations in the rotatory position. These oscillations should not happen in later models. An external supply is essential for reliable operation. The following project will show how I interactively program the arm to follow a path.


Comments

author
drmpf (author)2015-08-26

Updated 27th August with photos of the fixes

author
drmpf (author)2015-08-16

Updated 16th August 2015 with fixes for the problems with the arm.