OpenEncoder Construction Tutorial for the TowerPro MG995

Note: This tutorial is currently a work in progress. Please leave feedback in the OpenServo forums.

This tutorial documents the conversion of a POT found in a low-cost R/C servo known as the TowerPro MG995. The conversions allows for 12 bit resolution (.0878 degrees per bit) full rotation position and speed feed back. This conversion requires both mechanical and electrical skills to accomplish. Here's a video showing it as a first draft. http://vimeo.com/10364526

The servo chosen for conversion in this tutorial is the TowerPro MG995 which is widely available for under $20 from a variety of vendors. The conversion of other models and brands of servos will be very similar and the general process outlined below. Here's a picture of the finished servo. (note this picture does not include the two buss resistors, this picture is good if connected to the OSIF, as the OSIF has those resistors installed)

This tutorial assumes that you're you've already taken out the old analog servo control board as described in ConstructionTutorial_MG995.

http://i324.photobucket.com/albums/k352/kb1gtt/mounted_357x360.jpg http://i324.photobucket.com/albums/k352/kb1gtt/encoder_261x237.jpg

Assembled !Open-Encoder ready for testing.


The Overview of the process

With extracted servo POT, OpenEncoder (OE) board, replacement SLA shaft and required tools, disassemble the POT such that you have the shaft separated from the POT. Discard shaft and replace with SLA shaft. Place magnet on shaft and glue with super glue. Then solder in small components on the OE board including the AS5046 chip. Now super glue the PBC to the POT case, and when it's dry, you have an OE encoder. This modification can take less than an hour. But I haven't had a chance to time it in a nice sequence yet, so there is some speculating in the estimate.

Tools I used to do this modification a pair of dikes, a pair of needle nose pliers, a 4-40 screw with head removed via crimp tool bolt cutter, and super glue.


Disassemble the POT

Start by removing the hot glue, then bend back the tabs. This will allow the PCB to be removed. The POT wiper is attached via peened shaft head. Cut what you can off with a pair of dikes. I couldn't get all of it, but I could get a fair bit which made the next step easier. With some needle nose pliers, I grabbed the wiper plate and wobbled it side to side until it popped off.

insert picture here.

Once I did this, I could pull the POT shaft out. There is some kind of thickish grease on the shaft, so careful about getting debris in that area if you can.


Machine the POT shaft

THIS STEP IS OBSOLETE, USE THE SLA SHAFT INSTEAD

Turn down a nub on the end that is small enough to fit in the magnet hole. I typically go to about .050 in. If you can turn things perfect, you can make it a tight fit, but with the typical drills and dremel tools most people have, you can't get that nub exactly centered. Going a little small will allow the misaligned nub to be aligned later on when it's glued together.

http://i324.photobucket.com/albums/k352/kb1gtt/dremel_lathe_cropped.jpg http://i324.photobucket.com/albums/k352/kb1gtt/shaddy-lathe_640x480.jpg

A make shift Dremel lathe, then a hand drill lathe.


Make Alingment Tool

THIS STEP IS OBSOLETE, USE THE SLA SHAFT INSTEAD

I made my alignment tool by cutting off the head of a 4-40 screw that was about an inch long. I then used some metal tape and wrapped two OD's on to it, such that it bulked up to the OD's I wanted. A key here is to pull it taught when you wind it up. If you do it will stay nice and firm, if you don't it will kind of wobble a bit. I choose the metal tape because it doesn't like to compress like paper, or plastic tapes will want to. Yes I like sparkfun, and felt like doing some advertisement for them. They got good stuff.

http://i324.photobucket.com/albums/k352/kb1gtt/align_tool.jpg http://i324.photobucket.com/albums/k352/kb1gtt/align1_285x216.jpg http://i324.photobucket.com/albums/k352/kb1gtt/align3_321x249.jpg

Alignment tool made via wrapping tape around a 4-40 screw, then the alignment tool inserted waiting for the PCB to be glued.


Reassemble POT with the OE board

Here's the electrical BOM in comma delimited format.

ref,

value,

mfg,

#,

vendor,

#

C2,

2.2uF,

TAIYO YUDEN,

EMK107BJ225KA-T,

Newark,

87K3717

C3,

100n,

Ftaiyo,

TMK107BJ104KA-T,

Newark,

86H5300

R3,

1k47,

VISHAY,

CRCW06031K47FKEA,

Newark,

72M6819

R4,

1k47,

VISHAY,

CRCW06031K47FKEA,

Newark,

72M6819

U1,

AS5046,

AUSTRIAMICROSYSTEMS,

AS5046,

Newark,

59P4065

--,

--,

BatchPCB,

23010,

BatchPCB link

Here's the KICAD design files. Use KICAD to open encoder.pro and you should be on your way.

kicad_OE.zip

THIS REST OF THIS STEP IS OBSOLETE, USE THE SLA SHAFT INSTEAD

Install the small 0603 components, before the magnet. I know the caps are attracted to the magnet. You will want the magnet shown below. Note it shows the part number and vendor if you look close. You can directly source them, or poke around and you can likely find them from the folks on the forums here.

http://i324.photobucket.com/albums/k352/kb1gtt/magnets.jpg http://i324.photobucket.com/albums/k352/kb1gtt/Mag_mount_330x330.jpg

First are the magnets you will want to install. Then this is how I held the magnet at a proper distance when gluing it in place.

The magnets are from amazingmagnets.com number D118-240-063-DM. Here's a link to the drawing I used to make the purchase. PDF drawing Solidworks files


Attache wires and install in OSV3 modified servo

insert pictures and text about final wiring.


Remove gear pin to allow full rotation.

With a pair of dikes, I firmly grabbed the pin, and leveraged it out. I left the gear on the plastic body when I did this. If you get the dikes on it right, it comes out surprisingly easy, so you don't stress the other components much at all. Doing it this way, I didn't have to touch the grease, or other gears, so it was a quick pull.

http://i324.photobucket.com/albums/k352/kb1gtt/gears1_504x387.jpg http://i324.photobucket.com/albums/k352/kb1gtt/gears2_570x402.jpg

"This shows the pin removed."


Test OpenServo operation

insert pictures and text about final wiring.


Troubleshooting

[Describe troubleshooting tips here.]

ConstructionTutorial_MG995_open-encoder (last edited 2012-10-12 19:51:18 by localhost)