Go Down

Topic: Driving a mini 2-phase 4-wire stepper motor (Read 22809 times) previous topic - next topic

MarkT

So I got some QSBT40's and hacked up a breakout board, now on order:



Board is 11x16mm in size, I added a 1206 decoupling capacitor for good measure
as well as the QSBT40 and 0805 resistors.  I'm going to try 100 ohms or so for
Arduino and 47 ohm for another(*) 3.3V microcontroller I use (which can source upto 40mA,
ie _NOT_ the Due which is much less beefy).

(*) The P8X32A "Proepeller" - its got 32 pins so could drive 7 motors (allowing for serial
comms).

Another thought I had was that an RS485 driver chip can source/sink into a 50 ohm
load safely (they are designed to drive a 100 ohm twisted pair terminated at each end),
so could be used to drive the motor at higher currents from 5V.  Dual RS485 transmitters
are pretty cheap...
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

jremington

Those are the cutest little steppers but what will you use them for?
No PM's please.

MarkT

Erm, the worlds smallest 3D printer?!   Tiny robot...

One use is indicators, attach a drum with graphics around the edge, visible through a
slot in the front panel...   Or a faked needle-style meter (need some gearing though).

[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

jremington

Probably too big for a PicoSumo Bot! https://www.youtube.com/watch?v=oKE9KEYHJOo
No PM's please.

Robin2

Have you discovered what is the max current they can take?

How does their torque compare with a similarly sized DC motor?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

MarkT

Im not really sure how to measure a torque that small to be honest!  Perhaps wind a
single hair round the 0.92mm shaft?
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Robin2

Gear it down and measure the output torque? It would be a crude measure with lots of error, but better than nothing. (Borrow some gears from a small servo).

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

madaeon

Hi,
I have been for a long time searching for a way to control via arduino these micro steppers and nothing worked so far.
No I saw MarkT post and breakout board and it would be super to have finally found something working!
Unfortunately I have some troubles understanding the circuit and wiring from his pictures, due to my electronics knowledge being wosre than I tought.
Can you help me? I have attached what I was able to figure out (pretty nothing  :~)
A very raw sketch of arduino code on jow to control it and pinout would be a dream.
Regards

MarkT

For code something like this would sequence appropriately
Code: [Select]

#define Aplus 2
#define Aminus 3
#define Bplus 4
#define Bminus 5

byte phase = 0 ;

void update_motor ()
{
  for (byte i = Aplus ; i <= Bminus ; i++)
    digitalWrite (i, LOW) ;
  switch (phase)
  {
  case 0:
      digitalWrite (Aplus, HIGH) ;
      break ;
  case 1:
      digitalWrite (Bplus, HIGH) ;
      break ;
  case 2:
      digitalWrite (Aminus, HIGH) ;
      break ;
  case 3:
      digitalWrite (Bminus, HIGH) ;
      break ;
  }
}

void step (boolean dir)
{
  if (dir)
    phase += 1 ;
  else
    phase -= 1 ;
  phase &= 3 ;
  update_motor () ;
}


just call step (false) or step (true)

[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

madaeon

Thank you so much for the fast reply about the code.
If you would be so nice to also explain me a bit about the circuit, It would be very kind of you :smiley-mr-green:.
I have been trying to control those motors for my mini robot project for a while.

Riva

An old thread but while trawling eBay I came across these and thought of this thread.
Don't PM me for help as I will ignore it.

graham641

I also ordered those 2 phase steppers. I assumed that they were used for auto adjust on camera lenses in some planetary gear configuration. I would expect low torque and high speed for the application. The 20.7 ohm and 43.4 ohm values do seem a little flaky. It is like measuring across a single coil then parallel coils or some such thing. That may be why they are essentially giving them away. I looked at the provided specs and got this : Two-phase, four-beat: (+ A) (+ B) - (-A) (+ B) - (-A) (-B) - (+ A) (-B) -

Single-phase, four-beat: (+ A) - (+ B) - (-A) - (-B) -

Eight-shot, half: (+ A) (+ B) - (+ B) - (-A) (+ B) - (-A) - (-A) (-B) - (- B) - (+ A) (-B) - (+ A) -

I do not understand the nomenclature. Does it make sense to anyone?

MarkT

My circuit has two resistors to protect the output pins from over current and each pin needs
2 schotty diodes to protect from inductive voltage spikes.  Conveniently there are little packs of
multiple schottky diodes available (for protecting from a logic bus, not a motor, but same
function), so that made the component count nice and low.  All tiny surface mount stuff.

I got it working, but then I broke the motor off the PCB by accident - very delicate, and tricky to
repair that size.  No miss-stepping from standstill to max speed, since there is so little inertia
(the mechanical time constant must be a millisecond or something ridiculous!)
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up