PDA

View Full Version : Falling-Up Robot Project



EscapeVelocityLab
02-13-2017, 02:40 AM
I'm developing the Falling-Up Robot, a very tall balancing inverted pendulum bot, using the Teensy 3.6 microcontroller with Arduino IDE 1.6.12. I want to practice feedback control systems with this robot. I want to keep it from falling over while roaming autonomously and interacting with its environment. I'm building this in stages. So far, the brain and chassis is in place, and the basic balancing control system is in place. Here's the first video.


https://youtu.be/Xmt67HTI2Hg

I used stepper motors to take advantage of high torque at low RPM and zero backlash (or zero freeplay). Dealing with the high mechanical vibration was an issue, but was solved with analog filters in the IMU and an Extended Kalman Filter in software.

More details here:
https://forum.pjrc.com/threads/41442-Falling-Up-Robot-Project-for-Teensy-3-6

jwatte
02-13-2017, 11:22 AM
That's quite the tall robot! I like it.

When it comes to "zero" backlash: Did you compare direct-drive brushless DC motors with stepper motors?

EscapeVelocityLab
02-14-2017, 01:12 AM
When it comes to "zero" backlash: Did you compare direct-drive brushless DC motors with stepper motors?

Direct drive motors would do the job too, but are pricey. The power savings is attractive. Steppers are power hogs but about the same price as a good hobby gear motor. I did get quotes on near-zero backlash gear motors, but were too expensive ($200+).

jwatte
02-14-2017, 01:25 PM
Got it! As long as you use tethered power, or have batteries to spare, steppers are a fine solution.
If you want this to rove autonomously for a longer while, then the cost of extra batteries versus the cost of motors becomes an equation to solve.

Good luck with the project! I would love to see another post when you get more bits going.

tician
02-14-2017, 04:06 PM
Eh? I'm rather curious as to how steppers are classified as power hogs, but BLDCs are not.

Stepper motors and BLDCs are both permanent magnet synchronous motors. There are many many configurations including 2-phase, 4-phase, 5-phase, etc. stepper motors, and 3-phase, 2-phase, etc. BLDCs. The only real differences between a stepper motor and a BLDC are determined by the intended use via: 1) the turn count of the windings and 2) the apparent number of poles on the rotor and stator. Steppers are almost universally wound with high turn counts and many poles for lower speed and very high torque at low current - which greatly limits maximum power in a given size/package - while BLDCs tend to be wound with low turn counts and fewer poles for high speed and decent torque at very high current for moar powah.





Also kinda curious why the Clockwork Orange rendition of Henry Purcell's "Funeral March for Queen Mary" was used in that video.

jwatte
02-14-2017, 09:55 PM
I'm rather curious as to how steppers are classified as power hogs, but BLDCs are not.

I think it has more to do with what kind of packaging is easily available.
Steppers almost universally come in large, clunky steel casings, which are perfect for rigid floor-mounted machines, but bad for mobility.
BLDCs have been optimized (especially by the RC and Quadcopter folks) to be much more light-weight for the power.
Thus, lower inertia, faster response, and less load to lug around.

EscapeVelocityLab
02-15-2017, 02:42 AM
Eh? I'm rather curious as to how steppers are classified as power hogs, but BLDCs are not.

I have not used brushless DC motors for these balancing robots. On the other hand, I've used standard brushed gear motors along with steppers. Most of the time, the robot is just standing still making small corrections. The DC motor hardly consumes power, but the backlash and low torque at low RPM makes the stand-still response not very steady. In contrast, the stepper motor pair consumes about 0.6 to 0.7 amps even at zero RPM according to my desktop power supply. But the torque is very high, which is highly desirable. Along with zero backlash, I get very stable stand-still response. I think the best solution would be a direct drive motor as @jwatte suggested, but that route is pricey. For now, recharging the Lipo's for the steppers is a workable solution.


Also kinda curious why the Clockwork Orange rendition of Henry Purcell's "Funeral March for Queen Mary" was used in that video.
It has a thought-provoking quality to it, plus the electronic instrumentation goes hand-in-hand with robotics.

