User Tools

Site Tools


steppernxt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
steppernxt [2017/08/04 18:38] – [Construction] rebeccacaosteppernxt [2017/08/15 20:11] (current) – [Circuit Schematics] rebeccacao
Line 1: Line 1:
-====== How To Control an Unipolar Stepper Motor with LEGO NXT Using Only Transistors ======+====== How To Control an Unipolar Stepper Motor with LEGO NXT Using ULN2003A ======
  
 **Author:** Xinke (Rebecca) Cao **Author:** Xinke (Rebecca) Cao
Line 14: Line 14:
 \\ \\
 The stepper motors resembles the dynamixels used in Darwin-OP; therefore, learning to operate the stepper motors allows more possibilities on the types of mechanisms can be built that can be controlled by the LEGO NXT Brick. Furthermore, the ability to track the amount of rotation that the stepper motor has made allow for more accurate determination of the state (position, velocity, acceleration) of any mechanism that is attached to the stepper motor. The stepper motors resembles the dynamixels used in Darwin-OP; therefore, learning to operate the stepper motors allows more possibilities on the types of mechanisms can be built that can be controlled by the LEGO NXT Brick. Furthermore, the ability to track the amount of rotation that the stepper motor has made allow for more accurate determination of the state (position, velocity, acceleration) of any mechanism that is attached to the stepper motor.
 +\\
 +\\
 +\\
 \\ \\
 ==== Parts List and Sources ==== ==== Parts List and Sources ====
Line 25: Line 28:
   * (1) NXT Brick   * (1) NXT Brick
   * (various quantities) gauge wires   * (various quantities) gauge wires
 +Here is the [[https://youtu.be/ueQvVYQ1Udo |demo]] of the motor turning with the following schematics and coding.
 \\ \\
-Here is the [[https://youtu.be/VVnshFiYg2U |demo]] of the motor turning with the following schematics and coding. +All the codes can be found [[https://github.com/XKRC/NXT_Stepper_Motor|here]], titled "Stepper_ULN2003A_Basic.nxc".
-\\ +
  
 \\ \\
Line 40: Line 42:
  
 {{ :xinke:circuit_ver_1.png?600 |}} {{ :xinke:circuit_ver_1.png?600 |}}
-\\ 
 D0 controls blue. D0 controls blue.
 \\ \\
Line 49: Line 50:
 D3 controls orange. D3 controls orange.
 \\ \\
 +The integrated circuit that is connected to the PCF8574A is the ULN2003A. The ULN2003A is an array of seven Darlington transistors that amplifies current from the PCF8574A and outputs the voltage supplied to its common port to drive the stepper motor. This is similar to how the IRF510 amplifies the current and acts as a switch to allow specific wires on the stepper motor to obtain enough voltage and current. However, when you input a LOW signal to the ULN2003A, it will output a HIGH signal. Therefore, in the code, we need to adjust the bit values output by the PCF8574A to account for this change.
 \\ \\
 \\ \\
 \\ \\
 ==== Construction ==== ==== Construction ====
-\\ 
-\\ 
 **Step 1** **Step 1**
 \\ \\
Line 190: Line 190:
     Wait(10);      Wait(10); 
  
-// +\\ 
- +To reverse the direction that the stepper motor is turning, the sequence can be reversed.  
-// +\\ 
-// +\\ 
-//+\\
 ==== Final Words ==== ==== Final Words ====
 +The purpose of this tutorial is to allow the users of the NXT Brick learn how to control a stepper motor through an NXT interface.
 +\\
 +Building from this tutorial, one can control the speed of the stepper motor and the direction of the stepper motor by altering the wait time between each signal and the sequence of the signal.
 +\\
 +If you have any questions, please email me at [email protected].
  
  
Line 203: Line 208:
  
  
- 
-**Circuit Schematics** 
- 
- 
-**Basic: Coding** 
-To simplify what I'm doing, I will put it in layman terms. Basically, in order to drive the unipolar stepper motor that we have, we send currents to the stepper motor in a correct sequence in order to turn the stepper motor, say in clockwise direction. This means, to drive the stepper motor in the opposite direction, we reverse the sequence.  
- 
- 
-**Sample Video** 
-// 
- 
-// 
  
  
  
  
steppernxt.1501897080.txt.gz · Last modified: 2017/08/04 18:38 by rebeccacao