Main Menu

Secondary Menu

Arduino Controlled Rotary Stewart Platform

This instructable is about building a Rotary Stewart Platform. It allows to position its moving platform in six degrees of freedom. This specific platform is designed to be able to position a DSLR or any other digital camera.

This version of Stewart Platform uses instead of linear actuators just ordinary hobbyist servos for motion. Whole platform is controlled by an Arduino Uno, it computes all necessary equations to get the platform into right position and also controls servos.

Video of movement of completed platform can be seen here. Quality is not very good, but camera with better picture was at the time of capture on the platform. It was set-up for random position every 4 seconds.

Some informations about platform:

weight of load can be up to 2Kg (platform tested with 1.5Kg with no observable problems during moves in whole range of movements), theoretically platform should be able to cope with even higher loads, but it wasn't tested with such load

low power consumption - with load of 1kg was consumption of around 5W.

very good fineness of moves - smallest possible move is around 1mm

perfect ability to repeatedly achieve the same positions.

good stability of platform even with big loads.

All source files for platform (templates, Arduino source code, code for communication library can be found here.

Price of platform mostly depends on the price of servos and of the Arduino board. Cutting of parts, all other needed parts cost at most 50$. Total price can be around 150$.

IrDA and LCD with I2C interface were bought from ebay, they are very cheap (together around 10$)

Parts of platform are cutted from acrylic, i used 4mm acrylic.

Needed tools:

drill

screwdriver

tools needed for soldering and creation of PCB for connecting external power supply

measuring tools

double sided tape

In case of any questions, feel free to contact me.

Step 1: Building Moving Platform

We start by cutting parts from acrylic, here we will use templates from files platform_bot and platform_top. This platform is divided into two parts for better universality, just by changing top part of platform you can adapt it for various purposes. They are put together using screws placed in holes A1-A3.

Dimensions are chosen with respect to size of ordinary DSLR. Platform can be changed to be smaller or bigger.

At denoted places B1-B3 in bottom part of platform it is needed to drill holes which are used for anchoring of connecting rods. On third picture you can see proper way of doing that. These weird deformations in acrylic were caused by using CA glue to fix screws in acrylic.

On top of the moving platform it is necessary to place a piece of rubber or foam and fix it there with double sided tape. It will prevent unwanted rotations and movements of camera on the platform.

Length of connecting rods should be around 12cm and they should be bended as can be seen on picture of completed platform. This bend greatly improves range of movements. Length of rods should be chosen so that the angle between servo arms in horizontal position and the rod is around 70°.

Step 2: Building Base of the Platform

To build base of the platform we will at first need to build PCB for connecting external power supply for the servos. Basic idea behind it and whole schematic of all connections can be seen on the schematic. Layout of the PCB is in the power_board_layout.svg. To all connection points in blue rectangle will go pins for connecting servos. In green area should be sockets for providing power to other accessories such as LCD and IrDA. In purple is shown connection point of power switch. By letter C are denoted positions of capacitors. Last signal cable is connected to ground, this one will be connected to GND socket on the Arduino. Without this connection, servos would run very badly.

Next you should cut main base parts from acrylic based on templates base_bot and base_top. At first, fix the PCB on the bottom part with screws through holes C, and fix three connecting legs (from file servo_arm.dxf) to holes B1-B3. Next place servos on top part, servos should be mounted in holes A0-A5, their signal cables should be led through holes S and W, the right way can be seen on a provided picture, connect all servo connectors to the board, also get all signal cables supposed to go into the Arduino to the top side through holes W. Now fix the connecting leg on top side of base, now it should hold together tightly, if servos can move, fix them with a bit of glue from hot melt glue gun.

Screw spacer screws into holes AD, fix Arduino on them, connect all the cables. Fix the power switch in hole SW. IrDA receiver board is easily fixed with screws through holes I. To fix LCD it is necessary to fix it through helper post - it is fixed on top of the base, LCD is fixed to it from front side. Also connect all cables for LCD and IrDA.

Step 3: Putting It All Together

Cut 6 pieces of servo arms from file servo_arm.dxf. Drill hole on far side with right dimension to be able to screw there nut bolt for ball joint. On the other side drill hole through the arm, place there nut bolt used for fixing it on the servo. This can be seen on a provided picture.

Place all servos into zero position (pulse length of 1500us), then place the arms in horizontal position, tighten the screw. Now is the platform complete and ready to be used.

In source codes, there is file platform.ino, this is main program for the Arduino. Here you have to change few variables with respect to built platform. Many variables are shown on a picture.

MIN and MAX defines - min and max values of servo pulse length

zero[] - pulse lengths in which arms are in completely horizontal position

beta[] - angle between x axis and servo arm

servo_min, servo_max - angle of servo arm in min and max position

servo_mult - values are from technical documentation of the servo, it's pulse length and the resulting angle of rotation corresponding to this pulse length

RD, PD, theta_p, theta_r values - they can be seen on pictures in previous and in this step.

equations for x and y position of servo rotation points on base and platform attachment points, they have to be calculated specificall with respect to desired orientation of x axis. It is just basic goniometry, provided picture can help understand these equations.

Step 4: How Does It Work?

Controlling platform uses inverse kinematics. We know position of base, desired position of platform, then calculate necessary rotation of servos, send them right pulses and its done.

First it is important to define basic position of base rotation points and attachment points of platform, this is bit explained in previous step.

After obtaining values of desired moves, program calculates corresponding position of moving platform attachment points. This is separated into two parts, getting translational vector - vector of movement in x y z axis, rotational matrix - matrix representing values of movement in pitch, roll, yaw, next it is combined in function getrxp, result is new position of platform. From this program finds necessary rotation of each servo, converts this angle into corresponding pulse length and sends it to the servos.

Platform with provided source code listens on serial interface, it accepts at first controlling char which denotes action, then it either executes the action or obtains/sends some data. For easier control of the platform, in src_comm_lib is C++ library for easier interfacing with Arduino, in header file there is explained its usage.

Toys Contest

Faux-Real Contest

Epilog X Contest

59 Discussions

I downloaded the code from guthub / Thomas KNR for the stewart paltform. Expunged all code lines which were relevant to Ir and LCD. The code compiles fine on Arduino but somewhere has issues whereby pulse outputs do not show up for the 6 rc servos. Any one having a working code, kindly forward it to me. I am a learner only!!!!

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see .*/

Good Day, I just saw this post while sifting for a 6 dof platform. I have collected all the hardware and need to make the platform. Please help! Could I have an autocad or similar software drawing for the bottom / top parts. Will get these cut out on Laser thru some local vendors.I await your kind reply.

Hi, ratio between size of base and platform is variable - it will affect range of movements, stability, precision (if platform is significantly smaller than base, range increases, stability and precision is decreases and vice versa), i would say size ratio of platform can be around 50-100% of size of base. Height is also variable, it can be shorter, or higher, depends on needs. If legs are very short, it will be harder to construct and range of movements will be limited by joints. If legs are long the upper platform will not be stable, precision will be bad. I would recommend to choose leg length so that in platform zeroposition their angle from base would be somewhere between 45-60°.

one of the document i read today , it states that In order to avoid singularities, a security margin of 15º between the platform and the links is taken. i dont fully understand what it means. it also gives an example, platform radius is 3cm, then he calculated the base radius and height accordingly .(Base R=7.6cm,H=26cm).

The security margin should prevent legs going straight up, if they are perpendicular to base, it would be unstable and with poor performance in these extreme positions. therefore platform should always by at least bit smaller and the length of legs chosen so they would not reach these extreme positions.

Hello, i've built the hexapod and loaded the code, after some tries got problem with power, i've burned one servo, and have to repair another, using a power supply 5volt, 1A, that goes directly in a breadboard, lcd connected on arduino, which supply did you use? Think 1A will be enough? Thx you

Hi, if you burned servo then you probably had severe problem with voltage or maybe put too much stress on the servo. However servos in general are tolerant and can work on various voltages, usually 4.8V-6.0V. Bigger voltage -> faster and more powerful -> in continuous stress bigger voltage will result in shorter lifespan or in extreme cases burn it faster than 5V. Check datasheet of your servos, voltage range is surely there.Current is other question, you have 6 servos which can take a LOT of power. When i tried using servos without enough power (small cheap micro servos) they behaved purely randomly, i had no control of them at all, or with more power (but still not enough) just some of them started behave randomly when they were under load. In the end, i used cheap 3A switching power supply and big reservoir capacitor to improve behavior in current spikes. In power consumption test my servos (standard 75g cheap servos) drew around 1.2A (if i remember correctly) in platform movements, platform had load of around 1Kg.

Hi, i'm starting with your project, i, got the cutted pieces from template, how did you drill plexiglass especially in top part, 'Cause i'm worried to damage the parts, thanks in advance for any suggestion!

Drilling plexi is hard indeed. Be very carefull and drill at very low speeds, it won't melt so much. It is soft so even at low drilling speeds it won't take much time to make needed holes. Often take brakes when drilling a hole if it melts too much, try to avoid any serious melting of the plexi because it can deform hole or even whole part.