Close
0%
0%

ESPeedo an ESP8266 Bicycle "Power" Sensor

Cost effective Fitness Power & Force Vector Meter for Cyclist's

Similar projects worth following
An affordable Fitness Power Meter using an ESP8266 WiFi module, 4 Strain Gauges in Wheatsone arrangement measured by HX711 24 Bit instrumentatin Amplifier.
It fits onto any type of bike with minimal intrusion to the mechanical integrity of the bike.

Many aspiring Racing/Triathlon/Fitness cyclists have to dig deep into their pockets to be able to afford the overpriced Branded Cycle Power meters that are on the market these days (off the peg prices range between $700 to $1500+ )

My incentive with this project to explore and develop a system which will drastically bypass the high costs down to a level where they would be standard factory fitted by default and affordable by all the young&veteran racers out there. (off the peg prices to date $20 to $30- ).


The Basic system requirements are in this order :-

  1. Speed + max Speed + Average Speed
  2. Distance + accumulative distance (yearly)
  3. Cadence (pedal rotation counter)
  4. Power Meter (load cells on crank arm)
  5. Wireless Web logging
  6. Altimeter For more accurate power calculation
  7. Temparature For more accurate power calculation
  8. Heart Rate
  9. Incline and Lateral motion measurement.
  10. Calories burned

Wheatstone Bridge output (it will be calibrated for 45-75 kilo-gramm loads)


Load cells placed at exact middle upper surface middle of crank (my cranks are 175mm long) using "Super Glue".

