Competition Year: 2017
University: Plymouth University
Project Supervisors: Dr Zaki Ahmed, Dr Paul Davey
Email Address: Max.Simmonds1337@gmail.com
Rota Una – The Self-Balancing, Electric Unicycle
Development of a modular, prototype system, to revolutionise the way we travel. Rota Una is a smart, Wi-Fi enabled, self-balancing electric unicycle. Winning two prestigious awards at the Plymouth University Project Showcase Day; Engineering Excellence and Technical Innovation.
Rota Una - Question and Answer Video
Rota Una - Technical Overview Video
IRGP4640PBF IGBT x6
TERMINAL BLOCK x9
MUR820 x 12
M3X25-NI SPACER x 12
Digital Volt Meter on a PCB
M3x6+6mm Female/Male Hex Standoffs x25
M3 Screws x 1/4in x50
180W 48v Buck Converter
48v 10ah Battery
Aluminium Bar (Heat Sink)
10 Pin Stackable Headers x7
1uF Electrolytic Capacitor x3
10uF Electrolytic Capacitor x6
100uF Electrolytic Capacitor x3
10nF Ceramic Capacitor x6
UF4007 Diodes x9
1000w BLDC Motor
10KΩ Resistors x20
5Ω Resistors x20
As far back as the mid-1890s, patents have existed for electric bicycles. By 2001, the term “e-bike” was commonly used to refer to electric bicycles: with the recent rise in fuel prices, the ever-increasing congestion, and a new craze for fitness, e-bikes are cycling their way out of the future, and into the present.
Figure 1 - A patented, electric bicycle from 1895 
However, bicycles are large and cumbersome, and so a new form of electric vehicle has emerged: the electric unicycle!
The challenge was to develop a prototype vehicle to meet the stringent demands of commuters in busy cities, such as London, who may use public transportation as part of their journey. E-bikes are large, heavy, and a hassle to take on a train. But a unicycle is far smaller, weighs less, and much easier to transport – not to mention, far cooler!
Rota Una solves the problems of cumbersome electric vehicles by reducing the overall footprint, it is as tall as a suitcase, which means it can fit in the designated baggage areas of trains/busses.
Bicycles use two wheels – the rear wheel drives it forwards, while the front enables you to balance, and stops you falling forwards, leaving the left and right balancing (which is much easier!) up to the rider.
However, if electronics and mathematics are incorporated into the bicycle, to do the balancing autonomously, then this secondary wheel becomes redundant. By adding intelligence, we can remove the wheel and make it a unicycle – reducing weight, and increasing manoeuvrability.
How Does It Work?
Figure 2 - Showing how Rota Una can be modelled as an inverted pendulum on a cart
Rota Una can be modelled as an inverted pendulum on a cart; a classical control problem where the centre of mass is to be held above its pivot point via a pole. Control theory was used to determine the force required to keep this mass (the rider) balanced. To do this, feedback needs to be fed into the system to determine the error (the deviation from the vertical; 'a' in figure 2.)
The idea is that when a rider leans forwards, the motor is used to correct the angle by accelerating forwards. By continually leaning forwards, the motor will keep accelerating (to a maximum speed) and this is the method of transportation. To slow down, the rider needs to simply lean back, and the motor will slow down. Control theory is used to determine the speed at which the motor will spin to correct the angle.
Figure 3 - The angle was calculated using the accelerometer's output and some trigonometry, combined with the gyroscope
By using a gyroscope, an accelerometer (from the MPU-6050), and some trigonometry, the angle from the vertical can be calculated. Digital Signal Processing (DSP) was used in software to filter the measurements from the gyroscope and accelerometer. This gives a more reliable angular measurement.
Once the angle had been determined, Rota Una needs to spin the 3 phase, brushless DC hub motor to make this angle 0 degrees. The power source of Rota Una is a 48vDC, 21ah Lithium-Polymer battery. This DC power source needs to be converted into a 3-phase AC signal to drive the hub motor at precisely the right time in order to make it rotate. For this project, I developed my own triple half bridge inverter, rated for 1000W. The motor uses 3 Hall effect sensors that determine the position of the motor's rotor, relative to the coils. Once this has been determined, the motor can be switched accordingly.
Why NI Products?
Figure 4 - A high level overview of Rota Una
Rota Una makes 1,000's of calculations per second to keep the rider balanced. These calculations need to be deterministic, and I needed full control over when exactly these calculations would be done. The NI myRIO was perfect for this; with its on-board FPGA, and a real time Linux OS, I was able to quickly develop code solo, that would have taken me months in a text based programming language, in only a matter of weeks. The FPGA allowed me to insert very small delays (625nS) during the switching of my inverter, ensuring that it does not enter a state that would damage it. I modified the default FPGA code to contain my code that reads from the Hall effect sensors (via the digital input lines), and the 6 digital outputs lines that go to my inverter circuit. The third party drivers that I wrote for the Inertial Measurement Unit implemented I2C on the FPGA.
Due to the nature of brushless DC motors, they need perfect timing to rotate. Because rotation relies on energising coils to pull, and then push, the rotor at exactly the right time (and measure the position via the Hall effect sensors in parallel) I needed a platform with nanosecond resolution. LabVIEW handles the parallelism so that I did not have to worry about multithreading. I also needed a method of communicating to the FPGA, and this was done through the Real-Time Operating System. This Real-Time OS then sent data wirelessly to my PC; displaying data graphically so that I can tune and understand my system.
Figure 5 - Rota Una's LabVIEW Front Panel, and Real Time code
It was of utmost importance for me to be able to develop quickly. Since I was to build Rota Una from scratch, develop all the electronics and circuits boards, implement the control algorithm, test and tune it, in less than 5 months. The NI platform based approach was the obvious choice. LabVIEW integrated seamlessly with the myRIO, and I was even able to develop drivers for third party hardware (a commonly used maker/hobbyist Inertial Measurement Unit), the MPU-6050. I needed an intuitive and easy to use interface, to allow me to tune the PID control loop dynamically. Using the myRIO's on-board WiFI adapter allowed me to have a LabVIEW front panel on my PC, wirelessly connected to Rota Una. I streamed angular data to my PC, and then adjust the PID control loop dynamically via my PC - sending the tuned values back to Rota Una. This was paramount to the success of Rota Una.
LabVIEW also has an amazing resource of built in functions (such as PID control, I2C) which allowed me to develop faster. It also has a huge, engaged community of users, who are openly sharing their own functions and software tools with other developers. These community generated tools (such as myComplimentaryFilter and this 6 phase controller) helped to further accelerate the development of Rota Una.
Figure 6 - Overview of the Real-Time and FPGA code
Rota Una was programmed to be flexible and scalable, so that in the future the Wi-Fi capabilities can be extended to help commuters even more - especially as we move into the age of the Internet of Things (IoT).
Figure 7 - The inverter design in NI Multisim and Ultiboard
Size was a huge constraint in developing Rota Una. I needed a circuit board that had a small footprint, but still was powerful enough to drive a 1000W motor. Using NI Multisim, I was able to design and simulate my circuit, to ensure it met specifications. I then ported this to NI Ultiboard where I developed the sophisticated switching circuits that control the motor. I then sent the designs off to be manufactured.
I used an innovative design of my own creation, to reduce the size of my inverter and make it modular - by stacking the circuit boards. Data lines were sent up through the board levels via header pins, while power lines were sent up by high gauge wire.
Figure 8 - Rota Una was made by up-cycling an old unicycle
Figure 9 - Modular Design of Rota Una
A key point of Rota Una was that it was modular, to allow for easy serviceability. All of Rota Una can be disassembled into its key parts. I built Rota Una from scratch, using my Dad's workshop and guidance.
Figure 10 - Rota Una on display at the Plymouth Showcase
To finalise Rota Una, I painted and added decals. The decals were cut out on a plotter – a 2 dimensional CNC machine with a blade that cuts vinyl to make stickers/decals. Designs were done on a computer and sent to the machine, which where then placed on to Rota Una.
Level of Completion
Rota Una is currently in its beta stage, while the concept of an electric, self balancing unicycle has been proved, the motor I am currently using can provide limited torque, meaning that it is unable to balance for extended period of time. However, this is an easy fix. Due to Rota Una's modularity, the electric motor can be replaced with another very easily.
In order to use Rota Una as a reliable method of commuting, the motor used needs to be upgraded to one that can provide more torque, at lower RPM. One such as a geared brushless DC motor would work better, rather than the direct-drive motor currently used.
Figure 11 - Rota Una Poster (PDF attached)
For an in-depth analysis on the unicycle, design considerations, testing, and build, please see the report attached.