Hello everyone, I am new to arduino and I am having problems with the movement of two stepper motors. I am trying to control two stepper motors with the help of two pololu drivers dvr8825 and an arduino uno. To do this I have a circuit board with the drivers and the connections for the motors that plug into the arduino board. I have already checked that the circuit is correct but the code is my problem. I have also a platform with the two motors. Motor1 rotates on a vertical plane and Motor2 rotates in an horizontal plane.
DRV8825 Stepper Motor Driver Carrier, High Current. Arduino Stepper Drivers Tutorial-2/2 by R Jordan Kreindler in Arduino. Stepper Motor Basics — 5 Wires Unipolar / Bipolar Motor. Dec 11, 2017 - The DRV8825 is a stepper motor driver board that has on a. Of stepper motors through arduino type programming firmware and software.
For each 1º that the vertical plane rotates I need to rotate -60º to 60º with the other motor in an horizontal plane. Each motor does rotate, however just with the first setup of putting the Motor2 at -60º (as it is my starting point) I have problems.Motor2 doesn't stop at -60º it keeps going until I unplug it.Each time I connect the board to the computer it starts running even before I upload the program. I am using also the CoolTerm software for mac to see the serial.println I have put in the code to be able to find the problem.
However, I don't know if I am using it correctly but it doesn't work. Is there any other tool I could use to see the serial.print???
Arduino Stepper Driver
I have searched throught the internet for days now and I have tried everything I have found and everything I have come up to without any luck. I appreciate all answers and any help I can get. Thanks in advance!
AliciaPae PD: I am attaching my arduino code and other pictures that might help. I have tried the code with if instead of while as you suggested and it works.
However, now I have a problem with the direction of the rotation. Even if I change the sign of the position (I am using the AccelStepper library) which should change the direction from clockwise to anticlockwise the motors don't change direction and continue rotating as if nothing was changed. I have tried also using the Stepper library from arduino and all the examples from it and still nothing.
Thank you in advance!! I have tried all of the examples in the webpage and others as well and nothing works. I have checked that the motors I am using are bipolar and all of the connections work as well. I have done a program that only moves 1 motor and I tried changing the direction and still didn't work. I don't know what else to try so any suggestions are welcome! The AccelStepper library says the following about the position: /// Set the target position.
The run function will try to move the motor /// from the current position to the target position set by the most /// recent call to this function. /// paramin absolute The desired absolute position.
Negative is /// anticlockwise from the 0 position. Void moveTo(long absolute); /// Set the target position relative to the current position /// paramin relative The desired position relative to the current position. Negative is /// anticlockwise from the current position. Void move(long relative).
TMC2100 in 16/256 microstepping with interpolation in spreadCycle mode if you can run them at 24V or higher. LV8729 is another option that does 1/128 microstepping. There is a really high current S109 driver that I've not tried, but I'm happy with the TMC2100's for now so I probably won't try them. DRV8825's are a lot quieter if you up the voltage.
But they're no where near the low dB of the TMC2100's. You might be able to use TMC2130's if you have a firmware that allows digital current setting. In that case, I'd use those instead for ease of tinkering. Will I need to jumper somehow the TMC2100's? I don't think there are jumpers built into the AZSMZ(clone smoothieboard with separate stepper drivers) like my other ramps board.
By default on the board the DRV8825's are set to 1/32. Edit: Yes, found online that the substepping selection pins are hardwired to high on this board, 1,1,1. So LV8729 would be by default set to 1/128. Sounds like you are a big proponent of 24v. I am stuck on 12v though with my heatbed choice and ceramic heater.
In that case, would you still recommend TMC's? I do not believe the AZSMZ supports digital current settings.
In order for the TMC2100 driver to operate in the desired step/mode setting, You have to tie the CFG1 pin to the GND pin, while leaving CFG2 pin open (not GND, not V+). If you don't have jumpers on the board, what you can do is desolder or even snip the CFG1, and CFG2 pins from the header on the bottom of the driver board so that they do not plug into the AZSMZ board, and then manually jump the CFG1 to the GND pin on the top of the board using a small length of solid wire. On some TMC stepper boards, there is also a little solder pad pair on the bottom of the driver that says 'CFG1' beside it. You will need to connect those two pads together as well so that essentially you enable the connection from the TMC2100 CFG1 pin on chip itself all the way to the CFG1 pin on the header. Then with your jumper from CFG1 to GND, it will be set up correctly. This is the chart that shows the modes and the little pads I mentioned. Though you'll notice it says GND, CFG1, VIO.
I think on my boards (which were not version 1.3) the little pad didn't actually go to GND, it was a manufacturing error. The new ones should just need the CFG1 and CFG2 pins snipped, and the little pad soldered on the bottom linking CFG1 and GND. No jumper wire soldered to the top.
It's not rocket surgery. Just two or 3 steps.
But you will need a really sharp soldering iron tip, and really sharp vision or a magnifying soldering station. At least I did. Sounds like you are a big proponent of 24v.
I actually have them running at 30V, as I modified them further and added small JST connectors to the GND and VMOT so that I can use external power supply booster to go from 12V to 30V. I think it was part of the reason why I am able to push the printer to 100mm/s print speed with no degradation in quality compared to 60-65mm/s. I'd have to check to be sure, but I run them far over the recommended spec- though I should lower them now, but I haven't printed in about 2 weeks. I think 0.9v @ 30V VMOT on the single motor drivers and 1.4v @ 30V VMOT on the dual motor drivers was how it was set last.
The longest print I've done since then I believe was around 8 hours, and it didn't have a single issue. I have a 3 blade 120mm server fan blasting air right over them, so they are 'actively cooled'- but i'd say that's a bit of an understatement. I have pressurized cold air blowing out of the electronics hatch because it flows so much air. I bet the drivers are below ambient if anything. That keeps 'em from burning up quite a bit. I will be replacing that fan with a 120mm MagLev Corsair ML120 fan because they're somewhat quieter and have insane static pressure for the sound/speed/size.
Modifying them to accept external voltage is both cheap and effective. I have 4 dc boost modules, one per axis + single extruder.
Bipolar Stepper Driver Circuit
With the printer running and the heated bed off (since it cycles on and off when it only needs to be at 60degC), the control board + the boost modules + the fans + the heater cartridge + the LCD screens (I have a TFT28 and RepRap discount controller hooked up at the same time), the printer consumes about 84 watts when printing (measured at the AC input). You could do what I did a lot easier by using just one unit like this 150W one: or perhaps even this one since it's about 100W I think the total power consumption at 30V is around 60-65 watts (at the AC Input), so with air cooling that should work fine. If you want to go all out, you could maybe get ahold of some TMC2100 drivers. They've a great reputation for reliability, fairly low noise, and an impressive maximum microstepping rate of 1/256.
There are other options, though. There's always the tried and true A4988, which drops you to 1/16, but has a long history as a reliable, well made driver. In addition to those, there's also a few options from a company named Panucatt, which have a history of making very nice boards, but for some reason don't ever seem as popular as a lot of other options out there. If you'd like to just drop in some replacements, and retain your old microsteps/etc, you could try Panucatt's based driver. They're based on the same chip, but are supposed to have a few performance and quality of life improvements.
They have another 1/32 microstepping chip in the form of the, which is based on an Allegro chip, rather than a TI one. Lastly, they have the Sanyo based, which offers 1/128 microstepping, and a number of jumper-based quality of life enhancements available.