Understanding output devices

A machine which can be programmed to provide some or the other form of output which consist of different trypes of outputs like display, mechanical motion, thermal output (Heating), Sound output (Speaker)

As a mechanical engineer I alwasy wanted to know how these stepper motors works. A stepper motor which can be programmed to control accurate and precise motion. I saw stepper motor being used in some of the robots kept at the exibhition. So I have decided to run stepper motor.

Steppr motor

Image shows basic principle of stepper motor. If we programmatically make on A-A', B-B' and C-C' in sequence then stator will rotate by 15 degree after each sequence

This is a basic working of stepper motor. Currently available motor differs in a way where step angle is 1.8 degree

Recipe

Steppr Board
Stepper Motor : TRINAMIC QSH4218-51-10-049
Step angle : 1.8°
Arduino UNO
Board Layout
12 V Battery
Board modified to connect missing connections
Connecting things
After making my board ready I tried several hours to program it using Arduino and finally figured out the cause of problem. I have checked board layout and found that
Ground was not connected to LSS pin of A4953

Files for download

These designed are modified designs. All missing connections are connected
Final Board
How its connected
Everything is connected as shown in below sketch
How its programmed?
Below are c and make files which I had successfully written on attiny 44
Steps
make -f hello.stepper.bipolar.44.full.c
make -f hello.stepper.bipolar.44.full.make
for detailed steps check Week 8 | Embeded programming | March 15
Connected to MTM as a trial
After I had done with programming. I had powered this board using 12 v battery and connected to MTM which we were making.
This what is the result
Stepper motor wasnt working as expected. Instead it was jerking heavily. There was something wrong
This noise is coming from lead screw. When lead screw rotates back and forth with jerks it creates hammering effect on box nut which creates this noise
Learnings
After everything was connected. I had burned a program. But still there was something which is causing motor to contineously vibrate and it was not providing correct output as expected.
This was due to the fact that I have connected wires incorrectly.
Black, Green, Red and Blue wires of stepper motors are required to be connected correctly. To understand this I have referred to datasheet of Motor

Datasheet of Stepper motor

Model : QSH4218-51-10-049
Datasheet snapshot
on page no 6 of datasheet its explained correctly
How its working
After I connected all wires correctly see whats the result
Its connected with MTM
After it was successfull I had connected this board to MTM and found its working as expected

Files for download