Tamiya 72004 worm gearbox speed sensor

 by ame
Featured
I wanted to accurately control the speed of the motor in a Tamiya 72004 worm gearbox for a robot I am building. To do this you must have some way to measure the current speed. This project shows the evolution of the speed sensor. As you can see in the picture, the motor drives a worm gear directly attached to its output shaft, then a series of three gears to reduce the speed of the final output shaft.
 
Remove these adsRemove these ads by Signing Up

Step 1: Research your options

Generally, to measure the speed of a motor you need some sort of sensor. There are a few options, but probably the most common is an optical sensor, and these can be implemented in one of two ways: reflective or transmissive.

For a reflective sensor a disc with alternating black and white segments is attached to the motor or somewhere along the drive train. An LED (red or infra-red) shines a light onto the disc and a photodiode or phototransistor detects the difference between the light and dark segments by the amount of LED light reflected as the motor turns.

For an transmissive sensor a similar arrangement is used, but the LED shines directly at the photosensor. An opaque vane attached to the motor or gear train (or a hole drilled in one of the gears) breaks the beam, allowing the sensor to detect one revolution.

I will add links to a few examples of these later. This project used the transmissive sensor design, but I tried several variations, as you will see.
vadipp says: Feb 4, 2012. 11:28 AM
Hi, thanks for the idea!
How did you "figure out which side was the emitter and which was the detector using a multimeter"?
ejoseph del rosario says: Jul 9, 2011. 6:47 AM
hi. shown in the picture at the first part. can use that motor w/ a gear box to become a generator? by putting a blade in the shaft? where can i buy that kind of motor? and the casing of the gear box.? thanks :D
evilgenius 398 says: Aug 20, 2008. 12:41 PM
genius
TheInventor says: Mar 9, 2008. 10:46 AM
Well done instructable! You had lots of pictures with lots of detail. +1 Added to favs
offlogic says: Aug 9, 2006. 7:45 PM
Ame- Checke out the natSemi LM18200 h-bridge driver? It kick the little h-bridges outta the water. it was made to run power seats & power windows, good for 3A continuous at 28 VDC. The Freescale MC33886 is even hardier, and runs up to 7.2 A at 40 VDC. I've got some 1"x2" circuit boards for the Freescale parts. Have you considered using back-EMF to sense speed? No sensor or mods needed, just cut the power for a few millisecods, then read the voltage produced by the motor, proportional to speed. Sure is cheap and easy.
avinashdadialla in reply to offlogicJan 14, 2008. 11:07 PM
hi. we faced several problems with 33886.. its failing and vcc and ground is getting shorted! can u suggest any precautions to be taken?
dtydc in reply to offlogicAug 21, 2006. 11:34 AM
You actually don't even need to cut power to the motor to measure back EMF. If you measure the current through the motor and you know the resistance of the motor windings you can figure out how much voltage is being dropped by the motor windings. Once you know that, you know that the rest of the voltage is being dropped by the back EMF "generator" effect. Of course the resistance of the motor windings changes as the motor heats up, but it's a pretty good model. Nothing like an encoder if you want real acuracy though . . .
ame (author) in reply to offlogicAug 9, 2006. 8:25 PM
Hi, Thanks for your comment. I am actually planning to use the Zetex ZHB6718 H-bridge chip. It is a tiny device rated to 2.5A at 20V, and I have found that the voltage drop on the drive transistors is very small. It's certainly adequate for the Mabuchi motors found in the Tamiya kits. I will mount these on a small piece of stripboard together with some 74-series logic gates to convert my three control signals to switch the transistors. I've seen the back-EMF speed measurement technique, but I haven't tried it yet. For the robot project I wanted to use conventional designs that I have used before. I want to get this robot working, so I can't spend too much time on investigating alternatives at the moment. How about doing an instructable for me?
magiceye says: Nov 12, 2006. 9:31 AM
Hi Ame, I was thinking about your project,could you use magnets connected to a Hall effect IC and obtain a voltage to control the speed. I understand that car speedo`s work this way,using a rotating disc (with magnets).
ame (author) in reply to magiceyeNov 12, 2006. 3:02 PM
Yes, this is a common technique. You can attach a magnet to one of the gears, or the output shaft, and place a hall-effect sensor nearby, so that it detects one revolution. If you have a gearbox with metal gears you can use a sensor that detects the individual teeth and gives you a pulse-per-tooth. In a conventional car speedo there is a spinning magnet (driven by a cable from the transmission) which is next to an aluminium disc. The disc is connected to the speedo pointer, and has a spring attached to it to stop it rotating freely. Aluminium is not magnetic, but the spinning magnet induces eddy currents in the metal, which in turn produce a magnetic field proportional to the speed of rotation of the magnet. The spinning magnet then acts on this magnetic field and 'drags' the aluminium disc round, against the spring, and the pointer indicates how much force is being applied, which is proportional to the speed. A
el_roboto_loco in reply to ameAug 2, 2007. 11:48 AM
Another easy way would be to use an infra-red reflective proximity sensor, and use a little strip of aluminum tape on the gear. The IR reflective sensors are about 50 cents from a surplus store. It wouldn't be a digital output, you'd have to use a comparator or A/D to see the return signal jump up in voltage when the shiny strip of tape went past it. Basically the same thing as using the hall-effect sensor, except the hall effect sensor can give you a digital output, if using the bi-polar digital type hall-effect sensor .
theRIAA says: Aug 8, 2006. 8:49 PM
knghifty
James (pseudo-geek) in reply to theRIAAApr 21, 2007. 3:22 PM
nifty*
James (pseudo-geek) in reply to James (pseudo-geek)Apr 21, 2007. 3:23 PM
lol sorry I have this habit of fixing everything.
Mohit Don says: Apr 10, 2007. 10:35 PM
hi i want ask you about the robot you ARE MAKING?
The Real Elliot says: Nov 23, 2006. 12:43 PM
Sweet project, and a cool instructable. Thanks for stepping through all 3 phases. It's nice to see a few solutions to the same problem.

Favorite H-bridges are like (ummm) bellybuttons -- everyone's got one. I'll throw the SN754410 in the ring. Full control over 2 motors, each at 1A. (Or gang them together for serious juice.) And best is that it's un-smokeable -- you can't turn one side's transistors all on at once, which would short the thing out (and burn it up).

But anyway... Nice encoders!
electronicfreak22 says: Oct 19, 2006. 5:48 PM
Wow thanks I was just thinking about if you can generate power from a motor I have about a million air hog engaines. Can I get more info on this? Thanks.
stonehenge360 says: Sep 28, 2006. 11:55 AM
i have a stupid question. if you have an electric motor, could you run it backwards; turning the gear and producing electrisity out the motor wires??
ame (author) in reply to stonehenge360Oct 1, 2006. 5:49 PM
Hi, It's not a stupid question- and in fact you can turn the motor and produce electricity, although this is known as a generator. Common types of generator are dynamos (found on bicycles for lighting) or alternators (found in cars to charge the battery and run the car electrical system). You cannot turn the gearbox attached to this particular motor backwards because of the worm gear, but you could take the motor out of the gearbox and turn it directly. Why not find a small motor like this and hook it up to a voltmeter then spin it with your fingers? You should get a reading on the meter. Try both the ac and dc settings on the meter, and see what you get.
bored boy says: Aug 23, 2006. 10:08 PM
not bad you can use a transistor with binary code to control motor direction and speed
offlogic says: Aug 15, 2006. 11:53 PM
Tamiya? "Don't you know you can't stop Godzilla with conventional weapons!?!!" - R. Burr Cooking up a new Instructable on back-EMF system, yeah. Sharing is caring (to a point, anyway).
malgolad says: Aug 12, 2006. 5:11 AM
Old computer mouses (not the optical models) are also a great source of opto-electronic parts. You get four phototransitor+led pairs and two encoder wheels out of each one.
Those wheels usually produce quite a lot of impulsions per revolution : http://www.sansyu.com/images/records/plastics/Decoder_Detail.jpg

Also, what about driving a very narrow beam through the teeth of one of the gear?
ame (author) in reply to malgoladAug 12, 2006. 5:23 AM
I agree about the mouse sensors, but, if you have an old floppy drive, but not an old mouse, what are you going to do? The encoder wheel in a (mechanical) mouse does indeed have many teeth, so maybe the opto sensors in a mouse could be used in conjunction with gear wheel teeth.
CementTruck says: Aug 9, 2006. 12:10 PM
What kind of robot are you building?

I'm in the process of collecting all the items needed for a remote control lawnmower. So far I have the lawnmower, wheelchair motors, wheels, and batteries, but I still need an alternator, speed controller and RC transmitter(radio). This project of yours might come in handy for me this winter.

http://www.evatech.net/ and http://www.webcom.com/sknkwrks/mowers.htm to see some RC Lawnmowers that I am trying to emulate. I've had this idea since I was a kid but never had the time, or $$ to do it. Looks like a few people beat me to the punch.

I'll post my Instructables when I finally get to this project.
ame (author) in reply to CementTruckAug 9, 2006. 4:23 PM
I am building a holonomic platform (or Killough Platform). It has three wheels at 120° spacing, and can translate or rotate itself by adjusting the relative speeds of the three wheels. In my design I have three of these Tamiya motor/gearbox kits driving the wheels. Movement accuracy will be affected by variations in motor speed, so I need to be able to tightly control that, hence I need to be able to measure it. The photo shows the robot as it is, but I still have to add three motor control boards and other bits and bobs. I also have a robot lawnmower project languishing in the spare room. I am using two motors from 12V cordless drills for the drive. I have built a temporary chassis from plywood and tinkered with a MOSFET motor driver, but that's all at the moment. It won't be remote controlled- it will be autonomous.
Holonomic Platform
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!