Giter Site home page Giter Site logo

Step pulse off timing about grbl_esp32 HOT 4 CLOSED

bdring avatar bdring commented on June 2, 2024
Step pulse off timing

from grbl_esp32.

Comments (4)

ggallant571 avatar ggallant571 commented on June 2, 2024 1

I have been doing my own gcode processor for a couple of years using a STM32 device. Recently have started using various ESP devices for remote sensing projects. More than willing to migrate to your implementation.

from grbl_esp32.

buildlog avatar buildlog commented on June 2, 2024

The solution mentioned above appears to work fine.

I removed the timer interrupt that turns off the step pulse and replaced it with a delay loop at the end of the main stepper driver interrupt (void IRAM_ATTR onStepperDriverTimer())

// wait for step pulse time to complete...some of it should have expired during code above
while (esp_timer_get_time() < step_pulse_off_time)
{
NOP(); // spin here until time to turn off step
}
set_stepper_pins_on(0); // turn all off

The stock Grbl setting is 3 uSecs, which is also the minimum. I am not sure why that is a minimum, but I'll leave it. Common drivers like the TI DRV8825 require a step pulse length of 1.9uS.

I don't think it should impact performance because the time is so brief. You can't go any faster than what the minimum step pulse timing will allow anyways. I have not profiled the code before that, but it probably uses up much of the time.

I have not committed the code yet, in case anyone wants to comment on this.

from grbl_esp32.

buildlog avatar buildlog commented on June 2, 2024

For reference, here is the DRV8825 timing diagram.

image

from grbl_esp32.

buildlog avatar buildlog commented on June 2, 2024

Changed to use method described above.

from grbl_esp32.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.