Shop OBEX P1 Docs P2 Docs Learn Events
Using a 3-axis Gyro (L3G4200D) To Rotate a Servo? — Parallax Forums

Using a 3-axis Gyro (L3G4200D) To Rotate a Servo?

dannyvdannyv Posts: 2
edited 2011-11-05 02:40 in General Discussion
I am utilizing the following components:

*Propeller Proto Board USB
*Gyroscope Module 3-Axis L3G4200D

I was curious if anyone has ever used this configuration to move a standard hitec servo?

My expertise is with control's design for the industrial packaging industry, so I'm new to this level of electronics.

Any help would be greatly appreciated! Thank you!

Comments

  • PublisonPublison Posts: 12,366
    edited 2011-11-03 14:08
    dannyv wrote: »
    I am utilizing the following components:

    *Propeller Proto Board USB
    *Gyroscope Module 3-Axis L3G4200D

    I was curious if anyone has ever used this configuration to move a standard hitec servo?

    My expertise is with control's design for the industrial packaging industry, so I'm new to this level of electronics.

    Any help would be greatly appreciated! Thank you!

    Danny,

    Welcome to the forums!

    This item just became available about 4-5 days ago. I don't think anyone has gotten to do any programming yet. I just got mine yesterday and ran the demo, now trying to program the temp out from the chip.

    As far as move a servo, are you trying to use it as an IMU? Or what is your purpose?

    Jim
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-11-03 15:55
    Are you wanting to use the gyro as part of a control system for the servo, or are you using the gyro to determine if the servo has moved to where you actually think it is? If the latter, there are much easier ways of doing it, such as going inside the servo and tapping off the potentiometer, or adding an external pot that indicates the position of the servo.

    If you're looking for an integrated system for servo control using a gyro, there are rate gyros specifically designed for servos (Hitec, Futaba, etc. make these), and they provide servo-compatible signals. You can certainly use a Prop and this gyro module, but you'll be doing all the math yourself.

    Maybe provide a little more detail of what you're going after.

    -- Gordon
  • dannyvdannyv Posts: 2
    edited 2011-11-04 10:12
    Hi Guys,

    My goal with this project is to basically make a servo controlled gyro camera stabilizer for my motorcycle. I'm attempting to design a control system that will monitor the gyro sensor and automatically move each servo to keep the camera level (Not sure if I'm going to use 1 or 2 axis yet). I've seen quite a bit of examples on Youtube, but the stabilization control in those videos are FAR from perfect. The best solution I've seen so far is of a gentleman that utilized a Gyroservo with an attached battery pack. It's a very nice design, however the video is extremely choppy and there was a ton of camera drift. I'm hoping I can design a system which will be much more stable.

    My components have not arrived yet, but I am expecting them within the next few days. I have been designing control systems for industrial packaging machinery for almost 20 years, but I have ZERO experience with Propeller software and hardware.

    Thanks!

    Danny
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2011-11-04 10:59
    You need more than just a Gyro for that kind of stability. The Earth's rotation alone can introduce a drift of up to 15 Deg per hour depending on if you are parallel to the Earths axis (15 Deg per hour drift) or Perpendicular to the Earths axis (0 Deg per Hour drift). Taking that concept further if you could eliminate the effects of the Earth, and you take a Gyro aligning the axis so that it is exactly perpendicular to the horizon, you will get a true reading, however if the alignment is slightly off you will introduce drift. The only exception is if the drift is complementary, i.e. if Gyro completes a full 360 deg circle, the error in tilt becomes complementary and mathematically cancels itself out.

    This is why you often see the use of Accelerometers in conjunction with a Gyro... Accelerometers can provide an average tilt over time, or an immediate value that has complementary effects that help compensate for Gyro drift.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-11-04 11:14
    What Beau said about also using an accelerometer.

    But if you're looking for smooth video you'll need something much (MUCH) faster than an R/C servo. A galvanometer (moving coil) with a speed of maybe 200 Hz or better might do the trick. You need something that can move a mass, like the kind used in laser light shows. Your camera must be very light, or you'll need a more powerful galvo. Fair warning: they're not cheap -- retail basic units sell for $250 to $1,000. Try eBay, but be careful that you know what you're getting.

    A camcorder with image stabilization, on shock mounts with maybe some counter balancing, might provide a better solution. It would be physical large, so it'll be for your bike, not your helmet.

    A servo would be cool for automatic pans, or to keep the camera upright in turns. Those changes occur much more slowly.

    -- Gordon
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2011-11-04 11:24
    Here is a reference page I put together for using a Gyro ... minus an accelerometer this is about as accurate as you can get reading directly from a Gyro without knowing the orientation of the Earth's axis.

    http://forums.parallax.com/showthread.php?127868-Gyro-lisy300
Sign In or Register to comment.