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