collapse

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

BaldwinK

  • Member
  • ****
  • B
  • Posts: 20
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 342 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: 20
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

Discord anyone? by tinhead
[October 20, 2019, 05:35:59 AM]


The unnamed (yet) quatruped spider project by tinhead
[October 20, 2019, 05:28:14 AM]


2D Side Scroller Cyberpunk themed by Killer Angel
[October 17, 2019, 09:44:06 AM]


MKS Gen L 1.0 by lllloydo
[October 06, 2019, 01:24:26 AM]


MKS Gen L 6 axis robot arm by Musa
[October 02, 2019, 03:07:08 PM]


Saturn pics anyone by viswesh
[September 28, 2019, 11:55:53 PM]


Hello Robot Rebels by Passixs
[September 15, 2019, 10:19:10 PM]


All Ya'll. And me. by James
[September 09, 2019, 10:35:19 PM]


MSD - Motorized solder dispenser (Work in progress) by James
[September 09, 2019, 08:45:29 PM]


It may be dangerous to work in the virtual realm by ZeroMax
[September 05, 2019, 05:55:16 PM]


"1984 Nixie Time" by Gareth
[August 25, 2019, 12:21:58 PM]


Just wanted to say Hi. by ErwinCanto
[August 18, 2019, 10:11:28 PM]


SDR (Software Defined Radio) by Gareth
[August 14, 2019, 01:12:21 PM]


PLX-DAQ by AmandaG
[August 06, 2019, 01:58:42 PM]


DIY Yellow Servo by AmandaG
[August 06, 2019, 01:08:09 PM]

* Recent Posts

Discord anyone? by tinhead
[October 20, 2019, 05:35:59 AM]


The unnamed (yet) quatruped spider project by tinhead
[October 20, 2019, 05:28:14 AM]


Re: 2D Side Scroller Cyberpunk themed by Killer Angel
[October 17, 2019, 09:44:06 AM]


Re: 2D Side Scroller Cyberpunk themed by Killer Angel
[October 17, 2019, 08:16:11 AM]


Re: 2D Side Scroller Cyberpunk themed by Killer Angel
[October 14, 2019, 08:52:20 AM]


2D Side Scroller Cyberpunk themed by Killer Angel
[October 14, 2019, 03:32:40 AM]


Re: MKS Gen L 1.0 by lllloydo
[October 06, 2019, 01:24:26 AM]


MKS Gen L 6 axis robot arm by Musa
[October 02, 2019, 03:07:08 PM]


Re: Saturn pics anyone by viswesh
[September 28, 2019, 11:55:53 PM]


Re: Saturn pics anyone by James
[September 17, 2019, 08:09:06 AM]


Re: Saturn pics anyone by Passixs
[September 15, 2019, 10:23:38 PM]


Re: Hello Robot Rebels by Passixs
[September 15, 2019, 10:19:10 PM]


Re: All Ya'll. And me. by James
[September 09, 2019, 10:35:19 PM]


Re: MSD - Motorized solder dispenser (Work in progress) by James
[September 09, 2019, 08:45:29 PM]


Re: MSD - Motorized solder dispenser (Work in progress) by arclite7
[September 08, 2019, 04:17:21 AM]