Coil pattern in a stepper motor

I am tinkering with a stepper motor and the example sketches (stepper_oneRevolution) for fun. My problem is that the motor shaft vibrates rapidly back and forth when i want it to move smoothly in one direction or the other. my hunch is that I have connected the coils in correctly. is there an easy way to figure out the correct coil pattern for an SP-57 motor without pulling it apart? also i am using 4 PNP mosfets instead of a driver chip.

How many wires?

Where did you find a PNP MOSFET? Do you mean p-channel? :wink:

six wires, unipolar (i think) motor looks exactly like this: http://www.ebay.com/itm/STEPPER-MOTOR-SP-57-36-OHM-12V-7-5-robot-cnc-step-lab-/150371628909. MOSFETs are IRFBC40 connected low side, so not p-channel but n-channel (PNP was incorrect, oops).

seanz2003,
http://www.stepperworld.com/Tutorials/pgUnipolarTutorial.htm
is the best source of stepper-info I've met.
He probably tells you how to check wires pairwise or measure coil-resistanc as half or full value.
As for the resonance you could have wired wrong, but there are large differences on the 'noise' of a proper wiring .. a function of frequency.