Gas station without pumps

2013 June 9

Three-phase motor

Filed under: Hexmotor H-bridge board,Robotics — gasstationwithoutpumps @ 17:10
Tags: , , ,
Picture of 3-phase motor from capstain side (similar to the view in the catalog, but a better, higher-resolution image).

Picture of 3-phase motor from capstan side (similar to the view in the catalog, but a better, higher-resolution image).

About a year ago, I bought some cheap motors from American Science and Surplus, including one that they listed as

40788P1 36-STEP MOTOR
$2.75 EACH

The 36 Steps
This new 12VDC 1A stepper motor with 36 steps per revolution was for a printer, maybe. Or a scanner, maybe. Whichever, it’s mounted on a 2-1/2″ x 2″ plate with a 3/4″ long shaft with a 5/8″ dia rubber wheel out one side and a 15-tooth, 2″ dia plastic sprocket on the side with the leads. The (5) blue leads opposite the white go to 2.8 Ohm coils. Sorry, no wiring diagram available. Samsung P/N 02914900.

My son and I were looking through my drawer of parts when we came across it, and he was interested enough to try to figure out the wiring.  We were not able to find any information about this part on-line.  If someone has more info than what is in this blog post, please let us know!

Connections for three-phase motor: HA, G, 5, A, B, C.

Connections for three-phase motor: HA, G, 5, A, B, C.

The wiring on the back was a bit mysterious, as there are 6 wires, but they are not labeled in an obvious way for a stepper motor (HA, G, 5, A, B, C). With an ohmmeter, my son determined that the A, B, and C connections were all about 3Ω from each other, and had no DC connections to the other three wires, which also seemed to have no low-resistance connections among themselves.

The three phasors for three-phase inputs to a motor (or outputs when the motor is run in reverse as a generator).  Note that the three phasors are 120˚ out of phase, but the differences B-A and C-A are only 60˚ out of phase with each other.

The three phasors for three-phase inputs to a motor (or outputs when the motor is run in reverse as a generator). Note that the three phasors are 120˚ out of phase, but the differences B-A and C-A are only 60˚ out of phase with each other.

I conjectured that the motor was not a standard stepper motor, but a 3-phase brushless DC motor.

We tested this conjecture by hooking up an oscilloscope to measure the voltages B-A and C-A as we spun the motor shaft by hand.  Sure enough, we got sinusoidal voltages out, with different phases. We were a bit confused, though, as the phases looked to be about 60˚ apart, when we were thinking that they should be 120˚ apart.

The figure to the left explains our confusion.

I further conjectured that the other three connections were supposed to be for feedback from a Hall-effect sensor, so that the motor could be controlled in a feedback loop. I hooked up “G” and “5” to Gnd and a 5-volt supply, and put an oscilloscope probe monitoring the HA-G pair. Sure enough there was a small periodic spike as we spun the shaft, synchronized with the sine waves on the ABC connections. It struck me as very strange that the spike went negative from a zero baseline, though, so I tried adding a 22kΩ pullup resistor, which turned the small, narrow spike into a clean square wave alternating between 0v and 5v, with a period the same as the sine waves and a 50% duty cycle.  For connection to an Arduino, no resistor is needed, as an input pin can be configured to use an internal 20kΩ pullup.

With the Hall-effect sensor working, we could determine how many periods of the sinusoid there were in one revolution of the shaft.  We marked the capstan so that we could judge a full revolution, and counted 6 cycles per revolution.  We also counted 36 “click stops” per revolution (6 per cycle), which would correspond to the permanent magnet rotor lining up with pole pieces for A, B, C, A’, B’, C’.

I next wanted to determine how fast I could spin the motor and what phase relationship the Hall-effect sensor should have to the sinusoids input at A, B, and C.

I decided to use my Hexmotor H-bridge board to control the motor.  The board is not designed for 3-phase control, so I can’t do independent pulse-width modulation (PWM) on arbitrary half-H-bridges. So I used 3 separate H-bridge chips, each of them with only one half-bridge under PWM control.  Initially I tried using a sinusoid approximation with different PWM values every 15˚, then every 30˚, then every 60˚.  I finally ended up with a simple square wave for each of A, B, and C, which I could have arranged to do with just two of the H-bridge chips.

I wrote a program first to see where the Hall-effect falling edge occurred when the motor was given a constant frequency input for a fairly slow spin.  This should be the phase for the rotor almost in phase with the magnetic field, and the maximum torque should occur when the rotor lags the field by about 90˚. When the rotation is slow, I get that the falling edge of the Hall-effect pulse comes about 22% of a cycle (80˚) after the rising edge of the A pulse, so maximum torque should occur when it lags by 170˚ (47% of a cycle).

I then wrote a simple feedback loop that looked at the difference between when the falling edge occurred in the cycle and when it would occur for maximum torque, and adjusted the period (gradually) unto the falling edge was close to the desired point.  Under no load, with a 6.4v power supply to the H-bridges, I could spin the motor up to about 3.8msec per cycle, 22.8msec/rotation, or 2600 rpm.  With a 14.5v  supply to the H-bridges, the feedback loop had some problems with hunting (it tended to stall, at which point it backed off to a much lower speed and re-accelerated).  I observed times of about 2.6 msec/cycle (3850 rpm) just before stalling.  With either power supply, the motor got quite warm, so I don’t believe that it is really designed to operate continuously at those speeds.

I also learned not to put even moderate currents through the flexible jumper wires that I have—I melted the insulation on a couple of them.  Replacing them with 22-gauge solid hookup wire eliminated the problem.

I suppose that the next step in characterizing the motor would be to measure the torque at different speeds and rotor lag angles.  I haven’t figured out an easy way to do that though, as it involves mechanical design. I should also see how slow the motor can be stepped, to see if it could be used as a stepper motor.

The next step in programming would be to make a more usable interface, so that users could specify combinations of speed, torque, time, or number of steps to move. Because I switched to square wave control, I could probably rewrite the code to use only two of the H-bridge chips, or maybe even 2 3-phase motors on with only 3 H-bridge chips, since I don’t need to worry about which pins have PWM control and which don’t.

I think I’ve played with the motor enough today, though so I’ll leave these tasks for a time when I actually have a use for the 3-phase motor.


  1. Kudos and thanks to the author – we have been perplexed about this motor for too long. Please contact us at so we can send you a little gift.
    With kind regards from American Science and Surplus

    Comment by CJ the house polymath — 2015 January 22 @ 10:07 | Reply

  2. […] The reason that I was sent this rather valueless $10 gift bag is that American Science and Surplus noticed my post about a motor I bought from them a few years ago: […]

    Pingback by Build a better life by blogging | Gas station without pumps — 2015 January 27 @ 18:28 | Reply

    • I enjoyed your article until I read your “rather valueless $10 gift bag” comment. This is a very common 3-phase DC servo configuration; you’r process of assessment made it clear that your inexperienced with DC 3 phase Wye wired servos; never the less, you went about evaluating this device rather nicely even know your clearly an armature. It’s too bad that you belittled yourself with that “rather valueless $10 gift bag” comment. Belittling others does not make you appear ignorant, not smarter. Perhaps this is why nobody has buzzed in and enlightened you with the insight you clearly lacked knowledge of. the funney part is… I suspect that $10 gift bag is much more valuable then this article.

      Comment by Kerr — 2017 February 28 @ 19:13 | Reply

      • Although I have not used 3-phase motors before, I had heard of them, and knew that they come in both Y and Delta configurations.

        If I still had the gift bag, I’d send it to you for the cost of shipping. Unfortunately, most of it was junk that was discarded. The most valuable thing was a coffee mug, which I added to the collection in the grad lab. I believe that it (like most of the mugs in the lab) eventually disappeared—I buy 5-6 mugs a year (@ 50¢ each at the thrift store) to replace the pilferage.

        Incidentally, more people would take you seriously if you had fewer spelling errors.

        Comment by gasstationwithoutpumps — 2017 February 28 @ 23:01 | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: