Picture of Low Cost Hobby Servo XY Table
For this project, we wanted to build a lower cost, lower precision XY table for an installation at TeleToyland. The goal is to allow web users to draw shapes in a sand box, so we wanted a simple XY table that is easy to control from a web application. Since we already have the Web to Hobby Servo connection working well for other installations, using a hobby servo was the desired approach. Most homebrew CNC XY tables use motors like steppers and acme screw drives, but we don't need that much precision, and they are a bit slower than we'd like. The Hobby Servo approach also gives us absolute position control, and helps keep the cost down too - using industrial servos would be great, but a lot more expensive. We were also looking for a lower cost way to do the linear glides - trying to avoid costly linear bearings etc.

(Note, we have a newer version of this project at this Instructable)

You can try this project out live at the site

The Challenge
So, the challenge is taking a hobby servo and getting 2-3 feet of linear motion out of it. ServoCity is working on servo linear actuators, but we'd prefer lower power, lower cost, and longer reach that they currently offer (though new ones may be pending). We also built a basic SCARA type arrangement with 3" lazy susans, servos, and counter weights. This works OK, but the workspace was limited, and due to the polar approach with hobby servos, the resolution is uneven - higher nearer the servos. This may not be a huge problem, but the approach shown here yields the same precision over the entire workspace. We could also consider a hybrid - using one rotational arm with a liner slider on it - the math would be easy in that it would use polar coordinates directly. We could also reverse the two - use on linear slider and add a rotating arm to it. A project for another day!

Using Hobby Servos
With a Hobby Servo, you typically get just 90 or 180 degrees of rotation, so the trick is getting that to work over a longer span - 2-3 feet. We could modify a servo for continuous rotation, but then you lose the positioning capability and we'd like to keep the internal PID circuitry and potentiometer approach. If you use the internal potentiometer and add a big servo horn, you could get a wider range of travel. With a circular horn, the distance traveled is Pi * Diameter of the horn / 2 - that last divide by two is to account for the max 180 degree of travel (we'll get into that later). So, for a 2' travel, you'd need a servo horn with a diameter of over 15"! We could use that approach with a lazy susan type of setup, but the momentum in moving that much material puts a huge mechanical strain on the servos (the same issue we had with the SCARA prototype). Another approach is to gear up the output, so you get more motion on the output. We didn't dig into this, and there may be issues with the power required to move those gears, and in addition, using gears is a bit ticker mechanically - we came up with a much simpler approach.

So, for our system, we pulled the potentiometer out of the servo case, and replaced it with a 10-turn potentiometer. So, right away, you can multiply the distance traveled by 10, so for the above case, it takes the horn diameter for a 2' travel from 15" to 1.5" - much more reasonable!

In terms of coupling the output we could drive a threaded shaft with a follower nut (ACME threading seems to be preferred). This appears to be the most common drive mechanism for homebrew XY Tables - due to it's power and precision. It does result in slower travel, though, and again, a lot of gearing to get the potentiometer to move at the right speed to cover the span of travel.

What we opted for was a very simple timing belt approach where the servo drives a timing belt pulley, and the 10-turn potentiometer is connected directly to the shaft. With this very simple arrangement, then, we get 2-3' of travel in a few seconds with no complex mechanics. You could scale this approach up by gearing down the drive or potentiometer to the limits of the mechanics of a hobby servo.
1-40 of 76Next »
cliffyd2 years ago
probley the worst CNC ever built. No z Axis? Servos? I bet it only has enough power to use a pencil on paper and thats it. There is no way this thing is doing anything useful! This is terrible!

Hey cliffy,

Post a Picture of your design!! Carl, really nice work!

How do you coordinate the movements of the the two motors so one of them doesn't arrive at the destination earlier or later than the other..?

CarlS (author)  muhammadsagif.shahab4 months ago
You divide up the full move into move increments or time increments like 100 steps or 2 seconds etc. - those can be any number based on how fast the motors can move and how far you need to go.

Then you step through those and calculate the X & Y position for the current step in the full path.

The sample code in this Indestructible has a simple version, based on time increments: http://www.instructables.com/id/Internet-Arduino-Controlled-T-Slot-XY-Table/

