redbasecap / Stepper_28BYJ-48_with_ULN2003_Driver_Libary

This libary let's you easy drive your stepper in WaveDrive, Fullstep and Halfstep. Enjoy! This is a libary for the 28BYJ-48 stepper motor with the ULN2003 driver module. With this you can run your stepper motor in the Wavedrive(fast__512steps/360degree), the Fullstep(fast__512steps/360degree, double the torque compared to Wavedrive) and Halfstep(slow__1024steps/360degree, double the torque compared to Wavedrive) method. It makes it much easier for beginners to use this stepper motor. Credtis to Bret Stateham. His video about stepper motors is great! https://www.youtube.com/watch?v=B86nqDRskVU

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stepper_28BYJ-48_with_ULN2003_Driver_Libary

Welcome to my little StepperLibary

How to use it:

  1. Get the libary
  • Clone it in to your libaries folder which is in /Documents/Arduino/Sketches/libaries or
  • Just download, exctract it and put it into it manually
  1. Include the libary
  • #include <stepperMotor_RBC.h> or
  • Choose Sketch in the toolbar -> Include libary -> Stepper_28BYJ-48_with_ULN2003_Driver_Libary //this is the way I recommend
  1. First you have to give the pins that you are using to the class in the libary.

    ////////CODEEXAMPLE///////

    #include <stepperMotor_RBC.h>

    StepperMotor StepperMotor(2,3,4,5,20); //Pin for IN1, IN2, IN3, IN4, Timedelay //the TIMEDELAY have to be >5 ms

    void setup() { }

    void loop() { }

    //////// END CODEEXAMPLE///////

  2. Use on off the 3 different modes Take a look at the DriveMethod.png (Source: https://www.youtube.com/watch?v=B86nqDRskVU by Bret Stateham) StepperMotor... -1) .waveDrive(100);

    //Only a single coil is controlled per time. //Low torque and precision but very easy to understand. 512 Steps/360 Degrees

-2) .fullStep(100);

//Two Coils active at a time
//Maximum Torque, Medium precision, 512 Steps/360 Degrees

-3) .halfStep(100);

//One or Two coils active at a time
//Medium Torque, Smallest step angle, 1024 Steps per 360 Degrees

-4) .clearInputs();

//Put all Digital Outputs to 0

About

This libary let's you easy drive your stepper in WaveDrive, Fullstep and Halfstep. Enjoy! This is a libary for the 28BYJ-48 stepper motor with the ULN2003 driver module. With this you can run your stepper motor in the Wavedrive(fast__512steps/360degree), the Fullstep(fast__512steps/360degree, double the torque compared to Wavedrive) and Halfstep(slow__1024steps/360degree, double the torque compared to Wavedrive) method. It makes it much easier for beginners to use this stepper motor. Credtis to Bret Stateham. His video about stepper motors is great! https://www.youtube.com/watch?v=B86nqDRskVU

License:Apache License 2.0


Languages

Language:C++ 100.0%