Hobbyist Toolkit

Showing results for 
Search instead for 
Did you mean: 

Control Bipolar Stepper Motor with LINX (Arduino)

Go to solution

I'm using a Nema 23 bipolar 4-wire stepper motor, StepperOnline DM542T driver, and an arduino uno R3 in a testing setup. I've downloaded LINX to communicate with arduino, but the programming logic is getting a bit lost on me. It seems that it should be communicating, and I believe it is since the RX/TX lights are blinking when I click run, but the motor isn't moving. I've downloaded the firmware to the arduino board from the LINX tab in tools just like all the tutorials I've found describe, but do I also need to code anything in arduino? Or is the firmware the code?


I attached my VI below, hopefully someone has had this issue and can see what may be wrong. I do think the issue is with my program and not my hardware because the motor works fine when taking arduino IDE commands directly.


Thanks in advance!

0 Kudos
Message 1 of 3
Accepted by topic author tck1378

Hello tck1378, i answered the other post, but you might have missed that.


"note that his code runs in a while loop, at the frequency of the desired step speed. Instead of using four digital write in sequence at 4 different channels, your application is much simpler: you only need to write true and false how many times your desired step quantity is needed."


your VI is working, but i believe that you are using the wrong function. you might use duty cycle to change speed on h bridge dc motor controls. so i measured the output. note that it does not change the frequency of PUL signals, in other words, the speed of your motor will not change:

duty cycle pwm.jpg

i recommend using the VI "Digital Write Square Wave" to "write true and false how many times your desired step quantity is needed"

check out my measurements observing that the duty cycle does not change, but the frequency does: (i'm am using autorange for better visualization)


write square wave.jpg

Another option is to use custom command as sugested by Stargo-44 in your other post.

Jorge Augusto Pessatto Mondadori, PhD
Sistema Fiep
0 Kudos
Message 2 of 3

Using a square wave instead of PWM worked, thank you! Now just to control speed/steps. Thanks so much again!

0 Kudos
Message 3 of 3