Tuesday, April 16, 2013

Compensating for Something–Thermal


No, this has nothing to do with a midlife crisis. It has all to do with heat, expansion, and the dreaded thermal drift in power meters. In one of my last posts, here, I talk a good deal about a minimum viable product but managed to segway myself  into a discussion on thermal compensation.

The short of it is that my left sensor arrangement is ideally thermally compensated by design, however I have concerns about my right sensor setup. I am therefore investigating this now.

It is theoretically thermally compensated but the problem is that there can be a differential temperature between the gauges on the top versus the gauges on the bottom of the crank arm resulting in potential drift. If the crank arm is at an even temperature it will be thermally compensated no matter the temperature (within a very small amount), but if there was a reason for the crank arm to be unevenly heated or cooled allowing a thermal gradient from the top to the bottom would mean that it would cause drift. This is because the top gauges are R1 and R4, and bottom gauges are R2 and R3. In a Wheatstone bridge this causes things to be worse and an increase or decrease the offset as diagonal pairs exacerbates the situation. However, this can only occur if there is significant insulation between the gauges allowing for a large temperature difference.

What causes thermal drift? Lets look at the basic Wheatstone bridge design. A Wheatstone bridge is essentially two voltage dividers. when R1 through R4 are identical OR ratio of R1/R2 = R3/R4, then Vg = 0. However if the resistance lowers in R1, then the voltage drop across this resistor lowers and the voltage “slack” is picked up by R2. A strain gauge works as a result of a change resistance that is linear with respect to strain, and strain being stretching or compressing of the underlying metal. But like a piece of wire, if you heat it the resistance will increase, if you cool it the resistance will decrease. If you super cool it, then it might turn into a super conductor near 0 Kelvin.

Metal also exhibits certain characteristics. Heating it causes it to physically expand and cooling it causes it to physically contract. People are familiar with this with pavement warping in hot areas. The pavement expands, has nowhere to go except up thus creating lumps. However, if a bicycle crank is heated then it will expand unconstrained. Imagine a strain gauge placed on it. As the metal expands so does the strain gauge, causing the resistance to go up – and to the electrical circuit this looks like strain!

Digging back into the electrical properties. Lets say that R1 is a strain gauge and R2 through R4 are dummy resistors. The dummy resistors are located physically somewhere else and have different thermal coefficients than R1.

Assume at 23 degrees C R1 to R4 = 120

But at 30 degrees R1 = 120.1 and R2 – R4 = 120.2

There may not be any strain in R1, but remember R2 – R4 are not at the same location!

It could be 30 degrees outside leaving R1 = 120.1, but then R3 – R4 are inside a plastic enclosure isolating it and will take a long time to heat up from 23 degrees. What happens? R3 and R4 resistance increases at the same rate, so point B remains balanced, but D does not. So we started a ride with an offset, and as the internal resistors heated up our offset changed. We either needed to zero on the fly or we might have a higher or lower power output. R1 is fluctuating due to one temperature and R2 is fluctuating due to another temperature! In order for a computer to compensate you’d need two temperature sensors!

We can’t just go putting temperature sensors everywhere! Every time we’d take one strain reading we’d take 2 – 4 thermal readings! This would take 4 times longer, cost a fortune, and use 4 times the battery power potentially. Not even the “golden” standard does this.

What if R2 was located near R1, made out of the same material but wasn’t a strain gauge? It would have the same thermal coefficient as R1, and R3/R4 would have the same thermal coefficients and voila! R1 and R2 responds electrically to temperature the same, R3 and R4 does as well. In theory they are perfectly balanced for all temperatures. Electrical problem solved. But that is only half the issue.

Now we have a problem with the second setup with the dummy gauge at R2. If we zeroed out the strain at 23 degrees, go outside and it’s 30 degrees then the crank arm heats up and physically elongates! Like before this appears as strain! But R2 is a resistor and can’t detect strain so while R1 goes up because the metal expands, R2 does not. We’ve lost our thermal compensation – well half of it.

Okay, lets solve this one more time! Let us presume that R2 is a strain gauge. It has to detect strain in opposite direction (if R1 goes up, R2 needs to go down, and vice versa) otherwise if it was the same gauge in the same direction then both going up or down at the same rate would mean point D doesn’t exhibit any change in voltage.

On V2 and the modification to V3 had me place the gauge on the opposite side of the crank arm. When one side is in tension, the other is in compression. This also doubles the sensitivity reducing gain, noise, and required voltage excitation which reduces current.

However, this means that the gauges could be at slightly different temperatures. Not much, but because of the spinning nature one side could heat or cool faster than the other. This would therefore cause drift.


V4 will likely use a different design to mitigate this. Here is how. Most materials exhibit the Poisson Effect. The Poisson Effect states that if you stretch a material in one direction it will reduce in perpendicular directions.

Image from omega.com

Now, if we put a strain gauge in for R2 and it is perpendicular and next the first gauge R1, then what happens. The great thing is that I don’t have to spend time aligning these relative to one another because shown above is what is called a Tee-Rosette. These are great little gauges that are designed for a primary stress and one resulting from the Poisson Effect.

Since the area is so close together and small there will likely be very little temperature difference between the two sites. So electrically both will increase or decrease at the same rate, and thermal expansion happens uniformly generally in all directions (Carbon fibre may exhibit directional expansion, to be investigated with S900 Crank). Therefore we’ve taken care of both issues. Now, replace the second leg of R3-R4 with strain gauges oppositely positioned on the crank and you get full thermal and electrical compensation with increased sensitivity. I’ve done this on a Spare Rival left crank arm to test the thermal compensation aspect of the design.

You can also compensate for forces you don’t want, but that’s another issue.


  1. I was reading through many of your posts and this is awesome. I am very much into mechanics and electronics but fail when it comes to the programming part and it's definitely needed to bring this together. This is very astounding to me though. Best of luck to you! I love people that do projects like this kind of like the brothers that made the flo wheels and I tend to always support them. I'll keep an eye out on this project and would love to get one if it becomes available. Sometimes by the end of the year I may purchase a power meter and I hope yours will be available. The separate power for legs is great and doesn't seem like it's as fragile as pedal based power meters.

    I do have a recommendation or request that you would have to determine if it's feasible or not. A rechargeable lithium battery with micro usb, or similar to garmin's technology where they have magnets or electrodes on their watches. I think you could get better power than a button cell and eliminate the low power that gives you less samples as well as eliminating having to change batteries. Personally I would rather charge it a time or two a month than change a battery every few months.

    Best of luck

    1. Thanks for your comments and support. I'm starting into ordering parts now for the next prototype(s). This one should be usable outdoors and after an initial one is debugged I'll be trying to make a few available as a beta.

      That means deciding on the battery situation very soon. The issue with Lithium is they are high self discharge, so if you forget about it then you are forced to charge it up. Most have been proponents of coin cells, but I'll take this under consideration.


  2. I came across this article today and I thought it could help you out

    Low Cost, High Accuracy Temperature sensing

    Using thermistors to get the accuracy of 1 wire/I2C parts, along with code examples.

  3. A calorimeter is a temperature sensor used to determine the heat flux in high temperature combustion of gases. They measure the instantaneous power quality of their flame by being inserted directly into a flame front. Applications for the flame intensity calorimeter range from power generation, hotbox flame control, jet exhaust output, natural gas energy content, reactor output, furnace intensity and several ASTM flame test evaluations.You give me best information! Thanks, very good post.Temperature Sensors