Control of robotic arm with Python


I have a test setup, where I have instruments that measures data, collected with Python/USB.

I need to add a probe to a robotic arm, with at least 4 degrees of freedom. It needs to be positioned with a XYZ position

Is there a USB controlled arm, not terrible expensive which also has SW to translate XYZ commands into the different servo positions? (I have heard the translation to different coordinate system is not easy)

Could you share more about why you need 4 DOF robot arm? Does it need to be able to do other tasks in future? Could an XY gantry with Z probing work? Stepper motor (rather than RC servo - assuming that’s what you meant by servo) and a more constrained motion platform should be much easier to find what you want?

It just so happens that I’m doing something very similar right now.

I purchased this from alibaba for about $6500 delivered.

The results are a little mixed. The first major downside is that the robot doesn’t have absolute encoders so everytime that it starts you need to jog to a home position and set home. At least that is what I’ve been doing so far. (Only spent ~4hrs playing).

The next is that this arm uses ROS, this is kinda cool because it is open source and linux based but also a little inconvenient and sometime unintuitive for the same reasons.

I don’t know what your budget is but I’m replacing a 2axis jig with this arm. Once I factored in all of the custom engineering I needed to do to make the jig and document it, it easily exceeded $6500. The reliability and durability of the jig was not great too, we already wore one of them out.

For any robot, to move to XYZ poses, you need a tool with kinematics and path planning. ROS has this and really you can use it to make any kind of robot move, even a custom one. Just a steep learning curve to climb. There is also the plumbing for python but tbd on how that works yet. Ultimately I will find out.

Would be great to share the journey with someone else on the forum.


Schizophrenic mode today, answering my own question:

GitHub - xArm-Developer/xArm-Python-SDK xArm 1S Programming Desktop Robotic Arm with Powerful and Robust Intelligent Bus Servos Featuring Position and Voltage Feedback (Unassembled) : Toys & Games

Not a quality robot, but seems that I will be up and running fast

I have a couple of ideas. The first one is to do near field radiated measurements, like this one:

DETECTUS EMC-Scanners - Pendulum Instruments (

But it’s something like 50kUSD, and I only need it once in a while

I have a CNC milling machine, I could add a probe to, but an arm would be more versatile

Then I could use it for an idea I have to do a cheap flying probe system, for people doing debugging and automated tests on low volume products

That looks very impressive, and even scary if the programming goes haywire

I heard TheAmpHour podcast about ROS, but heard it was a very steep learning curve

It’s a hard thing to give advice on but for little time and money you could do worse than a modern pen plotter kit, perhaps running grbl.

Eg axidraw. A good style of robot arm for this would be scara, if you want something different from a cartesian xy gantry - the work are will be much clearer and larger.

Of course, EMC probing near a motorised motion system introduces its own challenges that optoisolators can’t save you from having to carefully design around (pneumatic actuators anyone?!).

In fact, the EMC aspect of working with any electromagnetically actuated motion system are quite a brain teaser for this application. The probing side, where electrical contact will be made, I can see being less susceptible but near field probes could really get their own platform’s noise dominating the measurement if you weren’t careful with cable shielding/termination etc.

I wonder if the robot arm is worse or better for that. Mechanically, I would find it easier to move the motors further away using an XY gantry. I also wonder if the PWM going to RC servos to hold their position could be an issue on anything which uses them for motion in proximity to the near field probe.

I have been in favor of the XYZ table, that’s also how Detectus and other do it. That way the stepper can be turned off when in position and measuring

It should be possible to set the TMC2130 drivers to zero current. There is a possibility to set IHOLD to 0, so it should turn off completely

Yes, xy should be trivial to power down, although I admit I’m making a huge assumption that disabling the motor at the driver will make the coils and cables electrically quiet. But perhaps the more careful consideration needs to be given to counterweighting or braking the Z axis so that it doesn’t lose position when you remove power to take your measurement. Although cartesian xy gantry is simple, the way some of the drawbots do it could allow you to place one either side of the DUT and enable the ideal of multiple probes for eg continuity testing.

1 Like

Or driven from a worm gear, so it won’t change height unless driven

1 Like

Yes, sorry I consider gearing/transmission friction as braking but you are right to explicitly draw that out.

1 Like

The CNC I have has gearing on Z axis, and it does not move during powerless state:

1 Like