collapse

Welcome!



Welcome to Robot Rebels, an online robot maker community.

Register today to post your projects, ask questions, share knowledge and meet like-minded people from around the world.


The RobotRebel.org Community

Author Topic: Four Motor Leg Module  (Read 2567 times)

BaldwinK

  • Member
  • ****
  • B
  • Posts: 18
Four Motor Leg Module
« on: December 28, 2016, 10:51:10 AM »
This ongoing exploration into alternative servo designs follows on from the Quaternion Mimic.  That showed one MPU 6050 mounted horizontally could control three motors using the DMP output.

Test Rig C has four motors controlled by two MPU 6050 breakout boards mounted vertically to the upper and lower limbs of a simple robot leg.  Fusion code is required to use raw accelerometer and gyro outputs because the x, y and z axes have to be changed.

Test Rig C.jpg
*Test Rig C.jpg (41.04 kB . 431x768 - viewed 242 times)

IMU Issues

Changing the orientation of the GY-521breakout board highlights the asymmetry of the 6050 chip.  It can be used for deriving pitch and roll but the upper quadrants show a sign reversal that will defeat the atan2 function.  Bespoke code is required to sort out the value and sign of the acceleration vector components.

I did try out the GY-45 breakout board carrying the Freescale MMA8451Q chip.  This is very symmetrical and very easy to use as it provides values through all the quadrants.  For a simple tilt detector (eg switching portrait to landscape mode in a tablet or smartphone) it works fine.  Rattle it around in this application and the gravity vector is swamped by other movements so it is useless.

So reluctantly back to the 6050 for the gyro functions (which are pretty solid).  If only there was a readily available breakout board with both chips!!  Swinging the board around on the arm of a 55g servo makes it easy to see which are the relevant gyro outputs for the changed axes.  Fusion code based on Starlino’s Guide mixes the ‘static’ accelerometer positions with the moving gyro rotations to arrive at a good guess at where things really are.

Continually troubled by random locking up of the 6050, I studied that problem in greater detail.  The findings are in the ‘sick MPU’ tutorial.  Once the failure mode is detected as a bit stream pattern, the chip is power cycled to reset it.  Unless using the chip in an electrically noisy environment you will probably never notice anything.

Geared Motor Issues

At first glance, there seem to be hundreds of cheap motor/gearboxes available on eBay.  It turns out there are many variations on very few themes.  The yellow motor design is a masterpiece of plastics engineering and only costs around a pound.  The armature magnetic detent is reflected at the output shaft as a 6 degree ‘cogging’.  Graphing the PID output to MPU-reported position shows a ramp to staircase waveform. 

The lower limb is not under load so can shake around and the ‘cogging’ will be noticeable.  There is a PVA foam friction disc to help.  Previously I have used a coil spring to keep the joints biased but this time it is done with a bit of code to hold a minimum motor current.

The demo shows the leg kicking a ball and attempting the yoga ‘tree pose’.  The femur swivel should take place at the hip but in the test rig it takes place at the knee so it doesn’t look quite right.  The swivel angle is measured as the lower limb roll but this can only be used as a PID feedback in certain positions.  The motor is turned off when the leg geometry is inconclusive.


Conclusions

Yaw was previously discounted as not useful in this application.  Similarly, the derived femur swivel used here is not a rugged solution.  The longer cable path to the lower limb IMU is screened but that chip is still very susceptible to continuing noise at re-start.  It can be detected and the motors stopped but future designs may be a hybrid of techniques.

Powering each MPU from a Nano output pin has resulted in a higher pin count than originally expected and that will curtail the features of the next module.  It may be some time before I can see how a quadruped with self-balancing legs would perform in practice.

DWRobotics

  • Member
  • ****
  • D
  • Posts: 1
Re: Four Motor Leg Module
« Reply #1 on: November 04, 2018, 05:15:49 PM »
Realise this is an old project but just found this one while browsing. As you may know I am obsessed with the BO- series of plastic motors due to their strength and relative cost and have been working on many ways to make them contrallable.
   I love the complexity of that little leg and wonder if you did much more with that project afterwards?

 The fact you able to make complex controlled movements without having to rely on servos to do all the cool stuff is really cool. At the very least you have a pretty kickass animatronic. Actually looks very similar to my very first robot leg project where I was trying to use printed paper optical encoder to controll the angle of the legs. Was very messy! :

