While designing a self-balancing two-wheeled robotic vehicle, accurate high-speed measurement of angular rotation is a key requirement. Furthermore, the minimization of component weight and size is an equally vital consideration. Engineering students at Tokyo Denki University found the answer in the RM08 rotary magnetic encoder, from Renishaw’s associate company, RLS.
Jun Ishikawa, a pioneering researcher at the University’s Robotics and Mechatronics Department, challenged his engineering students to create a two-wheeled, self-balancing robotic vehicle. For this project, his students chose the RM08 rotary magnetic position feedback encoder from RLS, a Renishaw associate company.
Ishikawa challenged his students to solve a classic control theory problem — the inverted pendulum. The basis for the well-known Segway personal transporter, the inverted pendulum has its center of mass located above the pivot point.
A Challenging Control Problem
Unlike a suspended pendulum, which will naturally return to a stable equilibrium position after being displaced, the inverted pendulum is inherently unstable. Imagine holding a pool cue or a broom handle upright on the palm of your hand. It would tend to fall over without continuous adjustments to the position of your hand. A shorter inverted pendulum accelerates away from the vertical position faster than a longer one, requiring more frequent position adjustments and presenting a more challenging control problem — balancing a pen on your hand is trickier than balancing a pool cue.
One solution to the problem, as implemented by Segway, is to mount the pivot point on a wheeled platform. This type of vehicle takes inertial inputs from an inertial measurement unit (IMU), which comprises two sensors: an accelerometer and a gyroscope.
In this case, both vertical-axis and horizontal-axis accelerometers are used to determine the angular acceleration due to gravity. By constantly monitoring the tilt angle and angular velocity of the pendulum, a proportional-derivative (PD) control system can be used to drive the wheels forward or backward to maintain balance.
Adopting a similar approach in their own control system, Ishikawa’s students needed to design and integrate what was effectively a three-part solution, comprising tilt-angle sensing, control logic, and motor drive circuitry. When designing PCBs for this control application, small size and low weight is crucial for integration within the handlebars. PCB architectures have been optimized to ensure that all the required functionality is delivered in the smallest package size.
The PCB control board sits at the top of the pendulum, inside the handlebars, and carries all the electronic circuitry required, including a solid-state gyroscope, microcontroller, DC motor drive, and power management components.
In the wheeled platform, at the bottom, there are two axles: A horizontal axle linking the wheels and a vertical axle driven by a compact DC motor. Simple bevel gearing at the intersection between the axles enables the motor to drive the wheels in either direction.
For effective control, the system must maintain orientation within a small range of angles that are nearly vertical. If the vehicle tilts by more than 30 degrees in either direction, stability might be lost. To maintain balance, the wheels must be driven continuously with carefully calculated acceleration and speed.
Magnetic Encoder Solution
After much consideration, the solution came in the shape of the RM08 rotary magnetic encoder from RLS. This noncontact, frictionless rotary magnetic encoder weighs just 2 g, including cabling, and features an aluminum sensor housing measuring 8 mm in diameter with a thickness of only 3 mm.
The students designed a narrow nylon collar, to act as a mechanical linkage between the motor shaft and the magnetic actuator of the RM08 encoder, which added less than 0.5 g to the assembly. The RM08 encoder produces a 12-bit resolution output (4,096 steps per revolution), is suitable for high-speed operation up to 30,000 rpm and delivers an accuracy of ±0.3 º.
By using the RM08 high-speed rotary magnetic encoder to measure angular rotation at 12-bit resolution, the students were able to design a motion control scheme for a two-wheeled robotic vehicle capable of self-balancing and staying upright.
The RM08 encoder is IP68-rated and designed for integration into a wide range of high-reliability, high-volume OEM applications. The rotary magnetic encoder also addressed the vehicle’s demanding physical design constraints. Being a compact and lightweight component, it helped the students overcome space and load-carrying limitations.
The success of this project has given the students the confidence to explore other advanced robotics projects.
This article was contributed by Renishaw Inc. (West Dundee, IL). For more information, visit here .