• EUR€
  • £GBP
  • $USD


DFRobot Aug 30 2016 351


Hardware components:


  • NXP FRDM-K82F Freedom board × 1
  • Microchip RN-41-EK Bluetooth module × 1
  • DFRobot DFR0205 DC-DC Converter × 1
  • TB6612FNG Dual Motor Driver Carrier × 1
  • Servo (generic) × 2
  • LiPo Battery 11.1 Volts, 1000 mAh × 1
  • Micro metal gear motor 6V 100rpm × 1
  • Bicycle Frame × 1

Hand tools and fabrication machines:

  • Drill
  • Hot glue gun (generic)




For the last few years, hardware and software engineers have been working on the idea of self-balanced vehicles. They have come up with many solutions to the challenge of keeping a moving unstable two-wheel vehicle self-balanced. Most of powered, but what would the solution be when it comes to a man powered unstable vehicle – a bicycle?

Marvelocycle doesn’t pretend to be an end-product, but a prototype of a possible solution to the challenge of how to maintain a bicycle in a self-balanced state. This feature in a bicycle could enable a larger number of people to practice physical activities.


Working/Operating Principle

Currently, there are a variety of radio-controlled motorcycle brands. The general basic idea that designers take advantage of to keep balanced RC motorcycles is the momentum created by a gyroscope that uses a large spinning mass. This system is relatively heavy and to keep it working requires a large amount of energy. On the other hand, the principle of keeping the Marvelocycle stable in an up-right position is different. It uses a counter-weight that only moves to a convenient position when it is necessary, so the state of equilibrium can be maintained.




Because of the scale of the prototype, it is impossible for a person to ride and pedal the model. Instead of a person, a little electric motor is used to make the prototype move. This part of the design doesn’t have anything to do with the system that keeps the stability of the model.




Along with the aging process, people have a tendency to lose their capacity for adequate balance. The older they become, the more diminished the sense of equilibrium. This situation increases the risk of having a fall.

Considering the case of people that have been practicing cycling all their life, they don’t have any major difficulty in continuing the practice of cycling as they grow older. Not mentioning that cycling could be more appealing than just walking; what about seniors that are little accustomed to riding a bicycle and that would like to practice cycling and get some benefits from this activity? These seniors that would like to return cycling or that just would like to start practicing cycling might fear to do so and wouldn’t dare to ride a bicycle because of their fear of falling. The result of these situations is that these people would restrain themselves form cycling. The fear of an actual accident excludes these people from the enjoyment of cycling – an activity that is also good for fitness and health. Hence, a system that controls the balance of a bicycle and its rider will decrease the possibilities of suffering a fall and empower these seniors to practice an exciting activity.

Another important benefit of a self-balanced bicycle is that a larger number of people will become users of this economic and environmentally friendly means of transport.

Cycling is a non-polluting means of transport. Any technical improvement that we can develop to make the use of bicycles more secure and appealing as a means of transport will increase the number of users- the more people cycle; the healthier people will be. Marvelocycle can facilitate the adherence of seniors to a new physical activity.

Finally, who knows, maybe in the near future we will have a new category in the NXP CUP where these kinds of bicycles could compete.



The FRDM-K82F card is used in the design of the control system. The large computing power and the numerous peripherals in the card allow for the required control.

It is important to notice that for this contest only a simple system that meets the basic requirement was designed. The system is based on a closed loop PID control that has been implemented in the FRDM-K82F card. The accelerometer of the card works as an input sensor that determines any change in position in relation to the vertical axis. The control signals are PWM signals; these signals are used to position the servos in the design (See photos 1 - 4).




A counterweight is used for balance and a servo controlling the direction is used as additional aid to keep the balance. (See video 1)

The FLEXIO module is used for I2C communication with the accelerometer.



Due to an error in the tolerance of the holes that support the axes of the wheels, it was necessary to make some adjustments in the prototype to improve the perpendicularity between the axes and the frame of the bicycle. Some other adjustments were made to improve the rigidity of the frame of the bicycle itself.


Despite these efforts for solving the issues mentioned before and the solutions implemented; the problems reminded, but in a littler scale.


Additionally, due to the flexibility of the material used to build the frame, as the counterweight (Li-po bat) used to balance the bicycle moves from side to side, these movements add noise to all axes of the accelerometer.



As a last point, which is the worst problem and a major challenge, is that this kind of devices is a very unstable system. (See video 2)


All these problems mentioned above make the manual tuning of the PID controller a very difficult task.


The last step to achieve the whole work to be done is developing a mathematical model of the design, and then current techniques of control theory could be applied on the design. This is a last task to be done. This last step goes beyond the intended reach of this project.