Saturday, April 5, 2008

Robot will count your touches



Main Title: Hardware Interface
Project: Robot will count your touches
Developer: Md. Redwanur Rahman
Location: Dhaka, Bangladesh.
Date: 1 October, 2007

I am here to share knowledge with other.

Aim of this project
When someone touches my robot’s hand it will count how many people shake hand with it.

Needed components

C1=10uF 16V Electrolytic Capacitor
R1, R2=100K 1/4 Watt Resistor
R3=10 Meg 1/4 Watt Resistor
U1=4011 CMOS NAND Gate IC
Relay= 9V
D25 connector that is printer port connector.

Circuit details

Touch pad is just normal wires, when some one touch the touch pad then +9v relay will switch and it through signal (Supply +5v) at printer port 10. Computer get signal and program will count a touch. If someone touches my robot, every time it counts. Circuit ground (GND) must be connected to printer port pin 18~25.

Program Details
Private 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
End Sub
Private Sub Command3_Click()
Timer1.Enabled = False
End Sub
Private Sub Command4_Click()
End
End Sub
Private Sub Form_Load()
Port = &H379 ' LPT1 Status Port Address
Text1.Text = 0
Y = 0
X = 0
End Sub
Private Sub Timer1_Timer()
Y = Inp(Port)
If (Y And 1) = True Then
X = X + 1
End If
Text1.Text = X
End Sub

Conclusion:
I developed this circuit and program code that published in Computer Jagat, February, 2007 in Bangladesh. For others people help I am publishing this

No comments: