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

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

2»

Comments

  • @CJMJ

    The variable is an old LAMBDA model lr-602a-fm: https://www.recycledgoods.com/lambda-dc-power-regulator-lr-602a-fm/ I got both from All Electronics in Van Nuys, Ca when I lived there it is variable up to 15 volts and 15 amps.
    The 24 output: https://www.alliedelec.com/product/mean-well/sp-240-24/70069596/

    All Electronics:
    https://www.allelectronics.com/

    Ask for Fabien or Mike. Tell them Martin Montague sent you. I have worked with them for 10 years. Really great folks. Everything is wholesale.
    Martin.

  • @CJMJ

    24 volts: https://www.alliedelec.com/product/mean-well/sp-240-24/70069596/

    variable to 20 vdc: https://www.ebay.com/itm/254542594417

    I purchased these at All Electronics in Van Nuys, Ca. The Lamda is old but works great. The other is out of production. Maybe a similar item would help.

  • Maybe a stupid question for which I apologise, but can this object with BLDC motors be used for precise static positioning like steppers?

  • dgatelydgately Posts: 1,527
    edited 2022-10-05 20:58

    Stephen,

    EDIT... After hooking up the WXY pins to a scope, noticed some activity in the scope and touching the motor shaft there is a short burst forward and then backward (15 seconds apart, which was the MTR_HOLD_AT_SPEED_IN_SEC setting). Created a repeating loop & set MTR_HOLD_AT_SPEED_IN_SEC to different values, but results of the short forward/backward bursts are the same. Video of the HDMI screen: https://youtu.be/70F3EqzD09I
    END-EDIT

    Not getting motor response when trying to use the driver with: Parallax BLDC, 24V motor, SKU 750-90020... I do get response from the hall sensors, but the motor does not turn using the demo_single_motor.spin2 source (latest from P2-BLDC-Motor-Control-main ZIP download).

    I noticed that PWR_24p0V is stated as "NOT SUPPORTED", but actually does appear to be supported in the isp_bldc_motor.spin2 sources.

    isp_bldc_motor_userconfig.spin2 states:

    ' ADDING SUPPORT as we go...
    '   WARNING: NOT SUPPORTED YET:  (if you use a NOT SUPPORTED value, motor won't go...)
    '      NO SUPPORT FOR   PWR_6p0V
    '      NO SUPPORT FOR   PWR_7p4V
    '      NO SUPPORT FOR   PWR_24p0V
    

    BUT, isp_bldc_motor.spin2 code appears to support PWR_24p0V:

        if user.MOTOR_TYPE == MOTR_DOCO_4KRPM
            CASE userVoltage
                ' NOTE 6.0V is not legal for this motor
                PWR_7p4V:
                PWR_11p1V:
                PWR_12p0V:
                PWR_14p8V:
                PWR_18p5V:
                PWR_22p2V:
                PWR_24p0V:
                ' NOTE 25.9V is not legal for this motor
                OTHER:
                    legalVoltage := INVALID_VOLTAGE
    

    This config reports hall sensor activity, but the motor does not spin:

        MOTOR_TYPE = MOTR_DOCO_4KRPM
        ONLY_MOTOR_BASE = PINS_P16_P31
        DRIVE_VOLTAGE = PWR_24p0V
        WHEEL_DIA_IN_INCH = 0.0   ' no wheel attached (floating point constant)
    

    Do I need to use this config?:

        MOTOR_TYPE = MOTR_DOCO_4KRPM
        ONLY_MOTOR_BASE = PINS_P16_P31
        DRIVE_VOLTAGE = PWR_12p0V          <== use 12V versus 24 ???
        WHEEL_DIA_IN_INCH = 0.0   ' no wheel attached (floating point constant)
    

    Still trying different configs...

    dgately

  • @dgately there is the beginning of support for 24v but it’s not complete. Stay below 24v for now…. Always more to be implemented. 😋

  • dgatelydgately Posts: 1,527

    @"Stephen Moraco" said:
    @dgately there is the beginning of support for 24v but it’s not complete. Stay below 24v for now…. Always more to be implemented. 😋

    Well, thats good :) But, even using the config set to DRIVE_VOLTAGE = PWR_12p0V, I get only a short pulse of movement. About an 8th turn forward, then backward the same amount. I get the same pulse no matter what value of MTR_HOLD_AT_SPEED_IN_SEC...

    The forward pulse (I think, but could have been a backwards) looks like this for the WVU outputs to the motor:

    After sending the pulse, it waits for the correct amount of time with the following code, but the pulse is "long gone!".

    wheel.stopAfterTime(MTR_HOLD_AT_SPEED_IN_SEC, wheel.DTU_SEC)      ' set to hold at speed for MTR_HOLD_AT_SPEED_IN_SEC Sec
    waitUntilMotorDone()
    

    Note:

    Yellow probe == yellow (W)
    Blue probe == blue (V)
    Purple probe == green (U)

Sign In or Register to comment.