(SOLVED) Stepper Driver Voltage
Hey all,
So I am trying to drive my stepper with a DM542T and the Teensy 3.5
I was using an arduino but I want to use higher microstepping than just 1/2 steps so naturally I moved up. The code was working fine on my Arduino so I moved all the pins over hoping that the Teensy would work right out of the box but to no avail. I realized that the 3.3v pins are probably what are causing the issue and when looking at the data sheet for the driver it seems I need a minimum of 4V. So I went on Amazon and got some logic level shifters. These should push my 3.3v signal up to the 5v I need. After wiring it up and hitting it with a multimeter, I indeed got the 5v I needed but the stepper wouldn't budge. Further investigating found that when my leads are connected to the driver my voltage reads 2.6v but when disconnected and only on multimeter it will read 5v. I was able to measure this by using a blink sketch making the pin high every 2 seconds. So I am not sure why this is happening other than there must be a resistor in the way that is messing it up. But even if there is one it was working fine with arduino 5v so I am not sure what the difference would be? I also disconnected the leads from the driver and connected them to an oscilloscope. I found I was indeed sending a 5v pulse when using my AcellStepper code but again my assumption is when it hits the driver for whatever reason the voltage goes too low. Are there other reason that you guys can think of that would give me this issue? Is there a simple solution like giving the logic converter 9v instead to overcome whatever the reason for the large drop? Also should there be a pulldown between my signal and ground? When I was doing the blink sketch it would take like 1/2 a second to go from 0 to 5v but I can only image what havoc this could cause when there is a fast pulse. Not sure why it wasn't a problem on the arduino then?
Hey all,
So I am trying to drive my stepper with a DM542T and the Teensy 3.5
I was using an arduino but I want to use higher microstepping than just 1/2 steps so naturally I moved up. The code was working fine on my Arduino so I moved all the pins over hoping that the Teensy would work right out of the box but to no avail. I realized that the 3.3v pins are probably what are causing the issue and when looking at the data sheet for the driver it seems I need a minimum of 4V. So I went on Amazon and got some logic level shifters. These should push my 3.3v signal up to the 5v I need. After wiring it up and hitting it with a multimeter, I indeed got the 5v I needed but the stepper wouldn't budge. Further investigating found that when my leads are connected to the driver my voltage reads 2.6v but when disconnected and only on multimeter it will read 5v. I was able to measure this by using a blink sketch making the pin high every 2 seconds. So I am not sure why this is happening other than there must be a resistor in the way that is messing it up. But even if there is one it was working fine with arduino 5v so I am not sure what the difference would be? I also disconnected the leads from the driver and connected them to an oscilloscope. I found I was indeed sending a 5v pulse when using my AcellStepper code but again my assumption is when it hits the driver for whatever reason the voltage goes too low. Are there other reason that you guys can think of that would give me this issue? Is there a simple solution like giving the logic converter 9v instead to overcome whatever the reason for the large drop? Also should there be a pulldown between my signal and ground? When I was doing the blink sketch it would take like 1/2 a second to go from 0 to 5v but I can only image what havoc this could cause when there is a fast pulse. Not sure why it wasn't a problem on the arduino then?
Code:
const int stepsPerRevolution = 200*16; // change this to fit the number of steps per revolution
#include <AccelStepper.h>
// Define a stepper and the pins it will use
AccelStepper stepper(AccelStepper::DRIVER, 9, 8);
//AccelStepper stepper(1, 9, 8);
//number of steps to each position from 0
//long pos1 = 11810L*8;
//long maxspeed = 3937L*8;
//long accel = 4000L*8;
long pos1 = 2362000;
long maxspeed = 7874;
long accel = 8000;
void setup() {
Serial.begin(9600);
stepper.moveTo(pos1);
stepper.setMaxSpeed(maxspeed);
stepper.setAcceleration(accel);
//while(!Serial);
delay(1000);
}
void loop() {
//Serial.print("hi");
stepper.run();
}
Last edited: