Posts | Comments

Planet Arduino

Archive for the ‘robot arm’ Category

We’ve all seen videos of blisteringly fast SCARA arms working on assembly lines, and more than a few of us have fantasied about having that same kind of technology for the home shop. Unfortunately, while the prices for things like 3D printers and oscilloscopes have dropped lower than what many would have believed possible a decade ago, high-performance robotics are still too pricey for the home player.

Unless of course, you’re willing to build it yourself. The PyBot designed by [jjRobots] is an open source robotic arm that should be well within the means of the average hardware hacker. One could argue that this is a project made entirely possible by desktop 3D printing; as not only are most of the structural components printed, but most of the mechanical elements are common 3D printer parts. Smooth rods, linear bearings, lead screws, and NEMA 17 motors are all exceptionally cheap these days thanks to the innumerable 3D printer kits that make use of them.

A custom control board keeps the wiring tight.

Those who’ve researched similar projects might notice that the design of this arm has clearly been influenced by the Mostly Printed SCARA (MPSCARA). But while that robot was designed to carry an extruder and act as a 3D printer, [jjRobots] intends for the PyBot to be more of a general purpose platform. By default it features a simple gripper, but that can easily be changed out for whatever tool or gadget you have in mind.

In the base of the arm is a custom control board that combines an Arduino M0, an ESP8266, and a trio of stepper motor drivers. But if you wanted to build your own version from the parts bin, you could certainly wire up all the principle components manually. As the name implies, the PyBot is controlled by Python tools running on the computer, so it should be relatively easy to get this capable arm to do your bidding.

We’ve seen some impressive 3D printed robotic arms over the years, but the simplicity of the PyBot is particularly compelling. This looks like something that you could reasonably assemble and program over a weekend or two, and then put to work in your ad-hoc PPE factory.

Would you like your own industrial robot arm, but don’t have tens of thousands of dollars to spend? You could instead build Giovanni Lerda’s KAUDA, a five-axis device that uses under 800g of PLA, an Arduino Mega, and other off-the-shelf parts.

KAUDA utilizes servos to actuate the two wrist joints, along with a NEMA 17 motor for the elbow. A single stepper rotates the base in the horizontal direction, while dual steppers provide lifting force at this joint.

The gripper is a three-fingered linkage assembly, controlled by a small DC motor. The arm’s construction is outlined on its official website, and instructions can be found in Lerda’s write-up here. As seen in the video below, KAUDA looks great and appears to work quite well!

First the robots took our jobs, then they came for our video games. This dystopian future is brought to you by [Little French Kev] who designed this adorable 3D-printed robot arm to interface with an Xbox One controller joystick. He shows it off in the video after the break, controlling a ball-balancing physics demonstration written in Unity.

Hats off to him on the quality of the design. There are two parts that nestle the knob of the thumbstick from either side. He mates those pieces with each other using screws, firmly hugging the stick. Bearings are used at the joints for smooth action of the two servo motors that control the arm. The base of the robotic appendage is zip-tied to the controller itself.

The build targets experimentation with machine learning. Since the computer can control the arm via an Arduino, and the computer has access to metrics of what’s happening in the virtual environment, it’s a perfect for training a neural network. Are you thinking what we’re thinking? This is the beginning of hardware speed-running your favorite video games like [SethBling] did for Super Mario World half a decade ago. It will be more impressive since this would be done by automating the mechanical bit of the controller rather than operating purely in the software realm. You’ll just need to do your own hack to implement button control.

Building a robot arm is fun, but no longer the challenge it once was. You can find lots of plans and kits, and driving the motors is a solved problem. However, there is always one decision you have to make that can be a challenge: what effector to put on the end of it. If you are [MertArduino] the answer is to put suction at the end. If you need to grab the right things, this could be just the ticket for reliably lifting and letting go. You can see a video of the arm in action, below.

The arm itself is steel with four servo motors and comes in a kit. The video shows the arm making a sandwich under manual control. We suspect he might have put it under Arduino control but there’s no sudo for making sandwiches.

An air pump and a solenoid valve round out the arm. An Arduino reads some pots to control the servo motors on the arm. However, the air pickup is manually controlled. It wouldn’t be very hard to use a FET or a transistor to put that under Arduino control, as well.

This made us think of air tweezer designs we’ve seen in the past. We also wondered if the arm was robust enough for a pick and place setup.

img_1318If you're looking for a robotic arm, you wouldn't do badly to et LittleArm.

Read more on MAKE

The post LittleArm Is a Little Robot with a Little Price Tag appeared first on Make: DIY Projects and Ideas for Makers.

Google showed the world that you could make a virtual reality headset from cardboard. We figure that might have been [Uladz] inspiration for creating a robotic arm also made out of cardboard. He says you can reproduce his design in about two hours.

You’ll need an Arduino and four hobby servo motors. The cardboard doesn’t weigh much, so you could probably use fairly small motors. In addition to the cardboard, there’s a piece of hardboard for the base and a few metal clips. You can control it all from the Arduino program or add an IR receiver if you want to run it by remote control. There’s a video of the arm–called CARDBIRD–in action, below.

If you want to build something more robust, we’ve looked at some serious arms before. If you want to go big, we’ve seen that before, too. But every project has to start somewhere, and a cardboard mock-up is one of our favorite things.


Filed under: Arduino Hacks, robots hacks

As its name would suggest, the LittleArm is a mini 3D-printed robot that began as a weekend project. Its creator Gabe Bentz wanted a small arm that was easy to work with, and one that wouldn’t require him to dig deep into his wallet. So, as any Maker would do, he decided to design his own low-cost device.

After showing the LittleArm off, it wasn’t before long that he was approached by some STEM teachers in the area who wondered if the kit was something they could use in their classrooms. Ideally, every student should have one to tinker with, but unfortunately today’s systems tend to be too expensive and quickly loose parts and pieces. This is a problem that LittleArm is looking to solve.

The arm is powered by an Arduino Uno and four identical metal-geared micro servos, while all other mechanical components are 3D-printed. There’s also a modular gripper that’s actuated by a servo along with rigid end-effectors for various tasks. What’s more, a basic GUI enables you to control the arm, its gripper, the speed, as well as use its record function to train the robot to perform a specific task and then watch it play out the sequence.

The entirely open-source gadget comes as a DIY kit that can be purchased or built from scratch. Want one of your own? Check out Bent’z Kickstarter page here, and see the LittleArm in action below (including some of its dance moves).

Last fall, I grabbed a robot arm from Robot Geeks when they were on sale at Thanksgiving. The arm uses servos to rotate the base and move the joints and gripper. These work well enough but I found one aspect of the arm frustrating. When you apply power, the software commands the servos to move to home position. The movement is sufficiently violent it can cause the entire arm to jump.

This jump occurs because there is no position feedback to the Arduino controller leaving it unable to know the positions of the arm’s servos and move them slowly to home. I pondered how to add this feedback using sensors, imposing the limitation that they couldn’t be large or require replacing existing parts. I decided to try adding accelerometers on each arm section.

Accelerometers, being affected by gravity when on a planet, provide an absolute reference because they always report the direction of down. With an accelerometer I can calculate the angle of an arm section with respect to the direction of gravitational acceleration.

Before discussing the accelerometers, take a look at the picture of the arm. An accelerometer would be added to each section of the arm between the controlling servos.

arm flat extended with text

Accelerometers

Gravity tugs everything toward the center of the mass of the Earth. It is a force that creates an acceleration exactly just like what you feel when a vehicle begins to move or stop. The force of gravity creates an acceleration of 1 g which is 9.8 m/s2 or 32.15 ft/s2. An accelerometer measures this force.

Integrated circuit accelerometers are inexpensive and small devices readily usable by hackers. One reason they are inexpensive is the high demand for them in smart phones. These small devices are based on etching mechanical structures within the integrated circuit using a technology called MEMS (Microelectromechanical systems).

