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: 43
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: 81300
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: 43
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: 81300
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: 43
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: 81300
Joined: Sat Feb 07, 2009 10:11 am

Re: Help with automotive gauge stepper

by bobgardner on Sat May 15, 2021 6:08 pm

This is the datasheet http://agr.ucoz.lv/files/SP_X27_e_C.pdf. It says it has a 6 step per circle on the pinion gear and its 180 to 1 to the big gear on the shaft. So a step is 60 deg. per step on the inside rotor, and 60/180 on the shaft, or 1/3rd of a degree per step. So they have 2 coils, one on each leg of a u shaped magnet, and the 3rd pole is the center of the magnet. This pole "I think" is N if the 2 coils have an N polarity pointing to the 3rd pole. If either coil is off, the 3rd pole is the polarity of the coil that is on. The rotor is a little bar magnet about 1/16" of an inch long. It aligns with the sum of the polarity of the 2 coils. So with 4 outs, 1 and 2 go to pins 1 and 2 on coil1, outs 3 and 4 go to pins 3 and 4 on coil 2. This 4 bit output pattern for rotor position 012345 is hex 981542. Pdf says you can step every 4 ms (256ms per step). Divide by 3 for deg per sec. The coils are 280 ohms, and 5v is good to drive them. Juken is the Swiss manufacturer, and they make a dual shaft version that would make a good clock. There are some part numbers with an internal stop and one without. Imagine 2 90 deg needle gauges, one on the left is ccw at bottom, goes up cw to the top. The other one is full cw at the bottom, and increases angle ccw to the top. So you step thru the pattern one way for cw, the other way for ccw. You cant tell when the needle has hit the stop, so to initialize the needle you need to know which way is down, cw or ccw, and take more than 90 deg worth of steps to make sure it gets to the bottom, I have some c to run one of these on an uno. Hope this explanation is right. If it aint, you should tell us whats wrong.

bobgardner
 
Posts: 40
Joined: Fri Mar 08, 2013 8:35 pm

Please be positive and constructive with your questions and comments.