Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #5639
     Dave
    Participant

    Ok, so I think it’s working now. It’s now providing a constant speed under different loads to the motor gear output shaft. :)

    I spent some more time reading through that huge document “Roboteq Controllers User Manual v18” and on pg 123 found some “strt-up steps for closed loop speed control (attached). Following those instructions I saw that the when the feedback (Counter 1) should have been positive, it was negative. I then followed the next step in the attached doc and switched the encoder channels A and B. (I also tried switching the positive and negative going to the motors, but that didn’t seem to allow the motors to turn which is odd since they’re brushed and can go in forward and reverse)

    Now I’m able to control the motor on my desk using either the RoboteQ Utility (sliders) or via PWM, slow the motor to a craw, put a load on the motor and it still turns at a steady rate and I don’t see the error where the controller doesn’t respond after the 1st command, even turning off the PWM single which is very odd.

    I’ll reevaluate the tuning of the PID once the robot is built and in testing conditions. Attached is the configuration page with the values I used. Please notice that I still don’t know if the Pulses/Rev should be 420 as I calculated (84*5=420) or should be ~1,600 as measured. (see lingering question below, and above post)

    Thanks again for helping with this, can you please let me know your thought on my other threads/questions?

    Dave

    Lingering question:

    I thought I could calculate the PPR by 84 (gear reduction) * 5 (PPR)= 420 PPR on the geared motor output shaft, but when I tested it, the counter in the RoboteQ showed ~1,600. Any idea why my calculation and reality were so far off?

    Attachments:
    You must be logged in to view attached files.
    #5637
     Dave
    Participant

    Ok, I thought I could calculate the PPR by 84 (gear reduction) * 5 (PPR)= 420 PPR on the geared motor output shaft, but when I tested it, the counter in the RoboteQ showed ~1,600. (attached) Any idea why my calculation and reality were so far off?

    Continuing, I entered 1600 in Encoder 1, Pulses/Rev and the motor this time slowly sped up until it was turning at full speed and did not rock back and forth like earlier (I haven’t changed the hardware set-up). But, the motor just goes to full speed and changing the PWM value doesn’t slow the motor down, reverse, or stop with the PWM is shut off like it does in direct control mode. It seams like the controller reads the PWM value once to decide which direction to turn the motor and then never looks back.

    Attachments:
    You must be logged in to view attached files.
    #5633
     Dave
    Participant

    Hello, thank you for the information. I have two quick questions of clarification:
    1.”max RPM of your motor” do you mean the geared output or the motor shaft that’s connected to the encoder? I think you mean the motor shaft connected to the encoder. From the datasheet of the motor should I use Max RPM of 5600 or no load max RPM 7000 (please see attached)
    2.”pulses/rev will need to be measured” I assume you mean pulses per revolution of the geared shaft output, not the motor shaft which is 5PPR (please see attached)

    Thank you again for your help

    Attachments:
    You must be logged in to view attached files.
    #5630
     Dave
    Participant

    Thank you, that’s especially good to know about the software update to fix that bug. That could have been bad.

    I’ve updated the software after downloading the files from RoboteQ’s SDC21xx website and then set my motor operation to “Closed Loop Speed” (please see attached). Do you have any suggestions on how to tune the PID and the other settings like “Max Speed”, “Acceleration”, “Deceleration”, Turns Min to Max”, etc.? I’m using one of your “IG42 24VDC 078 RPM Gear Motor with Encoder” on my desk without a wheel attached to it for testing.

    I tried just running with the default values and the motor very rapidly/ violently went forward and reverse with a small PWM value of 1456 (just ~50 off from center ie. no movement). One other disconcerting observation was that even after I turned off the PWM single the motor still continued to rapidly move forward and reverse unlike before in direct control mode where turning off the PWM single caused the motor to stop because the controller had switched to Serial input which was set at no movement (sliders centered in the Roborun+ utility). I had to press the “Emergency Stop” in the Roborun+ Utility to stop the motor.

    Thank you

    Attachments:
    You must be logged in to view attached files.
    #5627
     Dave
    Participant

    OK so I found more information in “Roboteq Controllers User Manual v18” pg 45 that seams to confirm what I described in the above post.

    I would post a link to the manual mentioned above, but the forum software doesn’t appear to like that.

    #5616
     Dave
    Participant

    When using encoders, please keep PIn1, PIn2, PIn5, and PIn6 disabled.

    Thank you. I connected everything for one motor and I am able to control the motor using PWM (Digital P3) and read the encoder. (Please see attached pictures.) However, I’m still unsure if the Encoders should be selected as “Command” or “Feedback” to make sure the motor maintains a constant rpm. I tried holding the motor shaft to slow it down, but the gearing is too high. Can you please let me know what the correct setting is for the encoders?

    I’ll look into the API you sent in a bit. Thank you very much.

    Dave

    Attachments:
    You must be logged in to view attached files.
    #5615
     Dave
    Participant

    So the good news is that D2 is no longer putting out a PW value. The bad news is that I don’t know why it stopped and can’t repeat the bug.

    #5612
     Dave
    Participant

    Attached are the Digital pin input configurations

    Attachments:
    You must be logged in to view attached files.
    #5610
     Dave
    Participant

    Hello,
    Yes, both encoders are disabled. I had enabled them and then disabled them earlier today. Please see the attached picture.
    Is it possible to use the encoders and then use digital channel 3+ for the PWM input?
    Regarding interfacing with RoboteQ motor controllers through USB, do you have any more information on how to do this? It’s not practical to use the Roborun+ utility. THe plan is to use a computer running Ubuntu to control the motors with encoder feedback for closed loop operation with the SDC2130.

    Thanks again for your help.

    Attachments:
    You must be logged in to view attached files.
    #5605
     Dave
    Participant

    Hello,

    Thank you for your quick reply. Looks like I’ll need to order your DB9 Rs232 To TTL cable MCU-026-072 (or is there a more appropriate one?). Meanwhile, regarding enabling the encoders (question 3). There are two different options for enabling the encoders and two boxes that can be checked. Does it matter which option or if any of the boxes are checked? Thanks.

    Dave

    #5603
     Dave
    Participant

    Hello, I’m also trying to get that exact same demo code working as well, but I’m confused on a couple of points.

    1. Do you need to use the “DB9 Rs232 To TTL cable MCU-026-072” or can you connect the SDC2130 directly to the Arduino? Could you please share the schematic for a direct connection? [ex. SDC2130 DB15 pin2 to Arduino P0 & SDC2130 DB15 P3 to Arduino P1]
    2. The example code mentioned above states that the “Roboteq SDC2130 COM (Must be 115200)” but I don’t see where you can change the rate in the RoboteQ Utility. Is 115200 the motor controller defult? How can I verify this?
    3. It sounds like the encoders have to be enabled using the RobotieQ Utility. What is the proper configuration? I’ve tried a few and I can see the output in the Utility, but no luck with the Arduino moving the motor.
    4. Does the SDC2130 DB P5 need to be connected to ground? If yes, I assume it need to be connected to the Arduino Gnd based on note 5 on pg 5 of the SDC2130 manual.

    Thank you very much for your help!

    PS. I am using your encoder pull-up board (TE-179-000)

    #5592
     Dave
    Participant

    Thank you, do you know how much current can be drawn form Digital out? I’m hooking it up to control a relay like they show on page 5 so I’m assuming that it’s at least 500 mA and I’m guessing the same voltage that PwrCtrl is given?

    Thanks again for your help.

Viewing 12 posts - 1 through 12 (of 12 total)