One design for a MEMS accelerometer is basically a variable capacitor. One plate is fixed and the other mounted some distance away on a spring suspension. When the device is accelerated the suspended plate moves closer or further away from the fixed plate, changing the capacitance. Another uses piezo-resistive material to measure the stress on an arm caused by acceleration.

one axis measurementA single axis accelerometer measures acceleration in only one direction. If positioned so the direction is up and down it will measure the force of gravity but will not detect horizontal acceleration. When the device is tilted between horizontal and vertical the force of gravity is only partially affecting the measurement. This provides the ability to measure the angle of the device with the direction of gravity. The acceleration felt along the tilted axis, for a tilt angle can be calculated by:

A_{X} = g \sin\left ( \theta \right )

Knowing the output of the accelerometer we can determine the angle by taking the inverse sine, the arc sine, of the output:

\theta = \arcsin \left ( \frac{A_{X}}{g} \right )

If you rotate a single axis device through 360° the output is a sine wave. Start with the device outputting zero and consider that 0°. As it rotates, the output is 1 when the angle is 90° and back to zero at 180°. Continuing the rotation, the output becomes -1 at 270°, or -90°, degrees and back to zero at 360°, or 0°.

Notice on the chart that between -60° and 60° the output is nearly linear. This is the best orientation for measuring inclination. Increases in inclination are not as accurate on the other portions of the curve. Also notice that the same output is generated for 45° and 135° (90° + 45°) creating an ambiguity. With a single axis you cannot determine which of those angles is measured.

angle of inclination dual axis angle of inclination

Putting two accelerometers at a right angle to one another creates a 2-axis device which solves the ambiguity problem. As the device is rotated through 360° the outputs are 90° out of phase, the same relationship as the sine and cosine. By combining the measurements there is a unique solution for every angle throughout 360°. The acceleration due to gravity at each angle is given by:

\frac{A_{X}}{A_{Y}}  = \frac{\sin\left ( \theta \right )}{\cos\left ( \theta \right )} = \tan\left ( \theta \right )

which leads to calculating the angle by:

\theta = \arctan \left ( \frac{A_{X}}{A_{Y}} \right )

Actually, one more step is needed to determine the sign of the angle. This requires examining the sign of the values for the X and Y axis. It isn’t necessary to go into this here because a standard programming function handles this automatically.

The orientation of a quadcopter requires a 3-axis accelerometer. The calculations for the three spherical angles combine all three inputs for their results. You’ll need to study this carefully because the standard trigonometric equations can cause anomalies when the quadcopter flips.

First Pass Solution

Accelerometers are easily obtained and relatively cheap. You can find them mounted on breakout boards with voltage regulators and all the supporting circuits from the usual vendors. They are available for 1 to 3 axis, various amounts of g force, and providing either analog or digital outputs. Analog devices need an analog input for each axis being measured. Digital outputs use I2C or SPI buses for communications. I decided to use analog devices because digital units typically only allow two addresses and the arm needs three devices, one for each section.

The robot arm uses an Arduino board so there are at least 6 analog inputs. The original board was a Robot Geek Geekduino, their version of the Arduino Duemilanove, with 8 analog inputs. Unfortunately, when working with the arm I broke the USB connector so switched to a Uno equivalent having only 6 inputs.

accelerometerMy choice for accelerometer is a 3-axis, ±3 g accelerometer breakout from Adafruit, their ADXL335. It has one analog output for each axis. Since I’m measuring three joints that means three boards which adds up to 9 analog outputs.

ADXL335-fbl

Because of the geometry of the arm, however, I only need 5 inputs for these three joints. The shoulder joint only moves from 0° to 180°. This can be handled by a single axis accelerometer by mounting it to read acceleration of 1 g for 0° and -1g for 180°. That provides a unique output for the necessary angles. The elbow and wrist joints each require two inputs. The third input is not needed because their motion is constrained to moving within the vertical plane of the arm.

Frame of Reference

