Reaction wheels are useful things, typically used by satellites to keep themselves oriented the right way up in space. Turning the reaction wheel creates an equal and opposite torque in the spacecraft, allowing it to point and rotate itself accurately. The same technique also works here on Earth, and [Brick Experiment Channel] decided to build one out of LEGO to control an inverted pendulum.
The initial design using a small LEGO wheel on an inverted pendulum was only able to work reliably over a 4-degree angle from the vertical. Upgrading the wheel to a larger, heavier one enabled the wheel to instead work over a 28-degree range instead.
A MPU9250 inertial measurement unit was pressed into service for control of the reaction wheel, fitted to the base of the pendulum and read by a Raspberry Pi. The Pi takes accelerometer and gyroscope readings, and then controls the motor on the pendulum with a PID controller to keep the inverted pendulum upright.
The video goes into a great deal of detail on what it takes to make the pendulum run smoothly. From changes to the control coefficients to measuring the motor’s back EMF, [Brick Experiment Channel] demonstrates everything required to make the pendulum robust to outside perturbances.
The inverted pendulum is a great way to learn about control theory, as we’ve seen time and again.
Continue reading “Building Reaction Wheels With Python And LEGO”
Watching a child learn to run is a joyous, but sometimes painful experience. It seems the same is true for [James Bruton]’s impressive Sonic the Self-Balancing robot, even with bendable knees and force sensitive legs.
We covered the mechanical side of the project recently, and now [James] has added the electronics to turn it into a truly impressive working robot (videos after the break). Getting it to this point was not without challenges, but fortunately he is sharing the experience with us, wipe-outs and all. The knees of this robot are actuated using a pair of motors with ball screws, which are not back drivable. This means that external sensors are needed to allow the motors to actively respond to inputs, which in this case are load cells in the legs and an MPU6050 IMU for balancing. The main control board is a Teensy 3.6, with an NRF24 module providing remote control.
[James] wanted the robot to be able to lean into turns and handle uneven surfaces (small ramps) without tipping or falling over. The leaning part was fairly simple (for him), but the sensor integration for uneven surfaces turned out to be a real challenge, and required multiple iterations to get working. The first approach was to move the robot in the direction of the tipping motion to absorb it, and then return to level. However, this could cause it to tip over slightly larger ramps. When trying to keep the robot level while going over a ramp with one leg, it would go into wild side-to-side oscillations as it drops back to level ground. This was corrected by using the load cells to dampen the motion.
Continue reading “Sonic The Self-Balancing Robot: Face-Plants And The Challenges Of Sensor Integration”
Building your own self-balancing robot is a rite of passage for anyone getting into the field of robotics. Master of robots, [James Bruton] has been there, done that, and collected a few T-shirts. Now he’s building a large Sonic the Hedgehog self balancing robot that can bend at the knees and hip, allowing it to lean while turning and handle uneven terrain. Check out the first video embedded after the break.
Standing about 1 m tall, the robot is inspired by Boston Dynamic’s box handling bot, Handle. It’s “skeleton” consists of 20×20 aluminium extrusions, bolted together using a bunch of 3D printed fittings in the signature blue and red of Sonic. The wheels and tyres are also 3D printed, and driven by brushless motor via a toothed belt. The knee/hip mechanism is actuated using a ball screw, also driven by a brushless motor.
[James] intends to implement an active shock absorption system into the leg mechanism, using the same technique he tried on his OpenDog robot. It works by bolting a load cell onto one of the leg extrusion to sense when it flexes under load, and then actuating the knee mechanism to absorb the force. His first version of the system on OpenDog used PWM signals to send the load cell data to the main controller, but the motors on the legs induced enough noise in the signal wires to make it unusable. He has since started experimenting with the CAN bus protocol, which was specifically designed to work reliably in noisy systems like modern automobiles. If he gets it working on the two legs of this Sonic robot, he plans to also implement it on the quadruped OpenDog.
Continue reading “Sonic The Hedgehog Self-Balancing Robot Can Bend At The Knees”
Radio control cars have always been fun, it’s true. With that said, it’s hard to deny that true speed was unlocked when lithium polymer batteries and brushless motors came to the fore. [Gear Down For What?] built himself a speedy RC car of his own design, and it’s only got two wheels to boot (Youtube link, embedded below).
The design is of the self-balancing type – if you’re thinking of an angry unmanned Segway with a point to prove, you’re in the ballpark. The brains of the machine come thanks to a Teensy 3.6, which runs the PID loops for balancing and control. An MPU6050 gyroscope & accelerometer provide the necessary sensing to enable the ‘bot to keep itself upright in varied conditions. Performance is impressive, with the car reaching speeds in excess of 40 MPH and managing to handle simple ramps and bumps with ease. It’s all wrapped up in a 3D printed frame which held up surprisingly well to many crashes into tripods and tarmac.
Such builds are not just fun; they’re an excellent way to learn useful control skills that can serve you well in industry and your own projects. You can pick up the finer details of control systems in a university engineering course, or you could give our primer a whirl. When you’ve whipped up your first awesome project, we’d love to hear about it. Video after the break.
Continue reading “This Two-Wheeled RC Car Is Rather Quick”
At Maker Faire Milwaukee this past weekend, [basement tech] was showing off his latest build, a PID controlled charcoal grill. While it hasn’t QUITE been tested yet with real food, it does work in theory.
PID (a feedback loop with some fancy math used to adjust the input to get a consistent output) controlled cooking is commonly used for sous vide, where one heats up a water bath to a controlled temperature to cook food in plastic bags. Maintaining water temperature is fairly easy. Controlling a charcoal barbecue is much more difficult. [basement tech] accomplishes this with controlled venting and fans. With the charcoal hot and the lid on, there are two ways to control temperature; venting to let hot air out, and blowing air on the coals to make them hotter. A thermocouple sensor stuck through the grill gives the reading of the air inside, and an Arduino nearby reads that and adjusts the vents and fans accordingly.
The video goes into extensive detail on the project, and describes some of the challenges he had along the way, such as preventing the electronics and servos from melting.
Continue reading “PID Controlled Charcoal BBQ – Put An Arduino On It!”
Your quad-copter is hovering nicely 100 feet north of you, its camera pointed exactly on target. The hover is doing so well all the RC transmitter controls are in the neutral position. The wind picks up a bit and now the ‘copter is 110 feet north. You adjust its position with your control stick but as you do the wind dies and you overshoot the correction. Another gust pushed it away from target in more than one direction as frustration passes your lips: ARGGGHH!! You promise yourself to get a new flight computer with position hold capability.
How do multicopters with smart controllers hold their position? They use a technique called Proportional – Integral – Derivative (PID) control. It’s a concept found in control systems of just about everything imaginable. To use PID your copter needs sensors that measure the current position and movement.
The typical sensors used for position control are a GPS receiver and an Inertial
Management Measurement Unit (IMU) made up of an accelerometer, a gyroscope, and possibly a magnetometer (compass). Altitude control would require a barometer or some other means of measuring height above ground. Using sensor fusion techniques to combine the raw data, a computer can determine the position, movement, and altitude of the multicopter. But calculating corrections that will be just right, without over or undershooting the goal, is where PID comes into play. Continue reading “Flying With Proportional – Integral – Derivative Control”
For their Mechanical Engineering senior design project at San Jose State University, [Tyler Kroymann] and [Robert Dee] designed and built a racing motion simulator. Which is slightly out of the budget of most hackers, so before they went full-scale, a more affordable Arduino powered Stewart platform proof of concept was built. Stewart platforms typically use six electric or hydraulic linear actuators to provide motion in six degrees of freedom (6 DOF), surge (X), sway (Y), heave (Z), pitch, roll, and yaw. With a simple software translation matrix, to account for the angular displacement of the servo arm, you can transform the needed linear motions into PWM signals for standard hobby servos.
The 6 DOF platform, with the addition of a resistive touch screen, also doubled as a side project for their mechatronic control systems class. However, in this configuration the platform was constrained to just pitch and roll. The Arduino reads the resistive touch screen and registers the ball bearing’s location. Then a PID compares this to the target location generating an error vector. The error vector is used to find an inverse kinematic solution which causes the actuators to move the ball towards the target location. This whole process is repeated 50 times a second. The target location can be a pre-programmed or controlled using the analog stick on a Wii nunchuck.
Watch the ball bearing seek the target location after the break.
Thanks to [Toby] for sending in this tip.
Continue reading “Stewart Platform Ball Bearing Balancer”