PiStorms V2 w/ Pi B+ Motor Issues
 Hardware Related   Started by Gary Miller   2017-01-03 23:29:20 -05:00   Comments: 6    Viewed: 319

  1. Gary Miller
    Gary Miller Member
    Hello,

    I sent an email asking about the following issues but wondering if anyone else in the forum has had similar issues.
    I have been experimenting with the basic power and degrees rotation motor functions. Here is what I have been witnessing:
    • Medium Servo seems kind of ragged when the speed is reduced. Using an L293 driver board and PWM I can acheive much smoother operation.
    • When I run the motor 90 degrees it only moves 77 degrees on average.
      • I wrote a code to do the command 20 times and compute the encoder delta and then average after the 20 and after a few runs it resturns ~77 deg.
      • If I adjust the PID param to increase the accuracy the PiStorm freezes
    • I created a adapter cable to attach a Lego Power Function Motor to the PiStorm but cannot get variable power. No matter what I set for power the speed is always full speed.
    Any feedback anyone has, or similar experiences would be appreciated.

    Gary Miller, 2017-01-03 23:29:20 -05:00
  2. Mindsensors Support
    Mindsensors Support Member Richmond
    What is your power supply to PiStorms? (How many volts/amps?)

    Try a program like as follows:
    (which turns motor through 360 degrees in 4 steps of 90 dgerees each)
    What do you get?

    from PiStorms import PiStorms
    import time
    print "running program"
    psm = PiStorms()

    m = ["Motor-Demo", "Connect motor to Bank A M1.",
     "Motor will turn 360 degrees, and stop",
     "with brake.",
      "Click OK to continue"]
    psm.screen.askQuestion(m,["OK"])

    # run motor for 360 degrees, and at the completion,
    # brake while stopping
    psm.BAM1.runDegs(90, 75, True, False)
    time.sleep(0.5)
    psm.BAM1.runDegs(90, 75, True, False)
    time.sleep(0.5)
    psm.BAM1.runDegs(90, 75, True, False)
    time.sleep(0.5)
    psm.BAM1.runDegs(90, 75, True, False)
    time.sleep(0.5)

    m = ["Motor-Demo", "Motor should have turned 360 degrees",
      "and stop with brake and hold.", "click EXIT to exit program"]
    psm.screen.askQuestion(m,["EXIT"])
    Mindsensors Support, 2017-01-04 13:00:42 -05:00
  3. Gary Miller
    Gary Miller Member
    I have been using a 9V 800mA wall adapter which provides around 9.6V. I have also used a 6AA battery pack. Both give the same results.

    I tried the program provided above and the shaft end around 300 deg.
    Gary Miller, 2017-01-04 21:04:14 -05:00
  4. Mindsensors Support
    Mindsensors Support Member Richmond
    Below is excerpt from user guide:
    Note, the amps should be 1.5
    Nominal PiStorms Power requirement: 8 Volts, 1.5 Amps
    While using motors, at least 6.8 volts, 1.5 Amps power is needed.
    Mindsensors Support, 2017-01-05 10:12:22 -05:00
  5. Gary Miller
    Gary Miller Member
    Thank you for your help and feedback!

    I did see that in the manual and plan to get a better wall wart. The Medium Servo even at stall shouldn't draw enough to exceed the one I have. I have also used batteries too so I'm not sure amps are the problem. Unless your hardware requires more for its own use.
    On a related note the manual also states:
    "Current Characteristics Average current consumption of this device is about 5.0 mA. PiStorms can deliver up to 1 Amp current per NXT Motor attached. Drawing of excessively large current (such as incorrect motors or stalled motors) will result in internal shutdown until the situation is corrected."
    Is the 1.5A the total system max or can it draw 4A if all four ports are in use?

    Back to my original issues. Any thoughs why the angles are off? Also can PF motors be used with setSpeed?
    Gary Miller, 2017-01-05 11:47:25 -05:00
  6. Mindsensors Support
    Mindsensors Support Member Richmond
    Mindsensors Support, 2017-01-05 12:26:30 -05:00
  7. (You must log in or sign up to post here)

Log in | Sign up
Tems & Conditions!
Help!