Lever-based Non-strain Mass Measurement Sensing System
Overview
This project was completed for the Sensing and Measurement lab course (SDM273). The goal was to design a mass measurement system for objects in the 75–750 g range with error within ±5 g, without using any strain-gauge sensors. The solution used a lever-balance principle, driven by a stepper motor, with a GY-25 gyroscope detecting the tilt angle of the lever arm.
Results
- Measurement accuracy: Relative error consistently within ±1% across the 75–750 g test range.
- Linear calibration: Fitted a first-order relationship between stepper motor position and mass:
d = −1.4194m + 1193.7, validated through least-squares regression on calibration data. - Notable features:
- Voice broadcast of measurement results.
- No additional distance sensor needed — displacement computed from stepper motor step count.
- Extreme pin-resource utilization via combined hard and soft UART.
System Design
Hardware:
- Core structure: Roller-screw linear module acting as a lever arm, pivoting on flange-bearing supports to minimize friction.
- Counterweight: Two 500 g weights on a slider; the stepper motor drives the slider along the lever to balance the unknown mass.
- Sensing: GY-25 module (MPU6050-based) attached to the lever to read real-time pitch angle and determine which side is heavier.
- Controller: Arduino UNO; stepper motor driver board (HPD970).
Software:
- Balance detection: The system drives the slider in the direction that reduces tilt angle; balance is detected when the pitch sign reverses on consecutive readings (zero-crossing logic).
- Friction compensation: Due to bearing friction, the equilibrium position differs depending on approach direction. The final position estimate averages two convergence positions:
d = (d₁ + d₂) / 2. - Kalman filter: Applied to MPU6050 angular data to suppress noise and drift; the raw sensor exhibited >2% fluctuation even at rest.
- Serial communication: Combined hardware UART and software serial (SoftwareSerial) to manage the GY-25 module, voice broadcast module, and PC debug output simultaneously within Arduino UNO’s limited pin set.
Challenges
- MPU6050 noise and zero-drift: Raw gyroscope data was highly noisy; addressed with Kalman filtering and GY-25’s onboard attitude fusion.
- Friction asymmetry: The approaching-from-above vs. approaching-from-below slider positions differed due to pulley friction, causing measurement bias. Averaging the two crossing positions significantly reduced this error.
- Limited Arduino UNO pins: Needed simultaneous UART communication with GY-25 (115200 baud), the voice module, and the PC. Solved by remapping hardware/software serial ports and enabling additional UART channels.
- Small calibration dataset: Only a limited number of reference masses were available, risking underfitting/overfitting of the linear model; addressed by careful selection of calibration points across the full range.
Reflection and Insights
This project demonstrated that non-electrical sensing principles — in this case, mechanical leverage — can achieve high-precision measurements when combined with careful signal processing and systematic calibration. The Kalman filter was essential to making the gyroscope data useful in practice, and the friction-averaging technique was a simple but highly effective engineering heuristic. The resource constraints of the Arduino UNO also provided practical experience with low-level embedded systems optimization.
Team and Role
- Team: Two-person team sharing hardware construction and software development.
- My Role: Primarily responsible for the control algorithm, Kalman filter implementation, and serial communication configuration.