Weeble is a cute 2 wheeled self-balancing robot made with FTC parts and a fully 3D printed body. Weeble uses a Linear Quadratic Regulator (LQR) controller to balance and drive around!
It took a lot of work to fit the many features of Weeble into such a compact fully 3d printed cute robot let alone
get him to balance and drive so stable with the slow 20ms loop times of the Control Hub and being 7.5 pounds! Hope you like him!
- Fully
3d PrintedBody Linear Quadratic Regulator (LQR) controllerto balance and drive around the7.5 poundWeeble!- A
1080P Cameraembedded in the right eye, used forcomputer vision (openCV) Object detection and trackingwithembedded camera in right eye- A
head that can moveup, down, left and right super quickly 2 massive adorable eyes, that bothmove side to sideMoveable eyebrowsto expresscomplex emotions2 cute armspowered by servos2 epic 100mm Wheelspowered by312 rpm motors,high torquebecause Weeble is heavy!3 2M TOF distance sensorsforautonomous driving and obstacle detectionEfficient LQR controllerand12V batterymeanslong 30+ min battery life.
- Robot Reveal Video
- Onshape CAD Assembly
- How Does Weeble Balance?
- What is Weeble Made Of?
- How Does Weeble Work?
- Why Was Weeble Made?
Watch the video below to see Weeble in action! The video shows the progressions of Weeble from the first version to the current version. Also, the video is better with sound!
Weeble - Robot Reveal (YouTube)
Follow the link below to view the full CAD assembly of Weeble. The assembly includes every part of Weeble, from the big 3d printed parts to the smallest screws!
Weeble balances using a Linear Quadratic Regulator (LQR) Controller. The previous versions of Weeble used a PID controller, but the LQR controller is much more efficient and stable. Also, with the slow 20ms loop speed of the REV Control Hub, the PID was unable to be effective enough. Below are the key java classes that handle keeping Weeble
balanced (github links):
-
**LQRController.java ** - The LQR controller class. It calculates the optimal gains and calculates the optimal control input for the motors.
-
**GyroDrive.java ** - The class that handles the balancing of Weeble. It uses the LQR controller class and the states of Weeble.
The LQR controller uses the state-space model of the robot to
calculate the optimal gains to keep Weeble balanced. The state-space model is a mathematical model that represents
the behavior of a physical system as the set of input, output, and state variables. The gains are used with the state of
the robot (
angle, angular velocity, position, and velocity) to keep the robot balanced and driving. Future
improvements will be made to make the LQR controller PID-assisted to improve velocity control.
Below are the two most important components of the LQR controller, there are many more equations and components that make up the LQR controller but these are the most important and easiest to understand.
The dynamics of the system are modeled as a set of linear differential equations:
ẋ = Ax + Bu
xis the state vector (angle, angular velocity, position, velocity)uis the control input vector (motor power)Ais the state matrix (how state evolves over time)Bis the input matrix (how control input affects state)
The control input u is computed using the feedback law:
u = -Kx
Kis the feedback gain matrix (computed using LQR)xis the state vector (angle, angular velocity, position, velocity)uis the control input vector (motor power to keep the robot balanced)
- Fully 3D printed body
2x100mm rubber wheels with 3D printed hubs2x312 RPM GoBilda DC motors with encoders (Wheels)1xREV Control Hub (Brain)2xREV Servos (Arms)1xAxon Mini+ Servo (Neck)4xSG90S Servos (Head, Eyes, Eyebrows)3xREV 2M Distance Sensors (Front, Left, Right)1xInnomaker Arducam (Embedded in Right Eye, OpenCV)1x12V Battery (Power)
All 3 versions of Weeble were fully designed in OnShape and 3D printed parts were made with a
Prusa Mini+ 3D printer.
Weeble is programmed in Java using the FTC SDK as he uses a leftover REV Control Hub from the 2024 FTC season. He
also
uses OpenCV to track objects and faces. The robot is
controlled wireless with a Logitech Gamepad over a WiFi connection
to the REV Control Hub.
I made Weeble as a challenge to myself to see if I could make a balancing robot. I also wanted to make a robot that was fun with a personality, hence the moving head, eyes, and eyebrows. Now that Weeble is built, I plan to use him as a platform to work on computer vision projects, point cloud mapping, and autonomous driving.




