For Lukas K, who goes by the name carrotIndustries on GitHub, cycling was incredibly important, and given that he bikes in both the day and evening, having a bike computer that was backlit was vital. However, this presented a challenge in terms of power delivery since disposable batteries would need to be frequently replaced while rechargeable ones would have to be topped up far too often. Because of this, he decided to create his own device that could be powered from simply moving the pedals via an accompanying dynamo, which he calls the Cyclotron mini.
At the center of the system is an MSP430FR4133 microcontroller which has an ample number of pins for reading sensor data and controlling various other peripherals. In order to see information such as distance, speed, and altitude, a single 1x8 character LCD was added to the front as well as three buttons for gathering user input. Perhaps the most important aspect of this project, the power circuitry, consists of a dynamo which outputs AC voltage. This current is then rectified through a series of diodes and used to power the rest of the circuitry while also charging a 1.5F supercapacitor in case there is a temporary decrease in current. With this setup, Lukas was able to achieve an idle current consumption of just 150uA without the LCD's backlight being on.
The PCB Lukas came up with was fairly straightforward. Power management circuitry is relegated to one side on the board while the microcontroller, barometer, and ambient light sensor are on the opposite side. It was assembled using solder paste, a stencil, a steady hand, and plenty of patience.
Because the dynamo outputs a signal each time it completes a rotation, Lukas decided to connect the two output pins along with a few series resistors and clamping diodes to digital input pins on the MCU. The firmware configures the microcontroller to run a 1024Hz timer which checks the state of the two pins and increments an internal counter on each rising edge. After a second has gone by, this counter is read and used to calculate the distance, max/average/current speed, and total time in motion.
As well as the data mentioned previously, the bike computer has the ability to give the user altitude information from the onboard barometer. It also uses its ambient light sensor to automatically toggle the LCD's backlight on or off depending on how dark it is outside. Finally, the device can be programmed externally by pressing a set of spring-loaded pins to the underside of the enclosure.
The case for the Cyclotron mini had to be both light and strong, so Lukas printed the enclosure out of PLA filament and held together the various pieces with four M2 screws. It mounted to his bike's handlebars with a clamp made from flexible TPU filament for better grip.
To see the design files and code used to make this project, you can visit the repository for the Cyclotron mini here on GitHub.