Homemade mechanical bicycle speedometer. How to choose a speedometer for a bike? What is this device for? Installing a mechanical speedometer

With summer approaching, many have already opened the cycling season, and some are just preparing for it. In any case, if you frequently use two-wheeled vehicles, it is worth considering a speedometer to measure your current speed and distance traveled. It's boring to just go and buy an accessory in the store, so we suggest paying attention to creating your own speedometer on the Arduino platform. Everything will take no more than a couple of hours, and the project budget is less than 500 rubles. As a result, you should get an accessory in which a servo drive with an arrow and a scale will show the current speed in analog form, and the display will show the distance traveled.


Tools and accessories for assembly

Installation tools and accessories

Shoe sponge box
Drill, scissors, soldering iron
Thick cardboard, Marker
Toothpick, paint
Heat-shrink tubing
Glue gun and superglue


If, first of all, you are interested in the functionality of the speedometer, and not in appearance, any compact plastic box will do. For example, from a sponge for shoes. If homemade speedometer still want to see beautiful, look for something more presentable at home. The servo and display need to be fixed on the box with a glue gun, the button can be put on superglue.


For the manufacture of an analog speed indicator, thick paper or cardboard is suitable. Using a pencil and a compass, you need to draw a cutting line in the form of a circle, and also apply divisions. In order not to do this every time after rain, it is better to laminate the paper. As an arrow, you can use a toothpick (it is better to paint it with a bright varnish) and fix it on the servo with a heat shrink tube


The speedometer itself needs to be fixed to the steering tube, the sensor wire is best run along the front brake cable. At the bottom of the fork, you need to install a hall sensor, and the magnet on the spoke.

Optionally, you can put a second speedometer to check the accuracy of the readings of the homemade gadget. However, this is not necessary, since this is a fairly simple device and it is unlikely that something could go wrong with you during the assembly process. What is important, unlike similar store accessories, a homemade speedometer is more resistant to damage and can be used even by those who like aggressive driving on rough terrain.

A bicycle speedometer is a device mounted on a bicycle to measure the speed, distance traveled, and control the brightness of the headlight. The circuit consists of a common ATtiny2313 microcontroller, a standard indicator and several discrete elements.

Basic device parameters

Supply voltage: 4.5 ... 5.5 V
Current consumption: less than 10mA (without indicator backlight)

Measured parameters

Speed.
Full path.
Intermediate path.
Range of measured speeds: 3 km / h ... 60 km / h
Speed ​​measurement accuracy: 1 km / h
Display: 16 × 2 with HD44780-compatible controller

User manual

Basic Mode

In the main operating mode, the screen displays the current speed and the distance traveled (full and intermediate). The location of the parameters on the indicator changes depending on the number of lines. If the indicator is two-line, the speed is shown in the first line, and both distances in the second.

If single-line, the speed is shown at the beginning of the line, followed by the distance counter, with the full and intermediate raster values ​​shown alternately.

The complete distance traveled is stored in the volatile memory of the microcontroller at the moment of stopping. Unlike the full one, the intermediate counter is not saved and will be lost when the power is turned off.

The + and - buttons smoothly adjust the brightness of the headlight. PWM is used for regulation, so there is no additional power loss, in contrast to simpler circuits.

Customization

To reset the intermediate counter of the distance covered, press the "CLEAR" button.

Wheel length setting

When the CLEAR button is pressed, the +, - buttons change the calibration factor for adjusting the wheel length. The default wheel length is approximately 2 meters.

Since the distance traveled is obtained by multiplying the speed by time (integrating the speed over time), then to control the correctness of the speed coefficient, you can compare the readings of the distance traveled counter after traveling at a precisely known distance. If the readings are correct, then the speed is shown correctly.

Factory reset

To reset the coefficient to its default value and reset the trip counter, press all three buttons simultaneously. To avoid accidentally resetting, you can make the + and - buttons on the same switch.

Download the firmware for the bike speedometer

Often, each of the cyclists is interested in ─ to what speed he can accelerate his car. For the average bike rider, you need to know your speed just for the sake of curiosity. And an athlete needs to notice the distance traveled, average speed, the number of calories burned in order to find out about the changes taking place in his body. According to the observation results recorded from the bicycle speedometer, you can judge the improvement in your physical capabilities. Further, you can more systematically increase the load on the muscles. Thus, a person, having memorized his previous indicators, strives to improve them in the future. A bicycle speedometer in professional hands, so to speak, stimulates the cyclist to become even stronger and faster.

But most of those who like to run around, putting the speedometer on the bike, after a while they simply forget about it. Such a toy becomes uninteresting for people who do not seek to set new speed or distance records for themselves. Usually, for the sake of curiosity, people buy the cheapest bike speedometer. And it often happens that having installed a simple device somehow, and even forgetting to set it up, a careless cyclist notices during operation that the speed readings on the display are lagging or do not correspond to reality. Any bicycle speedometer in inept hands often fails after a year of use and hangs on the handlebars with a dead weight.

There are a lot of bicycle speedometers, so there is a large selection on sale. outward appearance, size and functionality. Naturally, the price for dissimilar devices varies considerably.

Mechanical speedometer

For the sake of objectivity, it should be noted that there are mechanical speedometers for a bicycle. Structurally, this device consists of a drive wheel, a cable and an indicating device.

The wheel must have clean contact with the tire of the wheel for correct speed reading. But you should not press it strongly against the rubber either, as this will slow down the bike in motion.

To prevent the cable from breaking from chafing, it must be taut, and not twisted into loops.
The principle of operation of the indicating device is that it converts the rotation of the wheel transmitted from the drive into a deflection of the arrow. There is a magnetic disk inside the device, which, when rotated by magnetizing attraction, non-contact pushes the cylinder together with the arrow.

Mechanical speedometer for the Veglia Classic bicycle made in France

Pros:

  • No batteries needed;
  • Electromagnetic interference is not scary;
  • Smooth operation.

Minuses:

  • Must be lubricated periodically;
  • Dirt on the tire gets in the way correct work;
  • Slightly slow down the rotation of the wheel;
  • There is no way to save data;
  • Does not work if the wheels are bent in a figure eight.

A mechanical speedometer can be used on a road bike, as this type of bike is most often used on asphalt roads where there is no dirt.

Electronic bike computer

The speedometer on a bicycle is primarily needed to measure the speed of movement. However, modern electronic models have such a wide range of functions that they are called bicycle computers. Even the cheapest of them have many functions ─ current speed, average speed, distance, total mileage, travel time, hours. More expensive bike computers have even more information functions and settings. The most famous manufacturers of quality bicycle speedometers are BBB, Cateye, Sigma, VDO.


Quality electronic speedometer from the Dutch manufacturer BBB

The principle of operation of an electronic speedometer is to count the number of signals from the sensor for a fixed period of time.

A sealed contact in a housing is most often used as a sensor. This reed switch is fixed on one of the feathers of the front fork, but if the length of the wires allows, then near rear wheel... The sensor is triggered by a permanent magnet attached to one of the wheel spokes.

The microcontroller of the device remembers the time between two switchings of the sensor, since to calculate the speed of movement it is necessary to perform the calculation according to the formula S = C * (F * 0.036) / T, in which: S is the required speed; C is the circumference of the wheel; F is the clock frequency of the processor; T ─ time between sensor activation.

Seven-segment liquid crystal displays are used to indicate values, since they have a low current consumption. A separately installed LED is used for illumination.

The wheel circumference (C) is set by the owner of the bike, as it is non-standard. To correctly set up the bike computer, you must specify its value as accurately as possible. Therefore, it is recommended to personally measure the perimeter of the tire by wrapping the wheel with a flexible ruler in a circle. You can also paint a lateral mark on a wheel tire and ride the bike forward in a straight line, and then measure the distance between two tracks left on a clean, level surface.

Knowing the previously given principle of operation of a cycling computer, many electricians assemble devices with their own hands, which, moreover, work successfully. In homemade products, various microcontrollers are used, for example, such as PIC16F830, ATTiny2313A, ATMEGA8, but for each of them you need to assemble an additional programmer.

Of course, doing something complicated on your own is always pleasant and commendable, but only really knowledgeable people are allowed. There are too many either simple schemes with errors or complex ones based on expensive displays and microcontrollers with a bunch of useless functions posted on the Internet.
And if you calculate how much it will cost to create a homemade product, and even taking into account the assembly of the programmer, the construction of the case, plus the time spent, it turns out that in any case it would be cheaper to buy a ready-made bicycle computer that costs only $ 9.


Inexpensive fully loaded cycling computer

Basically, most bike computers have a maximum displayed speed limited to 99.9 km / h, but there are models that show speeds over 100 km / h. Perhaps a similar copy with three numbers on the display will be useful to risky cyclists who dare to accelerate to such a high speed, sitting behind a truck, in a so-called air bag.


Sigma 506 bike computer showing speeds over 100 km / h

For a long time, electronic speedometers of the size of wrist watch... And some of them dress directly on the arm and have a built-in heart rate sensor, that is, they work as a tonometer. But the size of the bike computer does not say anything about its reliability and functionality.

The first thing to look for when buying is the body of an electronic device, because the speedometer on a bicycle is in the open air. Water, road dust and direct sunlight adversely affect poorly protected electronics. Even the cheapest bike computers are often protected from rain, but otherwise they are inferior to more expensive counterparts.

