4

I have built a robotic arm with the lego Mindstorms ev3. My goal is to control its motion via teleoperation, that is , to have a gyro sensor strapped onto my arm and have the robot mimick the up and down motion of my forearm. However, I am completely stumped concerning the programming. I need a reliable way to read the gyro sensor readings while taking into account any bias in the sensor. Second, I would also like the sensor to read the rate of change in my arm and translate that into power for the large motor. If anyone can show me how to do this with the ev3 programming environment, the help would be greatly appreciated.

2
  • Are the robotic arm (motor) and the gyro sensor connected to the same EV3 brick? If two EV3 bricks, the programming is more about the communication protocol between the bricks.
    – dfrevert
    Sep 24, 2014 at 17:54
  • Yes, the gyro and the motor are on the same brick. I am considering getting another ev3 brick, as I could easily see how to program that setup.
    – bsaat
    Sep 28, 2014 at 0:27

1 Answer 1

1

Disclaimer: I have never used the EV3 interface, only the text based programming languages for the NXT. Therefore I might be proven wrong.

I need a reliable way to read the gyro sensor readings

I think the gyro sensor should have come with the appropriate instructions to do that. If not, you can find many tutorials online, such as this: http://robotsquare.com/2014/06/25/tutorial-gyro-ultrasonic-sensor-ev3-home-edition/

while taking into account any bias in the sensor.

Bias can be accounted for by using a previously known position to calibrate the sensor. You could start your program with the gyro (and your arm) in one of the extreme positions and measure movement relative to that.

Second, I would also like the sensor to read the rate of change in my arm and translate that into power for the large motor.

This sounds like a simple differentiation task. You measure the angle and store it along with the current time (in milliseconds or whatever the most precise measurements available). In the next iteration you make another measurement, take the difference of the current and the previous angles, and divide it by the difference of the current and previous times. The result is the rate of change. This can be translated to motor speeds by using either trial and error, or calculations based on the characteristics of the motor, the gearing and the gyro.

However, I would rather use a command to turn the motor a specified number of degrees to match the measurements of the gyro.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.