# Safe limit of twist in a shaft



## strantor (Mar 22, 2021)

I want to make a torqe-sensing PTO shaft for my tractor. I don't want a pony brake dyno or anything similar, I want to measure PTO torque and speed _while running actual PTO attachments_. To do this I think the simplest way is to measure twist of the PTO shaft. This is how it's done in industrial settings:











So contrary to the norm, I want the maximum safe amount of twist. This will make my measurement less challenging. I've calculated some values for hollow tube and solid rod, and for my target maximum torque over a 5ft shaft I can get 20+ degrees of twist, but I have no idea if that's safe, or one the verge of turning into a pretzel. Is there any way to figure the maximum safe amount of twist?


----------



## macardoso (Mar 22, 2021)

You'd need to look at the material strength and shape of the shaft. A couple of places you might draw the line of "safe"

Ultimate Strength (derived from shear stress theory). This determines when a ductile material (steel) will fail
Yield Strength. This is when a permanent deformation has occurred in the part
Fatigue limit. This is the point below which the part will not fail when exposed to repeated load cycling
There are several stress theories which are used to derive the Ultimate strength of the material and each may be more or less conservative. This gets a bit complicated.

This is all calculated from the stress in the shaft which is in turn calculated from the applied loads and shaft geometry. Simple shapes like rods and tube can be calculated from textbooks, but more complex geometry (like a shaft with keyway) may require Finite Element Analysis (FEA). 

You'll also want to apply a safety factor to the load you find. I would shoot for either the Yield Strength or Fatigue Limit as my limit.

I worked for a company which made super high end axle systems for race cars out of a specialty torsion resistant steel (700M grade if I remember correctly). We would laser etch timing marks at each end of the shaft and when those timing marks had taken a permanent deformation of so many degrees, the shafts needed to be replaced. Cool stuff.


----------



## strantor (Mar 22, 2021)

macardoso said:


> You'd need to look at the material strength and shape of the shaft. A couple of places you might draw the line of "safe"
> 
> Ultimate Strength (derived from shear stress theory). This determines when a ductile material (steel) will fail
> Yield Strength. This is when a permanent deformation has occurred in the part
> ...


This smells like one of those rabbit holes where you spend a month learning all kinds of exciting technical stuff and only get further away from the answer you were hoping to find. Maybe it would be better to find some way incorporating some kind of spring or rubber cushion that deforms at a known rate (and returns to shape).


----------



## extropic (Mar 22, 2021)

@strantor
The etched marks mentioned by @macardoso are super simple. Not a rabbit hole at all.
Alternatively, paint a narrow stripe down the length of the shaft.
If the stripe remains straight, unloaded, you have not plastically deformed the shaft.
If the stripe is becoming a spiral, unloaded, you have exceeded the material's yield strength. Failure, at high loads, is imminent.
The value of the stripe assumes that the shaft is the weak link, so will fail before other PTO drive components are damaged.

If you work through the linked calculations, using properties appropriate for your choice of material, the shear stress is the value you're concerned with. Determine the safety factor you're comfortable with and keep your design limits that far below the chosen material properties.






						Torsion of Shafts
					

The torsion of solid or hollow shafts - Polar Moment of Inertia of Area.




					www.engineeringtoolbox.com


----------



## vocatexas (Mar 22, 2021)

I'm not an engineer, but I grew up running lots of shaft driven farm equipment. In my experience a twist of ten degrees would lead to catastrophic failure.


----------



## FOMOGO (Mar 22, 2021)

This is why God created the "Holy shear pin", and the "Sacred clutch". Mike


----------



## pdentrem (Mar 22, 2021)

Local racers would run a straight line of paint on their driveshaft and axles. Very much the same as punch marks mentioned earlier.
Pierre


----------



## strantor (Mar 22, 2021)

extropic said:


> @strantor
> The etched marks mentioned by @macardoso are super simple. Not a rabbit hole at all.
> Alternatively, paint a narrow stripe down the length of the shaft.
> If the stripe remains straight, unloaded, you have not plastically deformed the shaft.
> ...


My reply to @mcardoso was too abbreviated; I realize now, an inside joke that only I'm inside of.
I understand the concept of the timing marks he described and the painted line that you describe. That's the concept that I want this to operate under. I'll have a slotted disk at either end of the shaft and an optical fork sensor measuring the phase shift between them. A digital equivalent of the painted line or timing marks. If you connected an engine timing light to a magnet on the spinning shaft, you could see the twist in your line and the offset between my disks equally clear.

The background on my inside joke is that I've already been pounding those equations for a few days and can't seem to arrive at any better understanding of what the critical parameters are. Then I interpreted his reply as basically "all of them." It sounded like a well informed response seemed to confirm my suspicion that the reason I can't find a simple answer, no thumb rules, no tables of permissible shaft torques by material and diameter, no online calculator to tell me exactly what I want to know, is because there _is no_ simple answer to my question. Not what I wanted to hear but appreciated nonetheless.

Now, you say it's as simple as shear stress. I want to believe that, and I promise to spend the next day or two trying to convince myself of it, but I have a lot of mental hurdles to overcome before I get "there."


----------



## strantor (Mar 22, 2021)

To be clear, I'm not wanting a way to measure whether or not my shaft has a permanent deformation of twist. _I want my shaft to twis_t, (as much as possible without permanently deforming) so that I can measure the twist _in operation_, and turn it into a running torque value. I just want to know how much torque I can put on any given shaft without damaging it or someone or something.


----------



## strantor (Mar 22, 2021)

vocatexas said:


> I'm not an engineer, but I grew up running lots of shaft driven farm equipment. In my experience a twist of ten degrees would lead to catastrophic failure.


Are you talking about a permanent deformation of 10 degrees or running with a 10 degree twist that goes away after you turn it off?


----------



## jwmelvin (Mar 22, 2021)

Have you read some pages describing the relationships? Like: https://www.engineeringtoolbox.com/amp/torsion-shafts-d_947.html

Do that and ask if you have any questions. I’d think you can approximate with a solid or hollow shaft section, over which you will measure twist. You definitely don’t want to exceed the yield strength, and ultimately you’d want to build in a safety factor. But you should be able to get a first-order analysis going pretty easily.


----------



## rabler (Mar 22, 2021)

Why go with extreme twist?  Typical strain gauges can measure pretty small deformation.  You'd just need to calibrate the shaft under a known load.  This also saves doing complex analysis on the shape and type of material.  This is done all the time without getting anywhere near any limits of the material strength. 

The only minor issue I see is that PTO shafts need to telescope dynamically to account for lifting/lowering the implement, and possibly for following ground contour such is in a large mower deck.

www.sparkfun.com has some basic electronics for working with strain gauges and load cells.


----------



## strantor (Mar 22, 2021)

rabler said:


> Why go with extreme twist?  Typical strain gauges can measure pretty small deformation.  You'd just need to calibrate the shaft under a known load.  This also saves doing complex analysis on the shape and type of material.  This is done all the time without getting anywhere near any limits of the material strength.
> 
> The only minor issue I see is that PTO shafts need to telescope dynamically to account for lifting/lowering the implement, and possibly for following ground contour such is in a large mower deck.
> 
> www.sparkfun.com has some basic electronics for working with strain gauges and load cells.


There isn't a whole lot of opportunity to put a strain gauge into the mix. That was my original idea (measuring side thrust on my belt reduction) and I couldn't convince myself that it would work, and also I want this to work on multiple implements. If I made a strain gauge part of of the shaft then I would either need to put a 4-wire slipring on it or put the amplifier on the shaft as well and wirelessly transmit the info.... actually, that's kinda feasible. Should run off a battery just fine, at least for proof of concept. Maybe final rev could have some coils that rotate past fixed magnets; a tiny little generator to power the electronics


----------



## vocatexas (Mar 22, 2021)

I was talking about permanent deformation. I've run hay balers, hay cutters, peanut diggers and combines, post hole augers, feed grinders, etc. I'm sure there is a bit of deflection in a PTO driveshaft, but I would think it would be less than ten degrees or else it would either be twisted or broken at the end of a job. I'm going out on a limb with a wild guess, but I'm thinking somewhere along the lines of five degrees or less. This is just based on experience and the Mark One Eyeball.

Mike, loved the comment on the 'holy shear  pin'!


----------



## extropic (Mar 22, 2021)

strantor said:


> <snip Now, you say it's as simple as *shear stress*. I want to believe that, and I promise to spend the next day or two trying to convince myself of it, but I have a lot of mental hurdles to overcome before I get "there."



To be clear, I was referring to the shear stress (T max) as defined in the linked calculations. Not a single or double shear value from a table in Machinery Handbook.


----------



## Weldingrod1 (Mar 22, 2021)

The key number you need to watch is the stress. You need to be well under the endurance limit for your tube material. This is the stress below which you stop seeing fatigue failures.

Also, the important part about the twist is not the total twist but the twist per length. If your shaft is a mile long, then a full revolution is a minuscule stress or strain. If it's an inch long, you probably twisted it off ;-)

You can do RF transmission of strain gauge data for torque measurement, bit it's a fiddly little signal. I've done it on tractor trailer drivelines in frac service.

Sent from my SM-G892A using Tapatalk


----------



## strantor (Mar 22, 2021)

Weldingrod1 said:


> You can do RF transmission of strain gauge data for torque measurement, bit it's a fiddly little signal. I've done it on tractor trailer drivelines in frac service.
> 
> Sent from my SM-G892A using Tapatalk


Can you share any specifics about how you implemented that? 

Thinking more about the strain gauge idea, this gives the opportunity to put the measurement device on the tractor, which is preferable as the torque (? Or at least the speed?) In the shaft will oscillate any time it isn't going straight out to the load (which is always). It could be some kind of thing that fits over the spline shaft and has another spline shaft sticking out of it.


----------



## homebrewed (Mar 23, 2021)

If you're doing this on a real-world farm implement you have some significant environmental challenges that will need to be addressed.  Water, mud, crop/weed debris, high/low temperature, vibration, errant lube or hydraulic oil contamination etc.  I don't have a specific solution for you, just a lot of things to watch out for.  Example:  strain gauges typically are glued on to the thing they're monitoring.  Many adhesives don't like wide temperature swings or long term exposure to water or high humidity.

I also am wondering about the compatibility of a strain sensor & wireless sender with the safety shield that typically is around the PTO drive shaft.  If you remove yours for this, you're living dangerously.

A couple of magnetic sensors looking at magnets attached to each end of the shaft to look for phase shift differences between them as the shaft twists under load _might_ be robust enough (and might work with the drive shaft safety shield), but that's just armchair engineering.  There's lots of magnetic junk out there that could clog up the works, so to speak, so that approach may not be bulletproof, either.  If nothing else, naturally-occurring magnetite in the soil will eventually cause magnets to grow a nice beard of magnetic particles.

Shear pins.  They work on my tractor.  I've gone through quite a few.  And thanks to them, I still have a working mowing deck and tiller.


----------



## macardoso (Mar 23, 2021)

Wow! Bunch of replies here.

If you have a cylindrical or tubular section in the middle without a keyway then the math is pretty simple. I have a textbook I can pull out and try to work through some of the math with you.

The core principle for all materials is the stress-strain curve (see image below). Stress is the force per unit area in the material and strain is the deflection per unit length.