Types of cycling computers on site:

  1. Wrist.
  2. On the steering wheel.
  3. To take out the steering wheel.
  4. With universal mount.

The stem-mounted speedometer allows you to save space on the handlebars for other accessories.

Basic requirements for bicycle speedometers:

  1. Large display, preferably backlit.
  2. Resistant to weather conditions (direct sunlight, rain, snow, low temperatures).
  3. Resistant to vibration and shock.
  4. Reliability of all installed components (bike computer mounting pad, reed switch, magnet, pads, ties).

Wireless bike computer

Wireless devices have the same functions as speedometers with wires, but the signal from their sensor is transmitted through the radio channel. A separate battery is required for the wireless sensor as it must function as a radio transmitter. Usually, two batteries in the sensor and in the device itself last up to six months. On bicycle computers with wires, one battery will last longer than one year anyway.


Sunding SD-548C Wireless Cycling Computer

Most often, travelers or extreme sportsmen install a wireless bike computer on their bike. This can be explained by the fact that in the conditions in which they roll, the wire can be accidentally damaged. A wireless device costs twice as much as a speedometer with wires.

Pros of all electronic speedometers:

  • Display values ​​with tenths precision;
  • Save data in memory;
  • No lubrication required.

Minuses:

  • It is necessary to change the batteries from time to time;
  • Susceptible to electromagnetic interference such as ignition coils, cell phones, power lines
  • The readings on the screen are updated with a slight delay.

Securing the bike computer

  1. Fasten the sensor to the fork or frame with an electrical tie.
  2. Wind the wire tightly around the fork blade and the brake cable.
  3. Install the mounting pad to the handlebar or stem.
  4. Fix the magnet to the spoke, but do not overtighten the screw as it can easily break the magnet case. The gap between the magnet and the sensor in the triggering zone should not exceed 2–3 mm.
  5. Insert the cycling computer into the contact pad and check its operation.

You can learn more about installing a bike speedometer by watching the following video, which uses a Sigma device as an example.

“If one person screwed something to something, then another can always unscrew it” - a popular saying was most widespread among locksmiths - repairmen, but I remembered due to the fact that it was necessary to install a recently purchased bicycle on a bicycle. He was not afraid of theft (now such prospects are open to gentlemen crooks ...), but yes, mischief. What kid doesn't like taking risks? Not for the sake of profit, but to test your ability to "act". Therefore, the classical fastening, with the use of screeds, did not suit. To complicate things, by passing the wire inside the front fork it was lazy, and anyway they would tear something off. I decided to make a completely removable version.

In the standard installation version, plastic ties are used, it is fast, elegant, but completely unreliable if a bicycle equipped with a speedometer has to be left somewhere, even with a cable lock, but still it is unattended.


The option to easily remove the entire device, take it with you, and then put it back in place became possible thanks to a removable screw clamp from the fishing reel. In the photo to the left of the platform for installing the electronic unit, what was immediately removed from the kit. And on the right is a new flat and thicker platform support, cut from plastic, on which holes are drilled both for fastening with a platform and with a screw clamp.


In the attachment site, for a more reliable connection with the support, four "blind" holes were drilled through, and the existing self-tapping screws were replaced with longer ones.


Mounting plate, support and screw clamp assembly. In principle, making such a clamp on your own is not at all difficult. Two grips with a bend inward, a screw passes through the hole in the bend, at its end there is a washer with a nut. A plastic grip is installed on the screw head for screwing.


Speedometer assembled and mounted on the handlebars of the bike. In the process of use, the ability to easily change the installation location will allow you to choose the most convenient for observation.


The awkwardly protruding sensor wires are laid in a groove running along it, on the one hand, it turned out to be tightly inserted into the existing plastic grip, and on the other, they were fixed with a short piece of tie through the existing holes. Now you can be sure that the wire will not fall off on the first trip.


In a square aluminum pipe with a length corresponding to the length of the sensor, a slot is made for its working part, which, after installation, protrudes a few millimeters beyond the dimensions of the pipe. This will make it possible for the reed switch inside to clearly record the passage of the magnet mounted on the spoke past it.


An impromptu bracket made of a strip of metal is attached to the pipe, by means of which it is installed on the threaded part of the front hub axle. The result is a sensor holder.


The sensor holder is in working position, there is a sensor in it, a magnet in a plastic cage is attached to the spoke. In addition, we managed to comply with the recommendation for installing the magnet as close to the bushing as possible, which will reduce the speed of its passage past the reed switch and, accordingly, increase the time required for its operation. Taking into account the vertical arrangement of the holder, it is possible to completely exclude the possibility of the sensor falling out of it; moreover, it becomes in place with a slight interference.


When attaching a clip with a magnet to a wheel spoke, it may be difficult to tightly connect its two halves. It is eliminated by biting off part of the self-tapping screw or replacing it with a shorter one.


The bike computer is installed on your workplace and ready to go. The use of such an attachment option, firstly, makes it possible to take it on a trip only when it is needed, to wash and repair the bike without interference, and of course a 100% guarantee of that. that he will always be yours ;-)
The installation time, if desired and with some skill, can be literally brought to seconds. Withdrawal takes an identical amount of time. Especially for, the author of the article Babay iz Barnaula.

Will be a great addition for cycling enthusiasts. With such a speedometer, you can see the exact speed of movement, and with some enthusiasm, you can make a whole on-board computer for a bicycle.

To calculate the speed of rotation of the wheel, a non-contact magnetic switch (reed switch) is used. When a permanent magnet passes by it, the signal goes to the Arduino, here the speed is calculated in miles or kilometers per hour, as a result, numbers appear on the display, and they show the speed. You can install such a device on any wheel, not even a bicycle one. The main thing is to correctly indicate the radius of the wheel, because it is on the basis of this data that the speed is calculated.

Materials and tools for manufacturing:
- Arduino microcontroller;
- magnetic switch (reed switch);
- resistor (10 kOhm, 1/4 watt);
- the wire;
- 9V battery;
- LCD display;
- prototype board for desoldering;
- two switches.

You will also need plywood, screws, a certain amount of tools. Well, of course, the Arduino IDE software.

Build process:

Step one. Speedometer electrical circuit
In total, the circuit uses three switches. One switch controls the 9V power supply. The second switch is responsible for the operation of the LCD screen, with it you can turn it on or off. And finally, a reed magnetic switch, it closes the circuit in the event that the wheel makes one full revolution.
The project uses a Parallax LCD monitor, it is connected to the board using three pins. One pin is supplied with 5V, the second is connected to ground, and the third output is digital, it is marked with the number 1.
The 10 kΩ resistors play a protective role in the system to prevent overloading. You cannot connect ground and plus 5V to the Arduino directly.


Step two. Soldering the speedometer shield
On the breadboard, you need to install three rows of connectors, they must sit on the board in such a way as you can see in the picture.




Step three. Installation and connection of the reed switch
The reed switch consists of two elements, a switch and a permanent magnet. Two wires come out of the reed switch, when a magnetic field acts on it, a small magnetic element inside the switch moves and closes the circuit.
A 1K resistor must be installed between pin A0 and ground on the breadboard. The ends of the wire are connected to the A0 and 5V outputs.
















As for the mechanical part, the reed switch is installed as follows. A permanent magnet is attached to the spoke of the wheel. The reed switch itself is installed on the wheel fork opposite the magnet. There must be a short distance between the reed switch and the magnet, otherwise it will not work. Next, the wires are connected to the outputs of the soldered board, and the performance is checked. When the magnet passes near the reed switch, the Arduino should output ~ 1023. If the system is not working, 0 will be displayed.






In the Arduino IDE, you need to open the Serial Monitor (Tools - Serial Monitor) and run the check. If there is no signal when the wheel is rotating, you need to replace the magnet with a more powerful one or reduce the distance between the sensor and the magnet.
If there is a signal, you can upload the code for verification. When the wheel is not spinning, 0.00 should be displayed. When spinning the wheel, the speed should be displayed in miles per hour.





Step four. Checking and installing LCD

To install the display, you need to take an additional shield. The rail needs to be soldered to the female pins on the protoshield output. Three pins are used to connect the shield, it must be firmly installed on the rails.










On back side The LCD screen contains two switches as well as a potentiometer. The switches must be moved to the position shown in the picture. The potentiometer is used to manually adjust the contrast of the screen.








After installation, the display can be checked. If everything is done correctly, the message "Hello World" will appear on the screen. It is quite possible that it will not work the first time and you will have to re-upload the sketch.

Step five. Speedometer backlight
Now you need to connect the backlight toggle switch. This is done as shown in the pictures. Remember to connect the 10K resistor to the green and black wires. Further, these wires are connected to one contact of the switch, and the red wire is connected to the second.
The red wire is the power supply, it connects to the Arduino 5V. The green wire connects to D2 and the other side of the resistor to ground.






Step six. Speedometer power supply
A switch must be used on a powered circuit. The black terminal from the battery is connected to ground, and the positive terminal is connected to the Vin output via a switch.




Step seven. The final stage of assembly and installation of the speedometer
A box is used as a body, which is cut out of plywood. The elements of the body are cut using laser cutting according to the designed templates. Further, all the elements are connected to each other with glue. Finally, the plywood is painted or varnished for protection and aesthetics.
Share this