I had just finished my undergraduate degree and really enjoyed the control theory courses. I fully understood how fundamental they were to creating fluid and organic motion for robots, but lacked a true physical grasp of the concept. Sure, MATLAB simulation is primarily where all the magic lies but as a mechanical person, I need to see my math turned to reality.
Back in September, I had discovered a FOC project developed for Arduino. The BLDC control and hardware that I was familiar with in research, ODrive and T-Motor, was expensive for a beginner hobbyist. An alternative to that would be SimpleFOC. All you needed was a BLDC motor, a custom controller board which the project documented, and an Arduino.
The controller was pretty easy to obtain, just download the schematic file and order from JLCPCB as I did. Or opt for buying bulk packages from Alibaba, which I guess is the nature of open sourced hardware.
The BLDC motor I just bought from Amazon. Specifically, a gimbal motor with 260kv, lowest I could find at a cheap price. When selecting BLDC’s for direct drive control and not drone flight, the lower KV the better since high KV values translates to higher RPM per voltage and reduced torque.

Outrunner motors are ideal for high torque applications such as direct drive robotic limbs, but are quite expensive (at least for someone who did not have a job yet).

I wired everything up and fired up a quick test that gave a control signal for the motor to follow, a simple square wave. There, I could mess with the PID gain values until it matched the desired behavior I wanted, recalling things I learned in controls such as overshooting and settling time.
Now this was what should be demonstrated to students. PID and control theory clicked in my head and I knew I had to make a project about it right away.
A common project students make to teach control theory is inverted pendulums. But since I didn’t have the space or money to build a long linear track, I instead chose to make a Furata Pendulum. The model swivels around to swing a rod, in the same fashion of a linear rail but rotationally instead.
I got a cheap magnetic encoder, the AS5046, and assembled a tiny model to see if it was possible. I was following the project documentation by David Gonzalez making a Furata Pendulum desk toy with SimpleFOC.
Ok it swings, but not stable enough. It jitters around so likely tuning issues. I also had issues with the cables as there was no slip ring to stop it from wrapping itself around.
That year in October I went to MakersfaireMare Island where the SimpleFOC developers were there. I got to see their Furata Pendulum working and the robot dog, which gave me hope that I could continue on with my project.
It was time for version 2. Newly printer body to fit a gear train. Beautifully sanded PLA, almost like it was molded.


Free puppy photo. My parents just got her. God she’s so cuteee

I swapped out the old encoder for a higher resolution and more reliable sensor, a AS5048 encoder. Online posters aren’t a big fan of the AS5046 and neither was I. This will be used for the shaft encoding since this is the most critical spot for high resolution measurements.
I also experimented with making a digital readout and motion graph so I can visible see the signal without relying on serial monitor.
This entire thing ran off a RP2040 and SimpleFOC mini board.
So everything closed up, how did it perform? Well…it certainly didn’t work yet, same jittery motion. There’s no on-the-fly PID tuning after uploading the code so the process of perfecting it by hand would be a long process.
There was one major conclusion I came to however. It could be possible that the hardware is too underpowered. Once the pendulum has reached a critical angle, the motor is unable to kick the arm the opposite direction fast enough, which could be either a combination of the small gimbal motor or RP2040’s clock speed at 133Mhz.
Regardless, a complete new project will need to be made someday. The heat from the gimbal motors driving full power resulted in the PLA slowly deforming and the project fell apart after. I would also like to implement a way to tune the PID during runtime, which might be a consideration for either knobs or network connectivity.

Leave a comment