Tuesday, April 1, 2008

Voice controlled Stepper Motor



Main Title: Hardware Interface

Project: Robot Arm Controller Stepper Motor.

Developer: Md. Redwanur Rahman

Location: Dhaka, Bangladesh.

Date: 24 September, 2007


I am here to share knowledge with other
Aim of this project:

Using Computer you can control a stepper motor. This concept can be used for robot walking or arms movement, door opening, Machineries control etc.

Needed components

Uni-polar Stepper Motor, Transistor (TIP110), Diode (1N4001), D25 connector with wire (printer port connector), +12 v Power supply

Circuit details:

Connect D25 connector pin 2 to the circuit Pin 2 and D25 connector pin 3 to the circuit Pin 3 so on. Circuit Ground must connect to D25 connector pin 18 ~25. Transistor is used to switch Stepper motor coil. Use uni- Polar stepper motor that has 5 wires. One wire is common source and other connected to ground. Transistor is using to select which coil should be grounded. Diodes are use for to guide transistor or nothing else. Need to fiddle with coil’s wire to get the exact order. Incorrect order will cause the motor to either step irregularly, or not at all. Depend on Motor and transistor supply voltage may change.


Program Details:

Public Port, X, Y As Integer
Private Declare Function Inp Lib "inpout32.dll" Alias "Inp32" (ByVal PortAddress As Integer) As Integer
Private Declare Sub Out Lib "inpout32.dll" Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer)
Public Sub Command1_Click()
Timer1.Enabled = True
Timer2.Enabled = False
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
Timer2.Enabled = True
End Sub
Private Sub Command3_Click()
Timer1.Enabled = False
Timer2.Enabled = False
End Sub
Private Sub Command4_Click()
Out Port, 0
End
End Sub
Private Sub Form_Load()
Port = &H378 ' LPT1 Port Address
Out Port, 0
X = 0
Y = 0
Text1.Text = Y
End Sub
Private Sub Timer1_Timer()
If Y = 360 Then
Y = 0
End If
Out Port, X + 1 'Send signal to Pin 2 (D25 Connector)
Out Port, X + 2 'Send signal to Pin 3 (D25 Connector)
Out Port, X + 4 'Send signal to Pin 4 (D25 Connector)
Out Port, X + 8 'Send signal to Pin 5 (D25 Connector)
Y = Y + 1
Text1.Text = Y
End Sub
Private Sub Timer2_Timer()
If Y = 0 Then
Y = Y
Y = 360
End If
Out Port, X + 8 'Send signal to Pin 5 (D25 Connector)
Out Port, X + 4 'Send signal to Pin 4 (D25 Connector)
Out Port, X + 2 'Send signal to Pin 3 (D25 Connector)
Out Port, X + 1 'Send signal to Pin 2 (D25 Connector)
Y = Y - 1
Text1.Text = Y
End Sub

Operation:
In controller windows has a button “Left Move”, “Right Move”, “Stop” and “End”. Press buttons to control the uni-polar stepper motor.

Conclusion:
I developed this circuit and program code that published by Computer Jagat in Bangladesh, 2006.


 

No comments: