Close

Stepper motor driving core. First measurements

A project log for Building the Thor robot

Building a 6-axis robot based on the Thor robot. When size DOES matter!

olaf-baeyensOlaf Baeyens 05/12/2017 at 01:360 Comments

You don't need an expensive logic analyzer to be able test the setup. The $10 logic analyzer I originally had would have helped a lot in developing the core code.

I initially started by using the debug LED to test the development, but a logic analyzer speed things up. :-) The ability to test the code without need of motors. It makes you test the code for extreme situations without risk of damaging anything.

For the Thor robot I use the Ultratronics Board v1.0. The board comes with sockets for the DRV8825 stepper motor drivers. If you destroy one, you can easily replace one.

The nice thing about this board is also that they also provided break-out pins where I can hook my logic analyzer to.

So I connected the logic analyzer to one of the DRV8825 drivers. The Saleae can also measure the analog signals for each digital input.

The DRV8825 needs 3 controls.

It can only process no more than 250.000 steps/Sec. Example above is testing at 8 Khz.

The pulse width in the above example is 26.16 µS, I was trying for 2 µS programatically. The smaller that puls is, the more free time I have for additional calculations.

I also want to point out that this is interrupt driven. This motor will operate at that speed no matter how much time I use in my main loop. The key to all this, is to fill its processing execution buffer with enough data to keep it busy.

The whole purpose of this interrupt driven technology I develop is to have smooth movements that will take into account acceleration and deceleration.

Close up view of the analogue signal actually produced by the Arduino Due. Nice clear signal.

Next tests will be digital only and see how the code behaves when I operate 7 stepper motors at the same time. There is a reason why I need a 16 channel logic analyzer ;-)

Discussions