PiStorms motor issues
 Hardware Related   Started by Daniel Walton   2016-08-26 22:59:05 -04:00   Comments: 24    Viewed: 485

  1. I am having problems controlling a Large EV3 motor using pistorms.  I started off with an older PiStorms board and was using ev3dev, I was seeing an issue where the motor never really stopped, it would just sort of shake after it was supposed to stop.  You can see the video here:
    https://www.youtube.com/watch?v=NjeqUuCAIHc

    I posted about it at ev3dev https://github.com/ev3dev/ev3dev/issues/696 , dltech suggested I had a bad board so I asked mindsensors for a replacement (thank you for the replace).  So now I have a brand new board but I still see the exact same issue.

    dltech asked me to try using the PiStorms software so I gave that a try.  I still see issues but they are a little different.  The motor rotates but it doesn't really move like it does with ev3dev, it does "click" though as if it is trying to move but isn't getting enough power (it shouldn't be moving at all).  Here is a video of my rpi2 with brand new PiStorms board running PiStorms v4.006 with firmware 2.06:

    https://www.youtube.com/watch?v=T-CHCVdhz0s

    I also tried with a rpi3 and see the same issue.

    Thoughts?
    Daniel Walton, 2016-08-26 22:59:05 -04:00
  2. Deepak Patil
    Deepak Patil Administrator Staff Member Richmond
    holdOnCompletion tends to jitter motors.
    also, limit the motor speed to 100.

    in other words, change your function call as follows: 
    line ->> psm.BAM1.runDegs(1000, 400, True, True)
    change it to:
    psm.BAM1.runDegs(1000, 100, True, False)


    Deepak Patil, 2016-08-27 15:27:14 -04:00
  3. Disabling holdOnCompletion fixes it even with speed 400.  Are there plans to fix the holdOnCompletion jitter issue?
    Daniel Walton, 2016-08-28 13:34:36 -04:00
  4. Deepak are there plans to fix the holdOnCompletion jitter issue?
    Daniel Walton, 2016-09-03 14:29:14 -04:00
  5. Deepak Patil
    Deepak Patil Administrator Staff Member Richmond
    my apologies in delay in responding,
    the issue is, holdOnCompletion is meant to hold the motor in position from drifting due to external force.
    To hold that position that, PiStorms applies power and holds the motor to the last encoder value,
    but and under certain conditions, (and we suspect, when the external load is negligible), the motor tends to jitter.
    Our engineering has tried to fix this issue since you reported, but are not able to fix it.
    Deepak Patil, 2016-09-13 15:35:49 -04:00
  6. Deepak any update on resolving the holdOnCompletion jitter issue? This issue prevents me from being able to use my PiStorms for any rubiks cube solving robot :(
    Daniel Walton, 2017-10-06 09:44:02 -04:00
  7. seth10
    seth10 Member Staff Member
    Good morning! For what reason do you need to hold on completion? For a load as light as a Rubik's cube I wouldn't expect you to need it, unless someone is applying external force on the Rubik's cube.

    In any case, adjusting the performance characteristics (PID values) for your specific use case (very little load) might help. If you were to build a robot and want it to step when moving down a slope, hold on completion would actively resist continuing to roll downwards. There is a much higher load in this senario (the mass of the robot controllers, motors, and body), requiring tuning the PID values differently. Unfortunately, just by their nature there can't be one set of values that works well for every situation.

    http://www.mindsensors.com/reference/PiStorms/html/class_pi_storms_1_1_pi_storms_motor.html#a3e1bdbb9397b76ae1ec7a49072f176a6
    seth10, 2017-10-11 11:10:34 -04:00
  8. For what reason do you need to hold on completion? For a load as light as a Rubik's cube I wouldn't expect you to need it, unless someone is applying external force on the Rubik's cube

    There are several scenarios where it is needed, here are two of them for this robot 
    https://www.youtube.com/watch?v=3HjKxTlLDLw

    #1 - The motor at the bottom raises the cube up into the "cage" area so the cube can be rotated.  The motor at the bottom has to hold on completion, if it does not the weight of the cube will cause the motor to move causing the cube to lower which will either make the robot jam up or it will cause the wrong layer of the cube to be rotated.

    #2 - The medium motor on the side of the robot controls a "flipper" for flipping the cube from front to back or vice versa.  If this motor cannot hold on complete the weight of the cube causes the "flipper" to move about 45 degrees which in turn causes the robot to jam up the next time the bottom motor tries to raise the cube.

    I just need the motor to hold without shaking like crazy.  The motor is capable of it, I can do it with and EV3 and EVB, just not with PiStorms :(
    Daniel Walton, 2017-10-11 11:31:45 -04:00
  9. seth10
    seth10 Member Staff Member
    seth10, 2017-10-11 11:43:45 -04:00
  10. Thanks :)  In the video I am using an EV3 running ev3dev.

    I am using ev3dev so can't use `SetPerformanceParameters`
    Daniel Walton, 2017-10-11 11:47:53 -04:00
  11. seth10
    seth10 Member Staff Member
    Ah okay, I was thinking of the PiStorms.

    By the way, this was what I thought of when I read [LEGO] Rubik's Cube solver: https://youtu.be/dreTvumjNyw. That was from years ago, but it's vertically stationary platform came to mind, I didn't think of a cool moving one like you have.
    seth10, 2017-10-11 12:01:04 -04:00
  12. This has to be a hardware issue though, it happens on my PiStorms but does not happen on David Lech's (see this thread https://github.com/ev3dev/ev3dev/issues/696 )

    Can you try this on a few boards and see how many it fails on?
    Daniel Walton, 2017-10-11 12:25:10 -04:00
  13. seth10
    seth10 Member Staff Member
    Sure! Could you please send over the most-simplified working program that exemplifies the issue? I don't think our forum lets you post attachments but gist.github.com and pastebin.com are both good options.
    seth10, 2017-10-11 14:35:57 -04:00
  14. boot ev3dev (see http://www.ev3dev.org/docs/getting-started/ ) and at the bash prompt run

    echo reset > /sys/class/tacho-motor/motor1/command
    echo hold > /sys/class/tacho-motor/motor1/stop_action
    echo 400 > /sys/class/tacho-motor/motor1/speed_sp
    echo 1080 > /sys/class/tacho-motor/motor1/position_sp
    echo run-to-abs-pos > /sys/class/tacho-motor/motor1/command

    Daniel Walton, 2017-10-11 16:01:07 -04:00
  15. seth10
    seth10 Member Staff Member
    Oh, what's the code that gives you what appears to be a hardware issue on the PiStorms? I can try it on a handful of PiStorms here and see if the issue arises on none, some, or all of them.
    seth10, 2017-10-12 12:58:41 -04:00
  16. This is all you need, just cut-n-paste these commands
    echo reset > /sys/class/tacho-motor/motor1/command
    echo hold > /sys/class/tacho-motor/motor1/stop_action
    echo 400 > /sys/class/tacho-motor/motor1/speed_sp
    echo 1080 > /sys/class/tacho-motor/motor1/position_sp
    echo run-to-abs-pos > /sys/class/tacho-motor/motor1/command
    Daniel Walton, 2017-10-12 13:03:18 -04:00
  17. seth10
    seth10 Member Staff Member
    I thought you weren't having any issues with your EV3 and ev3dev, the issue was with your PiStorms. No?
    seth10, 2017-10-12 13:08:45 -04:00
  18. ev3dev supports PiStorms, the issue happens when I am running ev3dev on PiStorms :)   Take a PiStorms, install ev3dev on it per http://www.ev3dev.org/docs/getting-started/ and then cut-n-paste those echo commands at the bash prompt.
    Daniel Walton, 2017-10-12 13:12:12 -04:00
  19. seth10
    seth10 Member Staff Member
    Oh! I forgot you could run ev3dev with the PiStorms haha, thanks for reminding me. Will do.
    seth10, 2017-10-12 13:14:31 -04:00
  20. cool :) Make sure to do Step 3A, that is required for PiStorms
    Daniel Walton, 2017-10-12 13:23:21 -04:00
  21. Page 1 / 2

    (You must log in or sign up to post here)

Log in | Sign up
Tems & Conditions!
Help!