Menu

DRV 8825 HW203 Motor Speed Problem

2019-07-15
2019-09-14
  • Charles Clark

    Charles Clark - 2019-07-15

    Hi Robert, I have recently uodated my Arduino Firmware to the 2.84 version of the DRV8825 HW203 software for my strip board built controller with bluetooth control. I do not know if I am missing something with the changes in motor speed, but I am not noticing any difference when moving at slow, medium of Fast speeds. My max steps is set at 13700, I am running with a step size of 2.7 micro metres.
    When moving an increment of 1000 steps it takes just under 1 minute in all speed settings whether it be slow, medium or fast. I have motor change speed settings set to zero currently just to eliminate the slow down approach. Am I missing something
    When I change the speed from slow to fast etc then get motor speed the change has been picked up by the controller.
    I am usinf version 2.4.3.2 of the windows application
    It wouldnt be a major problem just having the one speed, but could you advise if I am missing something
    Regards
    Charles Clark

     
  • brownrb

    brownrb - 2019-07-16

    Hi Charles
    Please post your .ino file here
    Is motorspeed change disabled?
    Also please run the windows app, choose Save settings and post the settings file also.

    Regards
    Robert

    Can you confirm that the stripboard was working fine in version 2.83? or what was the previous version of the firmware?

    Also what version of Arduino IDE are you using?

     

    Last edit: brownrb 2019-07-16
  • Charles Clark

    Charles Clark - 2019-07-16

    H Robert
    As requested ino file attached plus widows app save settings
    Motor Speed change is enabled
    Arduino IDE used is ver 1.6.8
    Stepper motor is Nema 14 400 pulses /rev set for 1/4 stepping and a 3 to 1 gear ratio giving 4800 pulses/rev
    1 rev moves crayford focuser 13mm hence 2.7 micro
    last arduino firmware used was v2.81
    There was a difference between slow, medium and fast but it was not massive as I recall probably about 10 seconds longer between each one.
    Is there a fixed ratio between each speed setting?
    Regards
    Charles Clark

     
  • Charles Clark

    Charles Clark - 2019-07-16

    Sorry Windows App settings appear to have removed themselves.
    Attached below

     
  • brownrb

    brownrb - 2019-07-16

    Looks fine. Nothing stands out.

    Yes about the ratios. When you get down to 1/4 stepping or less there is going to be less difference in speeds, it is more noticeable at full speed. The defaukt values for speed in the firmware are general and based on a standard NEMA 200 step motor, but are easily tuned for user preference.

    You can adjust the speed settings in the firmware.
    Change these ones for 1/4 stepping, lower value = faster
    It takes a bit of optimising,, trial and error.

    #define FAST4DELAY          250
        #define MED4DELAY           1000
            #define SLOW4DELAY          2000
    

    I note that your motorspeedchange threshold setting is 0, which would indicate that you should have motorspeedchange enable OFF. If threshold was 200 (default) then it would mean 1/5th of the move (for 1000 steps) wouldve been at slow speed, which would make things look similar.

    However, adjust the numbers above. I would suggest maybe increase med4delay to 2000 and increase slow4delay to 3500 and try that

    Regards
    Robert

     

    Last edit: brownrb 2019-07-16
  • Charles Clark

    Charles Clark - 2019-07-16

    Hi Robert, thanks for the prompt response i will certainly give that a go. I did set motorthreshold down to 0 to try to eliminate the fact that there was not any discernable difference between slow medium and fast.
    I intend to set it back up to a reasonable approach later.
    Regards
    Charles Clark

     
  • Charles Clark

    Charles Clark - 2019-07-16

    Hi Robert, changed the delay settins as you suggested and even beyond ending up with

        #define FAST4DELAY          50
    #define MED4DELAY           3000
        #define SLOW4DELAY          6000
        None of which made any difference to the time to move 1000 steps
        I will just accept that I will only have one speed range which in the end will be no great hardship.
        Thanks for you help and suggestions.
        Regards
        Charles Clark
    
     
  • brownrb

    brownrb - 2019-07-16

    Hi Charles

    I will breadboard something up and replicate your setup, then take a close look.

    Regards
    Robert

     
    • brownrb

      brownrb - 2019-07-16

      If you could send me a log file from the windows app where you connect, do a move, change speed, do another move, change speed, do another move I'll see if there is anything there

       
  • brownrb

    brownrb - 2019-07-17

    Ok.
    I believe your eeprom settings are corrupted.
    Please program the controller with attached program, let it run after uploading for 2 minutes
    Then reprogram controller with the 284 code.

     

    Last edit: brownrb 2019-07-17
  • Charles Clark

    Charles Clark - 2019-07-17

    Hi Robert, cleared the eprom with the program you provided and reloaded the v2.84 firmware with the original delay values for fast, medium and slow.
    I the ran a 1000 pulse move at each of the three speeds ie fast, medium and slow with error logging running and still do not see any discernable difference in the speed.
    I have attached the error log file as previously requested.
    Prior to running the error log file i did try running the speed test with exaggerated dely values of 50 for fast 3000 for medium and 6000 for slow and that did not seem to show any speed difference.
    Regards
    Charles Clark

     
  • brownrb

    brownrb - 2019-07-17

    Log file does not appear to look right, I will check a few things. In the meantime,

    I suggest
    1. Update to latest Windows app
    2. Make sure motorspeedchange is DISABLED

     

    Last edit: brownrb 2019-07-18
  • brownrb

    brownrb - 2019-07-18

    I cannot seem to replicate the issue. Motor speed appears fine and works on every change. Using the same firmware but latest windows app.

    I did initially have the same issue. I had an older controller with outdated firmware. After upgrade to latest firmware it was exhibiting same behaviour. But when I cleared the eeprom and then reprogramed the controller it worked fine. But I never use motorspeedchange enabled.

    I am a bit of loss now. Will have to think some more.

    Regards
    Robert

     
  • Maciej

    Maciej - 2019-08-04

    Hi,
    I'm new here.
    I have similar problem.
    When push buttons are enabled, all the speeds are same as push button speed.
    Very slow.
    Otherwise perfect.
    Thank you Robert!

    Regards

    Maciej

     
  • brownrb

    brownrb - 2019-08-05

    Hi Maciej
    Please post your firmware.ino file here.

    Please provide a detailed step by step detail about what to do to recreate the problem.
    Start with Extra settings you enable/check, then click connect then what - each step

    push buttons run at the motor speed set in the controller. There is nothing in the code that changes the motor speed when using the push buttons.

    Also, connect you focuser using windows app. Then use menu-Extra Settings-Save or Restore Settings-Save settings and send me the file that generates.

    Regards
    Robert

     
  • Maciej

    Maciej - 2019-08-05

    Hi Robert,

    I'm using Focuserv284_DRV8825.
    I uncomment #define PUSHBUTTONS 1 line, upload the sketch. That's it.
    Lets say 7000 steps take about 10 mins on any speed setting.
    Buttons are slow too.
    With push buttons disabled takes 30 seconds or less on fast speed for 7000 steps.

    Thanks again for great project and your help.

    Regards
    Maciej

     
  • brownrb

    brownrb - 2019-08-05

    I also need the .ino file you used to program the controller

     
  • brownrb

    brownrb - 2019-08-05

    Ok. Got it.
    In the firmware, in the readpushbuttons()
    find the line
    else return val;
    and change it to
    else return 0;

    Firmware 288 is nearing completion and will have this addressed.

     
  • Maciej

    Maciej - 2019-08-05

    Bingo Robert!!!
    Buttons are still slow but I think I prefer them to behave this way.

    Many thanks
    Maciej

     
  • Trevor Searle

    Trevor Searle - 2019-08-09

    I had the same problem, now fixed thanks

     
  • Brad Julihn

    Brad Julihn - 2019-09-12

    Hello Robert;

    I have built the focuser with push button, temp comp, OLED display, and LED indicator lights. I am using the DRV8825 driver board and a Nema 17-PG27 stepper motor with 5370 steps/rev. My CFZ is 35.2 microns, 1 revolution = 13.3mm; and my step size is 2.48 microns.

    Windows App ver is 2.4.3.4
    Arduino IDE is ver 1.8.9
    Firmware file is Focuserv284_DRV_H203_OLED

    STEP SIZE is ENABLED
    MOTOR SPEED CHANGE is DISABLED
    STEP MODE is FULL

    Symptoms: the motor moves very slowly and no detectable change in speed from Fast to Med to Slow. 500 steps at fast speed takes about 20 seconds and seems the same at slow.

    I tried modifying the FAST1DELAY to 300; MED1DELAY to 600; SLOW1DELAY to 1200. Doesn't seem to affect it. I am attaching .INO file and Windows App settings file. Any help would be appreciated

     
  • Brad Julihn

    Brad Julihn - 2019-09-12

    Sorry, here is my Windows App settings file. Couldn't get both to attach at the same time.

     
  • brownrb

    brownrb - 2019-09-13

    Yes there is an issue with 284.
    Its fixed in 288 - 288 has an issue with Home Position Switch
    289 has Home Position Switch problem fixed.
    288 is here
    289 pre-release is on the yahoo group at present and should appear here next week
    Suggested solutions
    Update to 288 which is on this site.
    Keep 284 but disable pushbuttons

    Regards
    Robert

     
  • Brad Julihn

    Brad Julihn - 2019-09-14

    Thanks Robert;

    Firmware 288 seems to have solved my problems. Now to get it mounted to the focuser itself.

    Brad

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.