LV8727 stepper configuration information

@Brandon_Satterfield sent me the following stepper drivers for my OX build:

The silkscreen on the back is mostly in chinese without translation, and also doesn’t make sense; for example, it says that 128 microsteps per step and 20 microsteps per step are configured the same way.

It looks like the information on aliexpress makes more sense:

The rest of the information might be useful too:

Seems there was some pictures floating about of the internals of all in one control box, I’d follow those settings. Seems it was 1/16 micro step, although you could use a crazy high micro step (128) as your on 2.8A steppers with 4A drivers (intentional). I’ll look about.

Note that the two control connections are different. One is EN CLK DIR GND and the other is EN DIR CLK GND — it’s not a silkscreen error, I confirmed with multimeter.

I’m hoping that 3.3V is enough so that I can drive it from an ESP32 without a level shifter in the way. :slight_smile:

Thumbs up brother, absolutely correct!

1 Like

Are you suggesting that I should turn the driver current all the way up to 4A with 1/16 microstepping?

I started with as close as I could eyeball to 2.8A and 1/2 microstepping to see what it would be like, and… it doesn’t sound very good. 1/16 microstepping sounds a lot better. I haven’t turned the current up. It runs, but I haven’t put bit to wood yet.

Air-cutting imaginary OX plates from .gcode file from @Brandon_Satterfield now. And from another discussion…

I know that sometimes when people use steppers in a heated enclosure for 3D printing ABS and similar plastics, they damage the steppers. But I’m familiar with how how the 1A or so steppers on my printers get.

I’m running MT-2303HS280AW for all four steppers. Temperature ratings:

| Ambient Temperature | -20°C~+50°C |
| Temperature Rise | 80°C Max.(2 phase on) |

That seems to say they are rated to 130⁰C which seems hotter than I want to experiment with. So far, the X and Y steppers are just under 100⁰F and Z, which I set a little higher on current (not measured, of course :roll_eyes:) is 120⁰F, so probably there’s some headroom here at 1/16 microstepping. So @Brandon_Satterfield, did you run these 2.8A steppers at 4A with 1/16 microstepping?

1 Like

No, I kept them at the stock amperage but always had motors fully locked.


I did first cuts in styrofoam in order to take things one step at a time, and I appear to be skipping steps. My X and Y steppers are running near ambient temperature. This makes me think that I really need to actually measure the current and not go by the graphic in the documentation, which I kind of expected anyway.

(Wow I was glad I used a dust boot and vacuum while cutting styrofoam!)

Edit: I finally realized that I have $1=250 instead of $1=255 and not sure how that happened. Need to change that and try again.


Even with $1=255 set, axes are doing uncommanded moves. I got a hole from drilling (only Z movement, X and Y stayed at 0) that looks like this:

That’s not a round hole. And I felt the Y steppers actually stepping while it was drilling, with this gcode:

G0 Z9.906
G0 X0.000 Y0.000
G1 Z-6.350 F8.47
G0 Z9.906

Makes me wonder whether 3.3V signal is near a threshold for those stepper drivers and electrical noise is making them sense steps that aren’t there. I also got a phantom Y pin pressed notice once (the gantry was nowhere near the Y limit, and there was nothing anywhere near the switch to engage it).

Here’s my second (and, overlapping at the bottom, part of the my first) attempt to do a practice cut in styrofoam:

Those circles that aren’t quite coaxial are intended to be a 1 1/8" wide circular groove.

Should I be using a level shifter to clock the steppers?

It worked better with $1=10 than with $1=3; the hole I drilled looked like a hole instead of a backward L. But the Y axis was still hunting slightly during drilling, the circles were still offset, and there was still some step-over on the outside contour cut.

I also disconnected the limit switches entirely to make sure that I wasn’t experiencing electrical noise on the stepper lines.

From the app note:

STEP input MIN pulse width (common in H/L): 500ns (MAX input frequency: 1MHz)

Even $1=3 (ms) ought to be 6 times longer than enough by that.

However, constant current control is performed by PWM during chopping period, which is set by the capacitor connected between OSC1 and GND. You need to perform chopping more than once per step.

For this reason, for the actual STEP frequency, you need to take chopping frequency and chopping count into consideration.

For example, if chopping frequency is 50kHz (20μs) and chopping is performed twice per step, the maximum STEP frequency is obtained as follows: f=1/(20μs×2) = 25kHz.

I didn’t even try to probe with an oscilloscope to find the chopping frequency of the driver boards I got, so 10µs is just a guess for $1.

I measured max current with a good (fluke) multimeter and increased current on all four drivers to just under 2.8 A. It didn’t improve anything.

Data sheet indicates 3.3V should be fine:

But I don’t know whether there are optoisolators under the heat sink that I’m really driving. If so, then the classic MOSFET-based bidirectional logic level shifter might not source enough current, and I should instead use active level shifters to switch my 5V source. I ordered both TXS0108E and TXB0104 devices to try for this purpose, since I’m sure I’ll need more as I do more work with ESP32s and having some of them immediately available is likely to come in handy.

Ugly. I’ll find out soon whether it does the job!

It shifts enable, step, and dir from 3.3V to 5V and breaks out two Y headers. It has the same order of pins as the LV8727 drivers I’m using. The rat’s nest poking out the back is ground wires which I measured too generously and then was too lazy to fix up. I was frustrated with myself because I had just realized I should have oriented the two Y headers to avoid having to stack my wiring and kind of gave up making it nice. :roll_eyes:

If this solves, I should probably make up a custom PCB and do it right.

1 Like

Meanwhile, Bart Dring of Grbl_ESP32 fame let me know that those level shifters can’t source much current; I had misread the datasheet. For fun, I tried it and he was certainly right, as I expected.

Using the MKS DLC2.0 (atmega, 5V) I’m not seeing X and Y hunting. I have not (yet) measured current. It cut my test pattern correctly.

On the ESP32 at 3.3V, they are pulling about 40mA per pin, which goes beyond spec for the ESP32 and might explain the “hunting” behavior I saw.

1 Like

Untested design for an adapter that sits in a normal stepstick 16-pin port and converts the four output pins intended to be A1/A2/B1/B2 to 5V high-current GND/STEP/DIR/~EN pins.

I uploaded it to circuithub just to see what their instant quote interface looks like, but that would be $300 for one sent out in about three weeks, so that’s not the route I’ll take! :slight_smile:

Do you know the external stepper driver adapters that @raykholo sells?

1 Like

No, I wasn’t aware of it, but it’s pretty much the inverse of what I need. It just breaks out the signal, whereas what I’m looking for is something that supplies more power (and potentially higher voltage) on those signal lines. No room on the stick for screw terminals, and also no need in my case.

I did an updated version that doesn’t invert the signals last night.

Can you post a picture of your board? It’s very hard to imagine for people that can’t read gerber files (like me) :wink:

It exists only in the computer…

I haven’t even tried breadboarding it to make sure that I didn’t do something stupid in the circuit. I used 0402 passives because I wasn’t sure what would fit; the render made it clear that I could move to larger passives that are easier to do at home without a microscope. But I ran out of time right now to do any more work on it in the short term.