A4988 Pilote pour moteur pas a pas

A4988 Pilote pour moteur pas a pas

Automatic current decay mode detection / selection
· Mix with slow current decay modes
· Synchronous rectification for low power dissipation
· for Internal UVLO
· Cross-current protection
· 3.3 and 5 V compatible logic supply
· Thermal shutdown circuitry
· Ground fault protection
· Load short-circuit protection
· Optional step five modes: full, 1/2, 1/4, 1/8 and 1/16
Package Included:
1 X A4988 Stepper Driver
1X Heatsink


Controlling-Stepper-Motor-Circuit-Schematics


  1. /* Simple Stepper Motor Control Exaple Code
  2. *
  3. * by Dejan Nedelkovski, www.HowToMechatronics.com
  4. *
  5. */

  6. // defines pins numbers
  7. const int stepPin = 3;
  8. const int dirPin = 4;

  9. void setup() {
  10. // Sets the two pins as Outputs
  11. pinMode(stepPin,OUTPUT);
  12. pinMode(dirPin,OUTPUT);
  13. }
  14. void loop() {
  15. digitalWrite(dirPin,HIGH); // Enables the motor to move in a particular direction
  16. // Makes 200 pulses for making one full cycle rotation
  17. for(int x = 0; x < 200; x++) {
  18. digitalWrite(stepPin,HIGH);
  19. delayMicroseconds(500);
  20. digitalWrite(stepPin,LOW);
  21. delayMicroseconds(500);
  22. }
  23. delay(1000); // One second delay

  24. digitalWrite(dirPin,LOW); //Changes the rotations direction
  25. // Makes 400 pulses for making two full cycle rotation
  26. for(int x = 0; x < 400; x++) {
  27. digitalWrite(stepPin,HIGH);
  28. delayMicroseconds(500);
  29. digitalWrite(stepPin,LOW);
  30. delayMicroseconds(500);
  31. }
  32. delay(1000);
  33. }


Écrire une critique

Remarque: HTML n`est pas traduit!
    Mal           Bien
Captcha
  • : 212
  • Code produit: a4988
  • Disponibilité: En stock
  • $2.99