Stepper driver advice for use with X27-168 steppers

Hi all

For my aircraft sim cockpit I have made a number of gauges using the X27-168 type stepper motors, and am using them in conjunction with EasyDriver boards and latterly A4988 driver boards. They are driven by Nanos or a Mega, depending on the application, and they for the most part work well. They also have the advantage that they are relatively cheap, and easily available.

I switched from the EasyDriver boards for a number of reasons, which are they they run very hot, they have a largish form factor with an awkward pin layout, and lastly, they are super sensitive to any connection issues. I have a number of burnt out units, as if any of the stepper motor connections are not 100% they blow instantly.

The A4988 boards are smaller and are easier to incorporate onto PCBs, and due to a heatsink they run pretty cool, plus (as I have inadvertently discovered) are pretty robust, even to the point of not blowing when I got the polarity of the supply voltage wrong one time.

So there is a mix of these boards on the gauges I made, but both setups feature two characteristics that I would like to address.

The first is the requirement to have a 12v supply, which means every gauge has to have extra wiring and when there are 30 of them it adds up. There are enough wires need for the rest of the rig, so to be able to eradicate them would be desirable. The steppers are virtually zero torque as they only have to move a tiny plastic pointer, so power requirements are really minimal. 12v is total overkill.

However the number one reason to change them is the poor movement characteristics the gauges display. The gauge pointers are jittery, the movement is not smooth, and it is accompanied by a surprisingly audible chattering sound, which is of course multiplied by the number of gauges.

A brief explanation or how the game interacts with the gauges might help understanding here. Essentially the output from the PC to the controller is an integer between 0 and 65335, and the sketch in the Arduino maps that output 0 to 100% of the maxsteps value defined in the sketch. The stepper motor itself has an internal limiting pin that means max rotation is 315 degrees.

Clearly, if maxsteps is set at 630, the theoretical step angle should be 0.5 degrees, which doesn't sound too bad. However in practice it seems grainy in action unless making large movements, and even then appears to wobble and twitch near the ends of the motion. When moving slowly even though half a degree is pretty small, you really notice the individual steps.

I tried microstepping, but tests showed that it doesn't really microstep as you would think. As an example, 1/16th microstepping should in theory make the stepper move one step for every approx 10.21 units of output by the game when maxsteps is set at 6400. In practice, it will step, then step approx 10 units later, then only step again once another approx 150 units later, then another 10 steps and so on repeating. So while in theory there should be about 16 steps for every 163 units, in practice you only get two, irregularly spaced, the same as 1/2 stepping.

This means that Microstepping does not actually deliver smoother motion, and actually subjectively the 1/4 and 1/8th microstepping actually seemed to make the movement worse. In both those cases you also got the two steps, then a gap, two steps repeating pattern, effectively meaning they are the same as 1/2 stepping.

As for 1/2 stepping, you do actually get the correct halfstepping but the movement actually seemed to worsen. Note that in each case I played with maxaccel and maxspeed to optimise the values.

For reference the A4988 output pins are connected to the X27-168 steppers like this

1B - stepper pin 2
1A - stepper pin 1
2A - stepper pin 4
2B - stepper pin 3

So for some reason the microstepping is not functioning as I expected. I did a whole battery of tests to try and get the best settings to minimise the issues, but ultimately microstepping was no help, at least with the combination of parts I used.

I have seen on another site where someone used AX1201728SG type stepper driver for these stepper motors, and anecdotally the site mentions that they are more suited to them due to the way they work. Not details were given why this would be. They also have two other potential advantages, namely that they do not require an external power source, as the Arduino output is more than enough for these virtually zero torque motors, plus each one can drive four steppers independently, so simplifying connections and wiring further.

I obtained some AX1201728SG chips from ebay a while back, along with some adapter boards to solder them to. They took a good while to arrive in the current situation, but finally this week they got here. Over the last few days I have mounted a couple of the chips and tried them, but have utterly failed to get them working for even the simplest of tests. It may be that I have overheated the chips soldering them to the adapters, but I used my finger to hold the chip down while soldering the pads and the chip never got hot enough for me to let go. It's also possible that they are duff chips.

So before I go to the hassle and expense of getting new ones to try, I want to just try and find out if and why these units would make for smoother movement of the X27 steppers, and also if someone can explain why the A4988 stepper microstepping does not seem to work the way I imagined it would

Any feedback welcome

Les

What is your question?

"I want to just try and find out if and why these units would make for smoother movement of the X27 steppers, and also if someone can explain why the A4988 stepper microstepping does not seem to work the way I imagined it would"

Why when I think that 1/16th microstepping should make 16 microsteps does it only do two, and irregularly spaced

Why is it possible that the AX1201728SG chips would control the steppers more smoothly, is it that they have a different way of microstepping, or are there any special requirements for microstepping for the X27 motors that the AX1201728SG chips are compatible with?

Is there something about the X4988 stepper driver that would mean that they are not the right choice for driving the X27 motors?

Cheers

Les

Steppers work somehow for gauges, but you'll need either steppers with high resolution and no gear (0.7° or smaller per fullstep) - or better, or a real gauge, which is even simpler.

For your info, the X27-168 stepper motors are actually used on GM cars dash gauges, which is one of the reasons they were chosen, as well as being relatively cheap and freely available.

They are geared though

Les

