Giter VIP home page Giter VIP logo

avr-steppercontrol's Introduction

StepperControl Controls a Stepper With a Controller

What Is this?

This little project makes a stepper motor that has been salvaged from a CD burner step. I won't go into details here - you find everything about those motors on the web, just google for something like "dvd stepper motor avr". You might also want to look at this: http://homepage.cs.uiowa.edu/~jones/step/

Image of StepperControl

Please keep in mind that this is just a dirty prototype that I came up with under the shower. You probably want to have more voltage for real applications and driving the motor from the output pins' current probably isn't the brightest idea, either. After the project was completed, I actually read that my approach was crap and one should use a "dual full H-bridge" for this task. I found a nice little explanation here: http://www.kerrywong.com/2010/03/22/a-simple-dual-h-bridge/

One question you might want to ask when looking at my design is why I didn't use the ATmega's ports as current sinks instead of doing all that stuff with the transistors. Pulsar256 actually asked, and the answer has two parts:

  • At first I did exactly that. No transistors, no diodes, coils wired up directly to the muc's pins. It didn't work, so I tried to build something that would direct the current to common ground instead of pushing it into the controller. The funny thing is that it would probably have worked, but I had a totally unrelated bug in the controller code ... After I fixed that, I had already wired up the more complicated thing you see above, and I didn't want to remove all that nicely laid out electronics stuff again.
  • I had planned to get the current from an external 12V supply instead of the muc's pins using some pnp transistors. Before I had a chance of implementing that plan, I read about H-bridges and I realized that I was about to re-invent a very basic circuit that practically everybody but me seemed to know already. I decided not to do more work on the circuit. Instead I just documented what I had done so far, put everything up on Github and ripped the parts from the breadboard again.

Why I put this on Github even though it's crap? Because I had fun figuring this approach out and because it's a starting point. If you have no clue about steppers and H-bridges and whatever(like me when I started this), it might give you some insights. At the very least you can learn how not to do this. ;)

Hardware

The "Fritzing" subdirectory of the project contains schematics and a list of materials. The main ingredients are an ATmega328 controller (the one you also find in an Arduino UNO) clocked at 16MHz, the stepper motor from an old DVD burner, some diodes, some transistors, some resistors and some wire. Nothing too fancy.

Functions

The thing steps forward for a while. Then it steps backward. If you want more, toy around with the main routine.

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.