LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find the Angle Travelled by a Gear

Hi,
 
I am trying to find out the angle travelled by a gear (0-360 deg) if it is being driven by a motor. The motor drives small gears before driving the big gear. I made a simple sketch as attached. An angular sensor (potentiometer) is attached to the shaft of the motor which gives a full rotation output voltage of 24VDC.  One complete revolution of the angular sensor is about 1/8 cycle (for example) of the big gear. How can I get the angle travelled by the gear ? Should I use a counter in LabVIEW to count how many 24V have passed and make ratio and proportion to calculate for the angle?
Does anyone have similar application or any documents i can refer and study? Any advise i would greatly appreciate.
 
Thank you very much.
0 Kudos
Message 1 of 10
(4,044 Views)
Can you modify a little bit your system? I'd replace the one-turn potenciometer by a multi-turns one (I mean a model that you have to turn 8 times to go from 0V to 24V). The problem is to get a potenciometer that gives you exactly 8 turns. The ideal is to make your potenciometer turn with the big gear and not with the motor.

If you go for a counter solution, you have to know the initial angle and if the motor is turning clockwise or not. You can make this verifying if the potenciometer tension  is getting bigger or lower. The problem with this kind of solution is that if you don't see one transition from 0V to 24V, you will loose the correct gear angle.

Some robotic systems use an optical sensor called absolute rotary sensor.
http://en.wikipedia.org/wiki/Rotary_encoder


Rasputin
LV7.1 <> W2K
0 Kudos
Message 2 of 10
(4,027 Views)
Hello Mr Rasputin. Thank you for the kind reply.
 
"The ideal is to make your potenciometer turn with the big gear and not with the motor."
- This is the second option that i need to study. I will attach a small gear that will rotate as the big gear rotates. The potentiometer will be attached to the shaft of the small gear. Thus big gear and small gear will have GEAR RATIO. 
For example, 1 rotation of big gear is equivalent to 9 rotations of small gear which will also yield to 40 deg turn of big gear equals to 1 rotation of small gear. And with a potentiometer output voltage of 24VDC (1 complete rotation of small gear), it will result to 1.67 deg. / volt. (40 deg./24VDC).  
-  Is there a way to programmatically count how many 24V have passed if for instance the gear is moving clockwise? Say for example, after the first 40 deg. have passed, voltage will be added to the next 40 deg and so on....and will give me angular range data from 0 - 360 degrees.
 
Thanks for all the help.
0 Kudos
Message 3 of 10
(3,988 Views)
Bong,

Try always to mesure directly what you want to control. If the important is to know the angle of the big gear, try to measure this angle and not the motor angle. Better, as this gear should be attached to something else, try to measure this something. Sometimes it's impossible, maybe it's your case.

Measuring angles indirectly with other gears generate errors. There is no perfect contact between two gears, otherwise they wouldn't turn Smiley Wink. If this little error is not a problem for you, okay, don't mind it. But remember: one more gear, one more error (multipled by the ratio). In your case, it is better to measure the motor angle (1/8 ratio) than an small gear angle (1/40 ratio).

Detecting the transition from 24V to 0v is easy. You can compare two (or more) values, n-1 and n. If n-1 differs from n of more than, let's say, 12 volts, you have a transition. Pay attention to your sample rate and the maximal gear speed.
If n-1 is bigger than n, you have a 24V -> 0V transition.
If n-1 is smaller than n, a 0V -> 24V transition.

Are you using a control system? PID or something like this?
Rasputin
LV7.1 <> W2K
0 Kudos
Message 4 of 10
(3,980 Views)
Hello Mr Rasputin,
Thank you for your reply and advises.
 
"Try always to mesure directly what you want to control. If the important is to know the angle of the big gear, try to measure this angle and not the motor angle. Better, as this gear should be attached to something else, try to measure this something. Sometimes it's impossible, maybe it's your case.
Measuring angles indirectly with other gears generate errors. There is no perfect contact between two gears, otherwise they wouldn't turn . If this little error is not a problem for you, okay, don't mind it. But remember: one more gear, one more error (multipled by the ratio). In your case, it is better to measure the motor angle (1/8 ratio) than an small gear angle (1/40 ratio)."
 
- I am attaching a PDF file of what i am working on. Kindly see the attached. On Page 1 you can see the Base of the Machine, the motor with a small gear. On Page 2, you will see the bigger gear which i am interested on. On the other side of the Base of Machine, I am planning to put another small gear for the purpose of potentiometer reading. Do you think this will work? Can I minimize errors if i will do like this?
 
"Detecting the transition from 24V to 0v is easy. You can compare two (or more) values, n-1 and n. If n-1 differs from n of more than, let's say, 12 volts, you have a transition. Pay attention to your sample rate and the maximal gear speed. If n-1 is bigger than n, you have a 24V -> 0V transition. If n-1 is smaller than n, a 0V -> 24V transition."
 
- Do you have an example VI to illustrate this? If it is not asking too much, can I request a sample VI for me to understand it.
 
"Are you using a control system? PID or something like this?"
 
- No. I am planning to use a NI cRIO for control.
 
I have thought of using a Rotary Encoder but the price is a real big difference. Have you had similar application before?
 
Thanks a lot.
 
 


 
 
0 Kudos
Message 5 of 10
(3,972 Views)
Hi Bong,
 
I've written a short example that shows one way to determine the number of peaks in an input signal.
 
I hope this helps,
Justin D
Applications Engineer
National Instruments
0 Kudos
Message 6 of 10
(3,930 Views)
Hi Justin,
 
Thank you very much for this. I am still in LabVIEW 8.0 and can't open the VI. Can you kindly resend by LV 8.0.
Thank you.
 
 
 
0 Kudos
Message 7 of 10
(3,919 Views)

Here you go.

-Justin D

0 Kudos
Message 8 of 10
(3,897 Views)
Hello Justin,
 
Sorry for the late reply. Thank you very much for the sample VI. I revised the VI to correspond with my application.
When turning CW (clockwise) as the peak increases the angle just keep on adding. On the otherhand if turning CCW (counterclockwise), as the peak decreases the angle also keep on subtracting.
I have another problem on this. When the peak is less than zero or negative, i cant get the correct angle. Any advise i would greatly appreciate.
 
Thanks a lot.
 
bong
0 Kudos
Message 9 of 10
(3,866 Views)
Bong,
 
Isn't this what you wanted?  For the angle to add when your gear goes one way and for it to subtract when it goes the opposite way?
 
-Justin
0 Kudos
Message 10 of 10
(3,835 Views)