Menu

pin map for Uno and CNC shield with A4998

2018-06-01
2018-06-24
  • joann mcdonald

    joann mcdonald - 2018-06-01

    So I bought an UNO and a CNC Shield and A4998 drivers. I have nothing else to connect at this time besides the stepper motor. I plan to use ASCOM but will be starting with the Windows app for now.
    The shield has 4 spots for drivers. Lets say I am using Y. Dir is connected to pin 6. Step to pin 3 and enable to pin 8. I won't be using micro stepping at this time so full step (no jumpers used).
    I am using Focuserv270_A4998_HW203.
    Can you advise what pins to change? Everything is commented out. Should I just change the DIR/STep pins? The enable pin is actually already assigned to PIN 8.
    Or is there a better version of firmware I should be using.

     
  • brownrb

    brownrb - 2018-06-01

    Hi Joann
    Sorry, there is no support for using this project with a CNC shield. Each shield is different and often uses pins reserved for other functions that often interfere with focuser operation.

    Did they give you any specifications at to what pins the XYZ motors where connected to?

    Regards
    Robert

     

    Last edit: brownrb 2018-06-01
    • brownrb

      brownrb - 2018-06-01

      In v270 of the firmware
      you are going to change these lines
      #define DRV8825DIR 3 // drv8825 control lines
      #define DRV8825STEP 4
      #define DRV8825ENABLE 8
      #define DRV8825M2 5 // for easydriver, do not connect
      #define DRV8825M1 6 // for easydriver, connect to MS1
      #define DRV8825M0 7 // for easydriver, connect to MS0

      to this (for motor Y)
      #define DRV8825DIR 6 // drv8825 control lines
      #define DRV8825STEP 3
      #define DRV8825ENABLE 8
      #define DRV8825M2 10 // for easydriver, do not connect
      #define DRV8825M1 10 // for easydriver, connect to MS1
      #define DRV8825M0 10 // for easydriver, connect to MS0

      Note that microstepping is done by jumpers, but I have set these to Pin 10 which for the shield is the Y end-stop - so - set the microstepping with jumpers - changing the step mode in the focuser application will have no effect

      Regards
      Robert

       
      • joann mcdonald

        joann mcdonald - 2018-06-01

        Thanks I will give it a try right now. I have an tin can stepper that is an unknown so i might have to wire up my nema 17 0.9 motor just to see it work

         
  • joann mcdonald

    joann mcdonald - 2018-06-01

    seems to work, my motor is acting funny and that is a variable. Keeps randomly going the wrong direction. The pots are really hard to turn too. I'll let you know how the good motors fair. Thanks so much!

     
  • joann mcdonald

    joann mcdonald - 2018-06-02

    Test with a Nema 17 400 step motor went well. I still need to buy the geared motor. I did have an issue with the smaller movements 1 step/10 step skipping steps and reversing direction. Happened both at full step and x16. Pot should be adjusted right. Also the speed was really fast. I'll wait till I get the geared stepper to ask about final tweaks. Have not tried ASCOM yet. But the very minimal UNO and CNC shield was super easy. If I need more, I'll go the PCB route. Roughe stimate of cost (not waiting for China) UNO and CNC shield $18, 27-1 stepper $50, flexible shaft $7, case $10, power brick $10 (though I might just use one of the million old ones stuufed in "that box o electroincs", misc wires/connectors/screws $5, Mounting hardware $10. Total $110.

     
  • brownrb

    brownrb - 2018-06-02

    Below are the values that define the speed in the firmware file, you can change these to suit your motor and change the speed.

    I would set to full steps, fast motor speed, then adjust the FAST1DELAY by doubling value to 3000 and then see if thats ok. Basic principle is set one speed at a time, fast2delay is for fast motor speed with half steps, fast4delay is for fast motorspeed with 1/4 steps, and so on.

    #define FAST1DELAY          1500          // delay times - values are based on BOTH step mode and motor speed settings
    #define FAST2DELAY          600
    #define FAST4DELAY          250
    #define FAST8DELAY          50
    #define FAST16DELAY         20
    #define FAST32DELAY         10
    #define FAST64DELAY         10
    #define FAST128DELAY        10
    #define MED1DELAY           3000
    #define MED2DELAY           1800
    #define MED4DELAY           1000
    #define MED8DELAY           400
    #define MED16DELAY          200
    #define MED32DELAY          100
    #define MED64DELAY          50
    #define MED128DELAY         10
    #define SLOW1DELAY          6000
    #define SLOW2DELAY          3600
    #define SLOW4DELAY          2000
    #define SLOW8DELAY          800
    #define SLOW16DELAY         400
    #define SLOW32DELAY         200
    #define SLOW64DELAY         100
    #define SLOW128DELAY        20
    

    Cheers
    robert

     

    Last edit: brownrb 2018-06-02
    • joann mcdonald

      joann mcdonald - 2018-06-02

      Thank you so much Robert! Between you and Howard Dutton (OnStep), I may never have to go commercial :)

       
  • joann mcdonald

    joann mcdonald - 2018-06-23

    First test of focuser went well. I thought my motor was stalling but I was hearing whining/singing. This was due to the coil power being on to hold the microstep. Should I be concerned about this whining? If perfect focus happens to fall on a microstep, the coils could be powered for hours.
    I am using nema 17 2 amp motors with a A4988 at 1 Vref and X16 microstepping. Torque seems to be OK. My image train is just a DSLR. I used this motor simply because I had one. ! https://photos.app.goo.gl/tnFs5YLQycaQZY8b9

     
  • brownrb

    brownrb - 2018-06-24

    Hi Joann
    The singing appears to be related to current but also the actual driver chip. I have in most cases found that replacing the driver chip with another the singing goes away.

    2 amp is really at the limit. With coil power off, the stepper will be free to rotate to the nearest full step so depending upon your step size and cfz will depend if you are going to notice it. Probably with a dlsr and very wide FOV probably not.

    Photos look good.
    Cheers
    Robert

     
    • joann mcdonald

      joann mcdonald - 2018-06-24

      Thanks Robert. I'll try another driver, I have 2 more. My CFZ is 91.8 and my step size is 5.3 so I have 17 steps @ x16 micro steps. I'll experiment the next clear night. I have a 420mm fl scope and a crop sensor dslr.

       

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.