(two part epoxy's can be used also however care has to be taken to ensure the gauge is tight to the surface).


Surfaces must be flat and smooth , here 240 grit wet&dry sandpaper was used followed up with a metal polish, degreasing was done with Acetone. Care has to be taken that no oil or grease from fingertips etcetcetc comes into contact with the surface or strain gauges until the glue_ing stage is finished.

4 Strain gauges are used :-

....and placed on the crank in this configuration :-

Notice the orientation , the horizontal one is the active cell and the vertical is the temperature balance one (effectively it can be regarded as passive)

There seems to be not much information about the positioning of the load cells, most show them placed half way on the crank, alternatively they can be placed within the hollow type axles for torsional data. The latest method is to place 3D force sensors inside the pedals as the force vectors are not only "down the track line".


Below is one of the cranks I broke whilst training on my "Rollers", so it makes me think they should be placed here instead :-



Commercial product's for just "Power" measurement cost between $700-$1500 ,......

....This version is <$25.


The Build in more detail .

ESP8266 series 12

This will be affixed to the crank arm and transmit its serial derived data via WiFi to handlebar GUI (also an ESP8266 in server mode) , software very subject to change at momo until the mechanics are finished.

Update 20160325 :- Simple local server test works , accepts /torque /analog /digital parameter to extract more goodies out of the ESP

OLED display ----- upgrading to TFT soon as amount of data is getting very interesting


Reed Switch and magnets .... maybe upgrade to hall effect Sx's


The basic speed & distance calculations was straight forward and work well , however I am currently using change of state polling on the Reed Switch which is not the best, better would be to use interrupts (I have tested some interrupt code and it also works well , however I am not to sure about the implications of marrying interrupts with any form of WiFi Web access yet ie. speed implications).


They are wired in a Wheatstone Bridge arrangement as below..



The load cells are tiny ( micro sd card give comparison ).


I am using a complete set of 4 load cells, 2 active ie one in flexion config and one in extension config (one on top of crank and one below to get max deflection)


The second 2 load cells are passive in the bridge arrangement and act as balancing resistors that compensate for temperature changes (and to some extent noise).


The load cells are fed to a HX711 Instrumentation differential (2 channel) amplifier which when polled spits out the data for calculating applied load.


The onboard ADC has a whooping resolution of 24 bits (24 bits to measure a range of ±20mV " Awesomeness)

  • 3D Printed Flexi-Plate Sensor

    chiprobot08/07/2016 at 15:51 1 comment

    For experimentation I have 3D printed out a prototype sensor plate made from ABS plastic.

    Top side strain gauge pair..

    Bottom side strain_gauge pair..

    I am using a double pair as it helps to magnify the signal out and compensate for heat irregularities.

    Side view showing the slight concave bow of the sensor plate.

    I guess a metal plate would also work.... however where is the fun in that (just have to monitor the stability of the ABS, from my observations I could even print it 4x the thickness as the gauges pick-up the minutest of deflexions.

    The electronic set-up is the same as for the crank-arm.

    The output is displayed onto a TFT screen just for debug purposes.

    This simulated (pressing on gauge) output looks more like the mountain profile I and currently training on.

  • Open Source "Codeing"

    chiprobot05/28/2016 at 12:55 0 comments

    The open source code has now been published on GitHub :-

    https://github.com/chiprobot/Espeedo/blob/master/Espeedo_hackaday_003

    The code reads the HX711 instrumentation amplifier rigged to the strain gauge bridge

    This code outputs the strain measurement as a line graph to a TFT (ILI9340 chipset) display.

    The code also outputs text at different sizes .... so I can get a grip of how best to rearrange Gui graphics.

  • "Out of the Shoe Box into the Shoe" - intelligence inside

    chiprobot04/18/2016 at 23:11 0 comments

    With the great sensitivity I had with the crank placed sensor .... I have decided to take it a step further and design a system that fits into the cycle shoe itself, the reason being the shoes can then be used on any bike, eliminating the expensive attachment of complex mechanics to a single bike (not easily/quickly transferable or practical) that commercial system have. (commercial systems what you to buy a separate system for each bike you have, when you have a collection of bikes like myself then you can understand why my "One Shoe Fits All" is an appealing proposition).

    So the latest design will experiment with taking the Strain gauges inside the cycle shoe, with accelerometers to test out some foot force vector measurements.

    The idea is to place a bowed plate .....say 1 to 2 mm concave and place the strain gauges within top of the curve, this way any pressure on the plate will displace the strain gauge to give output on flexing.

    With this "in shoe" technique it may be possible to expand these to running/walking shoes, particularly the Gyro aspect for gait analysis. Or even at the Foot doctors (Podiartrist) for medical diagnosis and treatment of foot and ankle problems, I.e. ankle sprains and fractures, bunions, heel pain/spurs, hammertoes and neuromas.

    Second technique :-

    Though for these ideas more strain sensors would need to be installed, or some kind of a single soft conductive foam sole with staggered measurement increments.

    Quick BlenderUp below reveals the idea .... this will be a circa 5mm foam graphite impregnated foam insole. (yes I only 3D scanned my left cycle shoe so go spot the error).

    Attach 0.0 Volts to the heal part and attach 5.0 Volts to the toe part of the insole, then read 16 analogues (or 8 even) in pairs along the insole ... as the pressure of the foot changes the resistance of the graphite foam will form a pressure gradient that can be mapped for the whole foot surface.

  • 10Hz to 80Hz Hack

    chiprobot04/07/2016 at 17:06 0 comments

    Strain Gauge sensor data display to Handlebar Gui.

    The HX711 board I had sends data "Out of the Box" and 10Hz ... which is pretty miserable ... however there is a trick to speed things up.

    Pin 15 is your friend "RATE" ..... its tied to ground on my board (default speed 10Hz) , with a deft stroke of a soldering iron you will need to release this pin from the underlying ground plane and then run a wire from pin 15-RATE to the positive supply and then you will get it spitting out data @80Hz

  • TFT it .... when your OLED does not quite cut it...

    chiprobot04/06/2016 at 09:14 0 comments

    This project all started with a simple OLED speedo measuring just speed and distance..

    To get the most out of the new data that I will be logging I have upgraded to a larger TFT style screen,

    Its using the adafruit TFT library (mod_ed for ESP8266 ), which allows for text, line graphics and fill commands, so this will help to build a handlebar mounted GUI.

View all 5 project logs

  • 1

    Spare 1

  • 2

    Spare 2

View all instructions

Enjoy this project?

Share

Discussions

jack wrote 09/04/2016 at 20:51 point

Hi Gareth, your project could solve a common ebike problem: Ebikes with midmotors don't perform very well when in pedal assist mode, because a human power meter in the drivetrain (like a torque sensor that measures the chain tension) gets drowned by the power of the midmotor that is delivering it's power on the same chain. So you must either use a primary (human power) chain with a secondary (motor power) chain or use a torque sensor/power meter closer to where the human power is inserted in the drivetrain.

A crank or pedal power meter with (thru a wireless interface) a linear output of 0 to 5 volts would create a perfect pedal assist system for combining human and motor power in a harmonious way.

BTW, to create more flex on a crank you can cut a 1 by 30 mm slit lengthwise in the crank.

Ride on,

Jack

  Are you sure? yes | no

Muhammad Hisham Hamed wrote 06/01/2016 at 14:12 point

What kind of stain gauges are u using  ?

  Are you sure? yes | no

Anatoly wrote 04/29/2016 at 14:58 point

Hi Gareth.

I see you have a lot of ideas.  Which is a good thing, but it is very difficult for one man explore all the possibilities.  While it's a cool project to design the whole thing ground up, including the head unit and the sensors,  it's not very realistic.  Imho you should focus (at least for now) on the power meter sensor as this is the most sensitive area for many cyclists.   A head unit costs zero - i use my phone.  Even if i'm not so happy with the app interface, i can analyze data afterwards in an program of choice or use a different app.  A power sensor costs upwards of $400.  If i could buy or build one for a 100 i would do it.  I hope that this project produces an instructable on building such sensor.  It looks like you've got the most tricky part covered already, that is sensors and amplification, you a getting a nice clean data at 80Hz into your microcontroller.  What remains is data transfer,  power and packaging.
Don't get me wrong i appreciate your work very much, i just like it to be useful to others too.

Did you manage manage to record any real data from riding a bike outside or on a trainer.  It would be interesting to compare measurements with a commercially available powermeter.

  Are you sure? yes | no

chiprobot wrote 04/30/2016 at 20:10 point

Yo° Anatoly.

All in good Wizard time_ing, crawl, walk, run, cycle not in this particular order though.

Thanks for the comments, project is still developing in more ways than one, so I dare not miss any of the important sidetracks, motorways are so over rated.

....G

  Are you sure? yes | no

Shreekant wrote 04/08/2016 at 09:17 point

Awesome project, following it for sure :) What are the battery requirements, are you using coin cell?

  Are you sure? yes | no

chiprobot wrote 04/09/2016 at 14:34 point

My idea is to use Lipo cells as button cells will not have enough capacity (if I use WiFi senders) to keep the system going for long.

I leaning into using Bluetooth BLE (smart) rf senders for the crank part of the project and maybe then I could get away with using button cells.

....Gareth

  Are you sure? yes | no

chiprobot wrote 04/07/2016 at 11:50 point

Yo° Anatoly

The strain gauges can be used on anything that flexes, however the bugbear is that the gauges must have a good adhesion to the surface to be measured. 

Carbon is not the easiest material to glue, as resins are used to cure the carbon fibre's forms during manufacture.

The other alternative is to place the gauges on the spokes of the front chainset, on the pedal axle or even inside the hollow through hole axle you see on the latest cranks.

Yeah BLE is "plan b" at the moment , I might have to revert to this method if the battery requirements twist my arm further. There are ways to save power with the ESP8266 and this is the stage I am exploring now.

Linking into and accessing Garmin or other types of Power meters does intrigue me, I guess that would a chapter further up the hill . ( there are plus points to designing your own handlebar gui though).

....Gareth

  Are you sure? yes | no

Anatoly wrote 04/07/2016 at 11:12 point

Great Project!

Do the load cells rely in some way on the metallic properties of the crank?  Will they work with carbonfiber cranks?

Consider using BT LE instead of wifi, it should be possible to simulate an existing (commercial) powermeter, then it will work with phones and head units out of the box.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates