Shop OBEX P1 Docs P2 Docs Learn Events
mesmic 2125 servo question — Parallax Forums

mesmic 2125 servo question

TyrellTyrell Posts: 4
edited 2013-01-17 08:38 in Propeller 1
Hello al I am new to parallax. I have been toying around with the Mesmic 2125 Dual-axis accelerameter, and a parallax servo. After learning how they work independently. I decided to try to find a way to put them together. After about a week and a half of pulling put my hair. I decided to ask you guys for some help.*I would like to be able to take the values of the mesmic2125, and convert them to servo movements. In other words . When the X value of the mesmic 2125 is 0, I would like the servo to be at a pulse of 1500. And as the acceleromater moves forward. The servo moves to match the acceleromater, and so forth when moving backwards. I beleive this is called ramping.My goal is to Place the accelerameter in the middle of a bread board. Attach four servos. One on each corner. And as the accelerameter moves on all its axis.Each servo would move accordinally to keep the breadboard level. Im not asking for anyone to build my whole idea, but to help me start by moveing one servo on the X axis (forward, center, then backwards).From there I will learn the rest.*Thank you

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2013-01-16 23:24
    "When the X value of the mesmic 2125 is 0, I would like the servo to be at a pulse of 1500..." - because of mechanical variations, this thinking might cause perpetual oscillation problems. ... Instead, if what you want is to be 'level' then use the Accelerometer to determine the error + or - and use that to bump the corresponding servo in the proper direction. The larger the error the more the servo gets adjusted. You will also need to account for overshooting.... The jerkiness of the servo will cause unwanted readings from the Accelerometer. During those periods it might be beneficial to ignore Accelerometer values while the servo is in motion. Averaging the Accelerometer values can help, but will also cause delayed reactions that will work against you.
  • TyrellTyrell Posts: 4
    edited 2013-01-17 08:38
    Thank you for the info. Now that I think about it there will be jerking of the servo. But as I posted. Whats a good way to get started on my small project.
Sign In or Register to comment.