Modifications to Robot Arm for Opto Coupler Feedback, OWI 535, Edge Etc





Introduction: Modifications to Robot Arm for Opto Coupler Feedback, OWI 535, Edge Etc

For those of you into robotics, and especially robotic arms, many of you have seen the cheap but impressive robotic arm that is currently on the market for less then $30 (£30 in the UK) These arms have 5 motors, and some models come equipped with a built in USB interface allowing the PC to control the Arm.

Whilst good value for money, these Robotic Arms do have certain limitations, and the biggest by far, is the lack of feed back, not that there is anything to feed back from!

These robotic arms dont actually have servo's as such, but a simple motor and worm drive gearbox with 4 cogs inside it. Anyone interested in Inverse Kinetics, wouldnt be impressed with the way this arm performs, and the supplied software for the USB version just simply relies on a timer, hoping to get the arm in a very near position to where it was programmed to go.

After reading a few very interesting topics on here, where people have interfaced these arms with an Arduino, the lack of positional feedback was very obvious, especially if you wanted any degree of accuracy, ie better then 2" resolution.

After playing around with small variable resistors to give feedback, I decided to strip down one of the "servo's" to see what room i had to play with. The following Tutorial, explains how these "servo's" can be simply and easily modified using 1 part, and a little time to give that much needed feedback, with surprising accuracy.

Parts needed:- 4 infra red slotted opto's.
                            3 or 4 core flat cable.

Tools needed:- Soldering iron and solder.
                             Craft knife.
                             Super glue.
                              Endless supply of coffee!

Please note, the servo shown below is a finished one, hence the extra cable.

Step 1: Surgery

.The chances are, if you have one of these arms, you will have built it yourself and know how it goes together, so in which case, i will skip the obvious and get right down to the basics. There are 4 cogs or gear wheels inside the gearbox, driven by a worm drive. Take all of the parts out leaving the bare shell. Just to the right of the motor mount, and almost opposite the brown gear wheel, we need to cut some of the plastic away from the divide wall, this isnt critical, but a piece about 3mm X 10mm should be suffiicent, this is where the slotted opto will be glued.

Next modify the slotted opto, the mounting lug on the end opposite the chamfered LED needs to be cut off, next cut off about 1mm from the other lug. Next with care, cut off about 1mm of the chamfered housing for the LED, this is best done with the craft knife, be careful with your fingers, and make sure you dont crack the housing, as it is fragile, we have to remove enough plastic to expose the face of the LED, you may need to apply a drop of super glue afterwards, to hold the infra red LED in place. There is nothing special about these slotted opto's, i just happened to have a few in my junk box, practically any type will do.

Once the Slotted opto is cut and modified to fit, its time to prepare the connections, looking at the rear of the opto, and the LED with the chamfered edge nearest to you, cut the top left and bottom right connection short, to use as a terminal post. Next bend the bottom left diagonally to the top right and solder the two together, this forms the common connection or 0 volts.

Step 2: Mounting the Opto Coupler

Now its time to mount the opto coupler in position, note that the pictures show the wire already connected, but i would leave this off until last, its a lot easier! And appologies for the couple of blurred pictures, but they are clear enough to get the idea. This step has got to be the fiddliest of the whole operation, the opto has got to be mounted in eacactly the right position, if its too high or too low, then the opto will touch the cog, if it too far to the left, the motor wont fit, too far to the right, and the other half of the case wont fit. This is the way i did mine. 

The next step would be easier, if the bottom half of the case was held in a mini vise. Temporarily fit the motor, and hold it in place with a rubber band, then fit the two gear wheels,one grey/black the other brown to its shaft, and fit that in place.

At this stage, it would be useful to try a couple of dummy runs, getting the opto into place, BEFORE you apply the glue.

Apply super glue to the lower mounting lug of the opto, and carefully fit that into position (you may have to move the 2 gear wheels to one side to allow access. Once in postion, press the opto into place, making sure that the faces of the opto dont touch the faces of the gear wheel, and also making sure the opto is snug against the motor. Holding it in place with a small screw driver wedged between the opto and the plastic helps, you will see how when its in position.

Once the opto is in place, and you are happy that it IS in the right place, carefully remove the two gear wheels, and place the gearbox shell to one side to allow the glue to set.

Now comes the next fiddly bit.

Step 3: Modifying the Encoder Gear.

Now we have to modify one of the gear wheels, the brown one in fact, to turn it into the encoder wheel.

The very nice people who made this gear wheel, left 6 small circular markings on the underside of the gear wheel, these are in a perfect position for the holes that we want. Basically the more holes we have, the better the final resolution. I certainly wouldnt advise going for more then 6 holes, as it would leave the wheel too weak. The first picture shows the 6 markings, highlighted with a pen.

Great care needs to be taken with the next step, as the wheel can be easily damaged, Please DONT be tempted to drill each hole out in one go, The finished hole size is 4mm. I first took a piece of wood, and drilled a hole big enough to take the smaller half of the gear wheel, to allow the larger face to sit on a flat surface. The first hole i drilled was 1.5mm, this was my pilot hole, the next size up was 2.5mm, and for the last drilling, i did this by hand holding the drill bit with a cloth wrapped around it. The hole being so close to the edge, i didnt want the risk of the drill  bit grabbing, and wrecking the gear wheel.

With the gear wheel drilled, we can now move onto the next step.

Step 4: Wiring Up and Re-assembly

Now we can solder the wires into the opto coupler. I used flat cable, because i didnt have to make any further mods to the casing of the motor gearbox. In my case, all i could find was 3 core from an old computer modem lead. Thats the reason why i had to join the -ve's of the LED's, if you have 4 core, you could connect the two diodes in the opto coupler seperately, but it doesnt make any difference.

With the wires connected, they can now be moved clear of where the motor sits, and then with a spot of super glue, glue the cable into position, it needs to be glued to one side, to avoid catching the motor.

Step 5: Re-assembly

With the connections made, and the cable secured in place we can now replace all of the gear wheels, making sure that nothing catches or obstructs the gears, once satisfied, carefully thread the motor cable through the space next to the opto cable, and press the motor into place. Tidy up any wires which may catch on the lid, and then replace the top cover, and screw in the 3 case screws. Clip the motor wires into their lugs to hold them in place.

And thats it, the motor/gearbox has now been converted to provide accurate optical feedback.

Step 6: And.....Finally!!

The outer gear wheel/drive mount can now be added, and the whole assembly fitted back onto the robot arm.

One down, three to go!! Once I was up to speed, i could convert one of these motors in about 45 mins.

The ratio bewteen the gear wheel and the motor is 32 to 1, calculating the ratio of the other gear wheels, shows that for a 180 degree turn of the output shaft, you will get 1024 pulses out of the gearbox, and looking at the output waveform on a scope, the opto was producing nice and clean square waves.

Early playing around has proved that i can get the arm to any position along the horizontal axis to within 3 to 4 mm, this i feel sure can be bettered if the backlash or slack in the gears is allowed for within the software, im pretty new to writing Scripts in the Arduino world, having come from the world of PICS.

The gripper or the jaws were not modified in this way for two reasons, the first reason was, there wasnt really enough room to get an opto inside the gearbox without a lot of fabrication, but the main reason, was, i wanted better feedback from the gripper. I wanted to sense the actual grip pressure, and i did this using a sensitive current sensing module like this:-

Once fitted, i get an accurate feedback of the pressure applied to the jaws of the robot arm, and i can therefore program the Arduino to switch off the motor when a preset pressure is reached.

A similar sensor could be fitted to possibly the elbow joint, and the arm calibrated to give weight readings as well.

I hope you found this instructable of interest, and i welcome any questions or comments.

Happy Modding..;o)



  • Epilog Challenge 9

    Epilog Challenge 9
  • Pocket-Sized Contest

    Pocket-Sized Contest
  • Science of Cooking

    Science of Cooking

We have a be nice policy.
Please be positive and constructive.




Hi, I am trying to find opto coupler which you used, can you help me about this? What is its name?
I am really greatful your work it is really useful and succesful, especially your solution for getting feedback.

I bought OWI kit from amazon. It seems the speed of the motors is a bit slow.
Are there any methods to increase the speed of the motors?
Something like passing more current. But i doubt more current may burn the motors.

The speed is slow probably because the arm applied a relative high load to the motor. And motor is a simple, low torque DC motor. To make it fast, we can either change a motor or change the gear ratio to increase the torque.

Hi, as a retired robotics software engineer I have looked at this robot arm before as something to dabble with but have been put off by the lack of positional feedback. I came across this post and have been inspired to have a go and have just been given an arm kit for my birthday. The motors all have a worm gear on the motor shaft and I agree with chrism that this will give an overall ratio of 131:1 or 393 pulses per 180 degrees of movement. However, if the pulse sensing circuit/software generates a count on each pulse edge this would give 1572 counts for 180 degrees.

One question I have is do you have any means of automatically finding a datum position for each joint? It would be nice to home all the joints without reaching the end of travel.

Hi David, this was a cheap and cheerful set up, my prime objective was to improve the accuracy of the arm, which is what i succeeded in doing. When i worked in the motor industry on ASEA robot arms, they employed 2 types of positional feedback, one was a dead stop using a proximity sensor, and the other a 'soft' stop defined during setup. When i did this arm, i used just a soft stop, the arm was mounted on the board, with a peg sticking up in one corner. The arm was manually 'jogged' to that peg and when the peg was dead centre within the jaws, all counts were reset. I had planned to go one step further and program the arm to move to a reset point, when it reached this point, if it was still zeroed ok, it would allow the arm to continue.

There are many ways of doing this, another way could be to use another IR detector sensing something on the arm itself. Some of the posting was actually written some months after i had finished the arm, and i was relying on 'faulty' memory..:o)

ottimo lavoro, gli opto controller possono essere quelle dei mouse tipo vecchio?

great job, the opto controller may be those old type of mouse?

che ne pensi di riprodurre la ruota dentata con stampa 3D?

what do you think of playing the sprocket with 3D Printing?

Hi, have just found this whilst looking to automate my robot arm - looks like a cool mod. I have a few comments and questions:
You claim 1024 steps for 180 degrees - I've checked the gearing in mine and from the brown cog it has 3 reduction stages of 10/32 to the output shaft of the motor assembly, then a 10/40 reduction stage to the arm. I make that a total ratio of 131:1, which with 6 holes gives 393 pulses for 180 degree rotation (half a turn of the arm). Are your cogs different ratio to mine or is there something else I'm missing?
There's a previous comment about getting replacement cogs - I'd be wary of getting standard replacement cogs of the correct pitch - the grey ones beneath are standard cogs, but the brown one has slanted teeth to engage with the worm drive. I've not found a replacement for that, and I'm not sure they are readily available.
Is there any reason not to drill more holes in the cog for better resolution? You recommend drilling a small hole to start and then opening it out - do the holes actually need to be that big to work with the opto?

I am a software geek, so looking forward to playing with this - I'm hoping it should be possible to slow the motors down using PWM control when nearing the stop for better precision.

I think you may have a different gearbox to the one i had, the pulses for 180 degrees was in fact 1024 as i stated, and there was certainly NO worm drive in the gear chain whatsoever.

However you mod your gearbox the main aim is to get as many pulses for a given % of rotation. If you used just the infa red emitter and receiver removed from a slotted opto, you could even mount them either side of the first gear wheel, instead of the 2nd giving you a higher resolution.

As these are simple opto's the holes would need to be pretty big to get a good and clean signal when switching at a higher speed. Just remember that there is nothing special about these opto's, pretty much any will do.

There are also reflective sensors that can be used, these shine a broad infra red beam onto an object and the receiver senses the light and dark reflections coming back.

Slowing the motors down is what i did with mine, just keep an eye on the pulse count, and when you get near to where you want to be, start to reduce the drive to the motor in stages.

It is a nice surgery. I am wondering if you let me know the size of the opto coupler you used. I have purchased a small opto coupler, named TCST2300 from Vishay. Its dimension is : 24.5 x 6.3 x 10.8, gap 3.1 mm. When trying to install in the gearbox, it seems rather large.

i checked on the Vishay's website for the dimensions of the opto that you have bought and they are exactly the same size as the general Electric H21B1 i used. You have to look closely at how the opto is mounted and which pieces of plastic to cut. Also remember that i cut OFF one of the opto's mounting lugs to get it to fit into the motor housing. Once you realise how its done, the mounting is quite simple although a little fiddly. The first one i modified took me ages, but the rest took about 40 mins to modify. I hope that helps?