close-circle
Close
0%
0%

Utterly Hipster Bicycle Speed & Cadence Gauges

Two analog voltage meters, ATtiny85s and some parts from a modern bike computer turned into speed and cadence gauges for a hipster's bicycle

Similar projects worth following
close
Here at Insight Machines Laboratory we like analogue gauges so when we found out how easy it is to convert an old analogue voltage meter into an MCU-controled whatever meter, we decided to give it a try. The result is a set of two large analogue gauges that show bicycle speed and cadence.

Trying out the speed and cadence gauges:

The main source of inspiration for this project was a desk clock built with analogue voltage meters and ATmega328 (article in Polish). For our project, we decided to use the smaller an less power hungry ATtiny85 running at 1MHz. The power comes from a CR2032 coin battery which should last for around four months. We decided to use magnets and magnetic field sensors from a modern Sigma bicycle computer - mainly due to their low cost and reliable mounting. There's also a voltage regulator to make sure that the signal that goes to the voltage meter is always in the same voltage range (0-3V). The regulator is a contentious issue as it uses a lot of power and could theoretically be replaced by some logic in the firmware.

The illustration below shows how all the components are connected together and laid out inside the voltage meter's enclosure:

The screws, visible on both sides of the coin battery, hold the board in place and at the same time act as terminals for the magnetic field sensor. Thus, one of them is connected to the regulated power source while the other is connected to the gate of a NPN transistor and pulls down an ATtiny85's PB3 pin whenever a magnetic field is detected. This in turn causes an interrupt in the software that records the time of the signal. The speed/cadence value is calculated from the time difference between signals.

The components fit nicely into the voltage meter's enclosure:

Future improvements include:

  • Higher maximum RPM value
  • Removal of the voltage regulator and implementation of automatic PWM signal calibration to compensate for the lack of fixed maximum voltage set on the gauge
  • Printing the dials on smooth paper maybe with sticky back surface
  • Adding a weak LED as back light - this would require replacing the metal plates under the dials with something more or less transparent

gauge.svg

Gauge graphics. Slightly modified from the version visible on photos.

svg+xml - 31.80 kB - 09/14/2017 at 16:09

download-circle
Download

BicycleAnalogueGauge.ino

Arduino source code for both speed and cadence gauges

ino - 3.55 kB - 08/20/2017 at 18:45

download-circle
Download

  • 1 × ATtiny85 Microprocessors, Microcontrollers, DSPs / ARM, RISC-Based Microcontrollers
  • 1 × Analogue Voltage Meter We've used 15V meters but other ranges will also work (as long as you rescale them properly)
  • 1 × NPN transistor Used to detect signals from the magnetic sensor
  • 1 × 10kΩ resistor To limit the current going to the magnetic field sensor
  • 2 × 1.2kΩ resistor Used to change the voltage range of the voltage meter

View all 8 components

  • New test drive video

    Insight Machines Lab08/28/2017 at 21:38 0 comments

    Shot a new test-drive video depicting the behaviour of both the speed and the cadence gauges. The video is available in the "Description" section as well as here:

  • Changing the looks

    Insight Machines Lab08/28/2017 at 21:34 0 comments

    Tried to remove the plastic ring around the gauge today. Without a proper stand for a drill to cut a perfect circle with the diameter of 65mm, we opted for a more brute-force approach with the Proxxon Micromot 230 and a routing bit.


    The result wasn't perfect...

    ... But it has to do.

View all 2 project logs

Enjoy this project?

Share

Discussions

wrogerwroger wrote 6 days ago point

Hmmmmm good project. 

BUT the mechanics of driving the needles, are basically made for mounting in vibration and shock free panels. A bicycle is anything but - from the road shakes and bike drops....  

Also you have the problems of condensation and moisture ingress.... 

Roone them in no time.

They need foam style bearings that they can float in, so when the bike falls over, repeatedly, onto concrete, from about 1.2 meters up, they have a soft, long acting, energy dissipating enclosure to contain them.

The essential design has to incorporate the very, very light weight of the internal mechanisms and cases.

Good idea though.

Maybe add in a 12V power supply for a vehicle, lighting and weather sealing and drainage.

  Are you sure? yes | no

Insight Machines Lab wrote 5 days ago point

Thanks for your comments. The gauges are in daily use and they still work. They even survived a modest rain. However, some kind of weather sealing will be definitely necessary. Same applies to shock protection, although those devices aren't meant to be used on mountain bikes and it seems fair to assume that they will never be very rugged.

When it comes to the needle driving mechanism, the initial plan was to use a small servo because, just like you've written, it seemed obvious that the needles will wobble constantly due to vibration. However, out of pure laziness, we decided to try the original voltage meter mechanism first and surprisingly it proved very stable. The reason for this is that  the gauges are mounted almost horizontally so vertical shocks don't matter too much and horizontal shocks don't happen all that often on an urban bicycle. The only issue with durability that we have already observed is that the screws that hold the wires from magnetic sensors tend to loosen from time to time. This is annoying but not very severe and should be relatively easy to fix (one way or the other).

  Are you sure? yes | no

wrogerwroger wrote 5 days ago point

Yah... maybe you have smooth roads...  I always run my bikes with hard high pressure tyres, so things would get shaken to death - cameras on the handle bars - dead within a block or two...... Bicycles fall over - it's  a default setting. And I am thinking about using this set up on restoring motorcycle instrument panels..... AND depending on the type of engine, and the way it vibrates, and how this vibration travels through the frame and into the area where the gauges are mounted, AND how they are mounted.... will determine the life span - from minutes, to hours, to decades.... So the gauge can be mounted in vibration isolation mounts or it can be mounted and the mounts have isolation bearings between them and the mounting point etc. The almost complete lack of mass in the gauges, is both a good thing and a bad thing, depending on how you work with it.

  Are you sure? yes | no

James Murphy wrote 6 days ago point

Being an old 31E20 US Army Field Radio Repairman I LOVE the analog meters!  What Can we do to help?  PS Grandsons are 13 and 12 and ride their bikes many many miles per day.  Possible Test setup?

  Are you sure? yes | no

Insight Machines Lab wrote 6 days ago point

Hello James!

Any volunteers for testing are welcome. The two gauges from the demo video are still operational and are used almost on daily basis, but that does not mean that more tests would not be valuable. Hence, if you have a moment to spare and are willing to build and test another gauge, that would be great.

The biggest hurdle right now is to figure out a way to get rid of the voltage regulator as it consumes too much power and is actually the most expensive part of the whole device (!). It was added to make sure that the voltage on the mechanism that moves the needle is always in the same range (0 - 3V) regardless of the voltage on the battery. The regulator performs quite well, but the problem is that it uses few times more power than the micro controller in sleep mode and significantly shortens the battery life. It should be possible to use the ATtiny to measure the voltage on the battery and as the voltage slowly drops, compensate for that by slowly increasing the PWM duty cycle. But that's just our theory...

  Are you sure? yes | no

Lolucoca wrote 08/20/2017 at 22:17 point

That's a really cool project! I personally really like analog meters and in fact I'm using one right now as a sound level meter. I might actually do this to my bike! 

  Are you sure? yes | no

Insight Machines Lab wrote 08/21/2017 at 08:02 point

Glad you liked it! We were afraid that the needle would wobble when riding the bike due to vibration etc but it turned out that as long as the gauge stays horizontal, the wobbling is negligible.

  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