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




About: A semi retired engineer with too much time on his hands, I just love, building and tinkering with anything electrical or mechanical. I also love chatting to people and swapping ideas. Just send me a message ...

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)



  • Tape Contest

    Tape Contest
  • Trash to Treasure

    Trash to Treasure
  • Arduino Contest 2019

    Arduino Contest 2019

52 Discussions

Jeffy Beryl

Question 7 weeks ago

I'm trying to control my owi arm using arduino and l293d IC. The motor wouldn't run from the driver output. I tried powering the motor driver using external power supplies rated at 500mA and 1A. When I check with a multimeter across the driver output terminals there's a voltage difference of 4.7V. But the motor doesn't work most of the time. Occasionally it works for a few seconds. What could be the problem?


2 years ago

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.


3 years ago on Introduction

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.

1 reply

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.

1 reply

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)


4 years ago on Step 1

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?


5 years ago on Introduction

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.

1 reply

Reply 5 years ago on Introduction

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.

1 reply

Reply 5 years ago on Introduction

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?


6 years ago on Introduction

I want to do this but also keep the original gears in case I decide to try it another way.
To help me gather up the materials BEFORE I disassemble my arm it would be really helpful to know the dimensions of the 10/32 gear wheel so that I can try to buy a bagful of them on eBay.
Did you happen to keep a record, or do you have one lying about that you can measure?
Many thanks

1 reply

Reply 6 years ago on Introduction

Hello Nick,
The mods were done to the original gears, if you look at the 10/31 gear wheel from inside, you will see on the surface 8 little circles from the casting, all i did weas to drill 4 small holes using half of these circles as a guide. Doing this doesnt really stop you from trying something else. Saying that, these gear wheels are pretty standard, look in any hobby model magazine or catalogue and you will see these, they are pretty much a standard tooth pitch as BILLIONS of Chinese toys and cogs all use the same pitch. Any problems just shout!



6 years ago on Introduction

This is great! I have one of these robot arms and we have fun playing with it to move things around. I have been thinking about how I can hook it up to my Arduino for basic control. This adds another lever to what I could do with automated movement! S.W.E.E.T!!!!

3 replies

Reply 6 years ago on Introduction

Hello AT,
The next level is not as high as you think,actually its quite easy even if you have even basic programming skills.

each of the gearbox's is quite simple,its just a motor driving a gearbox. In the original, the system was basically very stupid, there was NO feedback to tell the micro at what position.

Here's my simple advice, take one of the motors out and connect it to your micro, just focus on the one, and not all of them, this will just confuse you. Now that you have added an opto to it, you now have a form of feedback, so your basic motor/gearbox is now a servo. Just play until you can control the new servo the way you want, when you are happy, just apply the rules to the other 'new' servo's


Reply 6 years ago on Introduction

Great advice. In looking through your instructable, it makes total sense how you are doing that. It is basically how the Rhino robotic arm that we had in college worked for positioning.

At one point I was tempted to look into replacing the motors with stepper motors. Another idea was to use servos. Your idea should be much cheaper and more fun as it gets into how the whole thing works.

My version does not have the USB inter face. I didn't even know it came with one! I was going to set up my Arduino with several MOSFETs to replace the switches in the controller box. That approach along with what you did would allow me to program the arm for repeated tasks.

A pressure sensor in the pincher wouldn't hurt either.

My son and I call my robot arm Whiny because of the sound the motors make as we move it around.


Reply 6 years ago on Introduction

Using steppers was an idea i originally considered, but when i sat down and had a think, the first problem was the extensive mods required to the plastics, and the second was the backlash in the gears negating the advantages of a stepper!.

The original DC motor can be compensated for within the micro if you calculate the backlash and 'overshoot' your stop point in either direction.

The 'pressure' sensor was nothing more then a simple current monitor, eventually i used a small Sparkfun current sensor module that was cheap. I used a 5 amp module which i modified. The current shunt was just PCB foil on both sides of the PCB and plated through. I first removed the plated through connectors to use one side, this effectively made it a 2.5 amp current shunt. A little more hacking with a modelling knife brought the module down to about 800Ma for full output (0 to 255Mv output for 0 to 800 Ma) It didnt need to be accurate just needed to feedback the amount of stalling current on the grippers.

The only weak point of the whole arm IS the gripper assembly. I have seen more robust ones for sale and that will be the next mod.


6 years ago on Step 6

this is great, excited to start working. two questions though:

-- where did you get the optos? where would you suggest I scavenge/buy some?
-- would you please put up more detailed instructions for putting in the low current sensor and gaining pressure sensitivity?

once again, thanks for a great project -- its exactly what I want to get me started in learning about digital fabrication arms!

2 replies

Reply 6 years ago on Step 6

The opto's are LITERALLY the cheapest you can find, there is NOTHING special to them, one half is the LED 'transmitter' the other half is the LED 'reciever' just look for the cheapest slotted opto you can find, it will do the job perfectly. Here is an example.. It is simply a photo transistor one side, and a transmitting LED the other. To test it, put 2v on the transmitting side, and your multimeter the other side set to the OHMS range. The meter will read a low resistance, if not, reverse the test meter leads. then just interrupt the beam in the slot, the meter will then show a higher resistance... another example..

This is what they look like...

There is nothing scary about the opto,s I used some that i had in my junk box, i didnt even check what they were, i just used them. For those really unsure, buy 1 and test them using the examples above.
For the pressure sensor, this is just as simple....I used a current sensor from sparkfun like this....

when the fingers grip an object, effectively the motor hits a brick wall and stalls. The current then starts to rise and this board will sense this. Whatever micro you use, just simply program it to read the rising current when the fingers grip something.


Reply 6 years ago on Step 6

thanks so much for the reply! I will be in touch as I move forward with the project.