Menu

strange behaviour with ULN2003 mini.....

2016-11-10
2016-11-11
  • terryb22160

    terryb22160 - 2016-11-10

    Hi,
    I've built the ULN2003 with 28byj-48 stepper mini version. It all connects ok, but only gives 500 steps per rotation. If I change to 1/2 step, it stays the same, and checking step rate, controller returns Stepmode:1. The other problem that I have, is that it only moves in one direction, no matter which of the + / - step buttons I press.
    I'm using latest arduino code.
    cheers
    Terry

     
  • brownrb

    brownrb - 2016-11-10

    ULN2003 driver board ONLY supports full stepping

     
  • terryb22160

    terryb22160 - 2016-11-10

    Hi,
    thanks for the reply. The controller board that I have is one of the ebay board and motor kits, with pre-wired connectors. Ok for the steps, but I'm only getting about 600 steps per rev....any ideas. The movement is nice and smooth.
    terry

     
  • brownrb

    brownrb - 2016-11-10

    Hi Terry
    U are using the L293D motor shield?
    You have changed the line of code that reads
    const int stepsPerRevolution = 1036; // NEMA17-PG5 motor

    to the correct value then reprogrammed the controller? For you I think you said 8192?

    Set focuser position to 0.
    Then enter 8192 as focuser position and click GOTO position
    At full steps when things are right the stepper motor will go one full rotation

    then switch to half steps
    repeat - set focuser to 0 position
    Then enter 8192 and click GOTO position
    half steps then motor will go half rotation

    You have motor now moving in both directions?
    Robert

     
  • terryb22160

    terryb22160 - 2016-11-10

    Hi Robert,
    I'm using the ULN2003 board, with 28byj-48 stepper motor. I have movement in one direction only, no matter whether I use + or - steps. The output shaft does 1 rotation in about 600 steps..
    Terry

     
  • brownrb

    brownrb - 2016-11-11

    Hi Terry
    Bad news. The stepper motor you purchased is not recommended one, the one you have is an eight step motor not the 4 step one that is recommended.

    Thus it does not work with the published code.

    Step Angle (8-Step sequence: Internal Motor alone): 5.625° (64 steps per revolution)
    Step Angle (4-Step sequence: Internal Motor alone): 11.25° (32 steps per revolution)
    SO: it takes (6464 = 4096 steps per output shaft revolution.. In 8-step sequence.
    SO: it takes (32
    64 = 2048 steps per output shaft revolution.. In 4-step sequence.
    NOTE: Arduino "Stepper Library" runs in 4-step mode only

    8STEP = HALF STEP = 5.625 degree per step, 64 steps per rev, 64:1 = 4076 steps per rev
    4STEP = FULL STEP = 11.25 degree per step, 64 steps per rev, 64:1 = 2038 steps per rev

    So what to do?
    Let me see if I can make some code changes for you to try - ignore other code for time being. I will see if that is possible. If not, then you may have to purchase different motor - but let me make some code changes first - maybe 2-3 days at most.

    Cheers
    Robert

     
  • brownrb

    brownrb - 2016-11-11

    Hi Terry
    Please try attached version. Let me know what happens
    Robert

     
  • brownrb

    brownrb - 2016-11-11

    Simple test program should work with your stepper motor

     
  • terryb22160

    terryb22160 - 2016-11-11

    Hi Robert,
    code works great. I also have a 35BYJ-412B which is a similar motor, but 12v with 4080 steps.... great!!!!
    All checks out with APT...
    If the modification to the firmware is easy, would it be possible to add to the other versions, as later on I'd like to build one of the more complete versions.
    Next projects are your dew buster and the sqm.
    many thanks
    Terry

     
  • brownrb

    brownrb - 2016-11-11

    Hi Terry
    Yes, that is possible. Just let me know when the time comes. You can email me direct. For the email address, look in Control panel for the myforcusepro2 windows app - in win10 it listst the support URL when highlighted - which is the email address

    Cheers
    Robert

     

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.