Electronic mountain bike suspension control system
Dear community, I am submitting to your attention a progress report on the crossing of my two hobbies: mountain bike and microelectronics.
So, in this article we will focus on the domestic development of an electronic suspension control system for a mountain bike. I will not torture with a long introduction, immediately to the photo and video:
')
Now for the details.
Problem:
With the active pedaling on the dvuhpodnomnogo bike, a large share of the rider's energy is spent on the buildup of the bike suspension, this is true for both the rear and the front suspension. The rear suspension is subject to buildup almost always, the front suspension is mainly susceptible when pedaling "standing". To make it clearer, imagine that you are standing next to a mountain bike that has a suspension fork and press the fork cyclically / push the fork to the ground. To do this, you spend your energy, in the same way your energy is spent completely useless when you intensively pedal (for example, uphill). That is, if it were not for the "buildup" of shock absorbers, then all the energy would be spent on a useful thing - pedaling.
To solve this problem, numerous mechanical systems for damping the buildup have been developed and implemented by various suspension manufacturers. Such as Motion Control from RockShox and Terralogic with ProPedal from FOX, etc. It is impossible not to agree that such mechanical systems, of course, improve the efficiency of pedaling, but still do not completely eliminate energy dissipation, since all these solutions are "passive."
In other words, mechanical systems do not take into account various external conditions, such as:
Movement speed
Cadence (pedaling frequency)
Nature of the road surface
Therefore, recently, major bicycle manufacturers have developed “active” suspension control systems that take into account the external conditions listed above, thanks to various sensors:
Reed speed and cadence
Acceleration sensors
Idea:
As usual, it was accepted in our homeland, the task was set as follows: "To surpass foreign counterparts in tactical and technical characteristics several times!". Namely, these foreign products needed to be technologically overtaken and overtaken by the following indicators:
Efficiency
Dimensions
Weight
Ability to pair the system with bluetooth devices
Intellectuality
Cheapness
Availability
Ease of installation on existing equipment (plug and amort) with minimal modification
Maintainability
fault tolerance
Possibility of hardware modifications (upgrade)
The possibility of modifying the software part (upgrade)
Operating time from one charge
What has been achieved:
1. Efficiency
Firstly, in contrast to foreign analogues, the control takes place at the same time as the front and rear suspension. Secondly, the hardware (microcontroller) allows you to implement any suspension control algorithms using publicly available tools, namely the C ++ programming language.
2. Dimensions
Specially selected components are so small that they allow you to place them in the plug forks. That is, the "brain" and the battery are placed directly in the free space of the rod of the plug. Thus, the dimensions of the control element do not exceed 200 mm in length, and 22 mm in width. Real sizes are approximately as follows: 150x19. The result is an elegant solution that is not even visible, and most importantly, nothing sticks out and does not occupy the right place as it is done here (a bulky battery pack attached instead of a vital flask of water):
3. Weight
For those who are not familiar with cycling, I will explain that weight is one of the main critical indicators for the equipment of a bicycle used in competitions. For this reason, this criterion was highlighted. As a result, the weight was about 120 grams. This includes:
Servo drive (2 to 19 grams)
38
Microcontroller board
ten
Battery
thirty
Acceleration Sensor (Sprung)
five
Acceleration Sensor (unsprung, together with sealed case)
15
Reed switches and magnets (2 to ~ 10)
20
Control module (buttons)
five
Wiring
five
Total:
128 grams
For reference: similar systems from foreign manufacturers weigh more than 300g.
4. Intelligence
Sensors and the ability to program a microcontroller make it possible to implement any algorithm in the high-level c ++ language. As a result, the following features are implemented at the moment:
Manual mode
In this mode, the user can control the locks of the front and rear shock absorbers (jointly or separately) through buttons located under the neoprene grips (rubber handle on the steering wheel). The work of this mode can be seen in the video above. Despite its simplicity, this mode is a very convenient and useful feature, since the shock absorber lock levers are very difficult to turn with your hands when riding a bike, especially at high speeds.
Semi-automatic mode
Mainly, this mode was developed for new shock absorbers from FOX , which have CTD levers. The main idea for this mode was to maximize the mechanical characteristics of the shock absorbers. That is, the system, depending on the sensors, must choose one of three CTD modes (Climb-Trail-Descent), relegating all the logic for optimizing the operation of shock absorbers to the shock absorbers themselves. The mode is selected by turning the servo at a certain angle corresponding to a particular mode of operation of the shock absorber.
Currently, the CTD modes are selected based on the angle of the bike. In other words, it works like this:
Bike rides uphill - the Climb mode is activated.
Bike rides in a straight line - Trail mode.
Bike rides from the mountain - Descent mode.
The limits of the transition from mode to mode are adjusted (the value of the catch slope in degrees). Also, the timeout of the transition from mode to mode is also configured.
This mode was developed specifically for one very respected rider (I will not name him, because they agreed), but at the last moment he changed the sponsor, and installing the system on his new bike became impossible.
Here's how it works:
Auto mode
This is the most interesting and challenging mode, as it is designed to maximize the efficiency of pedaling, by intelligently turning on / off the shock absorber locks at precisely those moments when it is necessary.
To implement this mode, several possible system states and rules of transition between them were identified, in short it looks like this:
System using sensors:
sprung acceleration sensor (in the fork rod)
acceleration sensor unsprung (for fork pants)
speed sensor
cadence sensor
Calculates the following indicators:
bump seriousness
the buildup of the fork in the vertical plane and in the plane perpendicular to the movement
bike angle
speed
cadence
And on the basis of these indicators selects the necessary state, moving from one to another:
System status (drive mode)
Status of shock absorber locks
rest mode
full lock
fork-punching
full lock
pedaling
fork absorber unlocked, rear shock locked
free rolling mode
all unlocked
bumps absorption mode
all unlocked
Unfortunately, I have not yet shot a video of how this mode works in action. If I find a video recorder, I'll try to take it off. In the meantime, here's a video of the work of this mode in statics:
5. Pairing the system with bluetooth devices
Thanks to the integrated bluetooth module, a bluetooth device can be connected to the system to display the telemetry of the system and to edit the settings. At the moment, it is written android application that performs the role of the cycle computer and the system settings editor. Here are some screenshots:
Manual mode:
CTD mode:
Red Curve - Unfiltered Inclination Data The blue curve is the slope angle obtained by applying a mathematical filter. Climb / Descend gradient threshold - limit angles of operation of the Climb / Trail / Descend modes (adjusted by the slider or from the buttons on the steering wheel).Also shown on the graph with dashed lines.
Auto mode:
Red curve - readings of the accelerometer sensor suspended on the fork's pants (unsprung sensor) The blue curve is the accelerometer sensor reading inside the fork shaft (sprung sensor) Sprung / Unsprung severity threshold - limiting values ​​of sensors for blocking plug and amort (sensitivity), when crossing unsprung values ​​- amort is blocked, when crossing sprung values ​​- the fork is blocked, provided that the sprung value is not exceeded, that is, there are no bumps (adjusted with a slider or buttons on the steering wheel).Also shown on the graph with dashed lines.
Editing settings:
The first two screens are serv / mode calibration.When dragging, the servo sliders are rotated in real time.This is just a small part of the available settings, only about 50 different parameters.
And here are some videos:
Manual mode:
CTD mode:
Servomotor selection:
Of course, in the future it will be possible to port android application for iPhone and other bluetooth devices. Soon, I will get such a device with an android , and port the application to it. I think it will be very convenient:
5. Cheapness
All selected components can be purchased on ebay or dx.com at scanty prices. But to create this system, I had to buy the same components at high prices, because I did not want to wait for delivery. The result was something like this:
ebay or dx
local shops
Microcontroller
300r
1500r
Acceleration Sensor (x2)
~ 300r
2000r
Battery (good 18650)
200r
500r
Button module
~ 30p
50p
Reed switches
unknown
unknown, used from old cycle computers
Wires
~ 100r
400r
Servo drive (good, with a metal gearbox, the fastest, x2)
600r
1300r
Hinges (aeromodelling)
50p
250r
Bluetooth module
200r
~ 500r
Solid-state relays, Li-Ion battery charge microcontroller, small things
~ 300r
~ 700r
Total:
~ 2180
~ 7200r
I do not know how much the same system from manufacturers will cost, I can imagine that when it will be available for sale it will be an order of magnitude or even two more expensive (with, presumably, fewer possibilities).
6. Availability
All components can be found in local stores, but at high prices. If you have time, you can buy on ebay and dx.com. In addition, I doubt that similar foreign systems will be available to us even after a year.
7. Easy installation on existing equipment (plug and amort) with minimal modification
Only one hole is drilled in the plastic cover of the wiki lock control and on the rear shock absorber lock lever. Bearing hinges are screwed into these holes (standard hinges for aeromodelling). Servos are mounted on plastic ties through plastic and rubber brackets that I found at home (mostly from old cycle computers). As a result, most likely, this system can be put on any bike.
8. Maintainability
As you can see, the system consists of a set of components / modules, each of which is easily accessible and replaceable. You can imagine what will happen if the factory shock absorber breaks, most likely it will be impossible to repair, only the replacement of the shock absorber will save. And if the carriage flies (where did the manufacturers of a similar system place the cadence sensor)? It seems that the carriage will be released.
9. Fault tolerance
Even if the battery is dead or the wire is broken or there is a fire on your bike, you can still switch the lock with your hands. When, as instrannye systems in such cases (as far as I know) will simply be stuck. The servo drive is treated with a special rubber compound to ensure water resistance.
10. Possibility of hardware modifications (upgrade)
The system was built using a modular approach. At the moment, the possibility remains available for connecting (free connectors) additional sensors (for example, a heart rate monitor) and other devices (for example, an LCD display as a display of bicycle computer functions).
11. The possibility of modifying the software part (upgrade)
The microcontroller can be flashed at any time with a new firmware written in c ++ via USB cable. You can imagine how great it is when you can realize any whims.
Plans to implement the following:
All possible functions of the bike computer (whatever they want, including those that are available in top models of bike computers).
Deeper analysis of the nature of the road surface (asphalt, grader, roots) in order to more accurately calibrate / calculate the characteristics of the blockage.
Much more (at least the alarm) ...
12. Operating time from one charge
Sleep mode
During idle time, the system consumes 1mA, thanks to the implanted three solid-state relays that disable the servo drive, bluetooth and i2c port (for the LCD display, now not used) in sleep mode. Therefore, it can be said that in an inactive state the system can stand idle for months (it all depends on the internal resistance of the battery, i.e. how much the battery can be in a charged state without load). Sleep mode automatically switches to timeout. Timeout can be changed, or completely disable the use of sleep mode. From sleep mode, the system goes on the event of the cadence sensor or the button on the steering wheel.
Active mode
Again, thanks to the solid-state relays, all servo drives are turned off immediately after they have been activated. Thus, ~ 80% of the time of the servo drive is not connected to the circuit at all (the hold mode is not used, which greatly saves the charge). In addition, the bluetooth module is turned off by an independent relay, respectively, the operating time increases without using bluetooth. Bluetooth is disconnected from the buttons on the steering wheel or by timeout. Timeout is configurable.
Current consumption
Service life from a separate charge (estimated)
Sleep mode
1mA
4 months (excluding internal resistance of the battery)
Active mode
20mA
6 days continuously
Active mode + bluetooth
40mA
2.5 days continuously
Active mode + servo
150mA
20 hours continuously, that is, if the servo operated continuously back and forth
13. Battery charge from a regular USB port.
Thanks to the built-in microchip charging Li-Ion batteries, the system can be charged from the usual USB lanyard. Time to full charge ~ 10 hours. Charging is automatically disconnected if the battery is fully charged, thus eliminating the "overcharge" of the battery, thereby increasing battery life.
Instead of concluding:
The system has been developed and tested for several months. At the moment, the work is not finished yet, it is a pity that the cycling season is over and now testing will most likely have to be postponed until the next season. But now it is clearly felt that the system really allows you to optimize the operation of shock absorbers, thereby helping the cyclist to show the best results.
Ps. Please note that this article is indicative in nature, because the size of the article does not allow to describe in detail all the features of the system. If this article arouses public interest, then I promise to write a more detailed review of each of the parts of the system, for example, interesting in my opinion:
work with accelerometers
signal filtering algorithms
system state model
the most efficient way to interact with a bluetooth device
electrical circuits
and much more
UPDATE: Had to remove all vidyahi. For me, the comrades of LaPierre threaten lawsuits. The life situation now I have is such that there are no opportunities to butt with the monster. I'm sorry.
Recently they sent an email with an official letter (with EDS) which says that I violate their patents (by the way, patents were received a day later as I posted vidyahi on YouTube, that is, at that time my system was already working and I was using it with might and main). Also in this letter, they demand that I immediately stop selling the system (although I did not sell it to anyone), remove all videos from YouTube (35+ thousand views from the most popular video), and ( ATTENTION ) stopped using it! Otherwise, they intend to “proceed with further legal action”.
It seems that the popularity of my system somewhat prevents them from selling their products. By the way, an article on bikerumor was published about the system. This article for the month became the most popular, and scored 17 thousand views (not that Habr but still :-)). And if you google “bike automatic suspension system” then the article about the system appears in the first place. So I seem to have spoiled their ambitious plans a bit :)