EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / What you must do is to

What you must do is to

|

Microcontroller › PIC › How to run the stepper motor ?.. › What you must do is to

August 18, 2013 at 8:16 am #10335
Luis Morquecho
Participant

What you must do is to investigate which is the secuence of the stepper motor.

The 16 posibilities are next:

IN1  IN2  IN3  IN4 

 0       0     0       0

 0       0     0       1

 0       0     1       0

 0       0     1       1

 

 ”        ”      ”        “

 

 1       1      1      1

 

Get a battery or power supply of 3,6V

1º connect GND of Power to the GND of the motor.

2º Try all the 16 posibilities and if the motor turns note down in which direction.

3º If for example there are 3 secuencies that turn in right direction reproduce this, but betwen out a secuence and out the next secuence put a delay that will mark the velocity of the motor. Watch out with the delay is not too small.

 

while (1)

{

out port  (0100)   //Secuence 1 turn right

delay_ms (500)    //delay 0,5 s

out port  (1000)   //Secuence 2 turn right

delay_ms (500)    //delay 0,5 s

out port  (1100)   //Secuence 3 turn right

 

delay_ms (500)    //delay 0,5 s

}

 

with this example the motor always turn in the right direction

RSS Recent Posts

  • Need a fresh eye on my first PCB November 14, 2025
  • restarting this Christmas project November 14, 2025
  • desoldering November 13, 2025
  • Unknown, to me, electric motor fitting November 13, 2025
  • Can a small solar panel safely trickle-charge old NiMH AA batteries? November 13, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise