Moteur pas à pas de lecteur de carte Arduino

Moteur pas à pas de lecteur de carte Arduino

In this tutorial we will show you how to connect a bipolar stepper motor to an Arduino Uno board. The stepper motor we are using is the Sparkfun Stepper Motor but you can use any other 4-wire bipolar stepper motor.

Because a stepper motor draws a higher current than the Arduino processor can handle we are going to use a Quad half H-Bridge chip to control the stepper motor. The popular Texas Instruments SN754410 chip is ideal for this.

Stepper Motor drive from Arduino

The Arduino Stepper library will work directly with this chip without any code modifications, so it is just a simple matter of wiring it up as per the diagram below.

Once all wired up, load one of the example stepper motor sketches. The One-Revolution sketch is shown below which turns the stepper motor one revolution in one direction, then one revolution in the other direction.

/* 
 Stepper Motor Control - one revolution

 This program drives a unipolar or bipolar stepper motor. 
 The motor is attached to digital pins 8 - 11 of the Arduino.

 The motor should revolve one revolution in one direction, then
 one revolution in the other direction.  

 Created 11 Mar. 2007
 Modified 30 Nov. 2009
 by Tom Igoe
 */
Stepper Motor drive from Arduino
#include <Stepper.h>

const int stepsPerRevolution = 200;  // change this to fit the number of steps per revolution
                                     // for your motor

// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8,9,10,11);            

void setup() {  // set the speed at 60 rpm:  myStepper.setSpeed(60);  // initialize the serial port:
  Serial.begin(9600);}void loop() {  // step one revolution  in one direction:
   Serial.println("clockwise");
  myStepper.step(stepsPerRevolution);  delay(500);
   // step one revolution in the other direction:
  Serial.println("counterclockwise");  myStepper.step(-stepsPerRevolution);  delay(500); }

 

For more detail: Moteur pas à pas de lecteur de carte Arduino


A Propos De L'Auteur

Ibrar Ayyub

Je suis expérimenté, rédacteur technique, titulaire d'une Maîtrise en informatique de BZU Multan, Pakistan à l'Université. Avec un arrière-plan couvrant diverses industries, notamment en matière de domotique et de l'ingénierie, j'ai perfectionné mes compétences dans la rédaction claire et concise du contenu. Compétent en tirant parti de l'infographie et des diagrammes, je m'efforce de simplifier des concepts complexes pour les lecteurs. Ma force réside dans une recherche approfondie et de présenter l'information de façon structurée et logique format.

Suivez-Nous:
LinkedinTwitter

Laisser un Commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

fr_FRFrench
Faire défiler vers le Haut