A Broken Inductor As A Bike Chain Sensor

If you have ever broken the ferrite core of an inductor, you’ll probably sympathize with [Oliver Mattos]. He accidentally stood on a ferrite-cored component, breaking it and rendering it useless. But utility is in the eye of the beholder, and instead of throwing it away he’s repurposed it as a chain sensor for his electric bicycle.

The broken inductor was positioned on the rear frame of the machine such that the chain passed through the area where the broken half of its core would once have been. As each link passes through the magnetic field it causes the inductance to change, and from this the speed, direction, and tension of the chain can be read.

Adding a 180 nF capacitor in parallel with the inductor creates a tuned circuit, and measuring the inductance is as straightforward as firing a single pulse at it and measuring the time it takes to go negative. Chain speed can be read by sensing the change in inductance as each link passes, tension by sensing the change in inductance as the chain is closer or further away, and direction by whether the chain is slack or not. It’s an ingenious and simple solution to measuring a bicycle chain, and we like it.

A lot of bicycle measurement systems have passed our way over the years, but it’s fair to say they have been more concerned with displays than sensors.

29 thoughts on “A Broken Inductor As A Bike Chain Sensor

  1. Polar actually made a bicycle power sensor around 10 years ago that worked in this very way, as I recall. I think its main benefit was being significantly cheaper than the market leader at the time, SRM.

    1. I’m a strong advocate of WD-40 for this. Cheaper than most lubricants, easier to spray on, helps cleaning out any sticky gunk and prevent rust.
      Downside is that you need to apply it often, but I find that it helps with not ignoring the overall maintenance of the bike… 🤷🏻‍♂️😋

        1. It is, just not as good as some other lubricants.

          It has mineral oil and paraffins dissolved in kerosene. Once the lighter hydrocarbons evaporate, it leaves a thin coating of wax and oil which acts as a rust inhibitor, which was its original purpose. This waxy coating does work as a lubricant just as well as any grease you might add – it’s just very thin.

    2. Covering a chain in grease is pretty much the only way to be able to cycle every day for multiple years with zero maintanance.

      As far as I know, that chain is 37 years old, and has never been replaced. Use any other lube and you’ll be replacing the chain every 10k miles or so.

      Grease looks nasty and isn’t very efficient, but super good for long lifetimes.

      1. Just checked and it looks like the recommendation for regular bike chains is to replace the chain every “500 to 5000 miles” (!). My grease-covered chain has done 52,500 miles in the 12 years I’ve had it, and I would guess at least the same in the 25 years before that. 100k miles on this chain, and while it’s clearly a bit worn, I doubt I’ll have to replace it before it does another 50k miles.

        1. You can keep using an old chain and sprockets in a single speed or a hub gear bike if you keep them together and never change either, because they’ll conform to one another. Eventually the chain just starts skipping and grinding, and you may have to remove links to account for the stretching.

          With Derailleur gears, you have to keep changing the chain and the sprockets or else they’ll wear out at different rates and the gears stop working.

      2. Grease is great for long lifetimes *in clean applications*. If you can shield the part from the environment – e.g. having rubber seals between the moving parts and outside, then grease is great. When the moving parts are outside in the dust and dirt, grease retains the contamination and then starts acting like grinding paste.

        1. That’s if the grease is continuously churned into the mechanism like in a bearing. In a bike chain the sliding surfaces never do a full revolution. Rather, they rock back and forth inside the chain links, so they squeeze out dust and grime, which collects in the gaps – so there might be a lot of gunk in the chain but it’s not a serious problem – at least until someone gets the great idea to wash the chain and remove all the grease, at which point it starts to wear out rapidly.

          That’s the beauty of the mechanism. A chain is very robust and works even in horrible conditions full of muck and dirt, and the crusty grease is catching the larger particles and preventing them from getting lodged in deeper, acting as a kind of seal between the parts. Once you try to re-condition an old chain by removing all the gunk and replacing it with some nice teflon oil, all the gaps open up and the loose parts start to rattle around, and the chain is quickly destroyed. The better idea is just to add more grease.

    3. No kidding. Abrasives get into the grease, then wear the chain, it “stretches”, then starts turning the gears into “custom” gears that won’t work with a new chain…

      The modern lubes for chains work far better, so you don’t trash chain & gears. Some even gather and shed abrasives.

      An alternate, popular with a number of motorcycles enthusists, can also revive a department store bike’s rusty chain for more use, is Fluid Film (largely lanolin). One of the top rust preventers, costing way less than the “top” products. I prefer it over the modern chain lubes.

      1. There’s two use cases. Single/hub and derailleur gear bikes. With the former kind you can use a chain practically forever, but you must encase it in grease. After a while, it settles into a state where all the parts just fit together and stop wearing out so fast. With the latter, you have to keep cleaning and changing the chain regularly or the gears will stop working for the reasons you mentioned – stretching and uneven wear of the gears.

        The two cases have different failure modes.

    1. Changing the chain tension changes the distance between the chain and inductor. Changing the mass of metal near the inductor changes the value of the inductor and thus the oscillation frequency of the RC circuit. The graph is little confusing in that the vertical axis is the RC circuit frequency, not amplitude. The oscillation in the graph is the RC circuit frequency going up and down as the metal lumps in the chain links pass the inductor.

  2. In the very first days of commercial power meters for bicycles, Polar designed and built a sensor that used this general mechanism of action, and it worked pretty well. It was particularly attractive in that it was an add-on to an existing bike, where all its competitors require buying new bike parts (hub, crank, or pedals.) I remember it being quite fussy to calibrate, however, and having troubles with repeatability and drift.

  3. This will only work on a single speed or hub geared bike. Maybe on the cage of a derailleur. Please no hot “glue” it will come off. I am glad US doesn’t have anti throttle laws. Power when you need it most (in an intersection) instead going slowly to get some torque to grind a little faster to get out of trouble. Quickly. I call those pedal-demand controllers a Fred Flintstone accelerator.

    1. The pedal sensors don’t depend on your speed, but on the torque you apply to the crank. They sense how much you are putting in and add to assist – at least that’s what they’re supposed to do – so you do get the full torque out from a standstill – you just have to pedal harder. The point of the sensor is that people wouldn’t just mash the throttle and instantly zoom into something.

      I’ve notice it’s a uniquely American notion that you need the ability to gun the accelerator to “get out of trouble”. It’s the idea that you can literally dodge a bullet by reacting to the gunshot. Every problem seems to have an active solution – more power, more guns, more policing, etc. rather than just “don’t do it”.

      1. And besides, even with a hand throttle, you don’t technically get “power” from a standstill. You have acceleration due to torque, while your output power is a product of acceleration and speed.

        The “Flintstones” effect is psychological – the fact that you have to pedal makes you feel like you’re taking off slower than if you were pulled along by the bike doing nothing – because you’re bracing in and taking active effort, so you attribute some of the power of the motor to yourself.

      2. Luke I have been in innumerable situations skateboarding and bicycling where I was using the max power and wishing I had more. Crossing in front of a moving bus. Outpedaling a rabid dog. Moving at a safe speed with the flow of traffic, etc.

  4. WD-40 mostly just overpriced low-viscosity mineral oil + (mineral spirits, kerosene etc.) solvent as most generic “penetrating oil” you can get on market for 1-2$ for 400ml or even cheaper.
    You can make one by yourself but it indeed it not good lubricant due to low viscosity and high volatility of solvent.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.