0
\$\begingroup\$

I'm very new to microcontrollers and stepper motors.

I have an idea to make a CNC based pen, so I got a stepper motor with ULN2003 stepper motor driver, but I have to learn more before using it.

To rotate it I need to make a small microcontroller program but I want to test it without microcontroller.

This is my stepper motor with driver:

enter image description hereenter image description here

So I can supply power to +and - terminal, but I have no idea how to use the 4 pins named 1n1,1n2,1n3,1n4. But I think it's possible to rotate it may be very small angle without a microcontroller. Can you help me to test it?

Do I need to supply a voltage to n1 and n2 or something like that ?

\$\endgroup\$
4
  • 2
    \$\begingroup\$ First read about stepper motors. This is a 4-pole unipolar motor. 'jones on steppers' used to be a good text. \$\endgroup\$ Feb 19, 2015 at 11:05
  • \$\begingroup\$ @WoutervanOoijen tnx i will definitely read it \$\endgroup\$
    – Fast Snail
    Feb 19, 2015 at 11:11
  • 2
    \$\begingroup\$ You can manually step it by applying signals with switches or wires, but that will get old fast. Something like a 555 to generate pulses and an L297 to convert from step/direction to phase drives would probably work. That said, most of us here would probably do a single-chip solution with whatever microcontroller we already have on hand. Back in the day of local bus parallel ports and primitive operating systems, it wasn't uncommon to driver steppers that way either - it can still be done awkwardly with realtime modifications to a Linux or Windows kernel, but true parallel ports are scarce. \$\endgroup\$ Feb 19, 2015 at 13:45
  • \$\begingroup\$ @ChrisStratton thanks.i don't care about speed at that time .only i want to test is it working or not .so just few steps or a vibration is enough.You can manually step it by applying signals with switches or wires .can u clarify it i think it's all i need . \$\endgroup\$
    – Fast Snail
    Feb 19, 2015 at 15:17

6 Answers 6

2
\$\begingroup\$

It looks as if your stepper driver is for a uni-polar step motor. I assume that you do indeed have a uni-polar step motor.

All you need is 4 toggle switches. Simply connect one side of all the toggle switches to a +5 Vdc power supply, connect the other side of each toggle switch to one of the inputs (IN1 - IN4) on the stepper driver card. Ensure that your 5V supply negative lead is connected to the same ground point as your step supply and driver card.

Now turn on switch 1. The motor should snap to a fixed position and it will be hard to turn it away from that position.

Now turn on switch 2. The motor will move a tiny bit in one direction or the other.

Now turn OFF switch 1. The motor will turn a tiny bit more in that same direction.

Now turn on switch 3. The motor will turn a tiny bit more in that same direction.

And so on. When you turn on a single switch, the motor lines up the rotor with the active pole piece in the stator.

When you turn on 2 switches, the rotor lines up midway between the two active pole pieces in the stator.

When you turn off the first switch, the rotor lines up only with the #2 pole piece because it is the only one that is active.

As you cycle all of the switches (1, 1&2, 2, 2&3, 3, 3&4, 4, 4&1, etc), you will see the motor rotate 4 full step positions. Note that is NOT one full rotation: most small step motors are 200 steps per revolution. You would have to repeat the above sequence 50 times to make the motor turn one full turn.

Note that the sequence that I have described is known as "half Stepping". I suggested this because it maintains a magnetic field on the motor at all times as you are manipulating the switches manually. If you were doing this electronically, I would have instead described full stepping.

\$\endgroup\$
3
  • \$\begingroup\$ i draw a simple diagram using your suggestion .can you tell is it correct .there is 4terminals(IN1 - IN4) and 2 terminals +- for power.when i connect 4 one side of switches to power supply + where i need to connect other side.you have states "Ensure that your 5V supply negative lead is connected to the same ground point as your step supply and driver card" do you mean the power supply terminal..this is my diagram is this correct?i.imgur.com/IJt3sl8.png \$\endgroup\$
    – Fast Snail
    Feb 20, 2015 at 6:42
  • \$\begingroup\$ Good answer if you are ok with it moving very very slow. I presumed you'd wanted a way to get it moving without continuous input from you. \$\endgroup\$ Feb 20, 2015 at 15:48
  • \$\begingroup\$ The very small and cheap steppers (like the one shown) often incorporate an internal gearhead with a 64:1 ratio - so this may take quite a few steps. \$\endgroup\$ Aug 1, 2020 at 0:57
2
\$\begingroup\$

Fast,

Different driver board designs can work differently. There are PWM output drivers and STEP/DIRECTION controllers. Can you comment back about the model of the board, or perhaps the model number of the driver chip?

Drivers using STEP and DIRECTION (and ENABLE) are fairly easy to prototype operation with a 555 timer or a benchtop frequency generator. If you had that type (consult the manual for that board), you would tie ENABLE to the inactive power plane (ground or +5), set DIR to a SPDT switch, allowing you to drive the signal with +5 or ground, and then drive the STEP input with the frequency waveform generator (or 555 output)...

The motor will turn if:

  • The driver is correctly sized for the motor
  • any phase current settings are correct (presumably a simple driver always uses max)
  • the loading of the motor doesn't exceed the torque calculated by phase current (up to the max capable by that motor)

Should be easy!

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
5
  • \$\begingroup\$ thanks for your answer.my stepper motor is 28byj-48 my driver is uln2003 chip .i brought motor and driver came with it so they should definitely match.i'm thinking about rotate motor at least a single step manually.i mean without any ic or microcontroller for testing purpose \$\endgroup\$
    – Fast Snail
    Feb 19, 2015 at 15:23
  • \$\begingroup\$ Forgive my answer being not specific to this board. I did investigate the ULN2003 board, and it just directly controls the stepper motor phases. Look to this simple guide to show the order of the signal motion for each step - note it's a quadrature output and harder to create with switches and timers... \$\endgroup\$ Feb 19, 2015 at 15:49
  • \$\begingroup\$ Look to the waveform drawings here link show the order of the signal motion for each step - note it's a quadrature output and harder to create with switches and timers... \$\endgroup\$ Feb 19, 2015 at 15:56
  • \$\begingroup\$ Your solution doesn't address the Original Poster's situation. He doesn't have a proper step & direction decoder and his stepper motor is uni-polar whereas you are showing a bi-polar stepper. \$\endgroup\$ Feb 19, 2015 at 20:45
  • \$\begingroup\$ Thanks for criticizing my answer, @Dwayne. I was in-fact unaware of the actual model and type when I answered the first time, and followed up with references to the waveforms he was actually looking for. So... \$\endgroup\$ Feb 20, 2015 at 15:46
2
\$\begingroup\$

I know this post is old but after reading with interest it brought back memory's I used to do something very similar to circuit above with the old brown door bell transformers which have a 4 Volt secondary tap which easily drives any 2 phase 4 wire stepper motor with added bananas that you can reverse as well as FWD the motor with a simple 2 way single pole switch.

schematic

simulate this circuit – Schematic created using CircuitLab

schematic

simulate this circuit

\$\endgroup\$
2
  • \$\begingroup\$ I been trying to delete all this mess I made yesterday and now today but now its like a dogs dinner. \$\endgroup\$ Dec 30, 2017 at 17:08
  • \$\begingroup\$ Can one of you admin here please help and wipe everything i put here , and then I will re-post with a correct circuit/dialog . \$\endgroup\$ Dec 30, 2017 at 17:12
1
\$\begingroup\$

you can run your stepper motor by adding only one capacitor!

in fact the stepper motor is like the synchronous motor it can run by the min ac power source.

you need:- small transformer 4.5v x2 it comes with 3 wire use 2 wire (4.5v only) - capacitor of 10uf or 4.7uf

connet the circuit and have fun

enter image description here

\$\endgroup\$
1
\$\begingroup\$

Above all answers, just in case you need to get motor characteristics rather than to see if it works, you can put an oscilloscope on its phases and rotate it with an electric screw driver, applied to the shatf. Thisnway you can measure BEMF, number of steps per revolution, maybe even torque constant- if you use some load on the phases.

\$\endgroup\$
0
\$\begingroup\$

If you just want to test it, use a multimeter. The stepper has 2 or 3 coils. Check continuity testing wires by pairs. If the coils are OK, probably the motor is working.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.