As the applied force (torque in your case) increases, the stress in the material rises. For simple shapes, the calculation of stress is easy, but adding a keyway to a shaft significantly increases the stress concentration at the corners of the keyway. Anyways, as stress goes up the material immediately deforms and starts to stretch or twist. As long as the stress stays below the yield strength the material will return to the original shape when the applied load is removed (just like a spring). If the applied stress goes above the yield strength of the material, a permanent deformation will occur. The material must still spring back the equivalent amount of strain before the yield strength; you notice this when working on sheet metal and you must deal with spring back.

Anyways as more and more load is applied, the stress in the material strain hardens until it reaches the Ultimate Strength. At this point, if the applied load remains, the material rapidly fails until fracture occurs.

In brittle materials (glass, ceramics, etc.) the fracture strength is lower than the yield strength and they will crack before plastically deforming.

Here is a great link that shows the formulas for calculating stress in common shaft shapes.






						Torsion of Shafts
					

The torsion of solid or hollow shafts - Polar Moment of Inertia of Area.




					www.engineeringtoolbox.com
				




If you stay below the Yield strength, the shaft will deform elastically (not permanent), and the deformation will be linear to the applied force, making a great torque meter using two encoders as you showed above. The relationship for stress/strain below the yield strength is Youngs modulus, a published value for most materials.

One other value you need to be aware of is the fatigue strength. This is a value of stress (typically below the yield strength) where repeated cycling of the load will tend to generate and grow cracks. Cracks have a very sharp tip which will concentrate the applied stress at a stress concentration (or stress riser). This causes local deformation and crack propagation. You typically want to design below this limit in designs that have cycling loads applied to them.









						Fatigue limit - Wikipedia
					






					en.wikipedia.org
				




What I find very interesting is that steel, titanium, and some other metals have a defined endurance limit where they will weaken from repeated load cycles, but only to a point, from there they retain their remaining strength for infinite cycles of the same applied stress.

Other metals like copper and aluminum have no endurance limit and will eventually fail under even the smallest cycling loads (after a crazy number of cycles).


----------



## macardoso (Mar 23, 2021)

