Attiny85 as a Step/Dir Stepper Motor Controller

Written by: roboguru

Picture of Attiny85 as a Step/Dir Stepper Motor Controller2014-06-16 19.44.40_info.jpg


Somewhere in Greece, someone did something never done before...


Seen those things before?

Thing: 1

Thing: 2

Thing: 3

Oh, you have! You bought one of them you say? Oh... Don't worry, I did too.

They did the job, yeah. But we paid for them much. Really much. And while our whole project would cost less than 60 bucks or euros without them, they slapped as in the face, then took our money and ran ... our precious motors...

The revenge has come...

Step 1: Some things about Steppers...

We all love steppers! They do some really nice things.

1) They ran great CNC systems, that make all kinds of goods!

2) They play music, sometimes better than humans!

Basically They do only those two things but they are enough...

We, people, often control them via computers or microcontrollers and make them do those nice things and live happily together.

Steppers differ from DC motors structurally and behaviorally. They have 4 control wires (instead of 2) and, in order to make the rotor move, you have to apply voltage to some combinations of them, and change the combinations over small (really small) time intervals (maybe every 0.01 seconds or less).

Why is that, you may ask. But it is for PRECISION! The god of productive machinery! Every time you drive the stepper wires with a correct combination the rotor moves by a certain amount of degrees... That way you can tell where the rotor is by just measuring how many such voltage combinations you have applied to the motor. Knowing the position of something without any kind of feedback is Really Something!!!

(You can read much more here. There is a decent explanation of microstepping inside. the thing that this project CAN'T do at the time of writing)