This one has similar code: http://www.instructables.com/id/Table-Sized-Arduino-Joystick-Controlled-T-Slot-XY-/

For stepper motors, you often use the longest dimension in steps.

Looks a little complicated, but thanks!

isaacs38 months ago

I saw this jig for routers, https://m.youtube.com/watch?v=ulblySFElo4 then i realized it could be controllable by servos,

CarlS (author)  isaacs38 months ago
Could be - not sure how much torque is required for that setup. DC motors would work. It's a cool design, and relatively low cost, though! Lot's of fabricating special parts, though. Check out the T-Slot version of this project - very easy to make.
inged11 year ago

you for this great tutorial! Thought I might share this website I came
accross which I found very useful:http://www.directindustry.com/industrial-manufacturer/xy-stage-76555.html
rimar20001 year ago
This is an awesome project, thanks for sharing.
boogotti2 years ago
Hey Carl amazing, i have an idea, and this will be very useful,
is there a way you can attach a powerful led light on the pointer end, and have it fade in and out?
the idea i have is to capture a lens flare.
as in do your camera move (in the computer) do a 2d track on the image of the light source.(track the cgi light source)
export the 2d tack coordinates to the XY table,
Have a camera pointing the other end. once the light is in position take an picture on the camera.
As to simulate depth/ occlusion the light source need to fade in intensity.
Problem i have, i have no idea how to program this for the XY table to read. any ideas?
CarlS (author)  boogotti2 years ago
Cool idea! Take a look at the T-Slot version of this project - there is a link to it in the intro. Since that one uses an Arduino, you can drive an LED with a transistor - just like the side lighting that project uses, but an LED instead of the Z-Axis servo. Maybe try to get an LED working and dimming with an Arduino first to see how it goes since you are learning? I have another instructable for permanent holiday LED lighting that shows how to dim an LED strip - same thing for an individual LED, and maybe even easier. There are a number of examples of a single LED dimming with an Arduino on the web. Good Luck!
CarlS (author) 2 years ago
Thanks - looking forward to seeing how it goes since I am curious about using stepper motors too.
I really enjoyed trying your sand CNC app--thanks! I am building my CNC to use drawer slides and NEMA17 steppers.
Void Schism5 years ago
Just had a thought; you could mark lines on the belt and use a light sensor to detect the light reflected. This method gives no wear at all and the parts are cheap. to get the markings accurate im sure you could use a contact transfer to mark the lines on.
could also use a rotary encoder at the shaft, gray code or something, it'd be like, the reverse of a stepper motor, unless the shaft jumped a whole rotation, you'd have an absolute position... same technique, but without worrying the belt will get the ultra tiny dots rubbed off. there's an ible for a jog shuttle made from a vcr head, the same printout dots and encoder would work perfectly.
Gelfling6 skaar2 years ago
Nice idea, but marking the belt would be a little tedious, to say nothing of what Skaar said, the possibility of them rubbing off, also makes it less ideal.. the contact transfer, would also need to be 100% accurate, even if using just 2 or 3 already-marked areas. Most inkjet printers, use a clear plastic disc, and yes, there is that danger of the shaft jumping a tooth, or two.. but those usually match to the splines on the gear, and have an 'End Of Travel' optical sensor at both ends. I imagine the multi-turn POT is also susceptible to the 'Jump a tooth' problem..
CarlS (author)  Gelfling62 years ago
Indeed - I have added hose clamps on the tubing connecting the potentiometers since they can slip. There is a trade-off between locking everything down and allowing some parts of the system to slip in case something goes wrong. For a CNC machine, locking things down more may make sense since they are generally attended. For TeleToyland, they need to run for weeks or months without intervention. Having a stepper and a home switch may work - it can home itself periodically, thus adapting to small variations.
francisroan2 years ago
hey arent potentiometers supposed to go only 180 degrees? in this case it goes round and round
CarlS (author)  francisroan2 years ago
Good catch. You are right - normally only one turn, but we are using 10 turn pots. It was mentioned in the intro, but we updated the parts list and this page to avoid confusion. Thanks!
Can u show us the circuit of this thing. how it been connecting to ueach other.
Hitm_n3 years ago
i used the same drawer glides too. they're perfect for the job. although they do dip if you go past their contracted length. they keep things neat and low cost when compared to aluminum rods and linear bearings.
CarlS (author)  Hitm_n3 years ago
Thanks. The drawer glides are still working on the web site, but I have an updated design that uses nylon screen door rollers on t-slot extrusions. The advantage is that they don't extend past the table when in use.