The x27 steppers are capable of very fine needle movements----- If it is done correct. They can and should be driven directly from an atmega. that is how most if not all stepper gauge manufactures do it. adding a stepper driver and trying to get a finer movement is useless. You wont find any posted step direction code or 0-5 volt input on the internet that will work properly. I manufacture analog x27 stepper motor gauges for industrial applications. Frequency and 0-5 volt inputs using an atmega328 with very smooth needle movements and no jitter. I hired a professional that was familiar with stepper motor movements to write me a proper working code. Not to be harsh asking questions on this site will only get you suggestions and not proper answers. Is your input step direction or what??

Just my unerducated opinion

DAS

To drive these stepper motors a particular step sequence is needed . There is a particular chip , which is very easy to use available for these specific motors and will give smooth fast response .

Google AX1201728sG ( switchtec) these are quad drivers and can drive 4 motors independently , no library is needed. They have one pin for direction and a second that you pulse LOW for 1micro sec , then HIGH For 500microsec ( or longer, depends on pointer weight) for each step . eBay sell them and they are designed for these motors , 5v !
Suddenly you’ll have 1000’s steps !
https://guy.carpenter.id.au/gaugette/2017/04/29/switecx25-quad-driver-tests/

Lesthegringo:
I have seen on another site where someone used AX1201728SG type stepper driver for these stepper motors, and anecdotally the site mentions that they are more suited to them due to the way they work. Not details were given why this would be. They also have two other potential advantages, namely that they do not require an external power source, as the Arduino output is more than enough for these virtually zero torque motors, plus each one can drive four steppers independently, so simplifying connections and wiring further.

I obtained some AX1201728SG chips from ebay a while back, along with some adapter boards to solder them to. They took a good while to arrive in the current situation, but finally this week they got here. Over the last few days I have mounted a couple of the chips and tried them, but have utterly failed to get them working for even the simplest of tests. It may be that I have overheated the chips soldering them to the adapters, but I used my finger to hold the chip down while soldering the pads and the chip never got hot enough for me to let go. It's also possible that they are duff chips.

So before I go to the hassle and expense of getting new ones to try, I want to just try and find out if and why these units would make for smoother movement of the X27 steppers, and also if someone can explain why the A4988 stepper microstepping does not seem to work the way I imagined it would

Any feedback welcome

Les

As you can see I had already noted the use of these drivers, but am unable to make the ones I have work

That's the site I used for reference too!

Cheers

Les

also if someone can explain why the A4988 stepper microstepping does not seem to work the way I imagined it would

The gauge motors work on a different principle than the standard two coil steppers. Furthermore, for microstepping to work, the current limit on the A4988 has to set correctly, which is not possible with those high impedance, low current gauge motors.

If you can't get the AX1201728SG chips to work, your only option for optimal performance is to use custom circuitry.

I'll try to get some AX1201728SG chips from a different source, maybe the ones I got were no good - wouldn't be the first time from Ebay specials

Is there a particular reason that these chips are better suited?

Cheers

Les

A standard stepper driver is intended for low impedance, two coil motors with a standard step sequence.

The gauge motors are almost entirely different.

I don't understand all the issues in your first post. The EasyDriver should not have heated up AT ALL, if properly connected. So, whatever you did do was wrong. Furthermore, the very quickest way to destroy any stepper driver is to disconnect the motor while the circuit is powered up.

In general, it is very wise to always disconnect power before altering a circuit.

There are 12 EasyDrivers all connected by soldered in headers onto a custom made PCB for the main engine control gauges I made, and the 12v is supplied on another part of the PCB. All 12 EasyDrivers get hot, and all 12 gauges work well, jittery movement notwithstanding. The ones with A4988 drives work the same, but just don't get hot.

The problem is if one of the EasyDrivers is slightly dislodged and I don't notice, it's gone before I know anything about it.

I'm not the only guy to notice that they get hot, although to be fair as long as the EasyDrivers are not disturbed they don't give any issue due to the heat. It is just one of those things that makes me uncomfortable.

Cheers

Les

I'm not the only guy to notice that they get hot

Then all of you are doing something terribly wrong, but since you posted no circuitry, no one on this forum would be able to guess what that might be.

Let me knock a diagram of what I have together

Cheers

Les

Here's the schematic used for each gauge, as you can see not much to it.

Sorry for the delay in getting back, I have to pay attention to the wife sometimes...!

If there is something wrong with this let me know. For info, the A4988 schematic is almost identical, the only difference being that the A4988 requires the 5v from the nano as well as the GND and the order of the stepper connections is slightly different

Thanks

Les

EasyDriver X27 stepper schematic.pdf (25.6 KB)

Hi,
Ops circuit, (better if posted as jpg)

Tom... :slight_smile:

Thanks Tom - for reference which command did you use to post as a .jpg? I only see where you have to post it as a link, or the attachment method

Cheers

Les

Have you adjusted the current limiting pot on the driver board - with the power off of course.

Hi,
This will help,

It will tell you that the "stepper" works on the differential of current flowing through its coils hence the unique driver IC.

And here;

https://nicegear.nz/product/automotive-gauge-stepper-motor-x27168

This library gives you code so you can try and drive the stepper directly from the Arduino 5V output.

I hope these help.

Tom.... :slight_smile:

Lesthegringo:
Thanks Tom - for reference which command did you use to post as a .jpg? I only see where you have to post it as a link, or the attachment method
Cheers
Les

You save the image as a jpg, then attach it.

If you go to the bottom of this reference, you will see how to insert an image.
https://forum.arduino.cc/index.php?topic=148850.0

Tom... :slight_smile: