Menu

Myfocuspro esp32 Output expected on Step pin

Jimboh2
2024-01-23
2024-02-04
  • Jimboh2

    Jimboh2 - 2024-01-23

    I have been building and testing the esp32 version using the 8825 board config.

    I have the display and am able to run the webserver and do a goto and the display shows the position number going from set to goto value.

    The problem I am having is no movement whatsoever of the stepper.

    I am using a stepper module mount for the 8255 and a nema 14.

    I am looking at the step and Dir pins with my scope . The Dir pin is going high for positive moves and low for negative moves.

    I was expecting to see pulses on the step pin but see nothing (0v). I am pretty sure I have everything set up but even having read the manual in full several times I am still not 100% sure.

    Can someone tell me what I should see on the step pin on the ESP32?

     
  • brownrb

    brownrb - 2024-01-26

    Hi Jimboh2

    The problem I am having is no movement whatsoever of the stepper.

    A couple of quick questions first.
    Are you using a PCB?
    What is the firmware revision?
    You are using Arduino IDE v1.8.19?
    Do you have 12V connected and turned on (motor will not move without 12V on) ?
    Do you have the large capacitor across the VMOT/GND of the drv8825 chip?

    Any pulses on the step line are around 3uS (three microseconds) so you would to set the correct timebase on the Oscilloscope.

    In general, if a stepper does not move then it can be down to a few reasons
    Little current Pot on the DRV8825 chip is not adjusted correctly,
    Wiring Issue
    (seldom) faulty drv8825
    see
    https://drive.google.com/drive/folders/1oE_EOgDKJflBRnwuc2OJB7xOWlRFu7DC?usp=drive_link

    regards
    Robert

     
  • Jimboh2

    Jimboh2 - 2024-01-26

    Thanks for the response.
    No PCB, just an ESP32 into an ESP32 development board.
    I am using the latest download available.
    Yes I am using IDE 1.8.19
    12v is Connected,
    No Capacitor. Can try that. Tried adjusting the 8255 pot - nothing.

    Should the Stepper be locked when the coil is enabled?
    I don't think I am getting anything on the step pin, but the direction pin is toggling.
    I was testing with a Hantek pc scope but I do have a tektronix 100mhz I can use. Will check tomorrow. And will visit the link as well. Thanks again.

     
  • Jimboh2

    Jimboh2 - 2024-01-26

    The 8825 is mounted in a stepper driver module (with 3 way dip sw for step).
    Thanks
    Jim

     

    Last edit: Jimboh2 2024-01-26
  • brownrb

    brownrb - 2024-01-26

    Hi
    The capacitor is essential or the motor cannot step correctly.
    It is important to mount the capacitor as close to the drv8825 as possible.

    But you said you are using a module like?
    https://www.ebay.com/itm/DRV8825-A4988-42-CH-Stepper-Motor-Driver-Expansion-Board-For-UNO-R3-3D-Printer/332441054084
    If that is the case then the capacitor is already fitted.

    The video I mentioned in the previous post shows how critical the position of the current potentiometer on the driver chip. It really is down to sub degree level between no go and go.
    As the video explains turn the pot all one way to a stop position. Please note that the driver chip does NOT rotate 360 degrees, and when turning it is real easy to break the stops and have it rotate all the way. If that is the case you will need another chip. I use a old small plastic screwdriver to turn the pot - the video shows the steps to do.

    Step mode is fine, set that to match the dip switches when you have the controller up and running, using the Management Server.

    If you enable coil power, after which do a small move like +10
    You must do the move after setting coil power. As coil power enabled does not work until a move occurs.
    At the end of the move the motor shaft should be difficult to turn manually. This applies more to a non-geared motor. If the motor shaft turns freely after a move, then the most likely cause is the EN wiring between the esp32 and the drv8825 module.
    ESP32 pin IO14 to Stepper Module EN Row D EN. There are three pins marked G V D
    Gnd, Volts and Data, so I am using the D pin (on the example board it is Yellow closest to the chip

    Check that EN goes Low when Coil Power is enabled
    EN is high when the chip is not enabled (and when coil power if not enabled).
    The chip will not step the motor unless EN is low,

    A logic High pulse on the step pin - when EN is low, will step the motor

    Let me know if this works
    Regards
    Robert

     
  • Jimboh2

    Jimboh2 - 2024-01-26

    I have gone back to a bare esp32 and am monitoring the pins when I instruct a move with the Management Server. No driver board or display connected.
    I checked both En and DIR when I do a move and both act as expected. En goes low when enable coil and Dir goes + 3.3 when move up and 0 when move down.
    But I am seeing nothing on the step pin on the ESP32.
    Is there something I may have misconfigured in the config that would prevent it from pulsing on the step pin?
    I have attached my config.h
    Regards
    Jim

     
  • Jimboh2

    Jimboh2 - 2024-01-26

    Ps I am using a new unused ESP32 for this test.

     
  • brownrb

    brownrb - 2024-01-26

    hhmm
    What ESP32 is it? Link?
    What is the firmware revision number?
    Please zip up the firmware folder you are using and post it to me.
    Include board_config.h

    regards
    Robert
    Do not include any SSID and Password settings in defines folder.

     

    Last edit: brownrb 2024-01-26
  • Jimboh2

    Jimboh2 - 2024-01-28

    Board_config.h Cant find that file

     
  • brownrb

    brownrb - 2024-01-29

    What ESP32 is it? Link?
    What is the firmware revision number?

     
  • Jimboh2

    Jimboh2 - 2024-01-30

    Thanks for pointing out I had an old version. I downloaded last week so have no idea how I managed to grab an old version. So I started again with the correct and latest version 311.
    Happy to report I am now getting pulses on the step pin so I will complete assembly and retest.
    Thanks for the assistance.

     
  • Jimboh2

    Jimboh2 - 2024-02-01

    Looking good thanks. One question though, I don't seem to be able to increase maxsteps only lower it in the management server?

     
  • brownrb

    brownrb - 2024-02-04

    Hi Jimboh

    In v311-00 this was applied
    Fix unable to increase MaxSteps, Management Server Eric Tarant

    The latest version is 311-02 which is supported.
    management server /admin3 is for settings maxStep

    Line 1526 in management_server.cpp is the Error
    tp = (tp > maxp) ? maxp : tp;

    Change that line to
    tp = (tp > FOCUSERUPPERLIMIT) ? FOCUSERUPPERLIMIT : tp;

    and delete this line just above (I think line 1522)
    long maxp = ControllerData->get_maxstep();

    FOCUSERUPPERLIMIT is the upper limit of 250000, found in controller_defines,h

    After making the change, reprogram the controller - there should be no need to upload the Sketch data files. If you have OTA confgiured and running just do the firmware update.

    Regards
    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.