The next issue is the frame of reference. This is a standard problem in robotics work. Early in a project, a global frame of reference is decided upon. This sets the origin for the coordinate system that the robot will follow and the direction of the three axes, usually specified as X, Y, and Z. For the arm, X is straight forward, Y is to the left, and Z is straight up. The zero point is the base of the shoulder. This also defines a global frame for rotation of the arms limbs with zero degrees also toward the front.
elbow anglesshoulder angles

Sensors and controllers each have their own frame of reference. Any differences among these devices and the global frame need to be resolved in software. The shoulder servo’s frame of reference is 0° at the back of the arm and 180° at the front, a clockwise rotation. This is the reverse of the global frame. The elbow servo worked the opposite with a counter-clockwise rotation putting 180° straight up and 90° straight out when the shoulder was vertical. It is 90° off from the global frame of reference.

Sensors also have their own frame of reference. The Y-axis accelerometer measuring the shoulder orientation worked counter-clockwise. Both axis on the accelerometers measuring the elbow worked in the clock-wise direction. This may seem strange but it’s because of the different mounting orientations of the sensors.

Software

The actual code is straightforward once the frame of references are sorted out. A single axis is read from the analog input and its angle calculated with:

const int shouldery = shoulderAnalogY.read();
float shoulder_angle = degrees(asin(shouldery_value / 100.0));

The read() method scales the raw analog input values so ±1g is represented as ±100. The input to asin() is divided by 100.0 to convert to the actual g value. That suffices for the shoulder angle.

The elbow and wrist angles use values from two axis and the calculation is:

const int elbowx = elbowAnalogX.read();
const int elbowy = elbowAnalogY.read();
float elbow_angle = degrees(atan2(-elbowy, elbowx));

The atan2() function is a special version of the arc tangent calculation. It examines the signs of the input value to determine the quadrant of the angle to set the appropriate sign on its result. The negative sign on the elbowy is needed to set the appropriate quadrant. There’s the frame of reference issue, again.

Wrap Up

Adding the accelerometers solved the startup lurching problem well enough. Whether the accelerometers can be used for other purposes remains to be seen.

The accuracy of the angle measurements is not good. In part this is due to using a device that with a +/- 3 g range to measure 1/3 of the devices range, 1 g. The device outputs 0 to 3.3 volts while the Arduino is sampling for 5 volts, again losing accuracy. This might be improved by using an Arduino based on 3.3 volts. I have a couple Dues on hand so might try them. The Uno also provides for adjusting the reference voltage for analog inputs so setting it to 3.3 volts might help.

The analog values need to be calibrated with some care. Each accelerometer outputs slightly different values. Calibration requires measuring the outputs for 1 and -1 g for each axis, recording the values, and using them to scale the voltage input to acceleration. This calibration is not accurate given the other problems with the analog inputs.

Another problem is the mounting of the accelerometers on the arm’s sections. The alignment of the boards with the sections of the arm is not perfect. When the servo is positioned at 90° the accelerometer doesn’t necessarily sit at 90° with respect to the center of the earth. Of course, the servos are not that precise, either. They do not always arrive at the same position, especially when approaching from different directions. Another goal for this project was to use the accelerometer information to more precisely position the servos.

I guess I have to think about this project a bit more, including deciding what I actually want to accomplish with the arm. But then, just saying you have a robotic arm is a terrific hacking cred.


Filed under: Arduino Hacks, robots hacks

The Rice Krispies Loader is designed to fleece you of your delicious cereal. Photo by Kit Fuderich.One Maker’s experiment in robotics results in an insatiable cereal transport system using Arduino, 3D printing, and Rice Krispies.

Read more on MAKE

The post This Cereal-Stealing Robot Will Swipe Your Breakfast appeared first on Make: DIY Projects, How-Tos, Electronics, Crafts and Ideas for Makers.

Toothbrush Helmet GIFMaker Simone Giertz creates a ridiculous, impractical, yet awesome motorized helmet that brushes her teeth. Sorta.

Read more on MAKE

The post Let This Helmet with a Robot Arm (Sorta) Brush Your Teeth appeared first on Make: DIY Projects, How-Tos, Electronics, Crafts and Ideas for Makers.



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook