Designing with magnetic encoders

The RM08 rotary magnetic encoder supports the stabilization control of self-balancing two-wheeled robotic vehicles.

The two-wheeled, self-balancing robotic vehicle designed by the engineering students at Tokyo Denki University.
PHOTOS COURTESY OF TOKYO DENKI UNIVERSITY

Working in the Tokyo Denki University’s Robotics and Mechatronics Department, Jun Ishikawa is a pioneering researcher in several technological fields including robot control system development. He challenged his engineering students to create a two-wheeled, self-balancing robotic vehicle, addressing a classic control theory problem – the inverted pendulum, the basis for the well-known Segway personal transporter.

Unlike a suspended pendulum, which will naturally return to a stable equilibrium position after being displaced, the inverted pendulum is inherently unstable. In addition, 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.

One solution to the problem, as implemented by Segway, is mounting 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, vertical-axis and horizontal-axis accelerometers 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 – tilt-angle sensing, control logic, and motor drive circuitry.

The encoder coupled to the motor-shaft.
PHOTOS COURTESY OF TOKYO DENKI UNIVERSITY

Solution

When designing printed circuit boards (PCBs) for this control application, small size and low weight are crucial for integration as the PCB 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.

At the bottom of the wheeled platform, 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 nearly vertical angles. If the vehicle tilts more than 30° in either direction, stability might be lost. To maintain balance, the wheels must be driven continuously with carefully calculated acceleration and speed.

Students needed a high-resolution position encoder to enable monitoring and regulation of the motor output to achieve the required level of motion control performance. It also had to be small and light enough to be accommodated within the vehicle’s slim vertical structure.

The solution came in the shape of the RM08 rotary magnetic encoder from RLS, a Renishaw associate company. This non-contact, frictionless rotary magnetic encoder weighs just 2g, including cabling, and features an aluminum sensor housing measuring 8mm in diameter with a thickness of 3mm.

The students designed a narrow nylon collar, acting as a mechanical linkage between the motor shaft and the magnetic actuator of the RM08 encoder, adding less than 0.5g 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,000rpm, and delivers an accuracy of ±0.3º.

Then came the motion control scheme for a two-wheeled robotic vehicle capable of self-balancing and staying upright, using the RM08 high-speed rotary magnetic encoder to measure angular rotation at 12-bit resolution.

The RM08 encoder is IP68-rated and designed for integration into a wide range of high-reliability, high-volume OEM applications.

Renishaw
https://www.renishaw.com

June 2022
Explore the June 2022 Issue

Check out more from this issue and find your next story to read.