BaldwinK

  • Member
  • ****
  • B
  • Posts: 18
Re: Four Motor Leg Module
« Reply #2 on: January 09, 2019, 04:55:14 PM »
Sorry I missed your message hence being late in replying

I have done a lot of work with the MPU and found various funny issues. Pitch and roll are easy to work out against gravity but yaw is in quite the wrong plane.  The MPU-6050 tries to guess the yaw from the pitch and roll so can mess up when not used in a drone or boat. In the tutorials I tried a Quarternion Mimic and you can see the motion like water going down a plug hole when it messes up. The real problem is that these sensors only work in a hemisphere and for general leg control there can be a sudden reversal of vectors.

Again in the tutorials I showed a DIY Yellow Servo using a cermet pot. For me the plastic gears could not deliver enough torque but could be usable for a smaller project.  Yes, your legs do look very similar - very smart.

I have been stripping MG996R servos and using the 260:1 metal gearbox with a Nano in control of motor positioning. Much stronger but a real hassle to get legs walking without stumbling.


 

* Search


* Recent Topics

Just scary to me... by VirgilReevy
[Today at 05:04:43 AM]


Vous ne savez pas comment m'aider? by VirgilReevy
[Today at 05:03:28 AM]


Just a short intro... by MEgg
[March 18, 2019, 05:49:28 PM]


MKS GEN L Servo Issue by cmptrguy1
[March 14, 2019, 01:18:28 AM]


Yes I am alive! by jinx
[March 10, 2019, 04:38:53 AM]


CZ-1 2.0: problems, calibration and printing, part2 by MEgg
[February 26, 2019, 03:35:15 PM]


Hi, Mushroom glue here. by nschreiber0813
[February 25, 2019, 02:09:13 PM]


Arduino IK by BaldwinK
[February 25, 2019, 05:54:44 AM]


Raspberry Pi / Python eBook - free for the next 11 hours! by MEgg
[February 24, 2019, 09:49:43 AM]


MKS Gen L 1.0 by MasterDomino
[February 24, 2019, 06:34:24 AM]


Fun Fact by Impala
[February 13, 2019, 11:05:01 PM]


Animabot Rev3 - Advanced Hexapod Robot by Smashley
[February 05, 2019, 03:41:50 PM]


Finally tried out a Chinese PCB service by Bajdi
[February 02, 2019, 08:40:49 AM]


PLX-DAQ by BaldwinK
[January 16, 2019, 06:44:18 AM]


Four Motor Leg Module by BaldwinK
[January 09, 2019, 04:55:14 PM]

* Recent Posts

Re: Just scary to me... by VirgilReevy
[Today at 05:04:43 AM]


Vous ne savez pas comment m'aider? by VirgilReevy
[Today at 05:03:28 AM]


Re: Just a short intro... by MEgg
[March 18, 2019, 05:49:28 PM]


Re: Just a short intro... by Killer Angel
[March 18, 2019, 06:55:35 AM]


Re: Just a short intro... by jinx
[March 16, 2019, 04:36:13 AM]


Re: Just a short intro... by Bajdi
[March 15, 2019, 04:22:09 PM]


Just a short intro... by cybersamurai
[March 15, 2019, 04:19:22 PM]


Re: MKS GEN L Servo Issue by cmptrguy1
[March 14, 2019, 01:18:28 AM]


Re: Yes I am alive! by jinx
[March 10, 2019, 04:38:53 AM]


Re: Yes I am alive! by nschreiber0813
[March 09, 2019, 03:59:04 PM]


Re: CZ-1 2.0: problems, calibration and printing, part2 by MEgg
[February 26, 2019, 03:35:15 PM]


Re: Hi, Mushroom glue here. by nschreiber0813
[February 25, 2019, 02:09:13 PM]


Yes I am alive! by nschreiber0813
[February 25, 2019, 02:08:12 PM]


Arduino IK by BaldwinK
[February 25, 2019, 05:54:44 AM]


Re: Raspberry Pi / Python eBook - free for the next 11 hours! by MEgg
[February 24, 2019, 09:49:43 AM]