So I guess what I want to say is this. If you have a simple shape (round, tube, or hex) then you can calculate the stress from applied load or vice versa. You can calculate the stress from the strain (using Young's modulus), and you can measure strain using two encoders a known distance apart. 

As long as you keep the applied load safely below the Yield Strength of the material, then with a bit of math, you can calculate torque from the difference in readings between the encoders.

You'll need very high resolution encoders as the amount of twist in the shaft under load will not be much.


----------



## macardoso (Mar 23, 2021)

For example, Let's imagine your PTO is a cylinder 1000mm long and 50mm (2") in diameter. It rotates at 300 rpm and has an applied load of 1000Nm. Using the material properties of 12L14 steel, there is a handy online calculator which shows an angle of twist of 1.2 degrees and a shear stress of ~41MPa.

The Yield Strength of the 12L14 steel is 415MPA, so you are at about 10% of the maximum torque you can place on that shaft before it begins to permanently deform.

At 300 rpm, this is about 31kW (42HP) through the shaft.





__





						Torsion of Solid and Hollow Shafts Calculator
					





					amesweb.info
				




I used a modulus of rigidity of 77GPa as calculated from the elastic modulus and poissons ratio.









						AISI 12L14 Carbon Steel (UNS G12144)
					

Carbon is the primary alloying element present in the carbon steels. They contain 0.4% silicon and 1.2% manganese. Small quantities of molybdenum, chromium, nickel, aluminium, and copper are also present in these steels.




					www.azom.com


----------



## tq60 (Mar 23, 2021)

Why?

Been around ag for years (exposed to as they were my radio clients in past life) and down time expensive so just build it correct and be done.

If you have 100 hp in available power to the PTO then insure the shaft Jan handle more.

Place shear pin rated for attachment (usually in attachment) someplace.

If you want to measure for fun fine, there are devices for this that are not cheap.

You could build something that looks at difference of position of both ends of the shaft with simple electronics but the mounting of the sensors would be a challenge.

Many other things to play with that could be more interesting.

Sent from my SAMSUNG-SM-G930A using Tapatalk


----------



## Boswell (Mar 23, 2021)

your plan of using an optical encoder to measure the twist of the shaft and thus the torque may not be accurate enough. Also optical encoders do not work well in harsh/dirty environments. You can improve the resolution by enlarging the optical disk but that will make it unwieldly pretty fast.  Also need to be sure you have a fast enough processor to accurately measure the timing differences of the optical input differences between the ends of the shaft at max expected RPM.
Interesting project


----------



## macardoso (Mar 23, 2021)

Boswell said:


> your plan of using an optical encoder to measure the twist of the shaft and thus the torque may not be accurate enough. Also optical encoders do not work well in harsh/dirty environments. You can improve the resolution by enlarging the optical disk but that will make it unwieldly pretty fast.  Also need to be sure you have a fast enough processor to accurately measure the timing differences of the optical input differences between the ends of the shaft at max expected RPM.
> Interesting project


I was thinking of maybe those magnetic non contact shaft encoders. You can get high resolution but they are a bit pricy.





__





						Rotary absolute encoder AksIM™ - www.rls.si
					

The AksIM™ is a non-contact high performance off-axis absolute rotary encoder designed for applications with limited installation space.



					www.rls.si
				




Each magnetic ring for a 2" PTO shaft is ~$300.  This is one high end example and there might be much cheaper options. These come in 20 bit (1 million + counts per rev) resolution.

This could resolve (using my previous example) down to 0.2Nm of torque on a rotating shaft.


----------



## strantor (Mar 23, 2021)

@mcardoso thank you for all that info. I am going to apply myself to everything you've said this evening and see if I can come up with numbers that I am confident in.


My plan (as described in post #1, everything up in the air right now) does not require high resolution encoders. I did not explain it fully in post #8; it was abbreviated for simplicity. I made it sound as if there will be two optical sensors; one at each end. Actually there will only be one. Instead of having a slotted disk at either end, one will be mounted at "end A", and the other will be mounted directly beside it. "End B" will have a tube fixed to it, running the length of the shaft back to "end A" and connect to the slotted disk. The optical sensor will be reading through both disks at once. The output of the optical sensor will basically be a PWM signal where duty cycle corresponds to torque and period corresponds to speed. Two variables in one signal. It will use use simple slotted disks, maybe 6 slots each, or however many it takes so they don't overlap at maximum twist. I think 6 pulses per revolution is more than enough; the only reason I am planning any more than one pulse per rev, is because I know that the speed (and?) torque in the shaft will be oscillatory any time there is any bend at the cardan joints and i want an average of the data for several sectors of the rotation. I do not believe I need high resolution encoders because I will be precisely measuring _time_. A crystal will be running and my microcontroller will be adding up the counts while the photointerrupter is off, and while it's on. Even a lowly 512kHz crystal would give me about 10,000 data points per slot, with 6 slots and running 540rpm.

If the above description is not clear, here is an *early version* picture of it. When I drew this up I was trying to maximize the difference in on-time vs off-time, so I had several disks which represent about a 15% duty cycle @ 0 torque, and they would fan out like a camera iris until fully closed. I later realized that this is pretty much pointless, with the accuracy of the crystal, I can just use 2 disks which each represent a 50% duty cycle. _I am not going to use the stack of disks and the multiple nested tubes. Just the first disk, the last disk, and the outer tube.










50% (50.0000%) duty cycle will be equal to 0 (0.00) ft×lbs. 0% will be equal to max. Anything in between will be whatever it is (empirically discovered). I can work out the real-world twist degrees per ft×lbs on the bench and scribe graduations on the disks, then verify the values my microcontroller spits out against a timing light.

P.s. I don't know why my last paragraph is in italics and I can't change it._


----------



## strantor (Mar 23, 2021)

tq60 said:


> Why?
> 
> Many other things to play with that could be more interesting.
> 
> Sent from my SAMSUNG-SM-G930A using Tapatalk


Because.

I have unconventional interests. The torque sensing shaft project is an interesting enough project for me to pursue in and of itself. But, it is a means to an end. My tractor is the lowest HP variant (40HP) of a line of tractors that goes up to 55HP. They are all mechanically identical. Same heads, same pistons, same stroke, same fuel pump, same turbo. The only difference is varying levels of handicap in the ECU. I'm going to hack it and I need a way to quantify my results. Planning to use the PTO generator I'm building as a variable load to put behind this.


----------



## macardoso (Mar 23, 2021)

strantor said:


> @mcardoso thank you for all that info. I am going to apply myself to everything you've said this evening and see if I can come up with numbers that I am confident in.
> 
> 
> My plan (as described in post #1, everything up in the air right now) does not require high resolution encoders. I did not explain it fully in post #8; it was abbreviated for simplicity. I made it sound as if there will be two optical sensors; one at each end. Actually there will only be one. Instead of having a slotted disk at either end, one will be mounted at "end A", and the other will be mounted directly beside it. "End B" will have a tube fixed to it, running the length of the shaft back to "end A" and connect to the slotted disk. The optical sensor will be reading through both disks at once. The output of the optical sensor will basically be a PWM signal where duty cycle corresponds to torque and period corresponds to speed. Two variables in one signal. It will use use simple slotted disks, maybe 6 slots each, or however many it takes so they don't overlap at maximum twist. I think 6 pulses per revolution is more than enough; the only reason I am planning any more than one pulse per rev, is because I know that the speed (and?) torque in the shaft will be oscillatory any time there is any bend at the cardan joints and i want an average of the data for several sectors of the rotation. I do not believe I need high resolution encoders because I will be precisely measuring _time_. A crystal will be running and my microcontroller will be adding up the counts while the photointerrupter is off, and while it's on. Even a lowly 512kHz crystal would give me about 10,000 data points per slot, with 6 slots and running 540rpm.
> ...


OK I think I am following...

So the solutions I have written about above are extremely close to the manner of measurement in video #1 in post #1. You'd need to track the positions of two encoders (zeroed out under zero load), query them for their current position simultaneously, compare the readings to determine twist, then use math to calculate torque from twist. You could also sample the tractor side encoder for the speed, multiply that by the torque, and get shaft power. The resolution of torque would be directly related to the resolution of the encoder, the geometry of the shaft (how much it twists for a given torque), and the distance between the encoders (as large as possible). If the distance between the encoders can be increased, then lower resolution (cheaper) encoders can be used.

I am following your plan as well, but would like to offer some dissenting opinions about the method based on my personal hands on experience. First off, feel free to ignore me and try it anyways. Second, prove me wrong, because I'd love to learn new methods like you are discussing. 

I believe you are planning to use a "transmissive photomicrosensor" as they are they are commonly called. These output an analog voltage (or sometimes a PWM duty cycle) which corresponds to the amount the sensor is blocked. These work, although they have a few notable drawbacks.

First off, the sensing window is small, forcing you to limit the measuring distance to a very short range (0.25" as an example). In your application, you will want to maximize the distance between the discs as to have a more noticeable twist in the shaft (which even over a good distance like 3 feet might only be a few degrees). The short distance would greatly limit the signal to noise ratio, perhaps to the point where there is no measurable twist between the discs.

Second, the sensor is an optical sensor which is very sensitive to ambient light and will report false signals from even a small amount of stray light - this will drastically reduce your signal to noise ratio. It will also be very sensitive to contamination from dirt, dust, or water. 

Finally, the voltage output from these sensors will is nonlinear and will require some mapping tables in code to calibrate the voltages to the actual twist in the shaft. You'll probably end up needing to calibrate the whole thing manually and will end up with a very poor signal to noise ratio. 

If you want to go this route, you might want to consider two sensors each with a single disc (just like you have pictured above) positioned as far apart on the shaft as possible. Instead of measuring the exact angular displacement as in my encoder example above, you would be comparing the timing of the light to dark transitions on each of the sensors. In this case an active photosensor with built in amplifier and comparator woud add a lot of robustness to the design. Link below.





__





						PM-F25-P Panasonic Industrial Automation Sales | Sensors, Transducers | DigiKey
					

Order today, ships today. PM-F25-P – Optical Sensor Through-Beam 0.236" (6mm) Module, Wire Leads, Slot Type from Panasonic Industrial Automation Sales. Pricing and Availability on millions of electronic components from Digi-Key Electronics.




					www.digikey.com
				




By knowing the exact speed of the shaft (read one of the discs like an encoder for speed), you can calculate the angular distance traveled by the shaft during the delay between the light to dark transition on each of the discs.  It would be very difficult to align the discs mechanically so each had a light to dark transition at exactly the same time under no load, so it would require a calibration cycle with the shaft running under no-load to determine a nominal delay time between each disc. Once that is defined you can load the shaft and the difference between the measured delay and nominal delay would give you the twist in the shaft. Again once you know this, a bit of math will give you torque and power. The sampling rate of the microcontroller to the sensor input would be the limiting factor in the resolution of torque. You would also need a very accurate measurement of shaft speed, so a disc with a higher pole count would be beneficial to a point although a dozen or so poles would be sufficient rather than the million pulses of the encoder idea. 

The downsides are that this could not measure the torque on a non-rotating shaft where the encoder method could, and you rely on a very fast microprocessor to sample the signal for good resolution where that is not a requirement for the encoders. Also it is still an optical system so contamination is a real risk. The sensors I linked are at least waterproof.


----------



## macardoso (Mar 23, 2021)

I am working on an industrial robot which used those transmissive photomicrosensors. They were a total pain and very finicky. It took me a long time to find those amplified output sensors with built in comparators but they worked great for my application.

Here is a photo of the original sensor




And the new active amplified sensor installed in the robot joint.


----------



## macardoso (Mar 23, 2021)

I wanted to work out a math problem for the last idea I presented.

Let's assume the sensors are on a 2" solid round 41L40 steel shaft located 36" apart. Each disc has 8 dark to light transitions (8 slots) and we plan on triggering on the rising edge of the sensor (the dark to light transition).

During the calibration run (no load) we read the sensor located on the tractor end of the shaft and detect a rising edge transition every 25.000ms. 0.025 seconds * 8 slits per revolution = 0.2 seconds per revolution. This is 5 revolutions per second or 300.00 RPM.

OK cool. Now let's assume during the no load calibration run we determine the time delay between the dark to light transitions on one disc to the same transition on the other disc is 1.000ms. We save this in the back of our minds. This is due to the inaccuracy in disc mounting.

Now we restart the test but with an applied load. We again measure the shaft speed and find it to be 300 rpm. We also find the delay between the mounted discs to be 1.200ms. We must subtract the calibration value of 1.000ms from this to find the time difference under load of 0.200ms (200us).

We know the shaft is rotating at 5 revolutions per second, so we calculate that 5 rev/s * 0.000200 s = 0.001 rev or 0.36 degrees.

Again using that online calculator we can calculate the torque given a shaft radius of 1", a length of 36", a twist of 0.36 degrees, and the mechanical material properties of 41L40 steel. This returns a torque of 358 Nm and a shaft power of 15.1HP.

All this information is given by measuring the relative timing of two sensors on the shaft.

It is not critical that the shaft be rotating at exactly the calibration value as the calibration delay can be converted to an angular misalignment measurement which can be applied to measurements at any speed. It is critical that the exact shaft speed be measured right as you are measuring the time delay between the sensors for best accuracy (both during the calibration run and the test).


----------



## Boswell (Mar 23, 2021)

An interesting thought experiment.


----------



## strantor (Mar 23, 2021)

macardoso said:


> OK I think I am following...
> 
> So the solutions I have written about above are extremely close to the manner of measurement in video #1 in post #1. You'd need to track the positions of two encoders (zeroed out under zero load), query them for their current position simultaneously, compare the readings to determine twist, then use math to calculate torque from twist. You could also sample the tractor side encoder for the speed, multiply that by the torque, and get shaft power. The resolution of torque would be directly related to the resolution of the encoder, the geometry of the shaft (how much it twists for a given torque), and the distance between the encoders (as large as possible). If the distance between the encoders can be increased, then lower resolution (cheaper) encoders can be used.
> 
> ...


Your input is greatly appreciated however you are mistaken about the portion in bold. I plan to use a digital photointerrupter just like the PM-F25 you linked to. Also i think you might be misunderstanding my explanation about the disks being close together.

Assume a single disk with 6 slots, with the slotted portion of the sensor radius equal to the unslotted portion, such that if we spin this disk in the field of the photointerrupter, we get a square wave with 50% ON time and 50% OFF time. Now make an exact copy of that disk and bolt the two together samely aligned. Spin it in the field of the photointerrupter and you still get a 50% square wave. Now loosen the bolt, rotate the 2nd disk by 10 degrees, retighten the bolt, spin it again in the photointerrupter field. Now you get a square wave with 33% ON time and 66.6% OFF time.

Now for a minute pretend those two plates bolted together are mounted on the PTO shaft and the offset between them represents the torque in the shaft. I will come back to this.

Consider that the period of this wave is measured by a (ex) 512kHz clock, so the raw data for the wave period looks like this (ex)
Total counts: 9482 (in one period, 1/6th of one revolution, at 540rpm)
ON counts: 3156
OFF counts: 6326
ON percentage: 33.2841%

Let's say that on the bench we measured a 14.3 degree twist at 607lbs (42.4476 ft×lb per degree), which what the math indicates our maximum safe torque is. The math then becomes:

(For this one sixth of a revolution):
Speed = 9482 clocks / 512000 clocks/sec = 0.0185195313s × 6 = 0.1111171878 seconds /rev
1/ 0.1111171878 seconds/ rev = 8.9995078151 revs/sec × 60 = 539.970468906 RPM
Torque: 50.0000% -  33.2841% = 16.7159% × 60 degrees = 10.02954 degrees × 42.4476 ft×lb/degree = 425.729 ft×lbs

HP = (539.97 RPM × 425.729 ft×lbs)/5252 = 43.77HP

And since all this is calculated during only one sixth of one revolution, we load it into a buffer and average it with the previous 5 values, and that's our output.

Ok, now we just did all that math assuming the plates are right up against each other, which doesn't mirror real life, right? Except it does. The plates will be right up against each other, and they will _still_ measure the twist from one end of the shaft to the other. How so? Picture the shaft left to right, mount one of the disks to the right hand side. Now on the left hand side instead of fixing the plate, slide a tube over the shaft. Slide it all the way until it almost touches the disk, maybe give it a couple thou. Tack weld the tube to the shaft at the very left end of the shaft only. Now slide the 2nd disk from left to right over the tube (this disk will need a slightly larger center hole) and right up against the right-hand disk (maybe give it a couple thou spacing too) and fasten it to the tube. Now the disks are right up against each other. The shaft can't spin inside the tube because they're welded together, but it can _twist_ inside the tube, and when it does, the angular displacement between these two disks will change because the tube doesn't also twist, as there's no torque on it.


----------



## Weldingrod1 (Mar 23, 2021)

I was about to suggest the sleevebtrick to let you measure over more span!
Any measurement where you can do frequency is radically easier than analog. Phase shift is a friendly measurement!

Rotating batteries and fiddly analog to digital bits are a PITA. Speaking from experience... getting the dratted strain gauge bridge bonded and wired is a challenge. And I didnt have to deal with brush and crops ;-)
These folks supplied it: 








						8 Considerations When Selecting A Rotary Torque Sensor - Binsfeld
					

Selecting the appropriate rotary torque sensor for your application is the key to obtaining the data you need as efficiently and accurately as possible.




					binsfeld.com
				




If you are willing to spend some.money there are flange mount non-contacting sensors that are really nice.

Sent from my SM-G892A using Tapatalk


----------



## strantor (Mar 23, 2021)

homebrewed said:


> If you're doing this on a real-world farm implement you have some significant environmental challenges that will need to be addressed.  Water, mud, crop/weed debris, high/low temperature, vibration, errant lube or hydraulic oil contamination etc.  I don't have a specific solution for you, just a lot of things to watch out for.  Example:  strain gauges typically are glued on to the thing they're monitoring.  Many adhesives don't like wide temperature swings or long term exposure to water or high humidity.
> 
> I also am wondering about the compatibility of a strain sensor & wireless sender with the safety shield that typically is around the PTO drive shaft.  If you remove yours for this, you're living dangerously.
> 
> A couple of magnetic sensors looking at magnets attached to each end of the shaft to look for phase shift differences between them as the shaft twists under load _might_ be robust enough (and might work with the drive shaft safety shield), but that's just armchair engineering.  There's lots of magnetic junk out there that could clog up the works, so to speak, so that approach may not be bulletproof, either.  If nothing else, naturally-occurring magnetite in the soil will eventually cause magnets to grow a nice beard of magnetic particles.



Your comments have been bouncing around in the back of my head and finally forced their way to the front. I wrote off magnetic sensors pretty early in the plan, and I can't remember why. I've done a month worth of brainstorming in the past week and I've forgotten a lot. I know that I've wanted a square wave from the outset, for simplicity; I can interface that directly to a microcontroller, no signal conditioning circuit necessary. Maybe I wrote them off because they don't make a square wave? That's not a good enough reason. Making a pair of zero cross detector circuits would be easier than making a pair of slotted disks, not to mention fabricating a custom PTO shaft just for this purpose. The custom shaft i have been discussing so far would be a fixed length thing, not exactly in line with my desire to have this work with more than one attachment. Magnets would be easy to implement, compatible with installation on an existing PTO shaft, and I could just mount the sensors straight through the safety shield, just drill a couple of holes. It would need to have a separate set of calibration values for each extension length I might use, as I imagine a PTO shaft fully collapsed has drastically different twist than one which is fully extended. So I couldn't use it for something which continually changes the extension amount, like a post hole auger. ... unless I made a lookup table of calibration values for every inch of extension, and add in some kind of extension length sensor feedback and automatically adjust for length. But I think I'm once again making it too complicated and probably less accurate.


----------



## macardoso (Mar 24, 2021)

strantor said:


> Your input is greatly appreciated however you are mistaken about the portion in bold. I plan to use a digital photointerrupter just like the PM-F25 you linked to. Also i think you might be misunderstanding my explanation about the disks being close together.
> 
> Assume a single disk with 6 slots, with the slotted portion of the sensor radius equal to the unslotted portion, such that if we spin this disk in the field of the photointerrupter, we get a square wave with 50% ON time and 50% OFF time. Now make an exact copy of that disk and bolt the two together samely aligned. Spin it in the field of the photointerrupter and you still get a 50% square wave. Now loosen the bolt, rotate the 2nd disk by 10 degrees, retighten the bolt, spin it again in the photointerrupter field. Now you get a square wave with 33% ON time and 66.6% OFF time.
> 
> ...



OK I'm following.

You have a hollow tube with a solid bar coming back down the middle to measure torque. Sorta like a russian nesting doll. That way you measure the twist over the full length. Should work.

I would think my idea of two sensors and two slotted wheels at each end of a slotted shaft would be simpler to build, but whatever works for your needs is great!

I hope I'm not stating something you already know, but be careful in confusing the clock speed of a microcontroller (I'm assuming you plan on using a programmable microcontroller to do all the math, rather than doing it in hardware) with the time to execute a reading. If you plan on reading the input using an interrupt service routine (ISR), recording the elapsed time, calculating the time differences, applying the conversion factors, averaging data over many readings, and writing the data to whatever output you wish to use to display the torque, you are looking at hundreds, thousands, or more clock cycles per measurement which would significantly limit your maximum sensing speed. I question if a 512 kHz clock would suffice for this application (although I certainly could be wrong). You can get microcontrollers with 200+ MHz clocks for $20 nowadays so there are certainly options.


----------



## strantor (Mar 24, 2021)

macardoso said:


> OK I'm following.
> 
> You have a hollow tube with a solid bar coming back down the middle to measure torque. Sorta like a russian nesting doll. That way you measure the twist over the full length. Should work.
> 
> ...


I was using 512kHz as an example, just to illustrate the precision that can be achieved using the most elementary of components. A faster clock could surely improve accuracy, but I have yet to determine what's "good enough" and where the point of diminishing returns is. I am thinking of using an external clock and external counter ICs, that way my only interrupts would be the high/low transitions, at which points the counter ICs are reset and the microcontroller has all the time in between to do the math and communicate with whatever I decide this is going to communicate with (probably an LCD during continuous use and/or laptop to plot the data during testing sessions).

I agree that having two different sensors as opposed to a tube would be simpler to implement. The purpose behind the tube is another thing that I know I once had a good reason for, but can't remember. I will let go of it now, unless I can remember the reason.

I just learned of something new, latching hall effect sensors. With these I could achieve the exact same goal (square wave with period corresponding to sectors of rotation) without needing the slotted disks. They could be mounted through the safety shield of a typical PTO shaft.


----------



## homebrewed (Mar 24, 2021)

A Teensy 4.x processor board runs at 600MHz and costs a tech less than $20.  It has a full complement of counters and can be programmed using the Arduino IDE once you download the libraries.

I confess I was thinking of a more analog approach, basically a type of phase detector implemented with a couple of D flip flops -- but the repetition rate would be pretty low.  A counter based method would probably be better in this case.

You wouldn't need to precisely line up the two magnet/sensor setup, just track shifts in timing as the PTO gets loaded up.


----------



## strantor (Mar 24, 2021)

homebrewed said:


> A Teensy 4.x processor board runs at 600MHz and costs a tech less than $20.  It has a full complement of counters and can be programmed using the Arduino IDE once you download the libraries.
> 
> I confess I was thinking of a more analog approach, basically a type of phase detector implemented with a couple of D flip flops -- but the repetition rate would be pretty low.  A counter based method would probably be better in this case.
> 
> You wouldn't need to precisely line up the two magnet/sensor setup, just track shifts in timing as the PTO gets loaded up.


I keep hearing good things about the new teensy. Your post broke the camel's back and I just ordered one. I'll find a use for it, maybe this project, maybe some other. When you say it has counters, do you mean like an "external" counter integrated into the IC? I don't see anything about that in the specs, unless you're referring to the attached screenshot. Is that what you're talking about?


----------



## pontiac428 (Mar 24, 2021)

I consider myself "smarter" and more "practical" than an engineer.  I know because I have to work with them regularly. Part of why is an engineer will try to put space launch technology into the mundane.  I consider the mundane to be where 99% of the world lives, and mundane applications should get mundane solutions, not fancy ones.  I think you have found a job for a simple mechanical device called a torque limiter.  Build one into the shaft and be done with it.  Some torque limiters ratchet, some cam out, and some are just shear pins.

As far as shaft twist goes, my expensive 4130 rock crawling axles have 120 degrees of twist.  I need resilient twist in my system.  How much twist depends on the material, length, and thickness/aspect ratio.  I couldn't tell you at what point breakage occurs at in the real world until I hear it let go.  At least I can drive home on a broken axle.  I guess my point is that it's a lot of adaptation to go through when a $2 shear pin will do the same thing for you.


----------



## extropic (Mar 24, 2021)

pontiac428 said:


> I consider myself "smarter" and more "practical" than an engineer.  I know because I have to work with them regularly. Part of why is an engineer will try to put space launch technology into the mundane.  I consider the mundane to be where 99% of the world lives, and mundane applications should get mundane solutions, not fancy ones.  I think you have found a job for a simple mechanical device called a torque limiter.  Build one into the shaft and be done with it.  Some torque limiters ratchet, some cam out, and some are just shear pins.
> 
> As far as shaft twist goes, my expensive 4130 rock crawling axles have 120 degrees of twist.  I need resilient twist in my system.  How much twist depends on the material, length, and thickness/aspect ratio.  I couldn't tell you at what point breakage occurs at in the real world until I hear it let go.  At least I can drive home on a broken axle.  I guess my point is that it's a lot of adaptation to go through when a $2 shear pin will do the same thing for you.



I see it differently. I believe the OP is trying to instrument the process.

It's not clear, to me, whether the instrumentation is for his private personal edification or does he intend to develop an accessory/device for sale.

Which, doesn't really matter to me. He has chosen a challenge and is working it out. I enjoy observing the process.

By following along, I'm bound to learn something.


----------



## homebrewed (Mar 25, 2021)

strantor said:


> I keep hearing good things about the new teensy. Your post broke the camel's back and I just ordered one. I'll find a use for it, maybe this project, maybe some other. When you say it has counters, do you mean like an "external" counter integrated into the IC? I don't see anything about that in the specs, unless you're referring to the attached screenshot. Is that what you're talking about?


Not quite, your screenshot is about various aspects of internal time (no external input needed).  But the internal counters can be used to count external inputs, for doing things like measuring frequency -- very close to what you want to do.  It probably will be necessary to download the data sheet to see what you need to do in order to set up the counters.  You also can see what other folks are doing to set up the counters if you go to the PJRC forum and do a search for counter-related programming questions.  There's a lot there.  Discussions on so-called GPS disciplined oscillators could be particularly useful w/regard to what you want to do.  Gated counters, that's what you want.


----------



## strantor (Mar 25, 2021)

pontiac428 said:


> I consider myself "smarter" and more "practical" than an engineer.


Which one? ... never mind, I'm sure there are several. 

I might count myself among them. I'm not a very good communicator. It is a known deficiency.  I try hard to express things clearly, and I thought I did a decent job in my first post, but it seems the majority read something between the lines that wasn't supposed to be there. Not totally sure but from context cues I guess it came across as "hi, my name is strantor and I'm an idiot. I've destroyed 15 PTO shafts in the past year and I can't figure out why." Just read the parts in bold, or I can summarize: I'm building a PTO Dynomometer. 



strantor said:


> *I want to make a torqe-sensing PTO shaft for my tractor.* I don't want a pony brake dyno or anything similar, I want to measure PTO torque and speed _while running actual PTO attachments_. To do this* I think the simplest way is to measure twist* of the PTO shaft. So *contrary to the norm, I want the maximum safe amount of twist.* This will make my measurement less challenging. I've calculated some values for hollow tube and solid rod, and for my target maximum torque over a 5ft shaft I can get 20+ degrees of twist, but I have no idea if that's safe, or one the verge of turning into a pretzel. Is there any way to figure the maximum safe amount of twist?





strantor said:


> *To be clear, I'm not wanting a way to measure whether or not my shaft has a permanent deformation of twist. *_*I want my shaft to twis*_t, (as much as possible without permanently deforming) *so that I can measure the twist in operation, and turn it into a running torque value. *I just want to know how much torque I can put on any given shaft without damaging it or someone or something.





strantor said:


> Because.
> 
> I have unconventional interests. The torque sensing shaft project is an interesting enough project for me to pursue in and of itself. But, *it is a means to an end*. My tractor is the lowest HP variant (40HP) of a line of tractors that goes up to 55HP. They are all mechanically identical. Same heads, same pistons, same stroke, same fuel pump, same turbo. The only difference is varying levels of handicap in the ECU. *I'm going to hack it and I need a way to quantify my results. Planning to use the PTO generator I'm building as a variable load to put behind this.*


----------



## pontiac428 (Mar 25, 2021)

@strantor Have you looked into getting a torsional load cell transducer?  You could mount it inline with your PTO shaft yoke, send the signal into a dataq, and even send the stream to a smartphone via bluetooth.  I have bought load cells and transducers in the past as industrial surplus on eBay for cheap, less than 1/10th of new.  Programming an arduino is easy, but working with lab software like WinDAQ gives you more flexibility.  Check it out.


----------



## strantor (Mar 25, 2021)

pontiac428 said:


> @strantor Have you looked into getting a torsional load cell transducer?  You could mount it inline with your PTO shaft yoke, send the signal into a dataq, and even send the stream to a smartphone via bluetooth.  I have bought load cells and transducers in the past as industrial surplus on eBay for cheap, less than 1/10th of new.  Programming an arduino is easy, but working with lab software like WinDAQ gives you more flexibility.  Check it out.


Thanks, I looked into them briefly but but was immediately soured by the cost. Even on eBay they were expensive,  but deals do come up on ebay from time to time. I will keep my eye out. 

Problem with ebay is, nearly all of the sellers are lazy and only put a part #. C'mon! List the friggin specs! I don't have time to track down a data sheet for every torsion sensor on ebay. They put that PN on there and list it for some unreasonable price, fishing for that one person searching by PN because they're only confident to replace a part with another one of the exact same PN. Probably a good tactic actually, I imagine it works out nicely every once in a while; often enough to matter, if you have a lot of surplus to sell.


----------



## Weldingrod1 (Mar 25, 2021)

We don't think you are an idiot! Most of us interpreted this as a "I WANT to build a torque transducer " and let me tell you, we are all about WANT to build something here! Lots of (fill in the blank) range and plenty of "why would anyone want to build that?" scope. Lots of us build things because we can or to obey the inscrutable exhortations of our souls, or ??? Myself HIGHLY included! I'm finishing a Magnabend scratch build right now. I could have bought one, but building it was sooo much more fun!

Sent from my SM-G892A using Tapatalk


----------



## pontiac428 (Mar 25, 2021)

Yes, torsion transducers are more expensive than pressure transducers, and there are many different styles as well.  For a rotating shaft, you would also need a slip ring to commute the revolving wiring terminal to a static breakout.  I think a slip ring could be shop made without too much heartache, but buying commercial might be dear.  There are a number of surplus dealers out there, and some can be real gems.  I think you could find the hardware with persistence.  My last dataq project only cost me $60 or so for a used Honeywell NASA-grade load cell and a Hitachi linear transducer.  The modest 8020 framing for the project cost more than the electronics and acquisition software combined.


----------

