WELLCOME -----FYP S2 2011 PROJECT BLOG-----SUPERVISED BY: SIR KAMALUL FAIZIN B. MOHD SUHUT

Wednesday, March 23, 2011

AWESOME STEPPER MOTOR!!! :D

Alhamdulillah, our prayers and hard confusing moments of stepper motor have passed! Thanx to our lecturer of medical subject, sir Zul, who has giving us hard 2 hours of agonizing torture, brainstorms and much more to use stepper motor with our UNO. Okay, I am so excited to write about this post, I don't even know where to start. XD 

Okay firstly, we have to know what is the stepper motor that we're about to use. For our project, we use unipolar stepper motor, with 6 wires, colored with 2 reds, orange, yellow, brown and black. The 2 reds is actually the power wire, so it'll be connected to Vin at Arduino. We also have to bear in mind that these color coding are different according to it's manufacturer or country where it's made. (ahah!!! I bet you're just as shocked as I am when I found out about this!) 


Figure 1: Unipolar stepper motor, schematic diagram 

Then, the other 4 wires are determined by the stepper constructions at this one blog sir Zul has given us, found by him in the internet, and can be connected to the H bridge, used to control the motions of it's sequences. I cannot find the links that my lecturer gave me, but I am sure I remember how those wire are connected to the H bridge.

The H bridge is actually transistors to control the movements of the stepper motor, forward or backwards. the H-bridge is so named because it has four switching elements at the "corners" of the H and the motor forms the cross bar. The H bridge that we used to control our stepper motor is L293. The schematic diagram is shown as the figure below. 

Image: Courtesy of Texas Instrument Datasheet. 
Figure 2: L293 (H-bridge circuit diagram). 

So, pin 3 and 6 and connected to: black and yellow and pin 11 and 14 are connected to orange and brown respectively. Then, pin 4,5,12 and 13 are joined together and connected to pin GND at UNO. Pin 16 and 2 red wires are joined and connected to 5V at UNO, and pin 8, 9 and 1 are connected to 5V. Then, lastly connect pin 7 to 11, pin 2 to 10, pin 15 to 9, and pin 10 to  at the UNO. 

After all these wires are connected, upload these sketches to your ARDUINO. 




#include <Stepper.h>
// change this to the number of steps on your motor
#define STEPS 100
// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepper(STEPS, 8, 9, 10, 11);
void setup(){  // set the speed of the motor to 30 RPMs  
stepper.setSpeed(20);
}
void loop()
{
  stepper.step(1*STEPS);
  delay(2000);
  stepper.step(-1*STEPS);
  delay(2000);
}


The above sketches is from sir zul also... Check out the video below, You'll understand what it's doing.




So, there you go, our stepper motor for infusion pump configures... Only next we have to determine what is the flow rate and connects the motor to a gear to push the tube. I hope we can get this all done by the end of the month. Wish us all the luck in the world!!! Insyaallah!!! :)

2 comments:

  1. Are they utilizing Photoshop or some other plan apparatus, this is viewed as an awful device in light of the fact that resizing the logo will result into hazy picture, so ensure they are planning in a vector group. logo design service

    ReplyDelete