Code Monkey home page Code Monkey logo

speed-control-of-a-2-phase-stepper-motor-using-a-dual-h-bridge-module's Introduction

Speed-Control-of-a-2-Phase-Stepper-Motor-using-a-Dual-H-Bridge-Module

This Project helps in understanding how a stepper motor works as we control the motor directly by GPIO pins using software interrupt and adjusting the frequency of the timer/counter. This project requires an external 12V power supply which is given to the H-Bridge to power the stepper motor (NEMA 17HS4401). This project uses a DSPIC33CH128MP508 Micro-Controller which is connected to a Dual H-Bridge Module using the GPIO pins. The Dual H Bridge Module is used to control the speed and direction of the 2-Phase Stepper Motor. All the libraries included in this project is setup using MCC in mplab, which is present in the c code. The Micro-Controller is connected to a Explorer 16/32 Development board, which includes a on board POTentiometer. This POTentiometer can be used to vary the speed of the stepper motor. An Opto-coupler module (Optional) is connected to one of the GPIOs of the Micro-Controller to calculate the real-time RPM of the stepper motor. Check the jpeg setup files to get a better idea about the Timer1, SCCP timer and ADC configuration. IN1, IN2, IN3, IN4 named GPIO pins can be directly connected to the H-Bridge IN1, IN2, IN3, IN4 pins. Look at PIN_setup.jpeg to get a better picture about pin mapping. Note: do check if you have connected a common ground to all the devices in use.

Theory: The stepper motor makes steps (1.8 degree) to make a full rotation. In this case 200 steps results in a full rotation. RPM = (1.8 degree/360)xFrequencyx60. We can use this formula to calculate the frequency or time period. For example for 60 RPM the GPIO needs to perform the excitation sequence 50 times in a second. 50 times the four excitation sequence [50*4 = 200 steps]. Check the stepper motor wave drive JPEG file for the excitation sequence.

speed-control-of-a-2-phase-stepper-motor-using-a-dual-h-bridge-module's People

Contributors

sayeed97 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.