tician
02-15-2017, 01:50 PM
I think it has more to do with what kind of packaging is easily available.
Steppers almost universally come in large, clunky steel casings, which are perfect for rigid floor-mounted machines, but bad for mobility.
BLDCs have been optimized (especially by the RC and Quadcopter folks) to be much more light-weight for the power.
Thus, lower inertia, faster response, and less load to lug around.
But power and torque are not the same thing; torque is merely one component of power along with speed. Traction motors require much more torque than needed to swing any propeller. You can get ridiculous power 'ratings' from lightweight R/C plane and multi-rotor motors because they run at incredibly high speed and low torque, which is inadequate for direct-drive traction motors in anything heavier than a mouse-sized speed-run maze-solving bot. Even the giant melon class (>50mm stator; ~0.8kg) out-runners with Kv in the <800 RPM/V range require some amount of gearing in traction applications with a vehicle more than a few times the weight of the motor unless you plan on it constantly pulling >20A per phase. Steppers tend to have Kv in the <50RPM/V range, so they always provide much more torque for a given current with lower overall power ratings (even rather large NEMA34 steppers are almost always rated below 10A continuous).


Compare and contrast:


Probotix HT23-180-8 stepper wired in bipolar parallel (~$40)

Current(max): ~2.5[A]/phase
Torque at 2.5A/phase: ~13.35[kg-cm]





Turnigy Aerostar 6374-149 outrunner (~$80)

Current(max): ~70[A]/phase
Torque at 2.5A/phase: ~3.27[kg-cm]




Again, steppers and BLDC are both permanent magnet synchronous motors but with designs suited for different uses. Steppers are suited for lower speed, direct drive traction/position control applications because of their high torque and high apparent pole count (one full electronic commutation cycle results in a very small mechanical rotation of the rotor). Hobby BLDC without gearing are suited for high speed, low torque speed control applications like propellers, turbines, and electric chainsaws (one full electronic commutation cycle results in a rather large mechanical rotation of the rotor). If you add sufficient gearing, BLDCs work wonderfully in traction applications and high-torque power tools but that gearing is absolutely required unless you want to deal with very high continuous currents. There are low backlash gear and belt systems, but they can get a bit expensive unless you have access to a machine shop to make your own.

jwatte
02-15-2017, 02:40 PM
There are brushless gimbal outrunners that optimize more for torque and less for high speed.
As you say, "melon class": https://hobbyking.com/en_us/turnigy-9014-105kv-brushless-multi-rotor-motor-bldc.html
Cheaper options: https://hobbyking.com/en_us/turnigy-hd-3506-brushless-gimbal-motor-bldc.html etc.
Aaaanyway. It's fun to see such a big balancing robot with steppers!

tician
02-15-2017, 03:28 PM
Indeed, but they offer the same performance (angular resolution of maybe 7.5 degrees per step) as cheap pancake stepper motors while requiring 3-phase motor controllers that need to be programmed for position control instead of speed control. Very few 3-phase hobby controllers use vector control (field oriented control) or anything similar to micro-stepping which would be necessary for such a low resolution motor to direct drive a wheel on an inverted pendulum bot. And that smaller, cheaper one would never have enough power to control something as large as Falling-Up (12V max with 13Ohm phase resistance).

NEMA sized hybrid stepper motors may be a bit heavier and lower power, but they are inexpensive, accurate, and can use small, inexpensive micro-stepping drivers for accurate position control without any gearing. The extra weight of the stepper motor is coaxial with the wheel, so has very little effect on the pendulum's moment of inertia and ultimate payload. If you absolutely do not want any gearing, you are pretty much stuck with stepper motors. There are low backlash gear boxes and/or roller chain / timing belt setups that would enable hobby BLDC motors to provide similar performance to a heavier stepper motor using direct drive, but they can be expensive and/or bulky.

r3n33
02-15-2017, 03:35 PM
Sweet project! I love how massively tall this robot stands. Might be pretty crazy to scale it wider and make something like wall dividers that you or two people could push around.

EscapeVelocityLab
02-16-2017, 02:36 AM
NEMA sized hybrid stepper motors may be a bit heavier and lower power, but they are inexpensive, accurate, and can use small, inexpensive micro-stepping drivers for accurate position control without any gearing. The extra weight of the stepper motor is coaxial with the wheel, so has very little effect on the pendulum's moment of inertia and ultimate payload. If you absolutely do not want any gearing, you are pretty much stuck with stepper motors. There are low backlash gear boxes and/or roller chain / timing belt setups that would enable hobby BLDC motors to provide similar performance to a heavier stepper motor using direct drive, but they can be expensive and/or bulky.

Very low backlash gearmotors are available, but are very expensive, upwards of $200 USD depending on desired specs. And the torque at low speed is still low compared to steppers.

The NEMA23 3A stepper motors used on the Falling-Up Robot have a max holding torque of 270 oz-inches without a gearbox. So there's no issue with wearing out gears. The torque combined with zero backlash results in very nice stand-still performance. For high rate corrections, the steppers are very responsive:

https://forum.pjrc.com/threads/41442-Falling-Up-Robot-Project-for-Teensy-3-6?p=132162&viewfull=1#post132162

For those who attempt stepper motors, driving them is not as straightforward as a DC motor with PWM control. Also, steppers induce more mechanical vibration that DC gearmotors. Microstepping is necessary and I recommend stepper drivers with sinusoidal current control. Filtering the accel & gyro measurements is also a must.

EscapeVelocityLab
02-17-2017, 02:20 AM
I love how massively tall this robot stands. Might be pretty crazy to scale it wider and make something like wall dividers that you or two people could push around.

I didn't have the heart to cut the 6 foot long aluminum extrusions. It turned out that It makes for a very interactive robot because it stands with you. And the main microcontroller board is at desk level, so it's convenient to work with, without taking precious space from my desk.
Extrusions are great for making very light and stiff robot frames. It's easy to add parts without having to disassemble your project. They're like legos for adults.

jwatte
02-17-2017, 11:37 AM
It makes for a very interactive robot because it stands with you

That's a great observation!

EscapeVelocityLab
04-03-2017, 08:51 PM
Okay, I got the XBEE communication working with the Teensy 3.6 mcu, and able to send motion commands to the Falling-Up Robot. Able to yaw and translate the 6-foot robot while maintaining tilt stability. It's no longer tethered to the USB port and the power supply unit. See latest video below. Recommend headphones.

https://www.youtube.com/watch?v=QHb9eYAyGJc

jwatte
04-03-2017, 09:06 PM
Nice wood floors. And kid play capsule :-)

That bot has to be over 2 meters tall now? It seems to reach almost to the ceiling.

EscapeVelocityLab
04-17-2017, 01:05 AM
Nice wood floors. And kid play capsule :-)

That bot has to be over 2 meters tall now? It seems to reach almost to the ceiling.

It's two meters tall. Didn't have the heart to cut the aluminum extrusions. I figured, why do bots need to be toy-sized, why not people sized?

jwatte
04-17-2017, 12:06 PM
why do bots need to be toy-sized, why not people sized

The first time it knocks a vase off a mantlepiece, you'll have your answer :-)

I kind-of agree, though. While I'm building a 2-foot walking robot, I dream of building a 4-meter walking robot ...

Brooks
04-17-2017, 12:27 PM
While I'm building a 2-foot walking robot, I dream of building a 4-meter walking robot ...

:wink:

EscapeVelocityLab
04-25-2017, 02:42 AM
A bit stuck with Integral Windup in the PID control system. It's especially a problem if the robot is lifted or gets stuck in a corner. The integral error blows up. I want to implement the Back-Calculation method for alleviating Windup, but I need more information on this. Any recommendations on a good Feedback Control Systems book for robotics?

jwatte
04-25-2017, 11:40 AM
I don't know of a good control systems book, but I've found that the "leaky integrator" works great for avoiding too much wind-up.
A second option, which is not as good, is to limit the absolute maximum of the wind-up accumulator. I've found that you typically need to put that limit quite high.

Leaky integrator is simple: Each step, when you add the error to the I accumulator, actually do a calculation like:


accumulatedError = accumulatedError * 0.95 + newError;

The constant 0.95 ends up being a time constant value for a low-pass filter, if you want to be all analytical about it.