SimpleFOC Demystifies Precision BLDC Motor Control

Brushless DC (BLDC) motors are standard fare in low-precision, speedy RC applications. The control schemes needed to run them slowly or precisely go deep into motor theory and might put these motors out of reach for your next homebrew robot project. [Antun Skuric] and crew aim to change just that. They’ve taken the field-oriented control algorithm and encapsulated it into a compact Arduino library, added a host of examples, and minted a stackable BLDC motor control shield to boot. The sum of their efforts is captured into the SimpleFOC Project in the aim of bringing precision BLDC control to a wide community of new hackers.

Field-Oriented Control is a BLDC motor control scheme that involves using a microprocessor to control the stator winding current in such a way that it always applies torque to the rotor. Doing so requires that your processor measure both motor current (think: shunt resistor) and rotor position (think: encoder). Implementing the algorithm, though, can get a bit tricky since it touches bits of linear algebra, motor physics, and control theory. But that’s the magic behind SimpleFOC. With the library at your fingertips, you don’t have to! And with that, the hardest part of brushless motor control has been made simpler with a solution that’s almost plug-in-and-play.

SimpleFOC has been implemented to extend to a variety of possible implementations. While you can certainly design your own control board, you can also start with the SimpleFOC motor shield for a single motor pulling up to 5 A of current. From there, you’ve got a pretty wide range of micros to choose from as the library has been extended to work on the Arduino, Teensy, STM32, and a few other microcontroller families. For implementation details, theory, and setup, there’s a healthy set of documentation to reference. And if you’re looking to share your project or ask questions, you can pop into the community forum for some high-fives and tips. Best of all, the source code has been offered for your enjoyment under a generous MIT License.

While the project kicked off last year, it’s undergoing continuous improvements including added support for current sensing and torque control in addition to position control. With a healthy community emerging around the project, we’ll keep our eyes peeled for more projects that build off of this fantastic reference design.

If BLDC motor control has your interest piqued, have a look through our archive for other BLDC motor control projects, including motor/controller hybrids, anti-cogging control schemes, and other low-speed position controllers. And if you’re up for a real challenge, why not 3D print the motor too?

Continue reading “SimpleFOC Demystifies Precision BLDC Motor Control”

Litter Buggies Haul Trash Off The Beach

There is a depressing amount of trash in our oceans, and a lot of it is washes up on beaches. [Glenn Morris] has turned collecting all this trash into a favourite pastime, using a series of custom radio-controlled Litter Buggies to haul the load.

The most basic versions of these buggies are off the shelf RC rock crawlers, usually a Traxxas TRX-4, with a basket mounted in place of the body. However, [Glenn] has developed the buggies far beyond that, making extensive use of 3D printing to create purpose-built trash haulers. He has created several frame systems to hold removable baskets, buckets, lights and tools. Most of the buggies use lithium power tool batteries to allow quick swapping, and the electric motors, ESCs and gearing is selected for low speed and high torque. Since the buggies spend a lot of time exposed to salt water, almost all the steel hardware on the chassis are replaced with stainless steel. To allow for one handed control, [Glenn] attached 3D printed levers to the steering knobs of the standard RC controllers, allowing steering to be done with his thumb.

We really like what [Glenn] has been doing with these buggies, and think they might be a good platforms for adding some autonomous capabilities. Add a smartphone for target following or obstacle avoidance, or some solar panels and a GPS autopilot system.

Continue reading “Litter Buggies Haul Trash Off The Beach”

A Robot To Top Up Your Tesla

The convenience of just plugging in your car in the evening and not going into a gas station is great as long as you remember to do the plugging. You really don’t want to get caught with an empty battery while you’re in a rush. [Pat Larson]’s Tesla plugging robot might be a handy insurance policy if you count forgetfulness among your weaknesses.

The robot consists of a standard Tesla charging plug attached to a 2-axis robotic arm mounted on [Pat]’s garage wall. Everything is controlled by a Python script running on Raspberry Pi 4. After taking a picture with a camera module, it uses a Tensor Flow Lite machine learning model to determine the position of a reflector on the charging port cover. The platform moves back and forth to align with the charging port, after which it opens the charging port using the Tesla API. It then extends the arm towards the charging port, using ultrasonic proximity sensors for distance control, and again uses the camera module and Tensor Flow to look for the illuminated Tesla logo adjacent to the charging port. The charge plug is flipped out using a large servo, and after some final position adjustment, it takes the plunge. While robot won’t be winning any interior design contests, it does the job well, and adds a bit of convenience and peace of mind.

Other Tesla hacks we’ve seen include building a working Model S for $6500, turning an old Honda into a speed demon using Tesla parts, and a Casio F-91W that can unlock your Tesla.

Robotic Ball-Bouncing Platform Learns New Tricks

[T-Kuhn]’s Octo-Bouncer platform has learned some new tricks since we saw it last. If you haven’t seen it before, this device uses computer vision from a camera mounted underneath its thick, clear acrylic platform to track a ball in 3D space, and make the necessary (and minute) adjustments needed to control the ball’s movements with a robotic platform in real time.

We loved the Octo-Bouncer’s mesmerizing action when we saw it last, and it’s only gotten better. Not only is there a whole new custom ball detection algorithm that [T-Kuhn] explains in detail, there are also now visualizations of both the ball’s position as well as the plate movements. There’s still one small mystery, however. Every now and again, [T-Kuhn] says that the ball will bounce in an unexpected direction. It doesn’t seem to be a bug related to the platform itself, but [T-Kuhn] has a suspicion. Since contact between the ball and platform is where all the control comes from, and the ball and platform touch only very little during a bounce, it’s possible that bits of dust (or perhaps even tiny imperfections on the ball’s surface itself) might be to blame. Regardless, it doesn’t detract from the device’s mesmerizing performance.

Design files and source code are available on the project’s GitHub repository for those who’d like a closer look. It’s pretty trippy watching the demonstration video because there is so much going on at once; you can check it out just below the page break.

Continue reading “Robotic Ball-Bouncing Platform Learns New Tricks”

Ball CVT Drives Robot From A Constant Speed Motor

[James Bruton] is experimenting is a series of interesting mechanical mechanisms, the latest being a CVT transmission system which uses a tilting sphere to get a variable speed output from a constant speed input. Video after the break.

In [James]’ proof of concept RC vehicle, a single powered disc is mounted on top, at 90 degree to the wheels. A rotating sphere makes contact with both the driven disc and the wheel. When the rotation axis of the sphere is at 45° between the disc and the wheel, it provides a one 1:1 transmission ratio. As the axis is tilted, the contact points on the sphere shift, changing the relative circumference at the contact points, and therefore changing the transmission ratio. It can also reverse by tilting the sphere in the opposite direction, and disconnected from the output wheel by aligning it with the hole in the bottom of the sphere. [James]’ simple two-wheel RC car concept quite well, driving around his kitchen with the transmission spheres being tilted by servos.

Thanks to the response time, CVT gearboxes are generally not needed for electric motors, but on internal combustion engines that which run best within a certain RPM range they can be very useful. One possible weak point of a design like this is it’s dependence on friction to transfer torque, which makes it vulnerable to wear and slipping.

This build is a spin-off of his spherical omni-wheels and the robot chassis he developed around them. For another interesting robot mechanism, check out is gyroscope balancing system. Continue reading “Ball CVT Drives Robot From A Constant Speed Motor”

3D Printed Mecanum Wheels For Hoverboard Motors

At this point, somebody taking the motors out of a cheap “hoverboard” and using them to power a scooter or remote controlled vehicle isn’t exactly a new idea. But in the case of the FPV rover [Proto G] has been working on, his choice of motors is only part of the story. The real interesting bit is the 3D printed omnidirectional Mecanum wheels he’s designed to fit the motors, which he thinks could have far reaching applications beyond his own project.

Now, that isn’t to say that the rover itself isn’t impressive. All of the laser cutting and sheet metal bending was done personally by [Proto G], and we love the elevated GoPro “turret” in the front that lets him look around while remotely driving the vehicle. Powered by a pair of Makita cordless tool batteries and utilizing hobby-grade RC parts, the rover looks like it would be a fantastic robotic platform to base further development on.

The Mecanum wheels themselves are two pieces, and make use of rollers pulled from far smaller commercially available wheels. This is perhaps not the most cost effective approach, but compared to the alternative of trying to print all the rollers, we see the advantage of using something off-the-shelf. If you’re not sure how to make these weird wheels work for you, [Proto G] has also released a video explaining how he mixes the RC channels to get the desired omnidirectional movement from the vehicle.

If you’re content with more traditional wheeled locomotion, we’ve previously seen how quickly a couple of second-hand hoverboards can be turned into a impressively powerful mobile platform for whatever diabolical plans you may have.

Continue reading “3D Printed Mecanum Wheels For Hoverboard Motors”

Active Ball Joint Uses Spherical Gear

A common CAD operation is to take a 2D shape and extrude it into a 3D shape. But what happens if you take a gear and replicate it along a sphere and then rotate it and do it again? As you can see in the video below, you wind up with a porcupine-like ball that you can transfer power to at nearly any angle. There’s a paper describing this spherical gear as part of an active ball joint mechanism and even if you aren’t mechanically inclined, it is something to see.

The spherical gear — technically a cross spherical gear — is made from PEEK and doesn’t look like it would be that difficult to fabricate. There’s also a simpler version known as a monopole gear in the drive system that provides three degrees of freedom.

Continue reading “Active Ball Joint Uses Spherical Gear”