Shop OBEX P1 Docs P2 Docs Learn Events
Universal Motor Driver - Dual wheel steering, motor control, and position tracking Objects for P2 - Page 3 — Parallax Forums

Universal Motor Driver - Dual wheel steering, motor control, and position tracking Objects for P2

13»

Comments

  • Stephen MoracoStephen Moraco Posts: 316
    edited 2023-04-21 17:29

    NEW v4.0.0 of our BLDC Motor driver.

    Adds Full support for RevB BLDC Boards
    Adds auto-recognition of RevA and RevB boards (adjusts internal motor parameters accordingly)
    Revamped "motor drive" PASM code, ramps are completed cleanly and state machine is simplified

    currently, this is available from the releases section of the official repository (it will be added to the p2 obex.)

    Three additional .zip files are available from the Assets section of the release page:

    • demo-1mot-archive-set.zip - single motor demo's with the full driver
    • demo-2mot-archive-set.zip - dual motor demo's with the full driver
    • serial-control-archive-set.zip - a smaller set of files necessary for an onboard Arduino/RPI controlling your motors via the serial interface.

    Note: The demo .zip's now contain the base version plus an HDMI version. The HDMI version for two motors is built using the new larger Edge Breakout Board so we can have two BLDC boards plus a DVI board connected.

    Platform Drawing updated: removed sharp corners, added mounting holes to support RevB BLDC boards. Next update is pending when Parallax selects the power hardware for the basic platform. At that time we'll add mounting holes for this new hardware.

    See the Configuring the driver for your motor page for details about the available motors and how to select one in your code.

    See the P2-BLDC-Motor-Control - Via Serial from RPi, Arduino, or... page for the system diagram, download, and setup instructions.

    See YouTube Control our 2-wheel BLDC robot platform from an RPi for a demo of how the system works on my platform.

    See The Authors' Test Platform for details of my platform.

    For a quick review of the Serial Steering interface see the page Serial Interface of Steering Object.

    Have fun!

  • Stephen MoracoStephen Moraco Posts: 316
    edited 2023-09-17 01:02

    NEW

    v5.0.0 of our BLDC Motor driver.

    Overall clean-up of motor ramping and motor coordination, fixing and awakening features

    • Improvements to getCurrent() for RevA and RevB boards
    • NEW setAcceleration(rate) implemented
    • Adds synchronization of multiple motors
    • Corrects DoCo motor direction (forward and reverse now correct for both motors)
    • Improves handling of wheel diameter
    • Driver internal adjustments:

      • Repaired board detection (now detects before use, oops!)
      • Internal driver clean up (duty, hall table access, stop mode, code shape changes, PWM enable/disable, etc.)
      • General clean-up of motor ramping
      • Adjusts motor power when small direction changes
    • FlySky changes

      • Code: min/max and controls, now configurable from the demo top-level
      • Demo Controls: add VRA (top left center dial) for controlling acceleration, add swE for rotation testing

    currently, this is available from the releases section of the official repository (it will be added to the p2 obex.)

    WARNING: With these ramp improvements our motors can accelerate even faster now. You already know they are powerful. Please be careful while you get used to these new changes.

    This release is user-developed improvements shared with us all!

    Thank you to Tim Moore (@timmoore) as this release is mostly his contribution! He's building and testing platforms with both the 6.5" and Doco motors. This work is a result of his adjusting the code so it is much better performing.

    Here are links to the platforms he built and has been using while developing these changes:

    • propbot using 6.5" wheels - checkout his platform!
    • docobot using the smaller/faster Doco Eng. motors and added 3" wheels

    My note: I have used this code on my own platform as I was incorporating Tim's changes. This entire system is now much more fun to use. Thank you Tim!

    Available Files for this Release

    Three additional .zip files are available from the Assets section of the release page:

    • demo-1mot-archive-set.zip - single motor demo's with the full driver
    • demo-2mot-archive-set.zip - dual motor demo's with the full driver
    • serial-control-archive-set.zip - a smaller set of files necessary for an onboard Arduino/RPI controlling your motors via the serial interface.

    Note: The 2 motor demo .zip contains the base version plus an HDMI version. The HDMI version for two motors is built using the new larger Edge Breakout Board so we can have two BLDC boards plus a DVI board connected.

    Platform Drawing updated: removed sharp corners, added mounting holes to support RevB BLDC boards. The next update is pending when Parallax selects the power hardware for the basic platform. At that time we'll add mounting holes for this new hardware.

    See the Configuring the driver for your motor page for details about the available motors and how to select one in your code.

    See the P2-BLDC-Motor-Control - Via Serial from RPi, Arduino, or... page for the system diagram, download, and setup instructions.

    See YouTube Control our 2-wheel BLDC robot platform from an RPi for a demo of how the system works on my platform.

    See The Authors' Test Platform for details of my platform.

    For a quick review of the Serial Steering interface see the page Serial Interface of Steering Object.

    Have fun!

  • Hi,
    I'm working on adapting isp_steering_serial to work with ros2, I have been able to been able to get the hall tick's but only in positive values. Is there away to get positive and negative hall values to tell direction?

    Thanks'
    Brian

  • Question about the driver. When the motor is not moving do you turn off the FETS or do you leave them on to hold the motor in place.

    If the FETS are left on how much current does it draw or do you pulse the same windings at a set frequency to hold the motor in place and is this more efficient?

    Mike

  • @iseries said:
    Question about the driver. When the motor is not moving do you turn off the FETS or do you leave them on to hold the motor in place.

    MIke, the ability to hold the motor in place by keeping power to the wheels is a run-time adjustable value.

    I don't know what the current would be but varies by the load of the platform against the want to roll. (e.g., more power to hold on a hill with a heavier bot)

  • @Brian_B said:
    Hi,
    I'm working on adapting isp_steering_serial to work with ros2, I have been able to been able to get the hall tick's but only in positive values. Is there away to get positive and negative hall values to tell direction?

    Brian, I've been away from this for a while. I'll have to go look things up. More in a day or two...

  • Thanks'
    I simplified the command structure as i really only need 3 commands for now ( m s e) , see video for details.

Sign In or Register to comment.