Black Lives Matter - Action and Equality. ... Adafruit is part of the Stop Hate for Profit campaign. Adafruit is open and shipping.
0

Help with automotive gauge stepper
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Help with automotive gauge stepper

by PeteBrad on Tue Jun 02, 2020 6:39 pm

It is very difficult to find info on the pins of the X27 168 stepper.

I have worked out that the two coils are left and right of the shaft and that you can connect one par of pins to M1 and the other to M2 of the motor shield. By a certain amount of trial and error I have established the motors run ok if the speed is set somewhere between 12 RPM and 20 RPM. The actual is not so fast with a 5V power supply but since there are actually internal gears I assume that it takes the number of steps declared, 600, and the RPM to get a pulse width to drive the motor.
I would appreciate it if someone could tell me the best setting.

What puzzles me is that it does not seem to make any difference if I reverse the leads for one coil. It seems not to be dependent on polarity. I have tried reversing the leads for each motor in turn and for both motors but the motors still seem to run at the same speed.
Is it that polarity of each coil is unimportant or is there actually a correct way?

I am not sure if it is correct but with the motor turned over and the output shaft at the top facing away from me I have nominated the right pins A and the left B with A1 and B1 towards the top and A2 and B2 towards the bottom.

I later found the photo below which also nominates them in this way.
Image

From https://os.mbed.com/users/nhimani3/note ... per-motor/

PeteBrad
 
Posts: 25
Joined: Thu Apr 30, 2020 10:45 am

Re: Help with automotive gauge stepper

by adafruit_support_bill on Tue Jun 02, 2020 8:02 pm

Stepper motor torque is roughly proportional to the input voltage and inversely proportional to the step rate. If you keep the voltage constant and increase the step rate, at some point, the motor will not have enough torque to step reliably. But if you increase the voltage too much, you risk burning out the motor.

Gauge motors are not designed for high RPMs. They are designed for high-resolution positioning.

The coils have no 'correct' polarity. In fact, the polarity reverses with every other step. Reversing the wires on one coil while keeping everything else the same will just reverse the direction of rotation.

https://cdn-learn.adafruit.com/download ... motors.pdf

adafruit_support_bill
 
Posts: 77907
Joined: Sat Feb 07, 2009 10:11 am

Re: Help with automotive gauge stepper

by PeteBrad on Wed Jun 03, 2020 5:30 am

Thanks for the reply. The link to the pdf was very useful.

I had found by experiment that if a low, say 5 rpm, is specified that the motor did not function properly and also above 20 rpm. Anything between 12 and 20 seemed to work ok.Testing showed that this did not represent the speed of the output shaft . Since speed is not important I will try 15 rpm which should be reasonably reliable.

Cheers
Peter

PeteBrad
 
Posts: 25
Joined: Thu Apr 30, 2020 10:45 am

Re: Help with automotive gauge stepper

by adafruit_support_bill on Wed Jun 03, 2020 5:42 am

I would expect it to work fine at a low step rate. It would just turn very slow. I have built clocks that take one step every few seconds. They don't appear to be moving, but they keep perfect time.

adafruit_support_bill
 
Posts: 77907
Joined: Sat Feb 07, 2009 10:11 am

Re: Help with automotive gauge stepper

by PeteBrad on Wed Jun 03, 2020 9:06 am

Yes. That is exactly what I am using them for. To make a two dial clock that looks something like a car or bike speedo and tacho. I have the sketch functioning with a RTC and compensating for European DST. My first experiments were using the small geared motors but I have finally received some automotive steppers. The problem appeared when I tried to use continuous steps, 600 forward and backward, to zero the motors against the stops on power up. Using this technique I can then read the RTC and automatically set the clock to the correct hour at power up or reset, this also involves continuous steps.

I am not even sure if it is necessary to specify the speed as it still seemed to work when I commented out that line of code.

At the moment I am only advancing the Minute hand once every 30 seconds but using these motors I could reduce that to once every 15 seconds easily enough.

Thanks
Peter

PeteBrad
 
Posts: 25
Joined: Thu Apr 30, 2020 10:45 am

Re: Help with automotive gauge stepper

by adafruit_support_bill on Wed Jun 03, 2020 9:14 am

Specifying the speed just alters the time between steps. For a clock, you will want to do one step at a time and handle the timing yourself to achieve best accuracy.

Many of the RTC chips have a very precise 1-second pulse output which makes a good reference time-base.

adafruit_support_bill
 
Posts: 77907
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.