clazman CarlS3 years ago
Love your innovation using "off the shelf" items!

Grrreat job!

Great Instructable!!! Ive been working on a machine of my own but I have some questions about my driver board. Has anyone used the HobbyCNC EZ Driver Board Kit or the PRO series?
doncrush4 years ago
Have you considered Kerk? I was aware of them having very low cost linear guide systems about 5 yrs ago...
POXYAT4 years ago
Hi, I am a new-registered member in your site...
I have a question here regarding to the PID X-Y table...

How do you know the maximum distance that the plate on the X-axis and Y-axis can reach when the potentiometer (the potentiometer in your diagram) is in saturation (potentiometer reach maximum)??

If I am using another two potentiometers as the controller to control the X-axis and Y-axis movement respectively, when I tune the controller to its maximum, it is expected that the potentiometer that linked to the servo motor will reach maximum as well, vice versa.

Hence, if my hardware is built without priorly knowing these information, it will happen that when I tune my controller to its maximum, the plate that move along the X-axis or Y-axis will reach to the edge before the potentiometer (the potentiometer that linked to the servo motor) reach its maximum if the area of the hardware is too small.

So, how are we going to know the exact length and width of the X-Y table that enable the potentiometer to rotate freely from 0% to 100%??

Please be tolerated while reading due to my poor english, haha.

Thanks a lot, hope to hear from you soon.
hondaman9004 years ago
CNC news! DIY CNC hits mainstream in an O'Reilly Radar tech blog report today. See

Pale_Flyer5 years ago
The linear bearings could be a smooth flat metal track, with the carriage mounted to a standard ball bearing.
i run the bs2 stamp chip i got over 60 servos around  i been trying to find a way to run servo's instade of stepper motor   im working on a nothere project cnc tipe  but i don't won't to run a 300 board i like to find a nothere way to run it or convert the servo wire's to run with a home made board
kingbolt5 years ago
Very creative way of doing CNC ;-)

...but I still believe that using steppers is the way to go.
akirawind5 years ago
I have an idea here...will it work fine if i replace the drawer slider with a robot castor  attach under the top X-axis bar?
akirawind5 years ago

if i were going to use roller-chain-sprockets instead of timing belt, is that possible to clamp the chain like what you've done here?

CarlS (author)  akirawind5 years ago
Maybe you could even just put a screw through one of the links?  We could have done that with the timing belts too, but we were reluctant to put a hole in the timing belt.
akirawind5 years ago
another question here. in this step 5 (picture number 2), does the small wood block, which attach on the Y-axis top glide, glue/screw together with the X-axis ?
CarlS (author)  akirawind5 years ago
Yes, I think its described in Step 4 - we attached small blocks to the X Axis glides, then the Y axis board to the tops of those blocks.  That was so the Y Axis was above the X Axis timing belt.
zenitrama5 years ago
I would like to use your table design in an upright position, i.e. vertical.  I cannot tell whether the design is mechanically consistent with this configuration.  Thank you!!
Thank you!  I will let you know how it goes.
CarlS (author)  zenitrama5 years ago
It should be since the drawer glides work in most orientations, but the weight of the Y axis would be a fairly big strain on the X axis.  Maybe you can add a counterweight to it?
flemron5 years ago
very cool! i would love to see how you did your web interface with the SSC-32 board.
CarlS (author)  flemron5 years ago
We use a SitePlayer Telnet device to go from the Ethernet to the serial port.  That let's us use simple PHP code to send commands via telnet.  Then, we connect a Lynxmotion SSC-32 right into that serial port to drive the servos.
1-40 of 76Next »